[Qemu-devel] [PATCH] fix bugs in gdbstub for TARGET_X86_64
From:
MingyanGuo
Subject:
[Qemu-devel] [PATCH] fix bugs in gdbstub for TARGET_X86_64
Date:
Sat, 5 May 2007 02:44:49 +0800
hi all,
The gdbstub (option -s) of QEMU is not useable for target amd64 full system emulation(TARGET_X86_64) on QEMU version 0.9.0. I have an ugly/dirty fix here. Any guys review(and improve) and merge it in
the CVS tree ?
-----------------------------------><-------------------------------------- --- qemu-0.9.0/gdbstub.c Tue Feb 6 07:01:54 2007 +++ gdbstub.c Sat May 5 02:22:39 2007 @@ -223,63 +223,83 @@
#if defined(TARGET_I386)
+#if defined(TARGET_X86_64) +/* + * XXX + * This is a ugly hack (in my opinion...), is it better to redefine R_EXX + * in target-i386/cpu.h to match 'amd64_regnum' in gdb (gdb/amd64-
tdep.h)? + */ +static int regnames[CPU_NB_REGS] = { R_EAX, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI, + R_EBP, R_ESP, 8, 9, 10, 11, 12, 13, 14, 15 }; +#endif static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf)
{ - uint32_t *registers = (uint32_t *)mem_buf; - int i, fpus; + target_ulong *registers = (target_ulong *)mem_buf; + int i, fpus, regno0, regno1, regno2;
Regards, MingyanGuo -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind.
---------Bertrand Russell
[Prev in Thread]
Current Thread
[Next in Thread]
[Qemu-devel] [PATCH] fix bugs in gdbstub for TARGET_X86_64,
MingyanGuo<=