Re: How to get source name/line number of backtrace?
Re: How to get source name/line number of backtrace?
- Subject: Re: How to get source name/line number of backtrace?
- From: Charlie Dickman <email@hidden>
- Date: Wed, 4 Nov 2009 14:20:09 -0500
There are standard predefined macros that, among other things, give
you the name of the source file. Use " __FILE__" (that's 2 underbars
in front and 2 underbars in back).
as in... NSString *file = [NSString string withFormat: @"__FILE__"];
On Nov 4, 2009, at 1:28 PM, Jens Alfke wrote:
On Nov 4, 2009, at 1:14 AM, Samuel DELMONT wrote:
I get the name of the function and its arguments but I would like
to have the source file's name and the line number of each address
of the stack. I know that gdb can do this with "info line *addr",
but I want to do it programmatically.
I got the symbolic information from the stack frame pointers by
invoking the 'atos' tool. Kind of a kludge but it works. See the
method my_callStack in
http://bitbucket.org/snej/myutilities/src/tip/ExceptionUtils.m
—Jens _______________________________________________
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
Charlie Dickman
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