aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-06-03 13:21:49 +0300
committerAvi Kivity <avi@redhat.com>2009-06-03 13:25:06 +0300
commit0936eb0a32e9442e6722bd517d4bfa43278cebaf (patch)
tree56d987c9f50c3111e087097304d9ee4e8c511c6c /gdbstub.c
parentProvide a kvm-free pic implementation (diff)
parentUpdate maintainer list. (diff)
downloadqemu-kvm-0936eb0a32e9442e6722bd517d4bfa43278cebaf.tar.gz
qemu-kvm-0936eb0a32e9442e6722bd517d4bfa43278cebaf.tar.bz2
qemu-kvm-0936eb0a32e9442e6722bd517d4bfa43278cebaf.zip
Merge branch 'master' of git://git.sv.gnu.org/qemu
* 'master' of git://git.sv.gnu.org/qemu: (40 commits) Update maintainer list. Install keymaps from new location vvfat: one more missing BlockDriver C99 initializer conversion Move keymaps into pc-bios kvm: Mark full address range dirty on live migration start Add detection of pthread library name User networking: Show active connections User Networking: Enable removal of redirections Allow monitor interaction when using migrate -exec fully split aio_pool from BlockDriver qcow: add qcow_aio_setup helper raw-posix: fix hdev_create fix raw_pread_aligned return value VNC: Fix memory allocation (wrong structure size). Drop bdrv_create2 qcow2: Update multiple refcounts at once qcow2: Refactor update_refcount qcow/qcow2: Drop synchronous qcow_write() e1000: Ignore reset command Fix output of uninitialized strings ... Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 0a7abab1c..9d99f7540 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1157,6 +1157,36 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n)
return 4;
}
+#elif defined (TARGET_MICROBLAZE)
+
+#define NUM_CORE_REGS (32 + 5)
+
+static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n)
+{
+ if (n < 32) {
+ GET_REG32(env->regs[n]);
+ } else {
+ GET_REG32(env->sregs[n - 32]);
+ }
+ return 0;
+}
+
+static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n)
+{
+ uint32_t tmp;
+
+ if (n > NUM_CORE_REGS)
+ return 0;
+
+ tmp = ldl_p(mem_buf);
+
+ if (n < 32) {
+ env->regs[n] = tmp;
+ } else {
+ env->sregs[n - 32] = tmp;
+ }
+ return 4;
+}
#elif defined (TARGET_CRIS)
#define NUM_CORE_REGS 49
@@ -1529,6 +1559,8 @@ static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
s->c_cpu->pc = pc;
#elif defined (TARGET_MIPS)
s->c_cpu->active_tc.PC = pc;
+#elif defined (TARGET_MICROBLAZE)
+ s->c_cpu->sregs[SR_PC] = pc;
#elif defined (TARGET_CRIS)
s->c_cpu->pc = pc;
#elif defined (TARGET_ALPHA)