On Sun, Jul 02, 2006 at 02:12:39PM +0300, Gilad Ben-Yossef wrote:
> Howdie list,
> 
> I'm trying to build the be-old, end-all exception signal signal handler for 
> SIGSEGV, SIGILL, SIGFPE and their ilk. One thing that will be useful to do 
> in such a handler is dump the state of the CPU registers when and where the 
> program segfauled etc. Sadly, despite zealous code reviews and much 
> googling I have not being able to find a way to do this.

IIRC, you want to set your signal handler with sigaction(), with
sa_sigaction sent to your handler. Then the third parameter to
sa_sigaction is the context, including the register context. See
getcontext() for the definition of the context structure.

Cheers,
Muli

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to