Re: [?] Find the address of a segfault in userland

David Woodhouse (Dave@imladris.demon.co.uk)
Sat, 28 Feb 1998 21:13:58 +0000


jasond@cdc.net said:
> void sigsegv_handler(int num, struct sigcontext info) /* ignore the
> compiler whinings :D */ {
> printf("EIP: %x\n", info.eip); }

That doesn't give the address that caused the fault, though - does the sigsegv
handler have to disassemble the offending instruction and work out the
faulting address itself?

---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
Dave@imladris.demon.co.uk http://dwmw2.robinson.cam.ac.uk
finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu