Merge remote-tracking branch 'origin/GP-5265_Dan_moveScheduleDisplay--SQUASHED'

This commit is contained in:
Ryan Kurtz 2025-03-05 10:34:19 -05:00
commit a0c5e18fcc
18 changed files with 38 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

@ -61,18 +61,16 @@
<H3><A name="goto_time"></A>Go To Time</H3>
<P>This action is available when a trace is active. It prompts for a <EM>time schedule</EM>.
This is the same form as the notation in the sub-title of the <A href=
"help/topics/DebuggerThreadsPlugin/DebuggerThreadsPlugin.html">Threads</A> window. In many
cases, it is simply the snapshot number, e.g., <CODE>3</CODE>, which will go to the snapshot
with key 3. It may optionally include an emulation schedule. For example, <CODE>3:10</CODE>
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., <CODE>3:t1-10</CODE>. 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, <CODE>3:t1-10;t2-5</CODE> will do the same as before, then get
thread 2 and step it 5 times.</P>
<P>This action is available when a trace is active. It prompts for a <EM>time schedule</EM>. In
many cases, it is simply the snapshot number, e.g., <CODE>3</CODE>, which will go to the
snapshot with key 3. It may optionally include an emulation schedule. For example,
<CODE>3:10</CODE> 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., <CODE>3:t1-10</CODE>. 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, <CODE>3:t1-10;t2-5</CODE> will do the same as before,
then get thread 2 and step it 5 times.</P>
<P>The emulator's state can also be patched by the schedule. Instead of specifying the number
of steps, write a <EM>Sleigh</EM> statement, e.g., <CODE>3:t1-{r0=0x1234};10</CODE>. This will

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

View file

@ -145,7 +145,6 @@ public class DebuggerThreadsProvider extends ComponentProviderAdapter {
forSnapsListener.setTrace(coordinates.getTrace());
setSubTitle(coordinates.getTime().toString());
contextChanged();
}

View file

@ -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<Trace>
}
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 trace = evt.getActiveCoordinates().getTrace();
try (Suppression supp = cbCoordinateActivation.suppress(null)) {
selectTab(trace);
refreshTab(trace);
}
}
else if (event instanceof TraceClosedPluginEvent evt) {