• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: howto break into debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >howto break into debugger (From: Simon Strandgaard <email@hidden>)
 >Re: howto break into debugger (From: Eric Albert <email@hidden>)

  • Prev by Date: xcodebuild can't find gcc?
  • Next by Date: @try / @catch requires c++ exceptions?
  • Previous by thread: Re: howto break into debugger
  • Next by thread: xcodebuild can't find gcc?
  • Index(es):
    • Date
    • Thread