This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Re: Today's gdb failed
- To: tromey at redhat dot com, gdb-patches at sources dot redhat dot com
- Subject: [PATCH] Re: Today's gdb failed
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Thu, 8 Nov 2001 01:06:11 +0100
- CC: gdb at sources dot redhat dot com
- References: <87snbr2zzu.fsf@creche.redhat.com> <3BE8ABC6.9080300@cygnus.com> <878zdjp2ik.fsf@creche.redhat.com> <s3izo5ymx9v.fsf@soliton.wins.uva.nl> <87vggmcw87.fsf@creche.redhat.com>
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. */