Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz 2024-10-31 06:03:45 -04:00
commit f8dc74b43e
2 changed files with 19 additions and 10 deletions

View File

@ -2454,7 +2454,11 @@ public class RTTIWindowsClassRecoverer extends RTTIClassRecoverer {
Map<RecoveredClass, Integer> parentOffsetMap = getBaseClassOffsetMap(recoveredClass);
return parentOffsetMap.get(virtualParentClasses.get(0));
if (parentOffsetMap != null) {
return parentOffsetMap.get(virtualParentClasses.get(0));
}
return null;
}

View File

@ -78,16 +78,21 @@ public class RttiUtil {
if (matchingSymbol != null) {
return false;
}
// 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.
}
}
try {
// 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.
// }
// }
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.