From 709134492b9df0a6fc37e9d9d4a18e4ebc32b98b Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 31 May 2003 16:25:13 +0000 Subject: * i386-tdep.c (i386_register_name): Check for MMX registers first. Fixes a bug where GDB would print the wrong register names for targets without SSE. --- gdb/ChangeLog | 4 ++++ gdb/i386-tdep.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e4404c4..134186e2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2003-05-31 Mark Kettenis + * i386-tdep.c (i386_register_name): Check for MMX registers first. + Fixes a bug where GDB would print the wrong register names for + targets without SSE. + * x86-64-tdep.c (X86_64_NUM_SAVED_REGS): Set to X86_64_NUM_GREGS. (x86_64_sigtramp_frame_cache): Use `sc_reg_offset' to find saved registers. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 7daea31..1cbe043 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -125,12 +125,12 @@ i386_mxcsr_regnum_p (int regnum) const char * i386_register_name (int reg) { - if (reg >= 0 && reg < i386_num_register_names) - return i386_register_names[reg]; - if (i386_mmx_regnum_p (reg)) return i386_mmx_names[reg - MM0_REGNUM]; + if (reg >= 0 && reg < i386_num_register_names) + return i386_register_names[reg]; + return NULL; } -- cgit v1.1