Re: [RFC] Non-executable stack on SPARC

Eli Zaretskii
2004-01-27T08:00:04Z

> Date: Mon, 26 Jan 2004 11:21:01 -0500
> From: Andrew Cagney <cagney@gnu.org>
>
> A more robust check would be to confirm that a breakpoint is at that
> address (naturally ignoring decr pc after break :-).

If we can do that, why do we also test the signal that was reported
when the inferior stopped? What you say sounds like it would be
enough to verify that the place where it stopped has a breakpoint, and
decide right there and then that it stopped because the breakpoint
breaks, no matter what TARGET_SIGNAL_* was reported.

> > 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)
>
> For this, that would be wrong. The target, in combination with the
> breakpoint code, determines if a breakpoint leads to a sigsegv.

I'm not sure I understand: are you saying that this is a target
issue, not an architecture issue?