Re: Accessing debugging info from within the running program
Re: Accessing debugging info from within the running program
- Subject: Re: Accessing debugging info from within the running program
- From: Ken Thomases <email@hidden>
- Date: Sun, 10 Aug 2008 18:07:40 -0500
On Aug 10, 2008, at 5:45 PM, Rick Mann wrote:
I'm trying to write a logging facility that can generate stack
traces at any given point in a program's execution (normal
execution, at least). I'm using glibc's backtrace() function to get
a list of callstack addresses. I'd like to translate those into
source file and line number information. Obviously, to do this, I
need access to the symbol information. So one question is, can I
reliably locate the symbol file generated by Xcode for an
application? (I'll deal with plugins later).
Second, is there something like libbfd for reading that symbol
information? Given an address, how can I get a source file name and
line number?
Your best bet is to collect a list of addresses and then invoke the
external "atos" tool with your pid and those addresses.
Cheers,
Ken
_______________________________________________
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