diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerListingPlugin/images/DebuggerListingPlugin.png b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerListingPlugin/images/DebuggerListingPlugin.png index d8d7e04dc7..dd87b11ced 100644 Binary files a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerListingPlugin/images/DebuggerListingPlugin.png and b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerListingPlugin/images/DebuggerListingPlugin.png differ diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerThreadsPlugin/images/DebuggerThreadsPlugin.png b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerThreadsPlugin/images/DebuggerThreadsPlugin.png index 65b3572ee6..7a10f049ff 100644 Binary files a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerThreadsPlugin/images/DebuggerThreadsPlugin.png and b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerThreadsPlugin/images/DebuggerThreadsPlugin.png differ diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTimePlugin/DebuggerTimePlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTimePlugin/DebuggerTimePlugin.html index 0f74f6c0bc..46a9d5e5aa 100644 --- a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTimePlugin/DebuggerTimePlugin.html +++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTimePlugin/DebuggerTimePlugin.html @@ -61,18 +61,16 @@

Go To Time

-

This action is available when a trace is active. It prompts for a time schedule. - This is the same form as the notation in the sub-title of the Threads window. In many - cases, it is simply the snapshot number, e.g., 3, which will go to the snapshot - with key 3. It may optionally include an emulation schedule. For example, 3:10 - will use snapshot 3 for an emulator's initial state and step 10 machine instructions on - snapshot 3's event thread. If the snapshot does not give an event thread, then the thread must - be specified in the expression, e.g., 3:t1-10. That expression will start at - snapshot 3, get the thread with key 1, and step it 10 machine instructions. The stepping - commands can be repeated any number of times, separated by semicolons, to step threads in a - specified sequence. For example, 3:t1-10;t2-5 will do the same as before, then get - thread 2 and step it 5 times.

+

This action is available when a trace is active. It prompts for a time schedule. In + many cases, it is simply the snapshot number, e.g., 3, which will go to the + snapshot with key 3. It may optionally include an emulation schedule. For example, + 3:10 will use snapshot 3 for an emulator's initial state and step 10 machine + instructions on snapshot 3's event thread. If the snapshot does not give an event thread, then + the thread must be specified in the expression, e.g., 3:t1-10. That expression + will start at snapshot 3, get the thread with key 1, and step it 10 machine instructions. The + stepping commands can be repeated any number of times, separated by semicolons, to step threads + in a specified sequence. For example, 3:t1-10;t2-5 will do the same as before, + then get thread 2 and step it 5 times.

The emulator's state can also be patched by the schedule. Instead of specifying the number of steps, write a Sleigh statement, e.g., 3:t1-{r0=0x1234};10. This will diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png index a8839668b2..b4dff232d2 100644 Binary files a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png and b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png differ diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/thread/DebuggerThreadsProvider.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/thread/DebuggerThreadsProvider.java index d83043533c..3334d69385 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/thread/DebuggerThreadsProvider.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/thread/DebuggerThreadsProvider.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -165,7 +165,6 @@ public class DebuggerThreadsProvider extends ComponentProviderAdapter { forSnapsListener.setTrace(coordinates.getTrace()); - setSubTitle(coordinates.getTime().toString()); contextChanged(); } diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/trace/DebuggerTraceTabPanel.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/trace/DebuggerTraceTabPanel.java index 46f66b1f3f..a83ee6ab40 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/trace/DebuggerTraceTabPanel.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/trace/DebuggerTraceTabPanel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,11 +25,11 @@ import ghidra.app.plugin.core.debug.event.*; import ghidra.app.plugin.core.debug.gui.DebuggerResources; import ghidra.app.plugin.core.debug.gui.DebuggerResources.*; import ghidra.app.plugin.core.debug.gui.thread.DebuggerTraceFileActionContext; -import ghidra.app.plugin.core.progmgr.MultiTabPlugin; import ghidra.app.services.DebuggerTargetService; import ghidra.app.services.DebuggerTraceManagerService; import ghidra.debug.api.target.Target; import ghidra.debug.api.target.TargetPublicationListener; +import ghidra.debug.api.tracemgr.DebuggerCoordinates; import ghidra.framework.model.*; import ghidra.framework.plugintool.*; import ghidra.framework.plugintool.annotation.AutoServiceConsumed; @@ -117,7 +117,17 @@ public class DebuggerTraceTabPanel extends GTabPanel } private String getNameForTrace(Trace trace) { - return DomainObjectDisplayUtils.getTabText(trace); + String name = DomainObjectDisplayUtils.getTabText(trace); + DebuggerCoordinates current = traceManager.getCurrentFor(trace); + if (current == DebuggerCoordinates.NOWHERE) { + // TODO: Could use view's snap and time table's schedule + return name + " (?)"; + } + String schedule = current.getTime().toString(); + if (schedule.length() > 15) { + schedule = "..." + schedule.substring(schedule.length() - 12); + } + return name + " (" + schedule + ")"; } private Icon getIconForTrace(Trace trace) { @@ -179,6 +189,7 @@ public class DebuggerTraceTabPanel extends GTabPanel Trace trace = evt.getActiveCoordinates().getTrace(); try (Suppression supp = cbCoordinateActivation.suppress(null)) { selectTab(trace); + refreshTab(trace); } } else if (event instanceof TraceClosedPluginEvent evt) { diff --git a/Ghidra/Test/DebuggerIntegrationTest/src/screen/java/ghidraclass/debugger/screenshot/TutorialDebuggerScreenShots.java b/Ghidra/Test/DebuggerIntegrationTest/src/screen/java/ghidraclass/debugger/screenshot/TutorialDebuggerScreenShots.java index 28d89edaab..39a7e36455 100644 --- a/Ghidra/Test/DebuggerIntegrationTest/src/screen/java/ghidraclass/debugger/screenshot/TutorialDebuggerScreenShots.java +++ b/Ghidra/Test/DebuggerIntegrationTest/src/screen/java/ghidraclass/debugger/screenshot/TutorialDebuggerScreenShots.java @@ -309,6 +309,7 @@ public class TutorialDebuggerScreenShots extends GhidraScreenShotGenerator public void testGettingStarted_DisassemblyAfterLaunch() throws Throwable { launchProgramInGdb(); + Thread.sleep(7000); captureToolWindow(1920, 1080); } @@ -354,7 +355,7 @@ public class TutorialDebuggerScreenShots extends GhidraScreenShotGenerator launchProgramInGdb(); placeBreakpointsSRandRand(); - tool.setSize(1920, 1080); + runSwing(() -> tool.setSize(1920, 1080)); captureProvider(DebuggerBreakpointsProvider.class); } diff --git a/GhidraDocs/GhidraClass/Debugger/B2-Emulation.html b/GhidraDocs/GhidraClass/Debugger/B2-Emulation.html index 2d5a708ed3..d178d2273d 100644 --- a/GhidraDocs/GhidraClass/Debugger/B2-Emulation.html +++ b/GhidraDocs/GhidraClass/Debugger/B2-Emulation.html @@ -238,16 +238,16 @@ snapshot, Ghidra will read that variable from the live target, capture it, and provide its value to the emulator.

Stepping Schedules

-

If you had not noticed before, the subtitle of the Threads window -gives the current snapshot number. If you have stepped in the emulator, -it will also contain the sequence of steps emulated. Recall the -time element of the Debugger’s coordinates. (See the -Navigation module if you need a +

If you had not noticed before, the trace tabs include the current +snapshot number. If you have stepped in the emulator, it will also +contain the sequence of steps emulated. Recall the time element +of the Debugger’s coordinates. (See the Navigation module if you need a refresher.) The time element, called the schedule, consists of -both the current snapshot and the sequence of steps to emulate. The -subtitle displays that schedule. If you have done any patching of the -emulator’s state, you may notice some more complicated “steps” in the -schedule. The syntax is:

+both the current snapshot and the sequence of steps to emulate. The tab +displays that schedule. If you have done any patching of the emulator’s +state, you may notice some more complicated “steps” in the schedule. The +syntax is: