Re: CFBundleGetFunctionPointerForName
Re: CFBundleGetFunctionPointerForName
- Subject: Re: CFBundleGetFunctionPointerForName
- From: "Troy Gaul" <email@hidden>
- Date: Thu, 10 Jan 2008 14:43:50 -0600
On Apr 19, 2007 11:26 PM, Kevin Packard <
email@hidden> wrote:
Thanks for the reply. My plugin is now linking with my application
symbols.
I no longer need CFBundleGetFunctionPointerForName(), but I'm still
curious about why it returns NULL when the app is run from XCode.
When I *debug* the app from XCode, or launch from Finder, or launch
from the Terminal, CFBundleGetFunctionPointerForName() works as
expected. Any idea why?
I realize this is a very late reply, but I found your message when researching a similar issue just today. The problem seems to be the way Xcode (prior to
3.0 and starting with 2.2) implements its "just in time" debugging with GDB. There is an environment variable added:
DYLD_INSERT_LIBRARIES=/Developer/Applications/Xcode.app/Contents/Resources/../PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib
If this is specified, then a call to CFBundleGetFunctionPointerForName on an application's main bundle will return NULL, even though the function has been exported. To run an app with these versions of Xcode, you need to turn off the "Auto-attach debugger on crash" checkbox in the Debugging tab of the application's Executable Info window. It's a bit annoying to lose this capability, but at least Xcode
3.0 on Leopard doesn't seem to have this problem. Of course, if anyone knows another workaround to this issue when using Xcode 2.x (short of directly linking or moving the function to another framework), I'd love to hear it.
_troy
_______________________________________________
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