In article >3987CA65.B4BDBCD2@transmeta.com>,
H. Peter Anvin <firstname.lastname@example.org> wrote:
>I have a program which relies on being able to derive the address of
>a SIGSEGV. To do that, I use the SA_SIGINFO option to sigaction() and
>read out the faulting address from the si_addr parameter of the siginfo
>structure (second argument.) I also check si_code for SEGV_ACCERR.
>Under 2.4 kernels, this works great. However, under 2.2.17pre15 (I
>downgraded because of stability problems) and glibc 2.1.2, si_code
>and si_addr are both 0. Is this simply unimplemented in 2.2 kernels,
>or is this a bug?
Well, I can't help you with that, but I know of an alternative for
i386 at least:
void segv_handler(int sig, struct sigcontext ctx)
void *addr = (void *)ctx.eip;
-- Cistron Certified Internetwork Expert #1. Think free speech; drink free beer.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:08 EST