[PATCH] Fix i386 MMX register name printing
Mark Kettenis
kettenis@chello.nl
Sat May 31 16:25:00 GMT 2003
Subject says it all.
Committed.
Mark
Index: ChangeLog
from 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.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.147
diff -u -p -r1.147 i386-tdep.c
--- i386-tdep.c 31 May 2003 16:08:05 -0000 1.147
+++ i386-tdep.c 31 May 2003 16:23:25 -0000
@@ -125,11 +125,11 @@ 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;
}
More information about the Gdb-patches
mailing list