dladdr() returns garbage for nearest symbol name
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcmGDN9CDz3N5ThMRHKUAa0AWTSB/g== Thread-topic: dladdr() returns garbage for nearest symbol name I've finally gotten my -finstrument-functions hack working with dladdr(), but I've noticed that I'm getting a fair amount of garbage out of it. Basically, I'm calling it like so: void __cyg_profile_func_enter(void *this_fn, void *call_site) { Dl_info functionInfo; dladdr(this_fn, &functionInfo; Dl_info call_siteInfo; dladdr(call_site, &callsiteInfo); syslog(LOG_INFO, "%s got called from within %s", call_siteInfo.dli_sname, functionInfo.dli_sname); } The problem is that although the function name is always good, the call site info is often bad. I'll get output like "???^H?^C?^XG??^A???", without the quotes. This isn't very useful. Any ideas on what I'm seeing and what I need to do to correct this? Thanks, Cem Karan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Karan, Cem (Civ, ARL/CISD)