libunwind-devel
[Top][All Lists]
Advanced

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

RE: [libunwind] Signal handlers and unw_resume


From: David Mosberger
Subject: RE: [libunwind] Signal handlers and unw_resume
Date: Tue, 24 Aug 2004 01:51:56 -0700

>>>>> On Mon, 23 Aug 2004 12:33:22 +0100, "Thomas Hallgren" <address@hidden> 
>>>>> said:

  Thomas> Sigh...  I know that you don't like the idea of using the
  Thomas> context passed to the signal handler to initialize the
  Thomas> cursor so I'd like to try another solution with you. Assume
  Thomas> the flow that I just outlined (i.e.  unw_getcontext(),
  Thomas> unw_init_local(), and some unw_step() calls) but instead of
  Thomas> the unw_resume() at the end, I would call:

  Thomas> void unw_resume_to_sigcontext(unw_cursor_t* curosr,
  Thomas> ucontext_t* sigcontext);

  Thomas> This method would update the sigcontext based on the current
  Thomas> state of the cursor. It would then return without any
  Thomas> jump. So when I do a normal return from the signal handler
  Thomas> and the signal frame thus jumps by restoring the ucontext,
  Thomas> I'd end up at the position where the unw_cursor was at the
  Thomas> time when I called the unw_resume_to_sigcontext.

  Thomas> Can you see that function implemented?

I guess I'm missing the point of this.  How would this be any
different from simply doing an unw_resume() from the signal-handler?

        --david


reply via email to

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