From b8e8c094a18d9839c5b90bcef4a4fc3a0145b686 Mon Sep 17 00:00:00 2001 From: ghidra007 Date: Tue, 6 Jul 2021 14:35:02 -0400 Subject: [PATCH] GP-1101 Added missing isPDBLoaded flag assignment to the RTTIWindowsClassRecoverer which was inadvertently left out during refactoring. --- .../ghidra_scripts/RecoverClassesFromRTTIScript.java | 8 ++------ .../classrecovery/RTTIWindowsClassRecoverer.java | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/RecoverClassesFromRTTIScript.java b/Ghidra/Features/Decompiler/ghidra_scripts/RecoverClassesFromRTTIScript.java index 7eb439c967..7e396282c7 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/RecoverClassesFromRTTIScript.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/RecoverClassesFromRTTIScript.java @@ -275,12 +275,8 @@ public class RecoverClassesFromRTTIScript extends GhidraScript { private boolean isPDBLoadedInProgram() { Options options = currentProgram.getOptions("Program Information"); - isPDBLoaded = false; - Object isPDBLoadedObject = options.getObject("PDB Loaded", null); - if (isPDBLoadedObject != null) { - isPDBLoaded = (boolean) isPDBLoadedObject; - } - return isPDBLoaded; + return options.getBoolean("PDB Loaded", false); + } public String validate() { diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java index b50c82b7cc..ae095681e2 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java @@ -91,6 +91,8 @@ public class RTTIWindowsClassRecoverer extends RTTIClassRecoverer { super(program, location, tool, api, createBookmarks, useShortTemplates, nameVFunctions, monitor); + this.isPDBLoaded = isPDBLoaded; + } @Override @@ -147,8 +149,6 @@ public class RTTIWindowsClassRecoverer extends RTTIClassRecoverer { @Override public List createRecoveredClasses() { - //TODO: check the classPath var for null and return null if it is null - List vftableSymbols; try { vftableSymbols = getListOfVftableSymbols(); @@ -254,8 +254,6 @@ public class RTTIWindowsClassRecoverer extends RTTIClassRecoverer { return false; } - - /** * Method to determine if the current program has RTTI data applied to it * @return true if the current program has RTTI data applied to it