Re: Help on Stack trace
Re: Help on Stack trace
- Subject: Re: Help on Stack trace
- From: Peter O'Gorman <email@hidden>
- Date: Sun, 08 Feb 2009 18:35:44 -0600
Steve Checkoway wrote:
> Interestingly enough, using some of your code, you can do a lot better.
>
> Given
>
> static void foo( int *p ) { ++*p; }
> int bar() { return 0; }
>
> the code snippet (full code listing attached, assuming the list allows it)
I keep being surprised at the number of places that bits of dlcompat
turn up in. :)
This one also seems to fix an issue Nick Kledzik pointed out when he
rewrote dyld with dlopen() et.al. for tiger:
> 1) dladdr called on a local symbol (e.g. static function) returns
> __mh_execute_header instead of the previous global function. I think
> this may be a bug in dlcompat where it is using (symtable->n_value -
> addr) instead of (addr - symtable->n_value).
It also looks nicer than my effort :)
And to give more attribution, I stole bits of it from an email from
Douglas Davidson
http://lists.apple.com/archives/Darwin-development/2002/Jun/msg00323.html
Peter
--
Peter O'Gorman
http://pogma.com
_______________________________________________
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