This is the mail archive of the gdb@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]
Other format: [Raw text]

Re: [RFC] Non-executable stack on SPARC


> Date: Mon, 26 Jan 2004 13:42:30 +0100 (CET)
> From: Mark Kettenis <kettenis@chello.nl>
> 
> With my patch,
> or with the suggestions I made below, GDB will usually still see
> SIGSEG under normal circumstances.  GDB will only convert such a
> signal into SIGTRAP if there's a breakpoint inserted at the point
> where the inferior stopped.

Where is this last condition tested to be true?  The if clause where
you wanted to add SIGSEGV doesn't test that, I think.

> As to punting the SIGSEGV to SIGTRAP conversion to the architecture:
> we could do this in target_wait() or target_wait_hook(), but that
> would offload it to the target we're running on and not to the
> architecture.

So perhaps we need an architecture way to do such conversions.

My line of thought is that it's IMHO fundamentally wrong to push
target- or architecture-specific details into the application level of
GDB, which is what infrun.c is.  infrun.c should deal with high-level
logic of handling a stopped inferior, it should not IMHO know about
intricacies of specific targets.


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