Revision 5b50e790 target-arm/gdbstub.c
b/target-arm/gdbstub.c | ||
---|---|---|
17 | 17 |
* You should have received a copy of the GNU Lesser General Public |
18 | 18 |
* License along with this library; if not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
*/ |
20 |
#include "config.h" |
|
21 |
#include "qemu-common.h" |
|
22 |
#include "exec/gdbstub.h" |
|
20 | 23 |
|
21 | 24 |
/* Old gdb always expect FPA registers. Newer (xml-aware) gdb only expect |
22 | 25 |
whatever the target description contains. Due to a historical mishap |
... | ... | |
24 | 27 |
We hack round this by giving the FPA regs zero size when talking to a |
25 | 28 |
newer gdb. */ |
26 | 29 |
|
27 |
static int cpu_gdb_read_register(CPUARMState *env, uint8_t *mem_buf, int n)
|
|
30 |
int arm_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|
28 | 31 |
{ |
32 |
ARMCPU *cpu = ARM_CPU(cs); |
|
33 |
CPUARMState *env = &cpu->env; |
|
34 |
|
|
29 | 35 |
if (n < 16) { |
30 | 36 |
/* Core integer register. */ |
31 | 37 |
return gdb_get_reg32(mem_buf, env->regs[n]); |
... | ... | |
53 | 59 |
return 0; |
54 | 60 |
} |
55 | 61 |
|
56 |
static int cpu_gdb_write_register(CPUARMState *env, uint8_t *mem_buf, int n)
|
|
62 |
int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|
57 | 63 |
{ |
64 |
ARMCPU *cpu = ARM_CPU(cs); |
|
65 |
CPUARMState *env = &cpu->env; |
|
58 | 66 |
uint32_t tmp; |
59 | 67 |
|
60 | 68 |
tmp = ldl_p(mem_buf); |
Also available in: Unified diff