[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libunwind] RE: BACKTRACE for coredump in signal handler does come prope
[libunwind] RE: BACKTRACE for coredump in signal handler does come proper for IA-64.
Sat, 20 Mar 2004 12:43:32 +0530
Is there a reference document for this special handling or which
section of the IA-64 document should be refered to get this information.
Thanks and Regards
From: David Mosberger [mailto:address@hidden
Sent: Saturday, March 20, 2004 6:23 AM
To: Kotian, Deepak
Cc: address@hidden; address@hidden
Subject: RE: BACKTRACE for coredump in signal handler does come proper
>>>>> On Sat, 20 Mar 2004 01:35:14 +0530, "Kotian, Deepak" <address@hidden>
Deepak> What is so special about signal handler, I need this
Deepak> information as well. And this is for core analysis.
Signal-handlers are special because they interrupt execution
asynchronously. Because of this, the signal-handler needs to be
invoked via a trampoline which takes care of preserving all the state
of the routine whose execution is interrupted.
Older IA-64 Linux kernels make the unwind info for the signal
trampoline available via the getunwind() system call. In newer Linux
kernels, the unwind info is made available via a "virtual dynamic
shared object" (vDSO) which looks like a normal shared library, except
that it's provided by the kernel.
In addition, since the signal trampoline does some things that cannot
be described directly via unwind info, the unwinder needs to have some
special-case code to unwind across signal-handlers.
Libunwind takes care of all of this automatically.
If you want to look at a simple example that unwinds across a signal
handler, take a look at tests/bt.c.