Re: Determining address which caused SEGV

From: Patrick J. LoPresti (patl@cag.lcs.mit.edu)
Date: Fri Jan 07 2000 - 19:16:32 EST


Jamie Lokier <lkd@tantalophile.demon.co.uk> writes:

> You can just do this:
>
> void user_segv_handler (int sig, struct sigcontext_struct context)
> {
> unsigned long fault_address = context.cr2;
> // ...
> }

Ah. So what is cr2, and where is it documented? Is there a reason
why the same information should not be copied to the si_addr field of
the siginfo_t as the documentation says?

Oh, and thanks :-).

 - Pat

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:11 EST