Shark and dlopen(): debug symbols, "unknown library"
Shark and dlopen(): debug symbols, "unknown library"
- Subject: Shark and dlopen(): debug symbols, "unknown library"
- From: Guido Lorenz <email@hidden>
- Date: Fri, 17 Apr 2009 18:36:08 +0200
Hi,
I already posted the message attached below a few weeks ago but did
not get an answer. Maybe I did not make myself clear, so I am posting
my problem again, hoping somebody can help.
* Setting:
I am working with a C++ application that is dynamically linked to a
library, that in turn loads additional code from a plugin library
using dlopen() and dlsym() from the C dlfcn.h header.
* Debug Symbols:
Both the library and the plugin are compiled in release mode, but with
debug symbols ("Generate Debug Symbols" is enabled in Xcode). These
debug symbols are actually available, since I can successfully debug
code inside the plugin (i.e. I can place a breakpoint and the main
application will stop there). The main application does not contain
debug symbols.
* Problem:
However, if I use Shark to generate a "Time Profile", only the library
is identified correctly, while the plugin is referred to as an
"Unknown Library".
* Things I already tried:
Google. Found a post by someone who tried to profile a similar setup
and gave up: http://www.cocoabuilder.com/archive/message/xcode/2006/3/7/4628
I tried all combinations of RTLD_LAZY/RTLD_NOW and RTLD_LOCAL/
RTLD_GLOBAL.
I also tried different levels of debug symbols (default, full) and
"Generate Profiling Code" for the plugin.
* Questions:
Does anyone have an idea why this is happening?
Do I have to enable some other code generation options?
Are there known issues with Shark and dlopen()?
Has anyone successfully used Shark in a similar scenario?
Any kind of hint would be greatly appreciated. :)
// Guido
Am 30.03.2009 um 15:13 schrieb Guido Lorenz:
Hello,
I'm trying to profile a C++ application that uses "plugins", i.e.
dylibs loaded at runtime using dlopen(). I can debug code inside
these plugins, so the necessary debug symbols seem to be available.
But Shark only displays calls to an "Unkown library" where code from
a plugin is executed.
Has anyone used Shark successfully to profile an application with
plugins, and any ideas why it isn't working for me? Can I help Shark
find the plugin library?
Thanks.
Guido
_______________________________________________
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