-----------------------------------><-------------------------------------- --- 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