diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-05-31 16:25:13 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-05-31 16:25:13 +0000 |
commit | 709134492b9df0a6fc37e9d9d4a18e4ebc32b98b (patch) | |
tree | 3681735c32326a474a484bbeb8358e7681eefea2 /gdb | |
parent | 2b5e07495d88a5301fa2d3ba7780246e79582c51 (diff) | |
download | gdb-709134492b9df0a6fc37e9d9d4a18e4ebc32b98b.zip gdb-709134492b9df0a6fc37e9d9d4a18e4ebc32b98b.tar.gz gdb-709134492b9df0a6fc37e9d9d4a18e4ebc32b98b.tar.bz2 |
* 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 6 |
2 files changed, 7 insertions, 3 deletions
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 <kettenis@gnu.org> + * 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; } |