Re: How to dump more info when received a SIGSEGV signal?
- From: Andrei Voropaev <avorop@xxxxxxx>
- Date: Fri, 27 Jan 2006 08:25:11 +0000 (UTC)
On 2006-01-27, cyril.li@xxxxxxxxx <cyril.li@xxxxxxxxx> wrote:
[...]
> The processor is IA32 and Linux kernel is 2.6
>
> ------------------------------------------------------------------------------------------
>
> void segv_handler(int sig, struct sigcontext ctx)
> {
> printf("eip = %x\n", ctx.eip);
Hm. Very interesting. My man page for sigaction on linux does not define
struct sigcontext. Instead it talks about siginfo_t and that structure
does not have eip field.
[...]
> m.sa_flags = SA_SIGINFO;
> m.sa_handler = (void (*)(int))segv_handler;
Well, usually if SA_SIGINFO flag is set, then sa_sigaction field shall
be used.
Aha, searching the Web shows that this structure used to be used on
NetBSD, but later releases got rid of it and use siginfo_t instead.
Read man pages! :)
--
Minds, like parachutes, function best when open
.
- Follow-Ups:
- Re: How to dump more info when received a SIGSEGV signal?
- From: John Reiser
- Re: How to dump more info when received a SIGSEGV signal?
- 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: How to dump more info when received a SIGSEGV signal?
- Next by Date: Re: How to dump more info when received a SIGSEGV signal?
- Previous by thread: How to dump more info when received a SIGSEGV signal?
- Next by thread: Re: How to dump more info when received a SIGSEGV signal?
- Index(es):