Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dladdr (was: backtrace_symbols not giving right symbols)




On Mar 26, 2008, at 10:17 PM, James W. Walker wrote:

I tried using backtrace_symbols from a framework of mine, and the function names were wrong. They were names that were probably in the framework somewhere, but not code that was actually being used. This was a debug build, full debug symbols, not optimized, not stripped. I tried changing the debug info format from Dwarf to Stabs and it made no difference. What might I be missing?

Having received no response to that question, I looked a little deeper. I see that the key is dladdr, which backtrace_symbols uses to get the symbols. And I find that dladdr starts working the way I expect when I uncheck the "Symbols Hidden by Default" code generation option for gcc. So, is that just the way it works - that when the dladdr docs say it finds the "nearest runtime symbol", that means exported symbol?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden


This email sent to email@hidden
References: 
 >backtrace_symbols not giving right symbols (From: "James W. Walker" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.