Revision 5b50e790 target-microblaze/gdbstub.c
b/target-microblaze/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 |
static int cpu_gdb_read_register(CPUMBState *env, uint8_t *mem_buf, int n)
|
|
24 |
int mb_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|
22 | 25 |
{ |
26 |
MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); |
|
27 |
CPUMBState *env = &cpu->env; |
|
28 |
|
|
23 | 29 |
if (n < 32) { |
24 | 30 |
return gdb_get_reg32(mem_buf, env->regs[n]); |
25 | 31 |
} else { |
... | ... | |
28 | 34 |
return 0; |
29 | 35 |
} |
30 | 36 |
|
31 |
static int cpu_gdb_write_register(CPUMBState *env, uint8_t *mem_buf, int n)
|
|
37 |
int mb_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|
32 | 38 |
{ |
33 |
MicroBlazeCPU *cpu = mb_env_get_cpu(env); |
|
34 |
CPUClass *cc = CPU_GET_CLASS(cpu); |
|
39 |
MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); |
|
40 |
CPUClass *cc = CPU_GET_CLASS(cs); |
|
41 |
CPUMBState *env = &cpu->env; |
|
35 | 42 |
uint32_t tmp; |
36 | 43 |
|
37 | 44 |
if (n > cc->gdb_num_core_regs) { |
Also available in: Unified diff