Skip to content

Commit

Permalink
Fix systematic names being deleted for multi-library aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepNT committed Jul 19, 2023
1 parent 256caaa commit 2460ffa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,11 @@ public void optionsChanged(Options options, Program program) {
chosenDB = options.getEnum(DATABASE_CHOICE_NAME, DATABASE_CHOICE_DEFAULT);
clearOldNames = options.getBoolean(DELETE_OLD_OPTION_NAME, DELETE_OLD_OPTION_DEFAULT);
}

private boolean isSystematicName(String libraryName, String symbolName) {
return symbolName.startsWith(libraryName + "_") && Utils.isSystematicName(symbolName);
}

private void deleteNonSystematicNamedSymbols(Address address, String libraryName, boolean functionSymbols) {
Symbol[] symbols = helper.symTbl.getSymbols(address);
for (Symbol sym : symbols) {
if (isSystematicName(libraryName, sym.getName(false)))
if (Utils.isSystematicName(sym.getName(false)))
continue;

if (functionSymbols) { // Function symbols have to be deleted with this method.
Expand Down

0 comments on commit 2460ffa

Please sign in to comment.