This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix Linux/x86 register storing code
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH] Fix Linux/x86 register storing code
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Thu, 21 Dec 2000 21:22:18 +0100
FYI, turns out this is necessary after all. Apparently it a register
store can happen before a register fetch when messing with the return
value of a function in GDB. Checked in.
Mark
2000-12-21 Mark Kettenis <kettenis@gnu.org>
* i386-linux-nat.c (store_fpxregs): Add code to detect support for
the PTRACE_GETFPXREGS request, and return zero if it's not.
Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.18
diff -u -p -r1.18 i386-linux-nat.c
--- i386-linux-nat.c 2000/09/22 17:45:47 1.18
+++ i386-linux-nat.c 2000/12/21 20:12:48
@@ -469,7 +469,15 @@ store_fpxregs (int tid, int regno)
return 0;
if (ptrace (PTRACE_GETFPXREGS, tid, 0, &fpxregs) == -1)
- perror_with_name ("Couldn't read floating-point and SSE registers");
+ {
+ if (errno == EIO)
+ {
+ have_ptrace_getfpxregs = 0;
+ return 0;
+ }
+
+ perror_with_name ("Couldn't read floating-point and SSE registers");
+ }
fill_fpxregset (&fpxregs, regno);