Skip to content

Commit

Permalink
add some logging info
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Dec 12, 2023
1 parent 286a127 commit 48e599a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/NSBundle.m
Original file line number Diff line number Diff line change
Expand Up @@ -1667,22 +1667,24 @@ + (NSBundle *) bundleForClass: (Class)aClass
if (!class_isMetaClass(aClass))
{
NSString *path;
NSString *exep;

/* If the class is defined in a file other than the executable
* it must be in a library or framework/bundle.
*/
path = GSPrivateSymbolPath(aClass);
if ([path isEqual: GSPrivateExecutablePath()] == NO)
exep = GSPrivateExecutablePath();
if ([path isEqual: exep] == NO)
{
NSString *libraryName = path;
NSString *ver = [self _versionForLibrary: &libraryName];

if (nil == ver)
{
NSLog(@"Warning: [%@+%@] unable to determine"
@" version of library '%@' containing '%@'",
NSLog(@"Warning: [%@+%@] unable to determine version"
@" of library '%@' containing '%@' for executable '%@'",
NSStringFromClass(self), NSStringFromSelector(_cmd),
path, NSStringFromClass(aClass));
path, NSStringFromClass(aClass), exep);
}
/* Get the library bundle ... if there wasn't one then we
* will check to see if it's in a newly loaded framework
Expand Down

0 comments on commit 48e599a

Please sign in to comment.