Ghidra is a software reverse engineering (SRE) framework
GP-611 - Changed setting location of Program.ANALYZED flag
ghizardf6bd922c7a95
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.javaindex 003cfa959b..01838c2ed7 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@@ -1110,9 +1110,7 @@ public class AutoAnalysisManager implements DomainObjectListener, DomainObjectClint answer = OptionDialog.showYesNoDialog(tool.getToolFrame(), "Analyze","<html>" + HTMLUtilities.escapeHTML(program.getDomainFile().getName()) +" has not been analyzed. Would you like to analyze it now?");- boolean analyzed = answer == OptionDialog.OPTION_ONE;- GhidraProgramUtilities.setAnalyzedFlag(program, analyzed);- return analyzed;+ return answer == OptionDialog.OPTION_ONE; // Analyze}return false;}diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisPlugin.javaindex 6ab15dac13..13e4f68cfa 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisPlugin.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisPlugin.java@@ -38,6 +38,7 @@ import ghidra.framework.plugintool.*;import ghidra.framework.plugintool.util.PluginStatus;import ghidra.program.model.address.AddressSetView;import ghidra.program.model.listing.Program;+import ghidra.program.util.GhidraProgramUtilities;import ghidra.program.util.ProgramSelection;import ghidra.util.HelpLocation;import ghidra.util.classfinder.ClassSearcher;@@ -110,6 +111,7 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis// they are insertedint subGroupIndex = 0;+ //@formatter:offautoAnalyzeAction =new ActionBuilder("Auto Analyze", getName()).supportsDefaultToolContext(true)@@ -131,6 +133,7 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis.onAction(c -> analyzeAllCallback()).validContextWhen(ac -> ac instanceof ListingActionContext).buildAndInstall(tool);+ //@formatter:ontool.setMenuGroup(new String[] { "Analysis", "One Shot" }, ANALYZE_GROUP_NAME);@@ -187,6 +190,7 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLisif (!showOptionsDialog(program)) {return;}+ GhidraProgramUtilities.setAnalyzedFlag(program, true);analysisMgr.initializeOptions(); // options may have changed@@ -270,9 +274,9 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLisprivate void programActivated(final Program program) {- program.getOptions(StoredAnalyzerTimes.OPTIONS_LIST)- .registerOption(StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,- "Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());+ program.getOptions(StoredAnalyzerTimes.OPTIONS_LIST).registerOption(+ StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,+ "Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());// invokeLater() to ensure that all other plugins have been notified of the program// activated. This makes sure plugins like the Listing have opened and painted the