This is the mail archive of the gdb@sourceware.org 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: Stepping out of signal handler problem


> Date: Fri, 16 May 2008 14:48:36 -0400
> From: Aleksandar Ristovski <aristovski@qnx.com>
> 
> Mark Kettenis wrote:
> >> From: Aleksandar Ristovski <aristovski@qnx.com>
> >> Date:  Fri, 16 May 2008 12:26:43 -0400
> >>
> >> This makes question 2: Is the only way to implement this similar to
> >> linux-nat (scanning for sigreturn kernel call)? Is there anything
> >> 'cleaner'?
> > 
> > The clean way of doing this is provide proper unwind info for the
> > signal trampoline.  This shouldn't be too difficult if your signal
> > trampolines live in libc, and quite a bit harder if they are in the
> > kernel.
> > 
> 
> What is the preferred way: frame_unwind_append_sniffer or
> tramp_frame_prepend_unwinder?

Neither.  I was referring to the possibility to generate DWARF2 frame
info for the signal trampoline.  This is what is done in glibc, the
Linux C library.  We also have a test for this in the GDB testsuite
(gdb.arch/i386-signal.c).

The nice thing about this approach is that it avoids hardcoding the
signal frame layout in GDB, making it possible to change the
implementation without having to adjust GDB.


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