Re: __darwin_i386_exception_state, cr2 and faultvaddr
Re: __darwin_i386_exception_state, cr2 and faultvaddr
- Subject: Re: __darwin_i386_exception_state, cr2 and faultvaddr
- From: Terry Lambert <email@hidden>
- Date: Mon, 19 Jan 2009 14:35:45 -0800
The GP2 does not get the faulting address on i385 if it is in the 64
bit hole. Otherwise it is the faulting address.
Don't expect siginfo to not change. Unless you are a debugger, and rev
every time week rev the os, expect your code to break. A call to
getthreadstate is a better bet.
-- Terry
On Jan 19, 2009, at 2:16 PM, Joel Reymont <email@hidden> wrote:
I've been looking at /usr/include/mach/i386/_structs.h and xnu/bsd/
dev/i386/unix_signal.c (sendsig) for quite a while but I don't
understand the purpose of faultvaddr and user_cr2.
What do these stand for and how are they used?
I have a hunch that this is the trap address but will it match EIP
in saved registers?
I need to grab the signal number and the return EIP in my signal
handler.
The signal number is obvious but the return EIP is not.
Thanks in advance, Joel
---
#if __DARWIN_UNIX03
#define _STRUCT_X86_EXCEPTION_STATE32 struct
__darwin_i386_exception_state
_STRUCT_X86_EXCEPTION_STATE32
{
unsigned int __trapno;
unsigned int __err;
unsigned int __faultvaddr;
};
#else /* !__DARWIN_UNIX03 */
---
http://twitter.com/wagerlabs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden