Ghidra is a software reverse engineering (SRE) framework
GP-5053 RTTIUtil removed check for similar symbol to fix class namespaces in some anonymous namespaces that could not be determined by pdb.
ghidra007922091e27d60
diff --git a/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/rtti/RttiUtil.java b/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/rtti/RttiUtil.javaindex 0b28425eb1..abc0a1c718 100644--- a/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/rtti/RttiUtil.java+++ b/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/rtti/RttiUtil.java@@ -78,16 +78,21 @@ public class RttiUtil {if (matchingSymbol != null) {return false;}++ // NOTE: This code was originally put here to skip applying labels the pdb put down if the+ // above check failed but symbols were similar. This check has been removed because of+ // cases where this check stopped the full namespace path from being created. The code is+ // here commented out because we might want to use this to do extra checking and possibly+ // remove the similar symbol instead of leaving it as a secondary symbol.// Don't create it if a similar symbol already exists at the address of the data.- SymbolIterator symbols = symbolTable.getSymbolsAsIterator(rttiAddress);- for (Symbol symbol : symbols) {- String name = symbol.getName();- if (name.contains(rttiSuffix)) {- return false; // Similar symbol already exists.- }- }+// SymbolIterator symbols = symbolTable.getSymbolsAsIterator(rttiAddress);+// for (Symbol symbol : symbols) {+// String name = symbol.getName();+// if (name.contains(rttiSuffix)) {+// return false; // Similar symbol already exists.+// }+// }try {-// Ignore imported mangled symbol because demangling would add tick marks into the name.// The name created here is better. Set the symbol to be primary so that the demangler// won't demangle.