From d6c1c3cf85e68d85354ee942fdb68f4f49820d44 Mon Sep 17 00:00:00 2001
From: Dan <46821332+nsadeveloper789@users.noreply.github.com>
Date: Mon, 6 Dec 2021 14:42:35 -0500
Subject: [PATCH] GP-1222: Added comparison between times in a trace.
---
Ghidra/Debug/Debugger/build.gradle | 1 +
Ghidra/Debug/Debugger/certification.manifest | 4 +
.../src/main/help/help/TOC_Source.xml | 4 +
.../DebuggerTimePlugin.html | 19 +-
.../DebuggerTraceViewDiffPlugin.html | 158 +++++
.../images/DebuggerTimeSelectionDialog.png | Bin 0 -> 21829 bytes
.../images/DebuggerTraceViewDiffPlugin.png | Bin 0 -> 48968 bytes
.../core/debug/DebuggerCoordinates.java | 4 +
.../core/debug/gui/DebuggerResources.java | 78 +++
.../debug/gui/DebuggerSnapActionContext.java | 18 +-
.../action/DebuggerTrackLocationTrait.java | 4 +-
.../gui/diff/DebuggerTraceViewDiffPlugin.java | 630 ++++++++++++++++++
.../listing/CursorBackgroundColorModel.java | 3 +-
.../gui/listing/DebuggerListingPlugin.java | 26 +
.../gui/listing/DebuggerListingProvider.java | 68 +-
...emoryStateListingBackgroundColorModel.java | 3 +-
.../gui/thread/DebuggerThreadsProvider.java | 4 +-
.../gui/time/DebuggerSnapshotTablePanel.java | 262 ++++++++
.../debug/gui/time/DebuggerTimePlugin.java | 71 ++
.../debug/gui/time/DebuggerTimeProvider.java | 234 +------
.../gui/time/DebuggerTimeSelectionDialog.java | 193 ++++++
.../DebuggerTraceManagerServicePlugin.java | 60 +-
.../core/debug/utils/BackgroundUtils.java | 60 +-
.../app/services/DebuggerListingService.java | 70 ++
.../services/DebuggerTraceManagerService.java | 200 +++++-
.../resources/images/table_relationship.png | Bin 0 -> 663 bytes
...ebuggerTraceViewDiffPluginScreenShots.java | 128 ++++
.../AbstractGhidraHeadedDebuggerGUITest.java | 62 ++
.../diff/DebuggerTraceViewDiffPluginTest.java | 233 +++++++
.../listing/DebuggerListingProviderTest.java | 60 +-
.../DebuggerMemoryBytesProviderTest.java | 20 -
.../gui/time/DebuggerTimeProviderTest.java | 75 ++-
.../ghidra/trace/database/DBTraceUtils.java | 1 -
.../database/memory/DBTraceMemoryManager.java | 11 +
.../database/memory/DBTraceMemorySpace.java | 20 +
.../model/memory/TraceMemoryOperations.java | 26 +
.../trace/model/time/schedule/Sequence.java | 18 +-
.../trace/model/time/schedule/Step.java | 8 +-
.../model/time/schedule/TraceSchedule.java | 24 +-
.../framework/plugintool/AutoService.java | 10 +-
.../framework/options/AutoOptionsTest.java | 183 +++--
.../core/codebrowser/CodeViewerProvider.java | 14 +-
.../docking/widgets/dialogs/InputDialog.java | 74 +-
43 files changed, 2622 insertions(+), 519 deletions(-)
create mode 100644 Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/DebuggerTraceViewDiffPlugin.html
create mode 100644 Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTimeSelectionDialog.png
create mode 100644 Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png
create mode 100644 Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/diff/DebuggerTraceViewDiffPlugin.java
create mode 100644 Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/time/DebuggerSnapshotTablePanel.java
create mode 100644 Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/time/DebuggerTimeSelectionDialog.java
create mode 100644 Ghidra/Debug/Debugger/src/main/resources/images/table_relationship.png
create mode 100644 Ghidra/Debug/Debugger/src/screen/java/ghidra/app/plugin/core/debug/gui/diff/DebuggerTraceViewDiffPluginScreenShots.java
create mode 100644 Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/diff/DebuggerTraceViewDiffPluginTest.java
diff --git a/Ghidra/Debug/Debugger/build.gradle b/Ghidra/Debug/Debugger/build.gradle
index 29c6dd693b..7030ea7f14 100644
--- a/Ghidra/Debug/Debugger/build.gradle
+++ b/Ghidra/Debug/Debugger/build.gradle
@@ -31,6 +31,7 @@ dependencies {
api project(':ProposedUtils')
helpPath project(path: ':Base', configuration: 'helpPath')
+ helpPath project(path: ':ProgramDiff', configuration: 'helpPath')
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
diff --git a/Ghidra/Debug/Debugger/certification.manifest b/Ghidra/Debug/Debugger/certification.manifest
index c0fbb2759e..ce88827e9d 100644
--- a/Ghidra/Debug/Debugger/certification.manifest
+++ b/Ghidra/Debug/Debugger/certification.manifest
@@ -119,6 +119,9 @@ src/main/help/help/topics/DebuggerThreadsPlugin/images/stepinto.png||GHIDRA||||E
src/main/help/help/topics/DebuggerTimePlugin/DebuggerTimePlugin.html||GHIDRA||||END|
src/main/help/help/topics/DebuggerTimePlugin/images/DebuggerTimePlugin.png||GHIDRA||||END|
src/main/help/help/topics/DebuggerTraceManagerServicePlugin/DebuggerTraceManagerServicePlugin.html||GHIDRA||||END|
+src/main/help/help/topics/DebuggerTraceViewDiffPlugin/DebuggerTraceViewDiffPlugin.html||GHIDRA||||END|
+src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTimeSelectionDialog.png||GHIDRA||||END|
+src/main/help/help/topics/DebuggerTraceViewDiffPlugin/images/DebuggerTraceViewDiffPlugin.png||GHIDRA||||END|
src/main/help/help/topics/DebuggerWatchesPlugin/DebuggerWatchesPlugin.html||GHIDRA||||END|
src/main/help/help/topics/DebuggerWatchesPlugin/images/DebuggerWatchesPlugin.png||GHIDRA||||END|
src/main/resources/defaultTools/Debugger.tool||GHIDRA||||END|
@@ -184,6 +187,7 @@ src/main/resources/images/stop.png||GHIDRA||||END|
src/main/resources/images/sync_enabled.png||GHIDRA||||END|
src/main/resources/images/system-switch-user.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/table.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
+src/main/resources/images/table_relationship.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/text-xml.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/thread.png||GHIDRA||||END|
src/main/resources/images/time.png||FAMFAMFAM Icons - CC 2.5||||END|
diff --git a/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml b/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml
index 9e57f22ea4..f45b46b223 100644
--- a/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml
+++ b/Ghidra/Debug/Debugger/src/main/help/help/TOC_Source.xml
@@ -157,6 +157,10 @@
sortgroup="p"
target="help/topics/DebuggerPcodeStepperPlugin/DebuggerPcodeStepperPlugin.html" />
+
The time window provides the following action:
+This action is available in the
menu whenever the focused + window has an associated snapshot. It will prompt for a new description for the current + snapshot. This is a shortcut to modifying the description in the time table, but can be + accessed outside of the time window.This toggle action is always available. It is enabled by default. The emulation service, - which enables 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.
+This toggle action is always available in the drop-down actions of the Time window. It is + enabled by default. The emulation service, which enables 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.