Re: howto break into debugger
Re: howto break into debugger
- Subject: Re: howto break into debugger
- From: gabe taubman <email@hidden>
- Date: Mon, 7 Nov 2005 20:38:20 -0500
Hi,
If you'd like to stop and get the stack trace completely right, you
can also use this:
#define die() asm("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n"
: : : "memory","r0","r3","r4" )
I had to add an equivalent of asm {int 3} to a library last year. The
problem with calling StopIfInDebugger() was that the stack trace would
be in that function when you started the debugging.
Just figured I'd let you know if you wanted. (It gets the current PID
and sends an interrupt to it)
On 11/7/05, Eric Albert <email@hidden> wrote:
> On Nov 7, 2005, at 12:28 PM, Simon Strandgaard wrote:
>
> > Is there something similar for mac, as this x86 code?
> >
> > #define BREAK_INTO_DEBUGGER() asm{ int 3 }
>
> If you want an asm alternative to the APIs other folks have pointed
> you to:
>
> #define BREAK_INTO_DEBUGGER() asm{ trap }
>
> Hope this helps,
> Eric
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users 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.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden