Skip to content

Ghidra is a software reverse engineering (SRE) framework

Merge remote-tracking branch 'origin/GP-688_ghidra007_fixRTTIVftableCount' into patch

ghidra17a3945f3bca1
diff --cc Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/rtti/RttiUtil.java
index 4fd197d895,864953dbf8..921960802a
--- 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
@@@ -127,6 -126,6 +126,8 @@@ public class RttiUtil
public static int getVfTableCount(Program program, Address vfTableBaseAddress) {
Memory memory = program.getMemory();
++ ReferenceManager referenceManager = program.getReferenceManager();
++ FunctionManager functionManager = program.getFunctionManager();
MemoryBlock textBlock = memory.getBlock(".text");
MemoryBlock nepBlock = memory.getBlock(".nep");
AddressSetView initializedAddresses = memory.getLoadedAndInitializedAddressSet();
@@@ -162,11 -161,14 +163,14 @@@
}
// any references after the first one ends the table
-- if (tableSize > 0 && program.getReferenceManager().hasReferencesTo(currentVfPointerAddress)) {
++ if (tableSize > 0 && referenceManager.hasReferencesTo(currentVfPointerAddress)) {
break;
}
- if (!pseudoDisassembler.isValidSubroutine(referencedAddress, true, false)) {
- Function function = program.getFunctionManager().getFunctionAt(referencedAddress);
++ Function function = functionManager.getFunctionAt(referencedAddress);
+
+ if (function == null &&
+ !pseudoDisassembler.isValidSubroutine(referencedAddress, true, false)) {
break; // Not pointing to possible function.
}