lkml.org 
[lkml]   [2000]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Determining address which caused SEGV
Jeff Dike wrote:
> void user_segv_handler(int sig)
> {
> struct sigcontext_struct *sc;
> sc = (struct sigcontext_struct *) (&sig + 1);

You can just do this:

void user_segv_handler (int sig, struct sigcontext_struct context)
{
unsigned long fault_address = context.cr2;
// ...
}
-- Jamie

-
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    [from the cache]
©2003-2011 Jasper Spaans