Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix OpenBSD/i386 signal trampoline recognition
@ 2004-08-05  2:02 Mark Kettenis
  2004-08-05 14:00 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2004-08-05  2:02 UTC (permalink / raw)
  To: gdb-patches

The signal trampoline has changed in OpenBSD 3.5-current.

Committed,

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
	* i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal
	trampoline in OpenBSD 3.5-current.

Index: i386obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v
retrieving revision 1.18
diff -u -p -r1.18 i386obsd-tdep.c
--- i386obsd-tdep.c 22 May 2004 15:16:22 -0000 1.18
+++ i386obsd-tdep.c 4 Aug 2004 21:04:59 -0000
@@ -78,15 +78,25 @@ i386obsd_sigtramp_p (struct frame_info *
   if (find_pc_section (pc) != NULL)
     return 0;
 
-  /* If we can't read the instructions at START_PC, return zero.  */
+  /* Allocate buffer.  */
   buf = alloca (sizeof sigreturn);
-  if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+
+  /* If we can't read the instructions at START_PC, return zero.  */
+  if (target_read_memory (start_pc + 0x0a, buf, sizeof sigreturn))
     return 0;
 
   /* Check for sigreturn(2).  */
   if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
     return 1;
 
+  /* If we can't read the instructions at START_PC, return zero.  */
+  if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+    return 0;
+
+  /* Check for sigreturn(2) (again).  */
+  if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
+    return 1;
+
   return 0;
 }
 \f


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-05 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-05  2:02 [PATCH] Fix OpenBSD/i386 signal trampoline recognition Mark Kettenis
2004-08-05 14:00 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox