On 4 May 2006, at 09:21, David Ayers wrote:
Lloyd Dupont schrieb:
Problem is I would like to replace 'gnustep-base.dll' by a more
multiplatform constant / invocation.
One that could read 'gnustep-base.dll' on windows and
'gnustep-base.dylib' on MacOSX for example...
http://www.gnustep.org/resources/documentation/Developer/Base/
Reference/index.html
NSBundle: +bundleForLibrary:
I don't think that's what he wants ... it returns the resource bundle
for a named library.
I believe he needs the path to the library itsself, so that he can
read the binary file for debug symbol info.
AFAIK objc_get_symbol_path() is the best thing for that.
I suppose for a full trace it needs ...
1. the symbols from the running executable
2. the symbols from libraries/frameworks linked into it.
3. the symbols from any class bundles loaded at runtime.
For the running executable, I think you can use [[NSBundle
mainBundle] executablePath].
I guess you can use [NSBundle +allBundles] and [NSBundle
+allFrameworks] to enumerate bundles/frameworks.
Then you can use the -principalClass method on each to get a handle
into the code (or nil if the bundle contains no code)/
Then objc_get_symbol_path() to locate the binary containing the code
for the bundle/framework
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep