Re: How to dump more info when received a SIGSEGV signal?
- From: Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx>
- Date: Fri, 27 Jan 2006 08:50:35 -0800
"cyril.li@xxxxxxxxx" <cyril.li@xxxxxxxxx> writes:
> However the result is not expected, e.g. the eip is not the the fault
> instruction when I use objdump to see the binary.
The ctx is filled only when you *do not* specify SA_SIGINFO.
When you do specify it, you get a single siginfo_t* as an argument
instead (so your program as-written just reads random garbage off
the stack).
> m.sa_flags = SA_SIGINFO;
Make that 'm.sa_flags = 0;' and try again.
Note that you are using undocumented and non-portable kernel feature.
You'll be better off using SA_SIGINFO and the resulting siginfo_t*,
which is still not very portable, but at least documented.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- References:
- How to dump more info when received a SIGSEGV signal?
- From: cyril.li@xxxxxxxxx
- How to dump more info when received a SIGSEGV signal?
- Prev by Date: Re: How to dump more info when received a SIGSEGV signal?
- Next by Date: Re: Cross-platform, the freedom to choose any computer
- Previous by thread: Re: How to dump more info when received a SIGSEGV signal?
- Next by thread: Re: Cross-platform, the freedom to choose any computer
- Index(es):
Relevant Pages
|