[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] Unwinding using the context passed to a signal handler (

From: Matthieu Delahaye
Subject: Re: [libunwind] Unwinding using the context passed to a signal handler (doesn't work)
Date: Mon, 22 Mar 2004 10:08:59 +0100
User-agent: Mutt/1.5.4i

On Wed, Mar 17, 2004 at 04:18:45PM +0100, Johan Walles wrote:
> Hi!
> I'm trying to create a stack dump from inside a signal handler.  The 
> context I'm using is the one passed as the third parameter to the signal 
> handler.  I'm doing this on Linux / ia64 using libunwind 0.96.
> I built my program using:
>   gcc -Wall -Werror -g unwind.c -o unwind -lunwind
> What the attached program does is basically this:

The attached program and tests/bt.c are both using unw_get_proc_name.
The "Thread and signal safety" section of the related man page specify
it is not safe to use from a signal handler. 
In this two files, this function is used inside of a signal handler.

So my questions:
- What is dangerous by calling this function inside of a signal handler?
- What is the safiest way? Dumping the stack and resume the control into
  "normal" mode to analyse the stack once again? [If it is possible].


reply via email to

[Prev in Thread] Current Thread [Next in Thread]