Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-3127 - PDB - Override overzealous thunk detection

ghizard407fe706d83b
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/app/util/pdb/pdbapplicator/FunctionSymbolApplier.java b/Ghidra/Features/PDB/src/main/java/ghidra/app/util/pdb/pdbapplicator/FunctionSymbolApplier.java
index bb5fb4ce88..aa7f34bd32 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/app/util/pdb/pdbapplicator/FunctionSymbolApplier.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/app/util/pdb/pdbapplicator/FunctionSymbolApplier.java
@@ -258,10 +258,12 @@ public class FunctionSymbolApplier extends MsSymbolApplier {
}
boolean succeededSetFunctionSignature = false;
- if (!function.isThunk() &&
- function.getSignatureSource().isLowerPriorityThan(SourceType.IMPORTED)) {
- succeededSetFunctionSignature = setFunctionDefinition(monitor);
- function.setNoReturn(isNonReturning);
+ if (thunkSymbol == null) {
+ function.setThunkedFunction(null);
+ if (function.getSignatureSource().isLowerPriorityThan(SourceType.IMPORTED)) {
+ succeededSetFunctionSignature = setFunctionDefinition(monitor);
+ function.setNoReturn(isNonReturning);
+ }
}
// If signature was set, then override existing primary mangled symbol with
// the global symbol that provided this signature so that Demangler does not overwrite