• 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: Why no execinfo.h?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why no execinfo.h?


  • Subject: Re: Why no execinfo.h?
  • From: Eric Albert <email@hidden>
  • Date: Thu, 20 Apr 2006 23:59:33 +0200

On Apr 20, 2006, at 9:42 PM, Rush Manbert wrote:

This is addressed to the Apple Gods of Xcode (AGX) who read this list.

I see that we can use __builtin_return_address() and __builtin_frame_address(), but I would also like to use backtrace() and backtrace_symbols().

When I try, the compiler tells me that it can't find the file execinfo.h. Is there a reason that this (and presumably the functions I want) is excluded from the system?

Alternatively, if I have a return address, is there a runtime lookup mechanism to resolve it to a symbol + offset?

backtrace and backtrace_symbols are Linux-specific APIs (more properly, they're glibc-specific). So they're not so much "excluded" as not part of Mac OS X (or FreeBSD, Solaris, etc.) to begin with. dladdr might give you want on Mac OS X and so might the NSModule man page, but we don't currently provide a generic backtracing or backtrace+symbols API on the system.


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


  • Follow-Ups:
    • Re: Why no execinfo.h?
      • From: Rush Manbert <email@hidden>
References: 
 >Why no execinfo.h? (From: Rush Manbert <email@hidden>)

  • Prev by Date: Re: Creating Carbon bevel picture buttons w/Interface Builder
  • Next by Date: Re: error for object : incorrect checksum for freed object
  • Previous by thread: Why no execinfo.h?
  • Next by thread: Re: Why no execinfo.h?
  • Index(es):
    • Date
    • Thread