Revision eabfc239 gdbstub.c
b/gdbstub.c | ||
---|---|---|
562 | 562 |
|
563 | 563 |
#elif defined (TARGET_MICROBLAZE) |
564 | 564 |
|
565 |
static int cpu_gdb_read_register(CPUMBState *env, uint8_t *mem_buf, int n) |
|
566 |
{ |
|
567 |
if (n < 32) { |
|
568 |
GET_REG32(env->regs[n]); |
|
569 |
} else { |
|
570 |
GET_REG32(env->sregs[n - 32]); |
|
571 |
} |
|
572 |
return 0; |
|
573 |
} |
|
574 |
|
|
575 |
static int cpu_gdb_write_register(CPUMBState *env, uint8_t *mem_buf, int n) |
|
576 |
{ |
|
577 |
MicroBlazeCPU *cpu = mb_env_get_cpu(env); |
|
578 |
CPUClass *cc = CPU_GET_CLASS(cpu); |
|
579 |
uint32_t tmp; |
|
565 |
#include "target-microblaze/gdbstub.c" |
|
580 | 566 |
|
581 |
if (n > cc->gdb_num_core_regs) { |
|
582 |
return 0; |
|
583 |
} |
|
584 |
|
|
585 |
tmp = ldl_p(mem_buf); |
|
586 |
|
|
587 |
if (n < 32) { |
|
588 |
env->regs[n] = tmp; |
|
589 |
} else { |
|
590 |
env->sregs[n - 32] = tmp; |
|
591 |
} |
|
592 |
return 4; |
|
593 |
} |
|
594 | 567 |
#elif defined (TARGET_CRIS) |
595 | 568 |
|
596 | 569 |
static int |
Also available in: Unified diff