mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-12 23:23:17 +00:00
Merge remote-tracking branch 'origin/GP-4975_ghizard_PDB_allow_VxTable_mangled_symbols_to_be_primary'
This commit is contained in:
commit
23b75ec040
@ -2335,8 +2335,10 @@ public class DefaultPdbApplicator implements PdbApplicator {
|
||||
}
|
||||
|
||||
if (!existingSymbol.getParentNamespace().equals(program.getGlobalNamespace())) {
|
||||
// existing symbol has a non-global namespace
|
||||
return doCreateSymbol(address, symbolPath, false, plateAddition);
|
||||
// Existing symbol has a non-global namespace
|
||||
if (!preferNewSymbolOverExistingNamespacedSymbol(symbolPath)) {
|
||||
return doCreateSymbol(address, symbolPath, false, plateAddition);
|
||||
}
|
||||
}
|
||||
|
||||
if (symbolPath.getParent() != null) {
|
||||
@ -2353,6 +2355,22 @@ public class DefaultPdbApplicator implements PdbApplicator {
|
||||
return doCreateSymbol(address, symbolPath, false, plateAddition);
|
||||
}
|
||||
|
||||
// We've found that a mangled version of vxtables can present more detailed information
|
||||
// than a non-mangled vxtable symbol that has a namespace (the information is not
|
||||
// as descriptive regarding vxtables owned by the child for a parent). So do not
|
||||
// accept these existing symbol with namespace to maintain their primary status.
|
||||
//
|
||||
// Kludge... this mechanism might go away later if/when instead we evaluate all symbols at
|
||||
// an address to do the right thing or if/when we process the tables in some place other
|
||||
// than or besides the Demangler.
|
||||
private boolean preferNewSymbolOverExistingNamespacedSymbol(SymbolPath symbolPath) {
|
||||
String name = symbolPath.getName();
|
||||
if (name.startsWith("??_7") || name.startsWith("??_8")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Symbol doCreateSymbol(Address address, SymbolPath symbolPath, boolean makePrimary,
|
||||
String plateAddition) {
|
||||
Symbol symbol = null;
|
||||
|
Loading…
Reference in New Issue
Block a user