Hi,

I apologize if this is not the right list for this kind of questions,please
point me to a better one that is the case.

Now,what I want to do is to generate stack traces from a running program.
That is no problem with gcc's __builtin_frame_address function. But
I'm having problem getting that to work from a signal handler,in this case
for SIGSEGV.

Output from test program:

bash-2.05b$ ./dump 
looking up address 0x80488c4 in frame 0xbfbff6a8
looking up address 0xbfbfffac in frame 0xbfbff870
looking up address 0x8048621 in frame 0xbfbff8bc
ext Stack: handle_SEGV_ext 0xbfbfffac _start 
Abort trap (core dumped)

address is the return address of previous function called and frame is
the stack frame.

I generate the SEGV from main. But as you can see I can't get the address
of the function that generated the signal/exception/trap.
I tried looking into /sys/i386/i386/trap.c to look for hints on how to get
the adress where the fault happened,but I was kind of lost :)

So my question is,is it possible to find out the address where a fault occured
from userspace?

Please reply to me directly since I'm not on the list.

Thanks in advance,
Daniel Lundqvist

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to