Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [RFC] Non-executable stack on SPARC
@ 2004-01-25 23:50 Mark Kettenis
  2004-01-25 23:59 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Mark Kettenis @ 2004-01-25 23:50 UTC (permalink / raw)
  To: gdb

A while ago, I established that getting inferior function calls on
SPARC working with a non-executable stack is remarkably simple.  Just
acknowledging that breakpoint instructions may cause SIGSEGV, as per
the attached patch, is enough.  However, some people were afraid that
blindly applying this patch might cause some problems on other
targets.  I think there are two alternatives:

1. Only check for SIGSEGV if the target in question uses "ON_STACK"
   for its call_dummy_location.

2. Add a new method to the architecture vector to check whether a
   particular signal may have been the result of a breakpoint
   instruction.  Suggested name & signature:

   int breakpoint_signal_p (struct gdbarch *gdbarch, int signal)

Preferences?

I'd like to get this sorted before 6.1, since OpenBSD/sparc has a
non-executable stack, and some people are running SPARC Solaris with a
non-executable stack too.

Mark


Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.122
diff -u -p -r1.122 infrun.c
--- infrun.c 25 Nov 2003 16:01:36 -0000 1.122
+++ infrun.c 25 Jan 2004 23:37:01 -0000
@@ -1864,6 +1864,7 @@ handle_inferior_event (struct execution_
   if (stop_signal == TARGET_SIGNAL_TRAP
       || (breakpoints_inserted &&
 	  (stop_signal == TARGET_SIGNAL_ILL
+	   || stop_signal == TARGET_SIGNAL_SEGV
 	   || stop_signal == TARGET_SIGNAL_EMT))
       || stop_soon == STOP_QUIETLY
       || stop_soon == STOP_QUIETLY_NO_SIGSTOP)


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

end of thread, other threads:[~2004-02-02 18:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 23:50 [RFC] Non-executable stack on SPARC Mark Kettenis
2004-01-25 23:59 ` Daniel Jacobowitz
2004-01-26  6:51   ` Eli Zaretskii
2004-01-26  6:51 ` Eli Zaretskii
2004-01-26 12:42   ` Mark Kettenis
2004-01-27  8:16     ` Eli Zaretskii
2004-02-01 17:48       ` Mark Kettenis
2004-02-01 20:13         ` Eli Zaretskii
2004-02-02 18:37           ` Andrew Cagney
2004-01-26 16:21 ` Andrew Cagney
2004-01-27  8:00   ` Eli Zaretskii
2004-02-01 17:54   ` Mark Kettenis
2004-02-02 18:27     ` Andrew Cagney

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