mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-4186: Refactor trace events.
This commit is contained in:
parent
00afebac48
commit
69d58d4e86
93 changed files with 1555 additions and 1111 deletions
|
@ -26,12 +26,12 @@ import ghidra.async.AsyncTimer;
|
|||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.*;
|
||||
import ghidra.trace.model.TraceDomainObjectListener;
|
||||
import ghidra.trace.model.memory.TraceMemoryRegion;
|
||||
import ghidra.trace.model.modules.TraceModule;
|
||||
import ghidra.trace.model.modules.TraceSection;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Swing;
|
||||
|
||||
public class DebuggerLocationLabel extends JLabel {
|
||||
|
@ -44,19 +44,19 @@ public class DebuggerLocationLabel extends JLabel {
|
|||
updateLabelDebouncer
|
||||
.addListener(__ -> Swing.runIfSwingOrRunLater(() -> doUpdateLabel()));
|
||||
|
||||
listenFor(TraceMemoryRegionChangeType.ADDED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.DELETED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_ADDED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_DELETED, this::regionChanged);
|
||||
|
||||
listenFor(TraceModuleChangeType.ADDED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.DELETED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_ADDED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_DELETED, this::moduleChanged);
|
||||
|
||||
listenFor(TraceSectionChangeType.ADDED, this::sectionChanged);
|
||||
listenFor(TraceSectionChangeType.CHANGED, this::sectionChanged);
|
||||
listenFor(TraceSectionChangeType.DELETED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_ADDED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_CHANGED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_DELETED, this::sectionChanged);
|
||||
}
|
||||
|
||||
private void doUpdateLabel() {
|
||||
|
|
|
@ -31,7 +31,7 @@ import ghidra.framework.options.SaveState;
|
|||
import ghidra.framework.plugintool.AutoConfigState.ConfigFieldCodec;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.util.classfinder.ClassSearcher;
|
||||
import ghidra.util.classfinder.ExtensionPoint;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
|
@ -91,7 +91,7 @@ public interface AutoMapSpec extends ExtensionPoint {
|
|||
return DebuggerResources.ICON_CONFIG;
|
||||
}
|
||||
|
||||
Collection<TraceChangeType<?, ?>> getChangeTypes();
|
||||
Collection<TraceEvent<?, ?>> getChangeTypes();
|
||||
|
||||
default String getTaskTitle() {
|
||||
return getMenuName();
|
||||
|
|
|
@ -24,9 +24,8 @@ import ghidra.debug.api.modules.ModuleMapProposal;
|
|||
import ghidra.debug.api.modules.ModuleMapProposal.ModuleMapEntry;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceMemoryRegionChangeType;
|
||||
import ghidra.trace.model.Trace.TraceModuleChangeType;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -44,9 +43,10 @@ public class ByModuleAutoMapSpec implements AutoMapSpec {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<TraceChangeType<?, ?>> getChangeTypes() {
|
||||
return List.of(TraceModuleChangeType.ADDED, TraceModuleChangeType.CHANGED,
|
||||
TraceMemoryRegionChangeType.ADDED, TraceMemoryRegionChangeType.CHANGED);
|
||||
public Collection<TraceEvent<?, ?>> getChangeTypes() {
|
||||
return List.of(
|
||||
TraceEvents.MODULE_ADDED, TraceEvents.MODULE_CHANGED,
|
||||
TraceEvents.REGION_ADDED, TraceEvents.REGION_CHANGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,8 +24,8 @@ import ghidra.debug.api.modules.RegionMapProposal;
|
|||
import ghidra.debug.api.modules.RegionMapProposal.RegionMapEntry;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceMemoryRegionChangeType;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -43,8 +43,8 @@ public class ByRegionAutoMapSpec implements AutoMapSpec {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<TraceChangeType<?, ?>> getChangeTypes() {
|
||||
return List.of(TraceMemoryRegionChangeType.ADDED);
|
||||
public Collection<TraceEvent<?, ?>> getChangeTypes() {
|
||||
return List.of(TraceEvents.REGION_ADDED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,8 +24,8 @@ import ghidra.debug.api.modules.SectionMapProposal;
|
|||
import ghidra.debug.api.modules.SectionMapProposal.SectionMapEntry;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceSectionChangeType;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -43,8 +43,8 @@ public class BySectionAutoMapSpec implements AutoMapSpec {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<TraceChangeType<?, ?>> getChangeTypes() {
|
||||
return List.of(TraceSectionChangeType.ADDED);
|
||||
public Collection<TraceEvent<?, ?>> getChangeTypes() {
|
||||
return List.of(TraceEvents.SECTION_ADDED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,18 +32,16 @@ import ghidra.app.util.viewer.listingpanel.AddressSetDisplayListener;
|
|||
import ghidra.debug.api.target.Target;
|
||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.framework.cmd.BackgroundCommand;
|
||||
import ghidra.framework.model.DomainObject;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.*;
|
||||
import ghidra.framework.options.SaveState;
|
||||
import ghidra.framework.plugintool.*;
|
||||
import ghidra.framework.plugintool.annotation.AutoConfigStateField;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryStateChangeType;
|
||||
import ghidra.trace.model.Trace.TraceSnapshotChangeType;
|
||||
import ghidra.trace.model.memory.TraceMemoryState;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
@ -101,9 +99,9 @@ public abstract class DebuggerReadsMemoryTrait {
|
|||
|
||||
protected class ForReadsTraceListener extends TraceDomainObjectListener {
|
||||
public ForReadsTraceListener() {
|
||||
listenForUntyped(DomainObject.DO_OBJECT_RESTORED, this::objectRestored);
|
||||
listenFor(TraceSnapshotChangeType.ADDED, this::snapshotAdded);
|
||||
listenFor(TraceMemoryStateChangeType.CHANGED, this::memStateChanged);
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::objectRestored);
|
||||
listenFor(TraceEvents.SNAPSHOT_ADDED, this::snapshotAdded);
|
||||
listenFor(TraceEvents.BYTES_STATE_CHANGED, this::memStateChanged);
|
||||
}
|
||||
|
||||
private void objectRestored(DomainObjectChangeRecord rec) {
|
||||
|
|
|
@ -43,11 +43,10 @@ import ghidra.framework.plugintool.*;
|
|||
import ghidra.framework.plugintool.annotation.AutoConfigStateField;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.Trace.TraceStackChangeType;
|
||||
import ghidra.trace.model.stack.TraceStack;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
public class DebuggerTrackLocationTrait {
|
||||
|
@ -57,8 +56,8 @@ public class DebuggerTrackLocationTrait {
|
|||
protected class ForTrackingListener extends TraceDomainObjectListener {
|
||||
|
||||
public ForTrackingListener() {
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::registersChanged);
|
||||
listenFor(TraceStackChangeType.CHANGED, this::stackChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::registersChanged);
|
||||
listenFor(TraceEvents.STACK_CHANGED, this::stackChanged);
|
||||
}
|
||||
|
||||
private void registersChanged(TraceAddressSpace space, TraceAddressSnapRange range,
|
||||
|
|
|
@ -22,7 +22,7 @@ import ghidra.app.services.DebuggerStaticMappingService;
|
|||
import ghidra.app.services.ProgramManager;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class NoneAutoMapSpec implements AutoMapSpec {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<TraceChangeType<?, ?>> getChangeTypes() {
|
||||
public Collection<TraceEvent<?, ?>> getChangeTypes() {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import ghidra.program.model.listing.Program;
|
|||
import ghidra.trace.model.Lifespan;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.modules.TraceConflictedMappingException;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class OneToOneAutoMapSpec implements AutoMapSpec {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<TraceChangeType<?, ?>> getChangeTypes() {
|
||||
public Collection<TraceEvent<?, ?>> getChangeTypes() {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ import ghidra.program.model.address.AddressRange;
|
|||
import ghidra.program.util.MarkerLocation;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceBreakpointChangeType;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpoint;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
|
@ -602,10 +602,10 @@ public class DebuggerBreakpointsProvider extends ComponentProviderAdapter
|
|||
public ForBreakpointLocationsTraceListener(Trace trace) {
|
||||
this.trace = trace;
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
listenFor(TraceBreakpointChangeType.ADDED, this::locationAdded);
|
||||
listenFor(TraceBreakpointChangeType.CHANGED, this::locationChanged);
|
||||
listenFor(TraceBreakpointChangeType.LIFESPAN_CHANGED, this::locationLifespanChanged);
|
||||
listenFor(TraceBreakpointChangeType.DELETED, this::locationDeleted);
|
||||
listenFor(TraceEvents.BREAKPOINT_ADDED, this::locationAdded);
|
||||
listenFor(TraceEvents.BREAKPOINT_CHANGED, this::locationChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_LIFESPAN_CHANGED, this::locationLifespanChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_DELETED, this::locationDeleted);
|
||||
|
||||
trace.addListener(this);
|
||||
}
|
||||
|
|
|
@ -49,10 +49,10 @@ import ghidra.framework.plugintool.util.PluginStatus;
|
|||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceObjectChangeType;
|
||||
import ghidra.trace.model.target.TraceObjectValue;
|
||||
import ghidra.trace.model.time.schedule.Scheduler;
|
||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.Swing;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
|
@ -78,9 +78,9 @@ public class DebuggerControlPlugin extends AbstractDebuggerPlugin
|
|||
|
||||
private final TraceDomainObjectListener listenerForObjects = new TraceDomainObjectListener() {
|
||||
{
|
||||
listenFor(TraceObjectChangeType.VALUE_CREATED, this::valueChanged);
|
||||
listenFor(TraceObjectChangeType.VALUE_DELETED, this::valueChanged);
|
||||
listenFor(TraceObjectChangeType.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
listenFor(TraceEvents.VALUE_CREATED, this::valueChanged);
|
||||
listenFor(TraceEvents.VALUE_DELETED, this::valueChanged);
|
||||
listenFor(TraceEvents.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
}
|
||||
|
||||
private void valueChanged(TraceObjectValue value) {
|
||||
|
|
|
@ -42,9 +42,9 @@ import ghidra.program.model.address.Address;
|
|||
import ghidra.program.model.address.AddressSet;
|
||||
import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryRegionChangeType;
|
||||
import ghidra.trace.model.memory.TraceMemoryManager;
|
||||
import ghidra.trace.model.memory.TraceMemoryRegion;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
|
@ -143,10 +143,10 @@ public class DebuggerLegacyRegionsPanel extends JPanel {
|
|||
public RegionsListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
|
||||
listenFor(TraceMemoryRegionChangeType.ADDED, this::regionAdded);
|
||||
listenFor(TraceMemoryRegionChangeType.CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.DELETED, this::regionDeleted);
|
||||
listenFor(TraceEvents.REGION_ADDED, this::regionAdded);
|
||||
listenFor(TraceEvents.REGION_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_DELETED, this::regionDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored() {
|
||||
|
|
|
@ -55,10 +55,10 @@ import ghidra.program.model.mem.MemoryBlock;
|
|||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.TraceDomainObjectListener;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Swing;
|
||||
|
||||
public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvider {
|
||||
|
@ -88,7 +88,7 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
|
|||
|
||||
protected class ListenerForChanges extends TraceDomainObjectListener {
|
||||
public ListenerForChanges() {
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
}
|
||||
|
||||
private void bytesChanged(TraceAddressSpace space) {
|
||||
|
|
|
@ -22,7 +22,6 @@ import ghidra.async.AsyncTimer;
|
|||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.*;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpoint;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpointManager;
|
||||
import ghidra.trace.model.memory.TraceMemoryManager;
|
||||
|
@ -30,6 +29,7 @@ import ghidra.trace.model.memory.TraceMemoryRegion;
|
|||
import ghidra.trace.model.modules.*;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.model.thread.TraceThreadManager;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Swing;
|
||||
|
||||
public class DebuggerMemviewTraceListener extends TraceDomainObjectListener {
|
||||
|
@ -55,31 +55,31 @@ public class DebuggerMemviewTraceListener extends TraceDomainObjectListener {
|
|||
|
||||
updateLabelDebouncer.addListener(__ -> Swing.runIfSwingOrRunLater(() -> doUpdate()));
|
||||
|
||||
listenFor(TraceThreadChangeType.ADDED, this::threadChanged);
|
||||
listenFor(TraceThreadChangeType.CHANGED, this::threadChanged);
|
||||
listenFor(TraceThreadChangeType.LIFESPAN_CHANGED, this::threadChanged);
|
||||
listenFor(TraceThreadChangeType.DELETED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_ADDED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_CHANGED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_LIFESPAN_CHANGED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_DELETED, this::threadChanged);
|
||||
|
||||
listenFor(TraceMemoryRegionChangeType.ADDED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceMemoryRegionChangeType.DELETED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_ADDED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_LIFESPAN_CHANGED, this::regionChanged);
|
||||
listenFor(TraceEvents.REGION_DELETED, this::regionChanged);
|
||||
|
||||
listenFor(TraceModuleChangeType.ADDED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.DELETED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_ADDED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_DELETED, this::moduleChanged);
|
||||
|
||||
listenFor(TraceSectionChangeType.ADDED, this::sectionChanged);
|
||||
listenFor(TraceSectionChangeType.CHANGED, this::sectionChanged);
|
||||
listenFor(TraceSectionChangeType.DELETED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_ADDED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_CHANGED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_DELETED, this::sectionChanged);
|
||||
|
||||
listenFor(TraceBreakpointChangeType.ADDED, this::breakpointChanged);
|
||||
listenFor(TraceBreakpointChangeType.CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceBreakpointChangeType.LIFESPAN_CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceBreakpointChangeType.DELETED, this::breakpointChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_ADDED, this::breakpointChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_LIFESPAN_CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_DELETED, this::breakpointChanged);
|
||||
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
}
|
||||
|
||||
public MemviewProvider getProvider() {
|
||||
|
|
|
@ -22,14 +22,13 @@ import java.util.stream.Stream;
|
|||
|
||||
import docking.widgets.table.RangeCursorTableHeaderRenderer.SeekListener;
|
||||
import docking.widgets.table.threaded.ThreadedTableModel;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.plugintool.Plugin;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceObjectChangeType;
|
||||
import ghidra.trace.model.Trace.TraceSnapshotChangeType;
|
||||
import ghidra.trace.model.target.TraceObject;
|
||||
import ghidra.trace.model.target.TraceObjectValue;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.datastruct.Accumulator;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
@ -40,12 +39,12 @@ public abstract class AbstractQueryTableModel<T> extends ThreadedTableModel<T, T
|
|||
protected class ListenerForChanges extends TraceDomainObjectListener {
|
||||
public ListenerForChanges() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::objectRestored);
|
||||
listenFor(TraceObjectChangeType.VALUE_CREATED, this::valueCreated);
|
||||
listenFor(TraceObjectChangeType.VALUE_DELETED, this::valueDeleted);
|
||||
listenFor(TraceObjectChangeType.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
listenFor(TraceEvents.VALUE_CREATED, this::valueCreated);
|
||||
listenFor(TraceEvents.VALUE_DELETED, this::valueDeleted);
|
||||
listenFor(TraceEvents.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
|
||||
listenFor(TraceSnapshotChangeType.ADDED, this::maxSnapChanged);
|
||||
listenFor(TraceSnapshotChangeType.DELETED, this::maxSnapChanged);
|
||||
listenFor(TraceEvents.SNAPSHOT_ADDED, this::maxSnapChanged);
|
||||
listenFor(TraceEvents.SNAPSHOT_DELETED, this::maxSnapChanged);
|
||||
}
|
||||
|
||||
protected void objectRestored(DomainObjectChangeRecord record) {
|
||||
|
|
|
@ -27,8 +27,8 @@ import ghidra.dbg.target.*;
|
|||
import ghidra.dbg.util.PathUtils.TargetObjectKeyComparator;
|
||||
import ghidra.framework.model.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceObjectChangeType;
|
||||
import ghidra.trace.model.target.*;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.HTMLUtilities;
|
||||
import ghidra.util.LockHold;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
|
@ -40,10 +40,10 @@ public class ObjectTreeModel implements DisplaysModified {
|
|||
implements DomainObjectClosedListener {
|
||||
public ListenerForChanges() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::domainObjectRestored);
|
||||
listenFor(TraceObjectChangeType.CREATED, this::objectCreated);
|
||||
listenFor(TraceObjectChangeType.VALUE_CREATED, this::valueCreated);
|
||||
listenFor(TraceObjectChangeType.VALUE_DELETED, this::valueDeleted);
|
||||
listenFor(TraceObjectChangeType.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
listenFor(TraceEvents.OBJECT_CREATED, this::objectCreated);
|
||||
listenFor(TraceEvents.VALUE_CREATED, this::valueCreated);
|
||||
listenFor(TraceEvents.VALUE_DELETED, this::valueDeleted);
|
||||
listenFor(TraceEvents.VALUE_LIFESPAN_CHANGED, this::valueLifespanChanged);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,8 +36,8 @@ import ghidra.framework.model.DomainObjectEvent;
|
|||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceModuleChangeType;
|
||||
import ghidra.trace.model.modules.*;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
|
@ -159,10 +159,10 @@ public class DebuggerLegacyModulesPanel extends JPanel {
|
|||
public ModulesListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
|
||||
listenFor(TraceModuleChangeType.ADDED, this::moduleAdded);
|
||||
listenFor(TraceModuleChangeType.CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.DELETED, this::moduleDeleted);
|
||||
listenFor(TraceEvents.MODULE_ADDED, this::moduleAdded);
|
||||
listenFor(TraceEvents.MODULE_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_DELETED, this::moduleDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored() {
|
||||
|
|
|
@ -37,10 +37,9 @@ import ghidra.framework.model.DomainObjectEvent;
|
|||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceModuleChangeType;
|
||||
import ghidra.trace.model.Trace.TraceSectionChangeType;
|
||||
import ghidra.trace.model.TraceDomainObjectListener;
|
||||
import ghidra.trace.model.modules.*;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
|
@ -146,13 +145,13 @@ public class DebuggerLegacySectionsPanel extends JPanel {
|
|||
* NOTE: No need for Module.ADDED here. A TraceModule is created empty, so when each
|
||||
* section is added, we'll get the call.
|
||||
*/
|
||||
listenFor(TraceModuleChangeType.CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceModuleChangeType.DELETED, this::moduleDeleted);
|
||||
listenFor(TraceEvents.MODULE_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_LIFESPAN_CHANGED, this::moduleChanged);
|
||||
listenFor(TraceEvents.MODULE_DELETED, this::moduleDeleted);
|
||||
|
||||
listenFor(TraceSectionChangeType.ADDED, this::sectionAdded);
|
||||
listenFor(TraceSectionChangeType.CHANGED, this::sectionChanged);
|
||||
listenFor(TraceSectionChangeType.DELETED, this::sectionDeleted);
|
||||
listenFor(TraceEvents.SECTION_ADDED, this::sectionAdded);
|
||||
listenFor(TraceEvents.SECTION_CHANGED, this::sectionChanged);
|
||||
listenFor(TraceEvents.SECTION_DELETED, this::sectionDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored() {
|
||||
|
|
|
@ -64,9 +64,9 @@ import ghidra.program.model.mem.MemoryBlock;
|
|||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.modules.*;
|
||||
import ghidra.trace.util.TraceChangeType;
|
||||
import ghidra.trace.util.TraceEvent;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
|
@ -271,12 +271,12 @@ public class DebuggerModulesProvider extends ComponentProviderAdapter {
|
|||
|
||||
protected class ForMappingTraceListener extends TraceDomainObjectListener {
|
||||
public ForMappingTraceListener(AutoMapSpec spec) {
|
||||
for (TraceChangeType<?, ?> type : spec.getChangeTypes()) {
|
||||
for (TraceEvent<?, ?> type : spec.getChangeTypes()) {
|
||||
listenFor(type, this::changed);
|
||||
}
|
||||
|
||||
// TODO: Delete this if/when TraceRecorderTarget is removed
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::memoryChanged);
|
||||
// Delete this if/when TraceRecorderTarget is removed
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::memoryChanged);
|
||||
}
|
||||
|
||||
private void changed() {
|
||||
|
|
|
@ -48,9 +48,9 @@ import ghidra.program.model.listing.Program;
|
|||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceStaticMappingChangeType;
|
||||
import ghidra.trace.model.modules.TraceStaticMapping;
|
||||
import ghidra.trace.model.modules.TraceStaticMappingManager;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.MathUtilities;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
|
@ -107,8 +107,8 @@ public class DebuggerStaticMappingProvider extends ComponentProviderAdapter
|
|||
protected class ListenerForStaticMappingDisplay extends TraceDomainObjectListener {
|
||||
public ListenerForStaticMappingDisplay() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
listenFor(TraceStaticMappingChangeType.ADDED, this::staticMappingAdded);
|
||||
listenFor(TraceStaticMappingChangeType.DELETED, this::staticMappingDeleted);
|
||||
listenFor(TraceEvents.MAPPING_ADDED, this::staticMappingAdded);
|
||||
listenFor(TraceEvents.MAPPING_DELETED, this::staticMappingDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored() {
|
||||
|
|
|
@ -52,8 +52,8 @@ import ghidra.dbg.error.DebuggerModelAccessException;
|
|||
import ghidra.debug.api.target.Target;
|
||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.docking.settings.*;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.options.AutoOptions;
|
||||
import ghidra.framework.options.SaveState;
|
||||
import ghidra.framework.plugintool.*;
|
||||
|
@ -64,15 +64,13 @@ import ghidra.program.model.lang.*;
|
|||
import ghidra.program.model.listing.Data;
|
||||
import ghidra.program.model.util.CodeUnitInsertionException;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.*;
|
||||
import ghidra.trace.model.guest.TracePlatform;
|
||||
import ghidra.trace.model.listing.*;
|
||||
import ghidra.trace.model.memory.*;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.target.TraceObject;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceRegisterUtils;
|
||||
import ghidra.trace.util.*;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.classfinder.ClassSearcher;
|
||||
|
@ -274,14 +272,14 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
|
|||
class TraceChangeListener extends TraceDomainObjectListener {
|
||||
public TraceChangeListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored(e));
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::registerValueChanged);
|
||||
listenFor(TraceMemoryStateChangeType.CHANGED, this::registerStateChanged);
|
||||
listenFor(TraceCodeChangeType.ADDED, this::registerTypeAdded);
|
||||
listenFor(TraceCodeChangeType.DATA_TYPE_REPLACED, this::registerTypeReplaced);
|
||||
listenFor(TraceCodeChangeType.LIFESPAN_CHANGED, this::registerTypeLifespanChanged);
|
||||
listenFor(TraceCodeChangeType.REMOVED, this::registerTypeRemoved);
|
||||
listenFor(TraceThreadChangeType.DELETED, this::threadDeleted);
|
||||
listenFor(TraceThreadChangeType.LIFESPAN_CHANGED, this::threadDestroyed);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::registerValueChanged);
|
||||
listenFor(TraceEvents.BYTES_STATE_CHANGED, this::registerStateChanged);
|
||||
listenFor(TraceEvents.CODE_ADDED, this::registerTypeAdded);
|
||||
listenFor(TraceEvents.CODE_DATA_TYPE_REPLACED, this::registerTypeReplaced);
|
||||
listenFor(TraceEvents.CODE_LIFESPAN_CHANGED, this::registerTypeLifespanChanged);
|
||||
listenFor(TraceEvents.CODE_REMOVED, this::registerTypeRemoved);
|
||||
listenFor(TraceEvents.THREAD_DELETED, this::threadDeleted);
|
||||
listenFor(TraceEvents.THREAD_LIFESPAN_CHANGED, this::threadDestroyed);
|
||||
}
|
||||
|
||||
private boolean isVisibleObjectsMode(AddressSpace space) {
|
||||
|
|
|
@ -170,7 +170,7 @@ public class RegisterRow {
|
|||
/**
|
||||
* Check if the register's value can be set via its data type's representation
|
||||
*
|
||||
* @return
|
||||
* @return true if the representation cell is editable
|
||||
*/
|
||||
public boolean isRepresentationEditable() {
|
||||
return provider.canWriteRegisterRepresentation(register);
|
||||
|
|
|
@ -39,15 +39,12 @@ import ghidra.program.model.lang.Register;
|
|||
import ghidra.program.model.lang.RegisterValue;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.Trace.TraceStackChangeType;
|
||||
import ghidra.trace.model.memory.TraceMemorySpace;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.stack.TraceStack;
|
||||
import ghidra.trace.model.stack.TraceStackFrame;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceRegisterUtils;
|
||||
import ghidra.trace.util.*;
|
||||
import ghidra.util.Swing;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
|
@ -124,11 +121,11 @@ public class DebuggerLegacyStackPanel extends JPanel {
|
|||
|
||||
class ForStackListener extends TraceDomainObjectListener {
|
||||
public ForStackListener() {
|
||||
listenFor(TraceStackChangeType.ADDED, this::stackAdded);
|
||||
listenFor(TraceStackChangeType.CHANGED, this::stackChanged);
|
||||
listenFor(TraceStackChangeType.DELETED, this::stackDeleted);
|
||||
listenFor(TraceEvents.STACK_ADDED, this::stackAdded);
|
||||
listenFor(TraceEvents.STACK_CHANGED, this::stackChanged);
|
||||
listenFor(TraceEvents.STACK_DELETED, this::stackDeleted);
|
||||
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
}
|
||||
|
||||
private void stackAdded(TraceStack stack) {
|
||||
|
|
|
@ -40,7 +40,6 @@ import ghidra.program.model.mem.ByteMemBufferImpl;
|
|||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.model.pcode.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.guest.TracePlatform;
|
||||
import ghidra.trace.model.listing.*;
|
||||
import ghidra.trace.model.memory.*;
|
||||
|
@ -48,6 +47,7 @@ import ghidra.trace.model.stack.TraceStack;
|
|||
import ghidra.trace.model.stack.TraceStackFrame;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.MathUtilities;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
|
@ -650,7 +650,7 @@ public enum VariableValueUtils {
|
|||
*/
|
||||
private class ListenerForChanges extends TraceDomainObjectListener {
|
||||
public ListenerForChanges() {
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
}
|
||||
|
||||
private void bytesChanged(TraceAddressSpace space, TraceAddressSnapRange range) {
|
||||
|
@ -826,8 +826,8 @@ public enum VariableValueUtils {
|
|||
* data unit using {@link #getRegisterUnit(Register)}. Fall back to this method only if that
|
||||
* one fails.
|
||||
*
|
||||
* @param register
|
||||
* @return
|
||||
* @param register the register
|
||||
* @return the "raw" value of the register
|
||||
*/
|
||||
public WatchValue getRawRegisterValue(Register register) {
|
||||
WatchValuePcodeExecutorState state =
|
||||
|
|
|
@ -33,16 +33,15 @@ import ghidra.app.plugin.core.debug.gui.DebuggerSnapActionContext;
|
|||
import ghidra.app.services.DebuggerTraceManagerService;
|
||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.docking.settings.Settings;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.plugintool.AutoService;
|
||||
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceSnapshotChangeType;
|
||||
import ghidra.trace.model.Trace.TraceThreadChangeType;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.model.thread.TraceThreadManager;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.database.ObjectKey;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
|
@ -128,13 +127,13 @@ public class DebuggerLegacyThreadsPanel extends JPanel {
|
|||
public ForThreadsListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::objectRestored);
|
||||
|
||||
listenFor(TraceThreadChangeType.ADDED, this::threadAdded);
|
||||
listenFor(TraceThreadChangeType.CHANGED, this::threadChanged);
|
||||
listenFor(TraceThreadChangeType.LIFESPAN_CHANGED, this::threadChanged);
|
||||
listenFor(TraceThreadChangeType.DELETED, this::threadDeleted);
|
||||
listenFor(TraceEvents.THREAD_ADDED, this::threadAdded);
|
||||
listenFor(TraceEvents.THREAD_CHANGED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_LIFESPAN_CHANGED, this::threadChanged);
|
||||
listenFor(TraceEvents.THREAD_DELETED, this::threadDeleted);
|
||||
|
||||
listenFor(TraceSnapshotChangeType.ADDED, this::snapAdded);
|
||||
listenFor(TraceSnapshotChangeType.DELETED, this::snapDeleted);
|
||||
listenFor(TraceEvents.SNAPSHOT_ADDED, this::snapAdded);
|
||||
listenFor(TraceEvents.SNAPSHOT_DELETED, this::snapDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored(DomainObjectChangeRecord rec) {
|
||||
|
|
|
@ -33,15 +33,15 @@ import ghidra.app.plugin.core.debug.gui.DebuggerResources.ToToggleSelectionListe
|
|||
import ghidra.app.services.*;
|
||||
import ghidra.app.services.DebuggerTraceManagerService.BooleanChangeAdapter;
|
||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.plugintool.AutoService;
|
||||
import ghidra.framework.plugintool.ComponentProviderAdapter;
|
||||
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceSnapshotChangeType;
|
||||
import ghidra.trace.model.TraceDomainObjectListener;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
|
||||
public class DebuggerThreadsProvider extends ComponentProviderAdapter {
|
||||
|
||||
|
@ -67,8 +67,8 @@ public class DebuggerThreadsProvider extends ComponentProviderAdapter {
|
|||
public ForSnapsListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::objectRestored);
|
||||
|
||||
listenFor(TraceSnapshotChangeType.ADDED, this::snapAdded);
|
||||
listenFor(TraceSnapshotChangeType.DELETED, this::snapDeleted);
|
||||
listenFor(TraceEvents.SNAPSHOT_ADDED, this::snapAdded);
|
||||
listenFor(TraceEvents.SNAPSHOT_DELETED, this::snapDeleted);
|
||||
}
|
||||
|
||||
private void setTrace(Trace trace) {
|
||||
|
|
|
@ -31,10 +31,10 @@ import ghidra.docking.settings.Settings;
|
|||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.trace.model.Trace.TraceSnapshotChangeType;
|
||||
import ghidra.trace.model.TraceDomainObjectListener;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
import ghidra.trace.model.time.TraceTimeManager;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.table.GhidraTableFilterPanel;
|
||||
import ghidra.util.table.column.AbstractGColumnRenderer;
|
||||
|
||||
|
@ -96,9 +96,9 @@ public class DebuggerSnapshotTablePanel extends JPanel {
|
|||
public SnapshotListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
|
||||
listenFor(TraceSnapshotChangeType.ADDED, this::snapAdded);
|
||||
listenFor(TraceSnapshotChangeType.CHANGED, this::snapChanged);
|
||||
listenFor(TraceSnapshotChangeType.DELETED, this::snapDeleted);
|
||||
listenFor(TraceEvents.SNAPSHOT_ADDED, this::snapAdded);
|
||||
listenFor(TraceEvents.SNAPSHOT_CHANGED, this::snapChanged);
|
||||
listenFor(TraceEvents.SNAPSHOT_DELETED, this::snapDeleted);
|
||||
}
|
||||
|
||||
private void objectRestored() {
|
||||
|
|
|
@ -56,8 +56,8 @@ import ghidra.base.widgets.table.DataTypeTableCellEditor;
|
|||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||
import ghidra.debug.api.watch.WatchRow;
|
||||
import ghidra.docking.settings.*;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.model.DomainObjectChangeRecord;
|
||||
import ghidra.framework.model.DomainObjectEvent;
|
||||
import ghidra.framework.options.SaveState;
|
||||
import ghidra.framework.plugintool.*;
|
||||
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
||||
|
@ -75,12 +75,11 @@ import ghidra.program.model.util.CodeUnitInsertionException;
|
|||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.Trace.TraceMemoryStateChangeType;
|
||||
import ghidra.trace.model.guest.TracePlatform;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
|
@ -247,8 +246,8 @@ public class DebuggerWatchesProvider extends ComponentProviderAdapter
|
|||
class ForDepsListener extends TraceDomainObjectListener {
|
||||
public ForDepsListener() {
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, this::objectRestored);
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceMemoryStateChangeType.CHANGED, this::stateChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_STATE_CHANGED, this::stateChanged);
|
||||
}
|
||||
|
||||
private void objectRestored(DomainObjectChangeRecord rec) {
|
||||
|
|
|
@ -49,26 +49,26 @@ import ghidra.program.model.address.AddressRange;
|
|||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.util.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceBreakpointChangeType;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpoint;
|
||||
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
|
||||
@PluginInfo(
|
||||
shortDescription = "Debugger logical breakpoints service plugin",
|
||||
description = "Aggregates breakpoints from open programs and live traces",
|
||||
category = PluginCategoryNames.DEBUGGER,
|
||||
packageName = DebuggerPluginPackage.NAME,
|
||||
status = PluginStatus.RELEASED,
|
||||
eventsConsumed = { ProgramOpenedPluginEvent.class, ProgramClosedPluginEvent.class,
|
||||
TraceOpenedPluginEvent.class, TraceActivatedPluginEvent.class,
|
||||
TraceInactiveCoordinatesPluginEvent.class, TraceClosedPluginEvent.class, },
|
||||
servicesRequired = { DebuggerTraceManagerService.class,
|
||||
DebuggerStaticMappingService.class, },
|
||||
servicesProvided = { DebuggerLogicalBreakpointService.class, })
|
||||
shortDescription = "Debugger logical breakpoints service plugin",
|
||||
description = "Aggregates breakpoints from open programs and live traces",
|
||||
category = PluginCategoryNames.DEBUGGER,
|
||||
packageName = DebuggerPluginPackage.NAME,
|
||||
status = PluginStatus.RELEASED,
|
||||
eventsConsumed = { ProgramOpenedPluginEvent.class, ProgramClosedPluginEvent.class,
|
||||
TraceOpenedPluginEvent.class, TraceActivatedPluginEvent.class,
|
||||
TraceInactiveCoordinatesPluginEvent.class, TraceClosedPluginEvent.class, },
|
||||
servicesRequired = { DebuggerTraceManagerService.class,
|
||||
DebuggerStaticMappingService.class, },
|
||||
servicesProvided = { DebuggerLogicalBreakpointService.class, })
|
||||
public class DebuggerLogicalBreakpointServicePlugin extends Plugin
|
||||
implements DebuggerLogicalBreakpointService {
|
||||
|
||||
|
@ -198,10 +198,10 @@ public class DebuggerLogicalBreakpointServicePlugin extends Plugin
|
|||
this.info = info;
|
||||
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
listenFor(TraceBreakpointChangeType.ADDED, this::breakpointAdded);
|
||||
listenFor(TraceBreakpointChangeType.CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceBreakpointChangeType.LIFESPAN_CHANGED, this::breakpointLifespanChanged);
|
||||
listenFor(TraceBreakpointChangeType.DELETED, this::breakpointDeleted);
|
||||
listenFor(TraceEvents.BREAKPOINT_ADDED, this::breakpointAdded);
|
||||
listenFor(TraceEvents.BREAKPOINT_CHANGED, this::breakpointChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_LIFESPAN_CHANGED, this::breakpointLifespanChanged);
|
||||
listenFor(TraceEvents.BREAKPOINT_DELETED, this::breakpointDeleted);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,25 +51,25 @@ import ghidra.program.model.listing.Program;
|
|||
import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceStaticMappingChangeType;
|
||||
import ghidra.trace.model.memory.TraceMemoryRegion;
|
||||
import ghidra.trace.model.modules.*;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
@PluginInfo(
|
||||
shortDescription = "Debugger static mapping manager",
|
||||
description = "Track and manage static mappings (program-trace relocations)",
|
||||
category = PluginCategoryNames.DEBUGGER,
|
||||
packageName = DebuggerPluginPackage.NAME,
|
||||
status = PluginStatus.RELEASED,
|
||||
eventsConsumed = { ProgramOpenedPluginEvent.class, ProgramClosedPluginEvent.class,
|
||||
TraceOpenedPluginEvent.class, TraceClosedPluginEvent.class, },
|
||||
servicesRequired = { ProgramManager.class, DebuggerTraceManagerService.class, },
|
||||
servicesProvided = { DebuggerStaticMappingService.class, })
|
||||
shortDescription = "Debugger static mapping manager",
|
||||
description = "Track and manage static mappings (program-trace relocations)",
|
||||
category = PluginCategoryNames.DEBUGGER,
|
||||
packageName = DebuggerPluginPackage.NAME,
|
||||
status = PluginStatus.RELEASED,
|
||||
eventsConsumed = { ProgramOpenedPluginEvent.class, ProgramClosedPluginEvent.class,
|
||||
TraceOpenedPluginEvent.class, TraceClosedPluginEvent.class, },
|
||||
servicesRequired = { ProgramManager.class, DebuggerTraceManagerService.class, },
|
||||
servicesProvided = { DebuggerStaticMappingService.class, })
|
||||
public class DebuggerStaticMappingServicePlugin extends Plugin
|
||||
implements DebuggerStaticMappingService, DomainFolderChangeAdapter {
|
||||
|
||||
|
@ -222,8 +222,8 @@ public class DebuggerStaticMappingServicePlugin extends Plugin
|
|||
this.trace = trace;
|
||||
|
||||
listenForUntyped(DomainObjectEvent.RESTORED, e -> objectRestored());
|
||||
listenFor(TraceStaticMappingChangeType.ADDED, this::staticMappingAdded);
|
||||
listenFor(TraceStaticMappingChangeType.DELETED, this::staticMappingDeleted);
|
||||
listenFor(TraceEvents.MAPPING_ADDED, this::staticMappingAdded);
|
||||
listenFor(TraceEvents.MAPPING_DELETED, this::staticMappingDeleted);
|
||||
|
||||
trace.addListener(this);
|
||||
|
||||
|
|
|
@ -52,8 +52,6 @@ import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
|||
import ghidra.framework.plugintool.util.PluginStatus;
|
||||
import ghidra.lifecycle.Internal;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceObjectChangeType;
|
||||
import ghidra.trace.model.Trace.TraceThreadChangeType;
|
||||
import ghidra.trace.model.guest.TracePlatform;
|
||||
import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.program.TraceVariableSnapProgramView;
|
||||
|
@ -62,6 +60,7 @@ import ghidra.trace.model.target.TraceObjectKeyPath;
|
|||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.database.DomainObjectLockHold;
|
||||
import ghidra.util.exception.*;
|
||||
|
@ -107,9 +106,9 @@ public class DebuggerTraceManagerServicePlugin extends Plugin
|
|||
|
||||
public ListenerForTraceChanges(Trace trace) {
|
||||
this.trace = trace;
|
||||
listenFor(TraceThreadChangeType.ADDED, this::threadAdded);
|
||||
listenFor(TraceThreadChangeType.DELETED, this::threadDeleted);
|
||||
listenFor(TraceObjectChangeType.CREATED, this::objectCreated);
|
||||
listenFor(TraceEvents.THREAD_ADDED, this::threadAdded);
|
||||
listenFor(TraceEvents.THREAD_DELETED, this::threadDeleted);
|
||||
listenFor(TraceEvents.OBJECT_CREATED, this::objectCreated);
|
||||
}
|
||||
|
||||
private void threadAdded(TraceThread thread) {
|
||||
|
|
|
@ -77,10 +77,10 @@ import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
|||
import ghidra.test.TestEnv;
|
||||
import ghidra.trace.database.ToyDBTraceBuilder;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Trace.TraceMemoryBytesChangeType;
|
||||
import ghidra.trace.model.memory.TraceMemorySpace;
|
||||
import ghidra.trace.model.thread.TraceThread;
|
||||
import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.trace.util.TraceEvents;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.datastruct.TestDataStructureErrorHandlerInstaller;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
|
@ -809,7 +809,7 @@ public abstract class AbstractGhidraHeadedDebuggerTest
|
|||
|
||||
TraceDomainObjectListener listener = new TraceDomainObjectListener() {
|
||||
{
|
||||
listenFor(TraceMemoryBytesChangeType.CHANGED, this::bytesChanged);
|
||||
listenFor(TraceEvents.BYTES_CHANGED, this::bytesChanged);
|
||||
}
|
||||
|
||||
void bytesChanged(TraceAddressSpace space, TraceAddressSnapRange range, byte[] oldValue,
|
||||
|
|
|
@ -17,6 +17,7 @@ package ghidra.app.plugin.core.debug.gui.pcode;
|
|||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -25,12 +26,14 @@ import org.junit.Test;
|
|||
|
||||
import db.Transaction;
|
||||
import generic.Unique;
|
||||
import generic.theme.*;
|
||||
import ghidra.app.plugin.assembler.Assembler;
|
||||
import ghidra.app.plugin.assembler.Assemblers;
|
||||
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerTest;
|
||||
import ghidra.app.plugin.core.debug.gui.listing.DebuggerListingPlugin;
|
||||
import ghidra.app.plugin.core.debug.gui.pcode.DebuggerPcodeStepperProvider.PcodeRowHtmlFormatter;
|
||||
import ghidra.app.plugin.core.debug.service.emulation.*;
|
||||
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulator;
|
||||
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulatorFactory;
|
||||
import ghidra.app.plugin.core.debug.service.tracemgr.DebuggerTraceManagerServicePlugin;
|
||||
import ghidra.app.plugin.processors.sleigh.SleighLanguage;
|
||||
import ghidra.app.services.DebuggerEmulationService;
|
||||
|
@ -63,6 +66,9 @@ public class DebuggerPcodeStepperProviderTest extends AbstractGhidraHeadedDebugg
|
|||
|
||||
@Before
|
||||
public void setUpPcodeStepperProviderTest() throws Exception {
|
||||
ThemeManager themeManager = ApplicationThemeManager.getInstance();
|
||||
themeManager.setColor("color.fg.listing.pcode.label", new Color(0, 0, 255));
|
||||
|
||||
traceManager = addPlugin(tool, DebuggerTraceManagerServicePlugin.class);
|
||||
pcodePlugin = addPlugin(tool, DebuggerPcodeStepperPlugin.class);
|
||||
listingPlugin = addPlugin(tool, DebuggerListingPlugin.class); // For colors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue