• 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: accessing debug info from code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing debug info from code


  • Subject: Re: accessing debug info from code
  • From: lajos kamocsay <email@hidden>
  • Date: Sat, 28 Jun 2008 20:55:54 -0400
  • Domainkey-status: no signature

Thanks! Exactly what I needed.

On Jun 27, 2008, at 11:13 PM, Rick Altherr wrote:


On Jun 27, 2008, at 7:42 PM, lajos kamocsay wrote:

Hello,


Is there a way to get debug information from code?
I'd like to save the source code name, line being executed and the
call stack at certain points in the application while the program is running.



Thanks, -lajos



_______________________________________________
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


A few ideas:
- Use __FILE__ and __LINE__ macros along with backtrace_symbols() from libSystem. This won't be 100% accurate and won't report objective-c methods.
- Use __FILE__ and __LINE__ macros along with backtrace(). Then run the addresses through atos. atos will read the debugging information from the binary and/or dSYM file. The backtrace is guaranteed to be accurate, but it should be close if you aren't using -fomit-frame-pointer.


--
Rick Altherr
Architecture and Performance Group
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: 
 >accessing debug info from code (From: lajos kamocsay <email@hidden>)
 >Re: accessing debug info from code (From: Rick Altherr <email@hidden>)

  • Prev by Date: Re: i want to use xcode to debug...
  • Next by Date: Why no -masm=intel with Darwin GCC?
  • Previous by thread: Re: accessing debug info from code
  • Next by thread: [Q] Is the 10.4u SDK distributed for the Intel Mac and the PPC Mac different?
  • Index(es):
    • Date
    • Thread