This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix Linux/x86 register storing code


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);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]