This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
[PATCH] Re: Today's gdb failed
From: Tom Tromey <tromey@redhat.com>
Date: 07 Nov 2001 10:43:52 -0700
>>>>> "Mark" == Mark Kettenis <kettenis@science.uva.nl> writes:
>> On my system, HAVE_PTRACE_GETFPXREGS is not defined.
>> This means that HAVE_SSE_REGS is not defined.
>> So the value of the above expression seems to be 32.
>> However regnum is 41.
Mark> It means that I broke it. Chaninging
Mark> #define I386_LINUX_ORIG_EAX_REGNUM 41
Mark> into
Mark> #define I386_LINUX_ORIG_EAX_REGNUM (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS)
Thanks, that worked for me.
Thanks for testing it. I committed the attached patch.
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.1730
diff -u -p -r1.1730 ChangeLog
--- ChangeLog 2001/11/07 22:42:28 1.1730
+++ ChangeLog 2001/11/08 00:01:54
@@ -1,3 +1,9 @@
+2001-11-08 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Define in
+ terms of NUM_GREGS, NUM_FREGS and NUM_SSE_REGS instead of
+ hardcoding the register number.
+
2001-11-07 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (USE_STRUCT_CONVENTION): Default to
Index: config/i386/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-linux.h,v
retrieving revision 1.15
diff -u -p -r1.15 tm-linux.h
--- tm-linux.h 2001/11/04 14:06:16 1.15
+++ tm-linux.h 2001/11/08 00:01:54
@@ -34,7 +34,7 @@
/* Register number for the "orig_eax" pseudo-register. If this
pseudo-register contains a value >= 0 it is interpreted as the
system call number that the kernel is supposed to restart. */
-#define I386_LINUX_ORIG_EAX_REGNUM 41
+#define I386_LINUX_ORIG_EAX_REGNUM (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS)
/* Adjust a few macros to deal with this extra register. */