mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 19:30:41 +08:00
Merge remote-tracking branch 'origin/GP-3125_ghidra1_DemanglerAnalyzers--SQUASHED'
This commit is contained in:
+22
@@ -111,6 +111,8 @@ public abstract class AbstractDemanglerAnalyzer extends AbstractAnalyzer {
|
|||||||
|
|
||||||
int count = initialCount;
|
int count = initialCount;
|
||||||
SymbolTable symbolTable = program.getSymbolTable();
|
SymbolTable symbolTable = program.getSymbolTable();
|
||||||
|
// TODO: iterator will continually need to reinitialize due to symbol changes
|
||||||
|
// consider copying primary symbols to alt storage for iteration
|
||||||
SymbolIterator it = symbolTable.getPrimarySymbolIterator(set, true);
|
SymbolIterator it = symbolTable.getPrimarySymbolIterator(set, true);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
monitor.checkCanceled();
|
monitor.checkCanceled();
|
||||||
@@ -129,7 +131,27 @@ public abstract class AbstractDemanglerAnalyzer extends AbstractAnalyzer {
|
|||||||
DemangledObject demangled = demangle(mangled, address, options, log);
|
DemangledObject demangled = demangle(mangled, address, options, log);
|
||||||
if (demangled != null) {
|
if (demangled != null) {
|
||||||
apply(program, address, demangled, options, log, monitor);
|
apply(program, address, demangled, options, log, monitor);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only attempt to demangle a non-primary symbol if primary is imported and will
|
||||||
|
// not demangle.
|
||||||
|
if (symbol.getSource() != SourceType.IMPORTED) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Symbol altSym : symbolTable.getSymbols(address)) {
|
||||||
|
if (altSym.isPrimary() || skipSymbol(altSym)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
mangled = cleanSymbol(address, altSym.getName());
|
||||||
|
demangled = demangle(mangled, address, options, log);
|
||||||
|
if (demangled != null) {
|
||||||
|
apply(program, address, demangled, options, log, monitor);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user