• 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: x86 inline assembler to stop in debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x86 inline assembler to stop in debugger


  • Subject: Re: x86 inline assembler to stop in debugger
  • From: Eric Albert <email@hidden>
  • Date: Mon, 30 Jan 2006 09:19:55 -0800

On Jan 30, 2006, at 9:04 AM, Brad Oliver wrote:

On Jan 30, 2006, at 9:57 AM, email@hidden wrote:

Sorry; I ignored the PPC side of your code earlier. :)  On PPC, you'll
want this:

#define DebugBreak() if (AmIBeingDebugged()) { __asm__ volatile
("trap"); }

OK, I have a dumb question. :-) Why wouldn't calling Debugger() work for these cases instead of using inline assembler targeting a specific CPU?

As far as I can tell -- I haven't tested it -- Debugger() only breaks if the USERBREAK environment variable is set to 1. In that case it sends a SIGINT to the current thread. That's not quite the same as a SIGTRAP.


-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


  • Follow-Ups:
    • Re: x86 inline assembler to stop in debugger
      • From: Brad Oliver <email@hidden>
References: 
 >Re: x86 inline assembler to stop in debugger (From: Brad Oliver <email@hidden>)

  • Prev by Date: Re: Static .a libraries with multiple archs
  • Next by Date: Re: referring to enum values in a template
  • Previous by thread: Re: x86 inline assembler to stop in debugger
  • Next by thread: Re: x86 inline assembler to stop in debugger
  • Index(es):
    • Date
    • Thread