Solaris SIGSEGV signal handlers

  • Follow


We have a Modula-2 development system and we are attempting to implement a 
post mortem debug capability for SIGSEGV and others. We install a signal 
handler with sigaction and one of the parameters to the signal handler is a 
ucontext_t type. In this type you can get the register context except the 
gwins field is always NULL so we cannot get all registers. We also found 
this with C compiled programs. Some documentation in the Solaris headers 
said that if the gwins field was NULL then the register windows are on the 
stack. The question is where? We have found these registers at 128 bytes 
from the signal handler frame pointer. We can't just assume this would 
always be the case. Can we?

So the bottom line is that from a signal handler we would like to be able to 
save the full register context from the point of the signal exception.

Thanks,
Norman Black
Saperion Inc. 


0
Reply Norman 1/5/2006 4:40:35 PM

Never mind. When you have a proc that is passed a context record you get 
into a certain mindset. The context record does have the sp register which 
gives me the window I am interested in.

Norman 


0
Reply Norman 1/5/2006 5:15:37 PM


1 Replies
434 Views

(page loaded in 0.04 seconds)

Similiar Articles:











7/15/2012 7:41:51 PM


Reply: