lkml.org 
[lkml]   [2000]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Determining address which caused SEGV
From
Date
patl@cag.lcs.mit.edu  (Patrick J. LoPresti) writes:

> 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?

It is documented in the intel ia32 architecture documentation ->
http://developer.intel.com

SIGSEGV is not a queued signal currently, and only queued signals
can carry a siginfo_t. I believe there are patches to change that,
but they are not in the standard kernel.

-Andi

--
This is like TV. I don't like TV.

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.545 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site