finding address that caused SEGV
jack at dali.gatech.edu
jack at dali.gatech.edu
Fri Dec 7 17:11:26 AEST 1990
Hi. I'm writing a program that uses dynamically loaded
code. One of the things i want it to do is be able to recover
from errors caused by the loaded code. I have a simple routine that
that uses setjmp/longjmp to recover when a SEGV occurs. What i'm
looking for is code that will allow me to determine what routine
caused the SEGV or other error signal, so that the error can be
logged and the code unloaded. Preferably a canned routine that
understands signal handlers. If anyone has a routine that returns
the values of the registers in a array, that might do instead. I'm
using a SparcStation running sunOS 4.0.3. The dynamic loader code
is dld by Wilson Ho (i think) available from GNU.
I've looked at the kvm calls for reading the process space
and the call kvm_getu returns, among other things, the register values.
However, i haven't been able to get them working. I'm not sure i'm
calling them right. Anyway, if anyone knows of code that would allow
me to do this, i would greatly appreciate pointer to it. Reply by
mail, preferably. I'll summarize if there is interest. Thanks.
tom
More information about the Comp.unix.programmer
mailing list