This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix i386 MMX register name printing
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 31 May 2003 18:25:33 +0200 (CEST)
- Subject: [PATCH] Fix i386 MMX register name printing
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;
}