Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-3282- fallout from recent change. Need to make sure we don't keep asking as they changing tabls

ghidragon45daeee35fd2
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java
index 27f0b84789..e60e59ed12 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java
@@ -114,6 +114,7 @@ public class AutoAnalysisManager implements DomainObjectListener, DomainObjectCl
private Thread analysisThread;
private AnalysisTaskWrapper activeTask;
private Stack<AnalysisTaskWrapper> yieldedTasks = new Stack<>();
+ private boolean alreadyAskedThisSession = false;
/**
* This variable is a poorly defined concept. Essentially, this value is <b>intended</b> to
@@ -1116,6 +1117,12 @@ public class AutoAnalysisManager implements DomainObjectListener, DomainObjectCl
// where multiple threads check the flag before either thread has a chance to set it.
Swing.assertSwingThread("Asking to analyze must be on the swing thread!");
+ // We only ever want to ask once per session even if they said it is ok to ask again
+ if (alreadyAskedThisSession) {
+ return false;
+ }
+ alreadyAskedThisSession = true;
+
if (GhidraProgramUtilities.shouldAskToAnalyze(program)) {
String name = HTMLUtilities.escapeHTML(program.getDomainFile().getName());
HelpLocation help = new HelpLocation("AutoAnalysisPlugin", "Ask_To_Analyze");