GDB backtraces throught signal handlers & glibc

Mark Kettenis kettenis@wins.uva.nl
Sun Jan 30 09:40:00 GMT 2000


Hi Ulrich,

While hacking on GDB, I noticed that backtraces through signal
handlers don't work with the current glibc.  The reason is abvious;
GDB isn't aware of the SA_RESTORER functionality.

With the current implementation of sigaction for Linux/i386, it is not
difficult to make it work again.  However, intimate knowledge of the
particular implementation used in glibc is necessary.  To make things
work in a reliable way, GDB needs to know the names of the restorer
functions (__restore and __restore_rt) and the way they're
implemented.

Is it reasonable to expect no gratitious changes in this bit of code?
I understand that you cannot guarantee that this code will never
change, but since the code in these functions is pretty much dictated
by the kernel, it wouldn't be very likely that changes are necessary
unless the kernel implementation changes, wouldn't it?

If you agree, would you accept a patch that adds some documentation to
the code telling people to think twice before changing it?

Mark


More information about the Libc-hacker mailing list