Ghidra is a software reverse engineering (SRE) framework
GP-2305: Add help for Debugger (dis)assembly actions
Dan9b75c4c3a7e6
diff --git a/Ghidra/Debug/Debugger/certification.manifest b/Ghidra/Debug/Debugger/certification.manifestindex adbc4a2a23..2470f40bad 100644--- a/Ghidra/Debug/Debugger/certification.manifest+++ b/Ghidra/Debug/Debugger/certification.manifest@@ -43,6 +43,7 @@ src/main/help/help/topics/DebuggerConsolePlugin/DebuggerConsolePlugin.html||GHIDsrc/main/help/help/topics/DebuggerConsolePlugin/images/DebuggerConsolePlugin.png||GHIDRA||||END|src/main/help/help/topics/DebuggerCopyActionsPlugin/DebuggerCopyActionsPlugin.html||GHIDRA||||END|src/main/help/help/topics/DebuggerCopyActionsPlugin/images/DebuggerCopyIntoProgramDialog.png||GHIDRA||||END|+src/main/help/help/topics/DebuggerDisassemblerPlugin/DebuggerDisassemblerPlugin.html||GHIDRA||||END|src/main/help/help/topics/DebuggerEmulationServicePlugin/DebuggerEmulationServicePlugin.html||GHIDRA||||END|src/main/help/help/topics/DebuggerInterpreterPlugin/DebuggerInterpreterPlugin.html||GHIDRA||||END|src/main/help/help/topics/DebuggerListingPlugin/DebuggerListingPlugin.html||GHIDRA||||END|diff --git a/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml b/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xmlindex c2dd57e3d0..2e86c6a687 100644--- a/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml+++ b/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml@@ -115,6 +115,10 @@sortgroup="i"target="help/topics/DebuggerListingPlugin/DebuggerListingPlugin.html" />+ <tocdef id="DebuggerDisassemblerPlugin" text="Disassembly and Assembly"+ sortgroup="i1"+ target="help/topics/DebuggerDisassemblerPlugin/DebuggerDisassemblerPlugin.html" />+<tocdef id="DebuggerStackPlugin" text="Stack"sortgroup="j"target="help/topics/DebuggerStackPlugin/DebuggerStackPlugin.html" />diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerDisassemblerPlugin/DebuggerDisassemblerPlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerDisassemblerPlugin/DebuggerDisassemblerPlugin.htmlnew file mode 100644index 0000000000..0a4b0f8b4b--- /dev/null+++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerDisassemblerPlugin/DebuggerDisassemblerPlugin.html@@ -0,0 +1,37 @@+<!DOCTYPE doctype PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">++<HTML>+ <HEAD>+ <META name="generator" content=+ "HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net">++ <TITLE>Debugger Disassembler</TITLE>+ <META http-equiv="Content-Type" content="text/html; charset=windows-1252">+ <LINK rel="stylesheet" type="text/css" href="../../shared/Frontpage.css">+ </HEAD>++ <BODY lang="EN-US">+ <H1>Debugger: Disassembler and Assembler</H1>++ <P>The Debugger provides specialized disassemble and assemble ("patch instruction") actions.+ These actions operate on a smaller scope of instructions, disassembling linearly from the+ cursor or program counter up to and including the next branching instruction. They also allow+ the user a selection of languages configured on the current trace.</P>++ <H2>Actions:</H2>++ <H3><A name="disassemble"></A> Disassemble</H3>++ <P>This action disassembles from the cursor up to the next branching instruction for the+ selected language. One action is presented per language configured at the current location.+ Other languages may also be presented if the only thing that varies is the default disassembly+ context, e.g., configuring ARM will also allow THUMB disassembly.</P>++ <H3><A name="patch_instruction"></A> Patch Instruction / Assemble</H3>++ <P>This action assembles an instruction at the cursor. One action is presented per language+ configured at the current location. Other languages may also be presented if the only thing+ that varies is the default disassembly context, e.g., configuring ARM will also allow THUMB+ assembly.</P>+ </BODY>+</HTML>diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/AbstractTraceDisassembleAction.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/AbstractTraceDisassembleAction.javaindex 4879594355..e02d26ff3a 100644--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/AbstractTraceDisassembleAction.java+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/AbstractTraceDisassembleAction.java@@ -24,6 +24,7 @@ import ghidra.program.model.listing.Program;import ghidra.program.util.ProgramSelection;import ghidra.trace.model.guest.TracePlatform;import ghidra.trace.model.program.TraceProgramView;+import ghidra.util.HelpLocation;public abstract class AbstractTraceDisassembleAction extends DockingAction {protected final DebuggerDisassemblerPlugin plugin;@@ -31,6 +32,7 @@ public abstract class AbstractTraceDisassembleAction extends DockingAction {public AbstractTraceDisassembleAction(DebuggerDisassemblerPlugin plugin, String name) {super(name, plugin.getName());this.plugin = plugin;+ setHelpLocation(new HelpLocation(plugin.getName(), "disassemble"));}protected abstract TracePlatform getPlatform(TraceProgramView view);diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/CurrentPlatformTraceDisassembleAction.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/CurrentPlatformTraceDisassembleAction.javaindex be213364f6..23419dbd35 100644--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/CurrentPlatformTraceDisassembleAction.java+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/disassemble/CurrentPlatformTraceDisassembleAction.java@@ -30,6 +30,7 @@ import ghidra.trace.model.program.TraceProgramView;import ghidra.trace.model.target.TraceObject;import ghidra.trace.model.thread.TraceObjectThread;import ghidra.trace.model.thread.TraceThread;+import ghidra.util.HelpLocation;import ghidra.util.task.TaskMonitor;public class CurrentPlatformTraceDisassembleAction extends DockingAction {@@ -45,6 +46,7 @@ public class CurrentPlatformTraceDisassembleAction extends DockingAction {setPopupMenuData(new MenuData(new String[] { NAME }, MENU_GROUP));setKeyBindingData(KEY_BINDING);+ setHelpLocation(new HelpLocation(plugin.getName(), "disassemble"));}protected TraceObject getObject(TraceThread thread) {