• 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
Making a breakpoint debugger command architecture-specific?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making a breakpoint debugger command architecture-specific?


  • Subject: Making a breakpoint debugger command architecture-specific?
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 16 Apr 2008 11:35:51 -0600

Short version: How do I make it so that a debugger breakpoint command is only executed on specific architectures?

Long version: I have a Core 2 Duo-based Mac, and so I debug both 32- bit and 64-bit executables. When the debugger breaks on objc_exception_raise, I want to print the contents of the NSException to the console. On X86 the command is "po *(int *)($ebp+8)", but for obvious reasons I only want that executed on X86 executables. On X86-64 the command is "po $rdi". So I want the breakpoint command to do something like this:

if architecture is i386
po *(int *)($ebp+8)
else if architecture is x86_64
po $rdi
end if

Can I do this? If so, how?

Nick Zitzmann
<http://seiryu.home.comcast.net/>
S/MIME signature available upon request




_______________________________________________ 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
  • Prev by Date: Re: G4 867mhz, Leopard, and XCode 3
  • Next by Date: cross-develop not working
  • Previous by thread: Summary format problems in debugger
  • Next by thread: cross-develop not working
  • Index(es):
    • Date
    • Thread