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]
Other format: [Raw text]

Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder


On Sun, Feb 29, 2004 at 08:33:11PM -0500, Andrew Cagney wrote:
> >On Sun, Feb 29, 2004 at 08:05:28PM -0500, Andrew Cagney wrote:
> >
> >>>It appears to work (but doesn't have much effect without an rs6000 
> >>>unwinder).
> >>>
> >>>One question (and to follow up my earlier post) is there a better way of 
> >>>doing this:
> >>>
> >>>+  if (frame_pc_unwind (next_frame) > 0x7f000000)
> >>>+    /* Assume anything that is vaguely on the stack is a signal
> >>>+       trampoline.  */
> >>>+    return &ppcnbsd_sigtramp_unwind;
> >>>
> >>>ok?, eventually for 6.1?
> >
> >
> >For other targets, we grub in the code for the sigtramp instruction
> >sequence.  I'm betting it's fixed for NetBSD too?  ppc_linux_in_sigtramp
> >does this.
> 
> That's potentially expensive - there should also be a predicate like the 
> above before the stack is read checked.

Then you risk both sigaltstack and thread support.  Thread stacks can
end up literally anywhere - and do!

It might be possible to compare to the current stack pointer, if you're
convinced the sigreturn sequence will remain on the stack.  I don't
know anything about NetBSD - for e.g. i386 GNU/Linux, this isn't
necessarily true, but that's handled specially.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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