diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelTargetThread.java b/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelTargetThread.java
index 294c1adb6d..c268453f48 100644
--- a/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelTargetThread.java
+++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelTargetThread.java
@@ -35,10 +35,8 @@ import ghidra.util.Msg;
@TargetObjectSchemaInfo(
name = "Thread",
- elements = {
- @TargetElementType(type = Void.class) },
- attributes = {
- @TargetAttributeType(type = Void.class) })
+ elements = { @TargetElementType(type = Void.class) },
+ attributes = { @TargetAttributeType(type = Void.class) })
public class GdbModelTargetThread
extends DefaultTargetObject
The application of these special properties to each object to determine its behavior and relevant actions allows all objects to be treated generically. This feature has several diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/DebuggerPcodeStepperPlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/DebuggerPcodeStepperPlugin.html new file mode 100644 index 0000000000..e7ef4f2ac5 --- /dev/null +++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/DebuggerPcodeStepperPlugin.html @@ -0,0 +1,81 @@ + + + +
+ + +P-code is the "microcode" of Ghidra's processor specifications, compiled from its SLEIGH + specification. Originally designed to facilitate static analysis, it is easily applied to + emulation as well. Stepping each p-code operation is an effective means of debugging the + SLEIGH. The plugin provides two panes: 1) The p-code listing, and 2) Temporary ("Unique") + variables. The listing works similarly to the dynamic listing. It displays each p-code + operation, highlighting the current "counter", which is the next operation to be executed. + There is also a cursor, allowing selection of an operation. The variables view operates + similarly to the registers view, displaying the current value of each unique variable.
+ +P-code stepping is built into the emulation framework, and so the other UI elements + (listing, registers, etc.) will display machine state from emulated p-code operations, i.e., + partially executed machine instructions. The p-code stepper provides a means of navigating time + at p-code-level and displaying p-code-level details of the machine state.
+ +The unique variables table displays information about temporary variables, including their + values and user-assigned types. It has the following columns:
+ +The p-code stepper provides the following actions:
+ +This action is available when the current coordinates have some positive number of p-code + ticks. It steps the trace backward to the previous p-code tick, possibly using emulation. Note + that stepping backward does not affect the target, and many windows that would ordinarily + interact with a live target, may no longer do so, until the user steps back to the present. + Note also that any component or script that does interact with the target and record things + "into the present" may not cause updates in windows that are not displaying the present.
+ +This action is available when a thread is selected. It steps the current thread forward to + the next p-code tick, using emulation. Note that emulation does not affect the target, and many + windows that would ordinarily interact with a live target, may not longer do so, until the user + steps back to the present. Note also that any component or script that does interact with the + target and record things "into the present" may not cause updates in windows that are not + displaying the present.
+ + diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/images/DebuggerPcodeStepperPlugin.png b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/images/DebuggerPcodeStepperPlugin.png new file mode 100644 index 0000000000..112f3f6f3c Binary files /dev/null and b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerPcodeStepperPlugin/images/DebuggerPcodeStepperPlugin.png differ diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerRegistersPlugin/DebuggerRegistersPlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerRegistersPlugin/DebuggerRegistersPlugin.html index c7ee982327..2ef13abe39 100644 --- a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerRegistersPlugin/DebuggerRegistersPlugin.html +++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerRegistersPlugin/DebuggerRegistersPlugin.html @@ -31,7 +31,7 @@The table displays information about registers, including their values and types. It has the - following columns
+ following columns:The stack window displays the current trace's execution stack, as unwound and reported by the target. Not all debuggers will unwind the stack, in which case, this window displays a - synthetic innermost frame. Level 0 always refers to the innermost frame, and each incremental + synthetic innermost frame. When emulation was used to generate the current machine state, only + a synthetic frame is shown. Level 0 always refers to the innermost frame, and each incremental level refers to the next caller in the chain — most of the time. The current frame comprises one element of the tool's current "coordinates." Selecting a frame changes those coordinates, potentially causing other windows to display different information. Namely, the Registers window - will show registers for the current frame, assuming they can be retrieved The Listings may also - navigate to the current frame's program counter.
+ will show registers for the current frame, assuming they can be retrieved. The Listings may + also navigate to the current frame's program counter.
Step Track
- Backward
Step Track
+ Snap BackwardThis action is available when there exists a snapshot previous to the current. It steps the + trace backward to the previous snapshot, causing most windows to display the recorded data from + the new point in time. Note that stepping backward does not affect the target, and many windows + that would ordinarily interact with a live target, may no longer do so, until the user steps + back to the present. Note also that any component or script that does interact with the target + and record things "into the present" will not cause updates in windows that are not displaying + the present.
+ +
Step Trace
+ Snap ForwardThis action is available when there exists a snapshot ahead of the current. It steps the + trace forward to the next snapshot, causing most windows to display the recorded data from the + new point in time. If the new point in time represents "the present" for a live trace, then + many windows will resume interacting with the target. Note that stepping the trace does not + affect the target; however, stepping back to the present may cause some windows to query the + target.
+ +
Step Track
+ Tick BackwardThis action is available when there exists a point in time previous to the current. It steps - the trace backward once, causing most windows to display the recorded data from the new point - in time. Note that stepping backward does not affect the target, and many windows that would - ordinarily interact with a live target, may no longer do so, until the user steps back to the - present. Note also that any component or script that does interact with the target and record - things "into the present" will not cause updates in windows that are not displaying the - present.
+ the trace backward to the previous tick, possibly using emulation. Note that stepping backward + does not affect the target, and many windows that would ordinarily interact with a live target, + may no longer do so, until the user steps back to the present. Note also that any component or + script that does interact with the target and record things "into the present" may not cause + updates in windows that are not displaying the present. -
Step Trace
+
Step Trace Tick
ForwardThis action is available when there exists a point in time ahead of the current. It steps - the trace forward once, causing most windows to display the recorded data from the new point in - time. If the new point in time represents "the present" for a live trace, then many windows - will resume interacting with the target. Note that stepping the trace does not affect the - target; however, stepping back to the present may cause some windows to query the target.
+This action is available when a thread is selected. It steps the current thread forward to + the next tick, using emulation. Note that emulation does not affect the target, and many + windows that would ordinarily interact with a live target, may no longer do so, until the user + steps back to the present. Note also that any component or script that does interact with the + target and record things "into the present" may not cause updates in windows that are not + displaying the present.
Seek Trace to
PresentThis window displays all recorded "snapshots" in the current trace. Typically, there is one snapshot per event recorded. Other tables often display the times of various events or use time - ranges to describe lifespans of various records. Those times refer to the "Snap," which is a + ranges to describe lifespans of various records. Those times refer to the "snap," which is a 0-up counter of snapshot records. Thus, a snapshot is a collection of observations of a target's state, usually while suspended, along with any user mark up. Selecting a snapshot navigates to the selected point in time. Note that browsing the past may prevent other windows @@ -50,5 +50,18 @@
The time window provides the following action:
+ +This toggle action is always available. It is enabled by default. The emulation service, + which enabled trace extrapolation and interpolation, writes emulated state into the trace's + "scratch space," which comprises all negative snaps. When this toggle is enabled, those + snapshots are hidden. They can be displayed by disabling this toggle. Note that navigating into + scratch space may cause temporary undefined behavior in some windows, and may prevent + interaction with the target.