Skip to content

Commit

Permalink
-For external classes, use the class name as a fallback if the symbol…
Browse files Browse the repository at this point in the history
… can’t be found (for some strange reason)

-OCD cleanup
  • Loading branch information
aricha committed Jan 8, 2014
1 parent 5f1e0e3 commit ef5465f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Source/CDLCSymbolTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ - (void)loadSymbols;
if (className) {
if (symbol.value != 0)
classSymbols[className] = symbol;
else {
else
externalClassSymbols[className] = symbol;
}
}
};

Expand Down
4 changes: 4 additions & 0 deletions Source/CDObjectiveC2Processor.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ - (CDOCCategory *)loadCategoryAtAddress:(uint64_t)address;
CDSymbol *classSymbol = [[self.machOFile symbolTable] symbolForExternalClassName:externalClassName];
if (classSymbol)
category.classRef = [[CDOCClassReference alloc] initWithClassSymbol:classSymbol];
else
category.classRef = [[CDOCClassReference alloc] initWithClassName:externalClassName];
}
}

Expand Down Expand Up @@ -280,6 +282,8 @@ - (CDOCClass *)loadClassAtAddress:(uint64_t)address;
CDSymbol *superClassSymbol = [[self.machOFile symbolTable] symbolForExternalClassName:superClassName];
if (superClassSymbol)
aClass.superClassRef = [[CDOCClassReference alloc] initWithClassSymbol:superClassSymbol];
else
aClass.superClassRef = [[CDOCClassReference alloc] initWithClassName:superClassName];
}
}

Expand Down

0 comments on commit ef5465f

Please sign in to comment.