Re: Why no execinfo.h?
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