mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 05:46:00 +08:00
GP-1978: Delete Framework-Debugging. Merge needed parts into
TraceModeling.
This commit is contained in:
@@ -32,7 +32,8 @@ from pybag.dbgeng.win32.kernel32 import STILL_ACTIVE
|
|||||||
|
|
||||||
from . import util, arch, methods, hooks
|
from . import util, arch, methods, hooks
|
||||||
from .dbgmodel.imodelobject import ModelObjectKind
|
from .dbgmodel.imodelobject import ModelObjectKind
|
||||||
from .exdi import exdi_commands, exdi_methods
|
if util.is_exdi():
|
||||||
|
from .exdi import exdi_commands, exdi_methods
|
||||||
|
|
||||||
PAGE_SIZE = 4096
|
PAGE_SIZE = 4096
|
||||||
|
|
||||||
|
|||||||
@@ -243,18 +243,6 @@ def refresh_processes(node: sch.Schema('ProcessContainer')):
|
|||||||
commands.ghidra_trace_put_processes()
|
commands.ghidra_trace_put_processes()
|
||||||
|
|
||||||
|
|
||||||
@REGISTRY.method(action='refresh', display='Refresh Breakpoint Locations')
|
|
||||||
def refresh_proc_breakpoints(node: sch.Schema('BreakpointLocationContainer')):
|
|
||||||
"""
|
|
||||||
Refresh the breakpoint locations for the process.
|
|
||||||
|
|
||||||
In the course of refreshing the locations, the breakpoint list will also be
|
|
||||||
refreshed.
|
|
||||||
"""
|
|
||||||
with commands.open_tracked_tx('Refresh Breakpoint Locations'):
|
|
||||||
commands.ghidra_trace_put_breakpoints()
|
|
||||||
|
|
||||||
|
|
||||||
@REGISTRY.method(action='refresh', display='Refresh Environment')
|
@REGISTRY.method(action='refresh', display='Refresh Environment')
|
||||||
def refresh_environment(node: sch.Schema('Environment')):
|
def refresh_environment(node: sch.Schema('Environment')):
|
||||||
"""Refresh the environment descriptors (arch, os, endian)."""
|
"""Refresh the environment descriptors (arch, os, endian)."""
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<context>
|
<context>
|
||||||
<schema name="DbgRoot" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="DbgRoot" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<attribute name="Sessions" schema="SessionContainer" required="yes" fixed="yes" />
|
<attribute name="Sessions" schema="SessionContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Settings" schema="ANY" />
|
<attribute name="Settings" schema="ANY" />
|
||||||
<attribute name="State" schema="ANY" />
|
<attribute name="State" schema="ANY" />
|
||||||
@@ -11,19 +10,12 @@
|
|||||||
<attribute schema="ANY"/>
|
<attribute schema="ANY"/>
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SessionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SessionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Session" />
|
<element schema="Session" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY"/>
|
<attribute schema="ANY"/>
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Session" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Session" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
@@ -49,20 +41,16 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Attachable" />
|
<element schema="Attachable" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Process" />
|
<element schema="Process" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
@@ -70,12 +58,11 @@
|
|||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="BreakpointLocation" />
|
<interface name="BreakpointLocation" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="Range" schema="RANGE" />
|
<attribute name="Range" schema="RANGE" />
|
||||||
@@ -92,7 +79,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="PID" schema="LONG" />
|
<attribute name="PID" schema="LONG" />
|
||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
@@ -105,18 +91,9 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Debug" schema="DebugBreakpointContainer" required="yes" fixed="yes" />
|
<attribute name="Debug" schema="DebugBreakpointContainer" required="yes" fixed="yes" />
|
||||||
<!-- attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" /-->
|
|
||||||
<attribute name="Exit Code" schema="LONG" />
|
<attribute name="Exit Code" schema="LONG" />
|
||||||
<attribute-alias from="_exit_code" to="Exit Code" />
|
<attribute-alias from="_exit_code" to="Exit Code" />
|
||||||
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
||||||
@@ -128,7 +105,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -149,7 +125,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="ModuleContainer" />
|
|
||||||
<element schema="Module" />
|
<element schema="Module" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
@@ -160,22 +135,7 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointLocation" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocation" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="Range" schema="RANGE" />
|
|
||||||
<attribute-alias from="_range" to="Range" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<element schema="BreakpointLocation" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Thread" />
|
<element schema="Thread" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
@@ -192,7 +152,6 @@
|
|||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Stack" schema="StackFramesContainer" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="StackFramesContainer" required="yes" fixed="yes" />
|
||||||
@@ -238,7 +197,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Section" />
|
<element schema="Section" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -258,13 +216,11 @@
|
|||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
<element schema="Symbol" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -298,7 +254,6 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
||||||
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
||||||
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
||||||
@@ -310,7 +265,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<context>
|
<context>
|
||||||
<schema name="DbgRoot" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="DbgRoot" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<attribute name="Sessions" schema="SessionContainer" required="yes" fixed="yes" />
|
<attribute name="Sessions" schema="SessionContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Settings" schema="ANY" />
|
<attribute name="Settings" schema="ANY" />
|
||||||
<attribute name="State" schema="ANY" />
|
<attribute name="State" schema="ANY" />
|
||||||
@@ -11,19 +10,12 @@
|
|||||||
<attribute schema="ANY"/>
|
<attribute schema="ANY"/>
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SessionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SessionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Session" />
|
<element schema="Session" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY"/>
|
<attribute schema="ANY"/>
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Session" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Session" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
@@ -52,20 +44,16 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Attachable" />
|
<element schema="Attachable" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Process" />
|
<element schema="Process" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
@@ -73,12 +61,11 @@
|
|||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="BreakpointLocation" />
|
<interface name="BreakpointLocation" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="Range" schema="RANGE" />
|
<attribute name="Range" schema="RANGE" />
|
||||||
@@ -95,7 +82,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="PID" schema="LONG" />
|
<attribute name="PID" schema="LONG" />
|
||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
@@ -108,18 +94,9 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Debug" schema="DebugBreakpointContainer" required="yes" fixed="yes" />
|
<attribute name="Debug" schema="DebugBreakpointContainer" required="yes" fixed="yes" />
|
||||||
<!-- attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" /-->
|
|
||||||
<attribute name="Exit Code" schema="LONG" />
|
<attribute name="Exit Code" schema="LONG" />
|
||||||
<attribute-alias from="_exit_code" to="Exit Code" />
|
<attribute-alias from="_exit_code" to="Exit Code" />
|
||||||
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
||||||
@@ -131,7 +108,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -163,22 +139,7 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointLocation" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocation" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="Range" schema="RANGE" />
|
|
||||||
<attribute-alias from="_range" to="Range" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<element schema="BreakpointLocation" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Thread" />
|
<element schema="Thread" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
@@ -195,7 +156,6 @@
|
|||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Stack" schema="StackFramesContainer" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="StackFramesContainer" required="yes" fixed="yes" />
|
||||||
@@ -241,7 +201,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Section" />
|
<element schema="Section" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -261,13 +220,11 @@
|
|||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
<element schema="Symbol" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -301,7 +258,6 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
||||||
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
||||||
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
||||||
@@ -313,7 +269,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
@@ -328,14 +283,6 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ExdiThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ExdiThreadContainer" required="yes" fixed="yes" />
|
||||||
<!-- attribute name="Modules" schema="ModuleContainer" required="yes" fixed="yes" /-->
|
<!-- attribute name="Modules" schema="ModuleContainer" required="yes" fixed="yes" /-->
|
||||||
@@ -343,7 +290,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -375,7 +321,6 @@
|
|||||||
<schema name="ExdiThread" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ExdiThread" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="TID" schema="LONG" />
|
<attribute name="TID" schema="LONG" />
|
||||||
|
|||||||
@@ -228,19 +228,6 @@ def refresh_processes(node: sch.Schema('ProcessContainer')):
|
|||||||
commands.ghidra_trace_put_threads()
|
commands.ghidra_trace_put_threads()
|
||||||
|
|
||||||
|
|
||||||
@REGISTRY.method(action='refresh')
|
|
||||||
def refresh_proc_breakpoints(node: sch.Schema('BreakpointLocationContainer')):
|
|
||||||
"""
|
|
||||||
Refresh the breakpoint locations for the process.
|
|
||||||
|
|
||||||
In the course of refreshing the locations, the breakpoint list will also be
|
|
||||||
refreshed.
|
|
||||||
"""
|
|
||||||
with commands.open_tracked_tx('Refresh Breakpoint Locations'):
|
|
||||||
commands.ghidra_trace_put_breakpoints()
|
|
||||||
|
|
||||||
|
|
||||||
@REGISTRY.method(action='refresh')
|
|
||||||
def refresh_environment(node: sch.Schema('Environment')):
|
def refresh_environment(node: sch.Schema('Environment')):
|
||||||
"""Refresh the environment descriptors (arch, os, endian)."""
|
"""Refresh the environment descriptors (arch, os, endian)."""
|
||||||
with commands.open_tracked_tx('Refresh Environment'):
|
with commands.open_tracked_tx('Refresh Environment'):
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<context>
|
<context>
|
||||||
<schema name="TTDSession" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="TTDSession" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
@@ -24,20 +18,16 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Attachable" />
|
<element schema="Attachable" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Process" />
|
<element schema="Process" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -45,12 +35,11 @@
|
|||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="BreakpointLocation" />
|
<interface name="BreakpointLocation" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -67,7 +56,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="PID" schema="LONG" />
|
<attribute name="PID" schema="LONG" />
|
||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
@@ -80,18 +68,9 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Breakpoints" schema="BreakpointContainer" required="yes" fixed="yes" />
|
<attribute name="Breakpoints" schema="BreakpointContainer" required="yes" fixed="yes" />
|
||||||
<!-- attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" /-->
|
|
||||||
<attribute name="Exit Code" schema="LONG" />
|
<attribute name="Exit Code" schema="LONG" />
|
||||||
<attribute-alias from="_exit_code" to="Exit Code" />
|
<attribute-alias from="_exit_code" to="Exit Code" />
|
||||||
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
<attribute name="Environment" schema="Environment" required="yes" fixed="yes" />
|
||||||
@@ -101,7 +80,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -122,7 +100,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="ModuleContainer" />
|
|
||||||
<element schema="Module" />
|
<element schema="Module" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -133,23 +110,7 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointLocation" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocation" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="Range" schema="RANGE" />
|
|
||||||
<attribute-alias from="_range" to="Range" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<element schema="BreakpointLocation" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Thread" />
|
<element schema="Thread" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -166,7 +127,6 @@
|
|||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
||||||
@@ -209,7 +169,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Section" />
|
<element schema="Section" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -221,13 +180,11 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
<element schema="Symbol" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -262,7 +219,6 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
||||||
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
||||||
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
||||||
@@ -271,7 +227,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<context>
|
<context>
|
||||||
<schema name="GdbSession" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="GdbSession" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
@@ -25,31 +19,27 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Attachable" />
|
<element schema="Attachable" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="InferiorContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="InferiorContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Inferior" />
|
<element schema="Inferior" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<element schema="BreakpointLocation" />
|
<element schema="BreakpointLocation" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -65,7 +55,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="PID" schema="LONG" />
|
<attribute name="PID" schema="LONG" />
|
||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
@@ -78,14 +67,6 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" />
|
<attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" />
|
||||||
@@ -98,7 +79,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -119,7 +99,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="ModuleContainer" />
|
|
||||||
<element schema="Module" />
|
<element schema="Module" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -142,30 +121,19 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<element schema="BreakpointLocation" />
|
<element schema="BreakpointLocation" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Thread" />
|
<element schema="Thread" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Method" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="Method" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="_display" schema="STRING" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_return_type" schema="TYPE" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute schema="VOID" fixed="yes" hidden="yes" />
|
|
||||||
</schema>
|
|
||||||
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
||||||
@@ -208,7 +176,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Section" />
|
<element schema="Section" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -220,13 +187,11 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
<element schema="Symbol" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -259,7 +224,6 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterValueContainer" attributeResync="NEVER">
|
<schema name="RegisterValueContainer" attributeResync="NEVER">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Module.manifest||GHIDRA||||END|
|
|||||||
README.md||GHIDRA||||END|
|
README.md||GHIDRA||||END|
|
||||||
build.gradle||GHIDRA||||END|
|
build.gradle||GHIDRA||||END|
|
||||||
data/debugger-launchers/local-lldb.bat||GHIDRA||||END|
|
data/debugger-launchers/local-lldb.bat||GHIDRA||||END|
|
||||||
src/llvm-project/lldb/bindings/java/java-typemaps.swig||Apache License 2.0 with LLVM Exceptions||||END|
|
|
||||||
src/llvm-project/lldb/bindings/java/java.swig||Apache License 2.0 with LLVM Exceptions||||END|
|
|
||||||
src/main/py/LICENSE||GHIDRA||||END|
|
src/main/py/LICENSE||GHIDRA||||END|
|
||||||
src/main/py/MANIFEST.in||GHIDRA||||END|
|
src/main/py/MANIFEST.in||GHIDRA||||END|
|
||||||
src/main/py/README.md||GHIDRA||||END|
|
src/main/py/README.md||GHIDRA||||END|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<context>
|
<context>
|
||||||
<schema name="LldbSession" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="LldbSession" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
@@ -26,7 +20,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -37,25 +30,22 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
<schema name="AvailableContainer" canonical="yes" elementResync="ALWAYS" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Attachable" />
|
<element schema="Attachable" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Process" />
|
<element schema="Process" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<element schema="BreakpointLocation" />
|
<element schema="BreakpointLocation" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -72,11 +62,10 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="WatchpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="WatchpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Togglable" />
|
<interface name="Togglable" />
|
||||||
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="Expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_expression" to="Expression" />
|
<attribute-alias from="_expression" to="Expression" />
|
||||||
<attribute name="Kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="Kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_kinds" to="Kinds" />
|
<attribute-alias from="_kinds" to="Kinds" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -90,7 +79,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Attachable" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="PID" schema="LONG" />
|
<attribute name="PID" schema="LONG" />
|
||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
@@ -103,14 +91,6 @@
|
|||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||||
<attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" />
|
<attribute name="Breakpoints" schema="BreakpointLocationContainer" required="yes" fixed="yes" />
|
||||||
@@ -124,7 +104,6 @@
|
|||||||
<attribute-alias from="_pid" to="PID" />
|
<attribute-alias from="_pid" to="PID" />
|
||||||
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
<attribute name="State" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||||
<attribute-alias from="_state" to="State" />
|
<attribute-alias from="_state" to="State" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -146,7 +125,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="ModuleContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="ModuleContainer" />
|
|
||||||
<element schema="Module" />
|
<element schema="Module" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -168,30 +146,19 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointLocationContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<element schema="BreakpointLocation" />
|
<element schema="BreakpointLocation" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Configurable" />
|
|
||||||
<element schema="Thread" />
|
<element schema="Thread" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Method" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="Method" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="_display" schema="STRING" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_return_type" schema="TYPE" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute schema="VOID" fixed="yes" hidden="yes" />
|
|
||||||
</schema>
|
|
||||||
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
||||||
@@ -203,7 +170,6 @@
|
|||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="Advance" schema="Method" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Module" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Module" elementResync="NEVER" attributeResync="NEVER">
|
||||||
@@ -234,7 +200,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Section" />
|
<element schema="Section" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
@@ -246,13 +211,11 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
<element schema="Symbol" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
@@ -286,7 +249,6 @@
|
|||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
<schema name="RegisterValueContainer" attributeResync="ONCE">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
<attribute name="General Purpose Registers" schema="RegisterBank" />
|
||||||
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
<attribute name="Floating Point Registers" schema="RegisterBank" />
|
||||||
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
<attribute name="Advanced Vector Extensions" schema="RegisterBank" />
|
||||||
@@ -298,7 +260,6 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
<schema name="RegisterBank" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
|
|||||||
+3
-3
@@ -28,7 +28,7 @@ import ghidra.trace.model.Trace;
|
|||||||
import ghidra.trace.model.guest.TracePlatform;
|
import ghidra.trace.model.guest.TracePlatform;
|
||||||
import ghidra.trace.model.program.TraceProgramView;
|
import ghidra.trace.model.program.TraceProgramView;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
import ghidra.trace.model.target.TraceObjectKeyPath;
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
import ghidra.trace.model.thread.TraceThread;
|
import ghidra.trace.model.thread.TraceThread;
|
||||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||||
import ghidra.util.TriConsumer;
|
import ghidra.util.TriConsumer;
|
||||||
@@ -467,14 +467,14 @@ public interface DebuggerTraceManagerService {
|
|||||||
* @param path the path
|
* @param path the path
|
||||||
* @return the best coordinates
|
* @return the best coordinates
|
||||||
*/
|
*/
|
||||||
DebuggerCoordinates resolvePath(TraceObjectKeyPath path);
|
DebuggerCoordinates resolvePath(KeyPath path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate the given canonical object path
|
* Activate the given canonical object path
|
||||||
*
|
*
|
||||||
* @param path the desired path
|
* @param path the desired path
|
||||||
*/
|
*/
|
||||||
default void activatePath(TraceObjectKeyPath path) {
|
default void activatePath(KeyPath path) {
|
||||||
activate(resolvePath(path));
|
activate(resolvePath(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import generic.theme.GIcon;
|
|||||||
import ghidra.app.services.DebuggerEmulationService;
|
import ghidra.app.services.DebuggerEmulationService;
|
||||||
import ghidra.app.services.DebuggerTraceManagerService;
|
import ghidra.app.services.DebuggerTraceManagerService;
|
||||||
import ghidra.app.services.DebuggerTraceManagerService.ActivationCause;
|
import ghidra.app.services.DebuggerTraceManagerService.ActivationCause;
|
||||||
import ghidra.async.AsyncUtils;
|
|
||||||
import ghidra.debug.api.target.Target;
|
import ghidra.debug.api.target.Target;
|
||||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
@@ -258,7 +257,7 @@ public enum ControlMode {
|
|||||||
return CompletableFuture.failedFuture(new MemoryAccessException());
|
return CompletableFuture.failedFuture(new MemoryAccessException());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AsyncUtils.nil();
|
return CompletableFuture.completedFuture(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+6
-6
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
package ghidra.debug.api.model;
|
package ghidra.debug.api.model;
|
||||||
|
|
||||||
import docking.DefaultActionContext;
|
import docking.DefaultActionContext;
|
||||||
import ghidra.trace.model.target.TraceObjectKeyPath;
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Really just used by scripts to get a path into an action context
|
* Really just used by scripts to get a path into an action context
|
||||||
*/
|
*/
|
||||||
public class DebuggerSingleObjectPathActionContext extends DefaultActionContext {
|
public class DebuggerSingleObjectPathActionContext extends DefaultActionContext {
|
||||||
private final TraceObjectKeyPath path;
|
private final KeyPath path;
|
||||||
|
|
||||||
public DebuggerSingleObjectPathActionContext(TraceObjectKeyPath path) {
|
public DebuggerSingleObjectPathActionContext(KeyPath path) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TraceObjectKeyPath getPath() {
|
public KeyPath getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -22,18 +22,18 @@ import java.util.function.BooleanSupplier;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
|
||||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.lang.Register;
|
import ghidra.program.model.lang.Register;
|
||||||
import ghidra.program.model.lang.RegisterValue;
|
import ghidra.program.model.lang.RegisterValue;
|
||||||
|
import ghidra.trace.model.TraceExecutionState;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.breakpoint.TraceBreakpoint;
|
import ghidra.trace.model.breakpoint.TraceBreakpoint;
|
||||||
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
|
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
|
||||||
import ghidra.trace.model.guest.TracePlatform;
|
import ghidra.trace.model.guest.TracePlatform;
|
||||||
import ghidra.trace.model.memory.TraceMemoryState;
|
import ghidra.trace.model.memory.TraceMemoryState;
|
||||||
import ghidra.trace.model.stack.TraceStackFrame;
|
import ghidra.trace.model.stack.TraceStackFrame;
|
||||||
import ghidra.trace.model.target.TraceObjectKeyPath;
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
import ghidra.trace.model.thread.TraceThread;
|
import ghidra.trace.model.thread.TraceThread;
|
||||||
import ghidra.util.Swing;
|
import ghidra.util.Swing;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
@@ -196,7 +196,7 @@ public interface Target {
|
|||||||
* @param path the path of the object
|
* @param path the path of the object
|
||||||
* @return the thread, or null
|
* @return the thread, or null
|
||||||
*/
|
*/
|
||||||
TraceThread getThreadForSuccessor(TraceObjectKeyPath path);
|
TraceThread getThreadForSuccessor(KeyPath path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the execution state of the given thread
|
* Get the execution state of the given thread
|
||||||
@@ -204,7 +204,7 @@ public interface Target {
|
|||||||
* @param thread the thread
|
* @param thread the thread
|
||||||
* @return the state
|
* @return the state
|
||||||
*/
|
*/
|
||||||
TargetExecutionState getThreadExecutionState(TraceThread thread);
|
TraceExecutionState getThreadExecutionState(TraceThread thread);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the trace stack frame that contains the given object
|
* Get the trace stack frame that contains the given object
|
||||||
@@ -212,7 +212,7 @@ public interface Target {
|
|||||||
* @param path the path of the object
|
* @param path the path of the object
|
||||||
* @return the stack frame, or null
|
* @return the stack frame, or null
|
||||||
*/
|
*/
|
||||||
TraceStackFrame getStackFrameForSuccessor(TraceObjectKeyPath path);
|
TraceStackFrame getStackFrameForSuccessor(KeyPath path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the target supports synchronizing focus
|
* Check if the target supports synchronizing focus
|
||||||
@@ -226,7 +226,7 @@ public interface Target {
|
|||||||
*
|
*
|
||||||
* @return the focused object's path, or null
|
* @return the focused object's path, or null
|
||||||
*/
|
*/
|
||||||
TraceObjectKeyPath getFocus();
|
KeyPath getFocus();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see #activate(DebuggerCoordinates, DebuggerCoordinates)
|
* @see #activate(DebuggerCoordinates, DebuggerCoordinates)
|
||||||
|
|||||||
+29
-34
@@ -21,7 +21,6 @@ import java.util.*;
|
|||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
|
||||||
import ghidra.app.services.DebuggerTraceManagerService;
|
import ghidra.app.services.DebuggerTraceManagerService;
|
||||||
import ghidra.dbg.target.TargetObject;
|
|
||||||
import ghidra.debug.api.target.Target;
|
import ghidra.debug.api.target.Target;
|
||||||
import ghidra.framework.data.DefaultProjectData;
|
import ghidra.framework.data.DefaultProjectData;
|
||||||
import ghidra.framework.model.*;
|
import ghidra.framework.model.*;
|
||||||
@@ -35,7 +34,7 @@ import ghidra.trace.model.guest.TracePlatform;
|
|||||||
import ghidra.trace.model.program.TraceProgramView;
|
import ghidra.trace.model.program.TraceProgramView;
|
||||||
import ghidra.trace.model.stack.*;
|
import ghidra.trace.model.stack.*;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
import ghidra.trace.model.target.TraceObjectKeyPath;
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
import ghidra.trace.model.thread.TraceObjectThread;
|
import ghidra.trace.model.thread.TraceObjectThread;
|
||||||
import ghidra.trace.model.thread.TraceThread;
|
import ghidra.trace.model.thread.TraceThread;
|
||||||
import ghidra.trace.model.time.TraceSnapshot;
|
import ghidra.trace.model.time.TraceSnapshot;
|
||||||
@@ -98,7 +97,7 @@ public class DebuggerCoordinates {
|
|||||||
private final TraceProgramView view;
|
private final TraceProgramView view;
|
||||||
private final TraceSchedule time;
|
private final TraceSchedule time;
|
||||||
private final Integer frame;
|
private final Integer frame;
|
||||||
private final TraceObjectKeyPath path;
|
private final KeyPath path;
|
||||||
|
|
||||||
private final int hash;
|
private final int hash;
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@ public class DebuggerCoordinates {
|
|||||||
private TraceObject registerContainer;
|
private TraceObject registerContainer;
|
||||||
|
|
||||||
DebuggerCoordinates(Trace trace, TracePlatform platform, Target target, TraceThread thread,
|
DebuggerCoordinates(Trace trace, TracePlatform platform, Target target, TraceThread thread,
|
||||||
TraceProgramView view, TraceSchedule time, Integer frame, TraceObjectKeyPath path) {
|
TraceProgramView view, TraceSchedule time, Integer frame, KeyPath path) {
|
||||||
this.trace = trace;
|
this.trace = trace;
|
||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
@@ -182,13 +181,13 @@ public class DebuggerCoordinates {
|
|||||||
return resolveThread(trace, TraceSchedule.ZERO);
|
return resolveThread(trace, TraceSchedule.ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceObjectKeyPath resolvePath(Trace trace, TraceThread thread, Integer frame,
|
private static KeyPath resolvePath(Trace trace, TraceThread thread, Integer frame,
|
||||||
TraceSchedule time) {
|
TraceSchedule time) {
|
||||||
TraceObjectKeyPath path = resolvePath(thread, frame, time);
|
KeyPath path = resolvePath(thread, frame, time);
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
return TraceObjectKeyPath.of();
|
return KeyPath.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceProgramView resolveView(Trace trace, TraceSchedule time) {
|
private static TraceProgramView resolveView(Trace trace, TraceSchedule time) {
|
||||||
@@ -214,7 +213,7 @@ public class DebuggerCoordinates {
|
|||||||
TraceProgramView newView = resolveView(newTrace);
|
TraceProgramView newView = resolveView(newTrace);
|
||||||
TraceSchedule newTime = null; // Allow later resolution
|
TraceSchedule newTime = null; // Allow later resolution
|
||||||
Integer newFrame = resolveFrame(newThread, newTime);
|
Integer newFrame = resolveFrame(newThread, newTime);
|
||||||
TraceObjectKeyPath newPath = resolvePath(newTrace, newThread, newFrame, newTime);
|
KeyPath newPath = resolvePath(newTrace, newThread, newFrame, newTime);
|
||||||
return new DebuggerCoordinates(newTrace, newPlatform, null, newThread, newView, newTime,
|
return new DebuggerCoordinates(newTrace, newPlatform, null, newThread, newView, newTime,
|
||||||
newFrame, newPath);
|
newFrame, newPath);
|
||||||
}
|
}
|
||||||
@@ -248,7 +247,7 @@ public class DebuggerCoordinates {
|
|||||||
return resolveFrame(target, target.getFocus());
|
return resolveFrame(target, target.getFocus());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceObjectKeyPath resolvePath(Target target, TraceThread thread,
|
private static KeyPath resolvePath(Target target, TraceThread thread,
|
||||||
Integer frame, TraceSchedule time) {
|
Integer frame, TraceSchedule time) {
|
||||||
if (target.getSnap() != time.getSnap() || !target.isSupportsFocus()) {
|
if (target.getSnap() != time.getSnap() || !target.isSupportsFocus()) {
|
||||||
return resolvePath(target.getTrace(), thread, frame, time);
|
return resolvePath(target.getTrace(), thread, frame, time);
|
||||||
@@ -273,7 +272,7 @@ public class DebuggerCoordinates {
|
|||||||
TraceProgramView newView = resolveView(newTrace);
|
TraceProgramView newView = resolveView(newTrace);
|
||||||
TraceSchedule newTime = null; // Allow later resolution
|
TraceSchedule newTime = null; // Allow later resolution
|
||||||
Integer newFrame = resolveFrame(newThread, newTime);
|
Integer newFrame = resolveFrame(newThread, newTime);
|
||||||
TraceObjectKeyPath newPath = resolvePath(newTrace, newThread, newFrame, newTime);
|
KeyPath newPath = resolvePath(newTrace, newThread, newFrame, newTime);
|
||||||
return new DebuggerCoordinates(newTrace, newPlatform, null, newThread, newView, newTime,
|
return new DebuggerCoordinates(newTrace, newPlatform, null, newThread, newView, newTime,
|
||||||
newFrame, newPath);
|
newFrame, newPath);
|
||||||
}
|
}
|
||||||
@@ -300,8 +299,8 @@ public class DebuggerCoordinates {
|
|||||||
TraceThread newThread = thread != null ? thread : resolveThread(newTarget, newTime);
|
TraceThread newThread = thread != null ? thread : resolveThread(newTarget, newTime);
|
||||||
TraceProgramView newView = view != null ? view : resolveView(newTrace, newTime);
|
TraceProgramView newView = view != null ? view : resolveView(newTrace, newTime);
|
||||||
Integer newFrame = frame != null ? frame : resolveFrame(newTarget, newThread, newTime);
|
Integer newFrame = frame != null ? frame : resolveFrame(newTarget, newThread, newTime);
|
||||||
TraceObjectKeyPath threadOrFramePath = resolvePath(newTarget, newThread, newFrame, newTime);
|
KeyPath threadOrFramePath = resolvePath(newTarget, newThread, newFrame, newTime);
|
||||||
TraceObjectKeyPath newPath = choose(path, threadOrFramePath);
|
KeyPath newPath = choose(path, threadOrFramePath);
|
||||||
return new DebuggerCoordinates(newTrace, newPlatform, newTarget, newThread, newView,
|
return new DebuggerCoordinates(newTrace, newPlatform, newTarget, newThread, newView,
|
||||||
newTime, newFrame, newPath);
|
newTime, newFrame, newPath);
|
||||||
}
|
}
|
||||||
@@ -313,7 +312,7 @@ public class DebuggerCoordinates {
|
|||||||
return thread(trace.getThreadManager().getThread(thread.getKey()));
|
return thread(trace.getThreadManager().getThread(thread.getKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceObjectKeyPath resolvePath(TraceThread thread, Integer frameLevel,
|
private static KeyPath resolvePath(TraceThread thread, Integer frameLevel,
|
||||||
TraceSchedule time) {
|
TraceSchedule time) {
|
||||||
if (thread instanceof TraceObjectThread tot) {
|
if (thread instanceof TraceObjectThread tot) {
|
||||||
TraceObject objThread = tot.getObject();
|
TraceObject objThread = tot.getObject();
|
||||||
@@ -340,8 +339,8 @@ public class DebuggerCoordinates {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceObjectKeyPath choose(TraceObjectKeyPath curPath,
|
private static KeyPath choose(KeyPath curPath,
|
||||||
TraceObjectKeyPath newPath) {
|
KeyPath newPath) {
|
||||||
if (curPath == null) {
|
if (curPath == null) {
|
||||||
return newPath;
|
return newPath;
|
||||||
}
|
}
|
||||||
@@ -371,8 +370,8 @@ public class DebuggerCoordinates {
|
|||||||
// Yes, override frame with 0 on thread changes, unless target says otherwise
|
// Yes, override frame with 0 on thread changes, unless target says otherwise
|
||||||
Integer newFrame = resolveFrame(target, newThread, newTime);
|
Integer newFrame = resolveFrame(target, newThread, newTime);
|
||||||
// Yes, forced frame change may also force object change
|
// Yes, forced frame change may also force object change
|
||||||
TraceObjectKeyPath threadOrFramePath = resolvePath(newThread, newFrame, newTime);
|
KeyPath threadOrFramePath = resolvePath(newThread, newFrame, newTime);
|
||||||
TraceObjectKeyPath newPath = choose(path, threadOrFramePath);
|
KeyPath newPath = choose(path, threadOrFramePath);
|
||||||
return new DebuggerCoordinates(newTrace, newPlatform, target, newThread, newView, newTime,
|
return new DebuggerCoordinates(newTrace, newPlatform, target, newThread, newView, newTime,
|
||||||
newFrame, newPath);
|
newFrame, newPath);
|
||||||
}
|
}
|
||||||
@@ -412,8 +411,8 @@ public class DebuggerCoordinates {
|
|||||||
: resolveThread(trace, target, newTime);
|
: resolveThread(trace, target, newTime);
|
||||||
// This will cause the frame to reset to 0 on every snap change. That's fair....
|
// This will cause the frame to reset to 0 on every snap change. That's fair....
|
||||||
Integer newFrame = resolveFrame(newThread, newTime);
|
Integer newFrame = resolveFrame(newThread, newTime);
|
||||||
TraceObjectKeyPath threadOrFramePath = resolvePath(newThread, newFrame, newTime);
|
KeyPath threadOrFramePath = resolvePath(newThread, newFrame, newTime);
|
||||||
TraceObjectKeyPath newPath = choose(path, threadOrFramePath);
|
KeyPath newPath = choose(path, threadOrFramePath);
|
||||||
return new DebuggerCoordinates(trace, platform, target, newThread, view, newTime,
|
return new DebuggerCoordinates(trace, platform, target, newThread, view, newTime,
|
||||||
newFrame, newPath);
|
newFrame, newPath);
|
||||||
}
|
}
|
||||||
@@ -425,8 +424,8 @@ public class DebuggerCoordinates {
|
|||||||
if (Objects.equals(frame, newFrame)) {
|
if (Objects.equals(frame, newFrame)) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
TraceObjectKeyPath threadOrFramePath = resolvePath(thread, newFrame, getTime());
|
KeyPath threadOrFramePath = resolvePath(thread, newFrame, getTime());
|
||||||
TraceObjectKeyPath newPath = choose(path, threadOrFramePath);
|
KeyPath newPath = choose(path, threadOrFramePath);
|
||||||
return new DebuggerCoordinates(trace, platform, target, thread, view, time, newFrame,
|
return new DebuggerCoordinates(trace, platform, target, thread, view, time, newFrame,
|
||||||
newPath);
|
newPath);
|
||||||
}
|
}
|
||||||
@@ -480,7 +479,7 @@ public class DebuggerCoordinates {
|
|||||||
return time(resolveTime(newView)).replaceView(newView);
|
return time(resolveTime(newView)).replaceView(newView);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TraceThread resolveThread(Trace trace, TraceObjectKeyPath path) {
|
private static TraceThread resolveThread(Trace trace, KeyPath path) {
|
||||||
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -490,7 +489,7 @@ public class DebuggerCoordinates {
|
|||||||
.orElse(null);
|
.orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Integer resolveFrame(Trace trace, TraceObjectKeyPath path) {
|
private static Integer resolveFrame(Trace trace, KeyPath path) {
|
||||||
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -502,7 +501,7 @@ public class DebuggerCoordinates {
|
|||||||
return frame == null ? null : frame.getLevel();
|
return frame == null ? null : frame.getLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DebuggerCoordinates path(TraceObjectKeyPath newPath) {
|
public DebuggerCoordinates path(KeyPath newPath) {
|
||||||
if (trace == null && newPath == null) {
|
if (trace == null && newPath == null) {
|
||||||
return NOWHERE;
|
return NOWHERE;
|
||||||
}
|
}
|
||||||
@@ -524,7 +523,7 @@ public class DebuggerCoordinates {
|
|||||||
newFrame, newPath);
|
newFrame, newPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DebuggerCoordinates pathNonCanonical(TraceObjectKeyPath newPath) {
|
public DebuggerCoordinates pathNonCanonical(KeyPath newPath) {
|
||||||
if (trace == null && newPath == null) {
|
if (trace == null && newPath == null) {
|
||||||
return NOWHERE;
|
return NOWHERE;
|
||||||
}
|
}
|
||||||
@@ -549,19 +548,15 @@ public class DebuggerCoordinates {
|
|||||||
throw new IllegalArgumentException("No such object at path " + newPath);
|
throw new IllegalArgumentException("No such object at path " + newPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static TraceThread resolveThread(Target target, TraceObjectKeyPath objectPath) {
|
protected static TraceThread resolveThread(Target target, KeyPath objectPath) {
|
||||||
return target.getThreadForSuccessor(objectPath);
|
return target.getThreadForSuccessor(objectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Integer resolveFrame(Target target, TraceObjectKeyPath objectPath) {
|
protected static Integer resolveFrame(Target target, KeyPath objectPath) {
|
||||||
TraceStackFrame frame = target.getStackFrameForSuccessor(objectPath);
|
TraceStackFrame frame = target.getStackFrameForSuccessor(objectPath);
|
||||||
return frame == null ? null : frame.getLevel();
|
return frame == null ? null : frame.getLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DebuggerCoordinates object(TargetObject targetObject) {
|
|
||||||
return path(TraceObjectKeyPath.of(targetObject.getPath()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebuggerCoordinates object(TraceObject newObject) {
|
public DebuggerCoordinates object(TraceObject newObject) {
|
||||||
if (newObject == null) {
|
if (newObject == null) {
|
||||||
return path(null);
|
return path(null);
|
||||||
@@ -604,7 +599,7 @@ public class DebuggerCoordinates {
|
|||||||
return frame == null ? 0 : frame;
|
return frame == null ? 0 : frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TraceObjectKeyPath getPath() {
|
public KeyPath getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,7 +621,7 @@ public class DebuggerCoordinates {
|
|||||||
if (registerContainer != null) {
|
if (registerContainer != null) {
|
||||||
return registerContainer;
|
return registerContainer;
|
||||||
}
|
}
|
||||||
return registerContainer = getObject().queryRegisterContainer(getFrame());
|
return registerContainer = getObject().findRegisterContainer(getFrame());
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized long getViewSnap() {
|
public synchronized long getViewSnap() {
|
||||||
@@ -761,7 +756,7 @@ public class DebuggerCoordinates {
|
|||||||
if (trace != null && coordState.hasValue(KEY_OBJ_PATH)) {
|
if (trace != null && coordState.hasValue(KEY_OBJ_PATH)) {
|
||||||
String pathString = coordState.getString(KEY_OBJ_PATH, "");
|
String pathString = coordState.getString(KEY_OBJ_PATH, "");
|
||||||
try {
|
try {
|
||||||
TraceObjectKeyPath path = TraceObjectKeyPath.parse(pathString);
|
KeyPath path = KeyPath.parse(pathString);
|
||||||
object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
|||||||
+10
-11
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -21,12 +21,11 @@ import java.util.concurrent.ExecutionException;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import ghidra.async.AsyncUtils;
|
import ghidra.async.AsyncUtils;
|
||||||
import ghidra.dbg.target.TargetObject;
|
|
||||||
import ghidra.dbg.target.schema.*;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.target.ActionName;
|
import ghidra.debug.api.target.ActionName;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
|
import ghidra.trace.model.target.schema.*;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A remote method registered by the back-end debugger.
|
* A remote method registered by the back-end debugger.
|
||||||
@@ -102,7 +101,7 @@ public interface RemoteMethod {
|
|||||||
* Check the type of an argument.
|
* Check the type of an argument.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* This is a hack, because {@link TargetObjectSchema} expects {@link TargetObject}, or a
|
* This is a hack, because {@link TraceObjectSchema} expects {@link TargetObject}, or a
|
||||||
* primitive. We instead need {@link TraceObject}. I'd add the method to the schema, except that
|
* primitive. We instead need {@link TraceObject}. I'd add the method to the schema, except that
|
||||||
* trace stuff is not in its dependencies.
|
* trace stuff is not in its dependencies.
|
||||||
*
|
*
|
||||||
@@ -111,17 +110,17 @@ public interface RemoteMethod {
|
|||||||
* @param sch the type of the parameter
|
* @param sch the type of the parameter
|
||||||
* @param arg the argument
|
* @param arg the argument
|
||||||
*/
|
*/
|
||||||
static void checkType(String paramName, SchemaName schName, TargetObjectSchema sch,
|
static void checkType(String paramName, SchemaName schName, TraceObjectSchema sch,
|
||||||
Object arg) {
|
Object arg) {
|
||||||
// if sch is null, it was definitely an object-type schema without context
|
// if sch is null, it was definitely an object-type schema without context
|
||||||
if (sch != null) {
|
if (sch != null) {
|
||||||
if (sch.getType() != TargetObject.class) {
|
if (sch.getType() != TraceObject.class) {
|
||||||
if (sch.getType().isInstance(arg)) {
|
if (sch.getType().isInstance(arg)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (arg instanceof TraceObject obj) {
|
else if (arg instanceof TraceObject obj) {
|
||||||
if (sch.isAssignableFrom(obj.getTargetSchema())) {
|
if (sch.isAssignableFrom(obj.getSchema())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,7 +143,7 @@ public interface RemoteMethod {
|
|||||||
*/
|
*/
|
||||||
default Trace validate(Map<String, Object> arguments) {
|
default Trace validate(Map<String, Object> arguments) {
|
||||||
Trace trace = null;
|
Trace trace = null;
|
||||||
SchemaContext ctx = EnumerableTargetObjectSchema.MinimalSchemaContext.INSTANCE;
|
SchemaContext ctx = PrimitiveTraceObjectSchema.MinimalSchemaContext.INSTANCE;
|
||||||
for (Map.Entry<String, RemoteParameter> ent : parameters().entrySet()) {
|
for (Map.Entry<String, RemoteParameter> ent : parameters().entrySet()) {
|
||||||
if (!arguments.containsKey(ent.getKey())) {
|
if (!arguments.containsKey(ent.getKey())) {
|
||||||
if (ent.getValue().required()) {
|
if (ent.getValue().required()) {
|
||||||
@@ -165,7 +164,7 @@ public interface RemoteMethod {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SchemaName schName = ent.getValue().type();
|
SchemaName schName = ent.getValue().type();
|
||||||
TargetObjectSchema sch = ctx.getSchemaOrNull(schName);
|
TraceObjectSchema sch = ctx.getSchemaOrNull(schName);
|
||||||
checkType(ent.getKey(), schName, sch, arg);
|
checkType(ent.getKey(), schName, sch, arg);
|
||||||
}
|
}
|
||||||
for (Map.Entry<String, Object> ent : arguments.entrySet()) {
|
for (Map.Entry<String, Object> ent : arguments.entrySet()) {
|
||||||
|
|||||||
+3
-3
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.debug.api.tracermi;
|
package ghidra.debug.api.tracermi;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
public interface RemoteParameter {
|
public interface RemoteParameter {
|
||||||
String name();
|
String name();
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import ghidra.app.script.GhidraScript;
|
|||||||
import ghidra.app.script.GhidraState;
|
import ghidra.app.script.GhidraState;
|
||||||
import ghidra.app.services.*;
|
import ghidra.app.services.*;
|
||||||
import ghidra.app.services.DebuggerControlService.StateEditor;
|
import ghidra.app.services.DebuggerControlService.StateEditor;
|
||||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
|
||||||
import ghidra.debug.api.breakpoint.LogicalBreakpoint;
|
import ghidra.debug.api.breakpoint.LogicalBreakpoint;
|
||||||
import ghidra.debug.api.control.ControlMode;
|
import ghidra.debug.api.control.ControlMode;
|
||||||
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
||||||
@@ -51,6 +50,7 @@ import ghidra.trace.model.memory.TraceMemoryOperations;
|
|||||||
import ghidra.trace.model.memory.TraceMemorySpace;
|
import ghidra.trace.model.memory.TraceMemorySpace;
|
||||||
import ghidra.trace.model.program.TraceProgramView;
|
import ghidra.trace.model.program.TraceProgramView;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
import ghidra.trace.model.thread.TraceObjectThread;
|
import ghidra.trace.model.thread.TraceObjectThread;
|
||||||
import ghidra.trace.model.thread.TraceThread;
|
import ghidra.trace.model.thread.TraceThread;
|
||||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||||
@@ -1452,13 +1452,13 @@ public interface FlatDebuggerAPI {
|
|||||||
return createContext(objThread.getObject());
|
return createContext(objThread.getObject());
|
||||||
}
|
}
|
||||||
return new DebuggerSingleObjectPathActionContext(
|
return new DebuggerSingleObjectPathActionContext(
|
||||||
TraceObjectKeyPath.parse(thread.getPath()));
|
KeyPath.parse(thread.getPath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
default ActionContext createContext(Trace trace) {
|
default ActionContext createContext(Trace trace) {
|
||||||
DebuggerCoordinates coords = getTraceManager().getCurrentFor(trace);
|
DebuggerCoordinates coords = getTraceManager().getCurrentFor(trace);
|
||||||
if (coords == null) {
|
if (coords == null) {
|
||||||
return new DebuggerSingleObjectPathActionContext(TraceObjectKeyPath.of());
|
return new DebuggerSingleObjectPathActionContext(KeyPath.of());
|
||||||
}
|
}
|
||||||
if (coords.getObject() != null) {
|
if (coords.getObject() != null) {
|
||||||
return createContext(coords.getObject());
|
return createContext(coords.getObject());
|
||||||
@@ -1466,7 +1466,7 @@ public interface FlatDebuggerAPI {
|
|||||||
if (coords.getPath() != null) {
|
if (coords.getPath() != null) {
|
||||||
return new DebuggerSingleObjectPathActionContext(coords.getPath());
|
return new DebuggerSingleObjectPathActionContext(coords.getPath());
|
||||||
}
|
}
|
||||||
return new DebuggerSingleObjectPathActionContext(TraceObjectKeyPath.of());
|
return new DebuggerSingleObjectPathActionContext(KeyPath.of());
|
||||||
}
|
}
|
||||||
|
|
||||||
default ActionEntry findAction(Target target, ActionName action, ActionContext context) {
|
default ActionEntry findAction(Target target, ActionName action, ActionContext context) {
|
||||||
@@ -1688,25 +1688,25 @@ public interface FlatDebuggerAPI {
|
|||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If the trace does not have a live target, it is considered
|
* If the trace does not have a live target, it is considered
|
||||||
* {@link TargetExecutionState#TERMINATED} (even if the trace <em>never</em> technically had a
|
* {@link TraceExecutionState#TERMINATED} (even if the trace <em>never</em> technically had a
|
||||||
* live target.) Otherwise, this gets the state of that live target. <b>NOTE:</b> This does not
|
* live target.) Otherwise, this gets the state of that live target. <b>NOTE:</b> This does not
|
||||||
* consider the current snap. It only considers a live target in the present.
|
* consider the current snap. It only considers a live target in the present.
|
||||||
*
|
*
|
||||||
* @param trace the trace
|
* @param trace the trace
|
||||||
* @return the trace's execution state
|
* @return the trace's execution state
|
||||||
*/
|
*/
|
||||||
default TargetExecutionState getExecutionState(Trace trace) {
|
default TraceExecutionState getExecutionState(Trace trace) {
|
||||||
Target target = getTargetService().getTarget(trace);
|
Target target = getTargetService().getTarget(trace);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
return TargetExecutionState.TERMINATED;
|
return TraceExecutionState.TERMINATED;
|
||||||
}
|
}
|
||||||
// Use resume action's enablement as a proxy for state
|
// Use resume action's enablement as a proxy for state
|
||||||
// This should work for recorder or rmi targets
|
// This should work for recorder or rmi targets
|
||||||
ActionEntry action = findAction(target, ActionName.RESUME, createContext(trace));
|
ActionEntry action = findAction(target, ActionName.RESUME, createContext(trace));
|
||||||
if (action == null) {
|
if (action == null) {
|
||||||
return TargetExecutionState.ALIVE;
|
return TraceExecutionState.ALIVE;
|
||||||
}
|
}
|
||||||
return action.isEnabled() ? TargetExecutionState.STOPPED : TargetExecutionState.RUNNING;
|
return action.isEnabled() ? TraceExecutionState.STOPPED : TraceExecutionState.RUNNING;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1714,7 +1714,7 @@ public interface FlatDebuggerAPI {
|
|||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If the thread does not have a corresponding live target thread, it is considered
|
* If the thread does not have a corresponding live target thread, it is considered
|
||||||
* {@link TargetExecutionState#TERMINATED} (even if the thread <em>never</em> technically had a
|
* {@link TraceExecutionState#TERMINATED} (even if the thread <em>never</em> technically had a
|
||||||
* live target thread.) Otherwise, this gets the state of that live target thread. <b>NOTE:</b>
|
* live target thread.) Otherwise, this gets the state of that live target thread. <b>NOTE:</b>
|
||||||
* This does not consider the current snap. It only considers a live target thread in the
|
* This does not consider the current snap. It only considers a live target thread in the
|
||||||
* present. In other words, if the user rewinds trace history to a point where the thread was
|
* present. In other words, if the user rewinds trace history to a point where the thread was
|
||||||
@@ -1725,10 +1725,10 @@ public interface FlatDebuggerAPI {
|
|||||||
* @param thread
|
* @param thread
|
||||||
* @return the thread's execution state
|
* @return the thread's execution state
|
||||||
*/
|
*/
|
||||||
default TargetExecutionState getExecutionState(TraceThread thread) {
|
default TraceExecutionState getExecutionState(TraceThread thread) {
|
||||||
DebuggerCoordinates coords = getTraceManager().getCurrentFor(thread.getTrace());
|
DebuggerCoordinates coords = getTraceManager().getCurrentFor(thread.getTrace());
|
||||||
if (!coords.isAlive()) {
|
if (!coords.isAlive()) {
|
||||||
return TargetExecutionState.TERMINATED;
|
return TraceExecutionState.TERMINATED;
|
||||||
}
|
}
|
||||||
return coords.getTarget().getThreadExecutionState(thread);
|
return coords.getTarget().getThreadExecutionState(thread);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ eclipse.project.name = 'Debug Debugger-isf'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':Framework-AsyncComm')
|
api project(':Framework-AsyncComm')
|
||||||
api project(':Framework-Debugging')
|
|
||||||
api project(':ProposedUtils')
|
api project(':ProposedUtils')
|
||||||
|
|
||||||
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-4
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -15,9 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.dbg.jdi.manager;
|
package ghidra.dbg.jdi.manager;
|
||||||
|
|
||||||
import ghidra.dbg.target.TargetConsole.Channel;
|
|
||||||
|
|
||||||
public interface JdiConsoleOutputListener {
|
public interface JdiConsoleOutputListener {
|
||||||
|
/**
|
||||||
|
* For console output notifications, indicates whether it is normal or error output
|
||||||
|
*/
|
||||||
|
public static enum Channel {
|
||||||
|
STDOUT, STDERR;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JDI outputted some text
|
* JDI outputted some text
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.sun.jdi.connect.AttachingConnector;
|
|||||||
import com.sun.jdi.connect.Connector;
|
import com.sun.jdi.connect.Connector;
|
||||||
import com.sun.jdi.connect.Connector.Argument;
|
import com.sun.jdi.connect.Connector.Argument;
|
||||||
|
|
||||||
import ghidra.dbg.util.ShellUtils;
|
import ghidra.pty.ShellUtils;
|
||||||
|
|
||||||
public class JdiArguments {
|
public class JdiArguments {
|
||||||
enum Mode {
|
enum Mode {
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ import ghidra.app.plugin.core.debug.client.tracermi.*;
|
|||||||
import ghidra.app.plugin.core.debug.client.tracermi.RmiMethodRegistry.TraceMethod;
|
import ghidra.app.plugin.core.debug.client.tracermi.RmiMethodRegistry.TraceMethod;
|
||||||
import ghidra.dbg.jdi.manager.impl.DebugStatus;
|
import ghidra.dbg.jdi.manager.impl.DebugStatus;
|
||||||
import ghidra.dbg.jdi.manager.impl.JdiManagerImpl;
|
import ghidra.dbg.jdi.manager.impl.JdiManagerImpl;
|
||||||
import ghidra.dbg.target.schema.EnumerableTargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
|
import ghidra.trace.model.target.schema.PrimitiveTraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
public class JdiConnector {
|
public class JdiConnector {
|
||||||
@@ -92,7 +92,7 @@ public class JdiConnector {
|
|||||||
private final Map<ReferenceType, AddressRange> cpAddressRangeByClass = new HashMap<>();
|
private final Map<ReferenceType, AddressRange> cpAddressRangeByClass = new HashMap<>();
|
||||||
|
|
||||||
private final Map<String, DebugStatus> returnStatusMap = new HashMap<>();
|
private final Map<String, DebugStatus> returnStatusMap = new HashMap<>();
|
||||||
final TargetObjectSchema rootSchema;
|
final TraceObjectSchema rootSchema;
|
||||||
private Map<String, String> env;
|
private Map<String, String> env;
|
||||||
|
|
||||||
public JdiConnector(JdiManagerImpl manager, Map<String, String> env) {
|
public JdiConnector(JdiManagerImpl manager, Map<String, String> env) {
|
||||||
@@ -166,7 +166,7 @@ public class JdiConnector {
|
|||||||
* TODO: The return type should be reflected from the method; however, none of the parameter
|
* TODO: The return type should be reflected from the method; however, none of the parameter
|
||||||
* collection routines currently use the return type, so just use ANY for now.
|
* collection routines currently use the return type, so just use ANY for now.
|
||||||
*/
|
*/
|
||||||
TargetObjectSchema schema = EnumerableTargetObjectSchema.ANY;
|
TraceObjectSchema schema = PrimitiveTraceObjectSchema.ANY;
|
||||||
RmiRemoteMethod method = new RmiRemoteMethod(rootSchema.getContext(), name, action, display,
|
RmiRemoteMethod method = new RmiRemoteMethod(rootSchema.getContext(), name, action, display,
|
||||||
description, schema, methods, m);
|
description, schema, methods, m);
|
||||||
remoteMethodRegistry.putMethod(name, method);
|
remoteMethodRegistry.putMethod(name, method);
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import com.sun.jdi.request.*;
|
|||||||
|
|
||||||
import ghidra.app.plugin.core.debug.client.tracermi.*;
|
import ghidra.app.plugin.core.debug.client.tracermi.*;
|
||||||
import ghidra.app.plugin.core.debug.client.tracermi.RmiMethodRegistry.TraceMethod;
|
import ghidra.app.plugin.core.debug.client.tracermi.RmiMethodRegistry.TraceMethod;
|
||||||
import ghidra.dbg.target.TargetMethod.Param;
|
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.address.AddressRange;
|
import ghidra.program.model.address.AddressRange;
|
||||||
import ghidra.rmi.trace.TraceRmi.MemoryState;
|
import ghidra.rmi.trace.TraceRmi.MemoryState;
|
||||||
|
import ghidra.trace.model.target.iface.TraceObjectMethod.Param;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
public class JdiMethods implements RmiMethods {
|
public class JdiMethods implements RmiMethods {
|
||||||
@@ -343,7 +343,7 @@ public class JdiMethods implements RmiMethods {
|
|||||||
name = "find") String targetClass) {
|
name = "find") String targetClass) {
|
||||||
return find_class(obj, targetClass);
|
return find_class(obj, targetClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TraceMethod(display = "Load class")
|
@TraceMethod(display = "Load class")
|
||||||
public boolean find_class(
|
public boolean find_class(
|
||||||
@Param(
|
@Param(
|
||||||
@@ -377,10 +377,12 @@ public class JdiMethods implements RmiMethods {
|
|||||||
|
|
||||||
@TraceMethod(display = "Refresh reference types")
|
@TraceMethod(display = "Refresh reference types")
|
||||||
public void refresh_canonical_reference_types(
|
public void refresh_canonical_reference_types(
|
||||||
@Param(schema = "CanonicalReferenceTypeContainer", name = "container") RmiTraceObject obj) {
|
@Param(
|
||||||
|
schema = "CanonicalReferenceTypeContainer",
|
||||||
|
name = "container") RmiTraceObject obj) {
|
||||||
refresh_reference_types(obj);
|
refresh_reference_types(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NB. Did not assign action="refresh" because this method is expensive. Assigning that action
|
* NB. Did not assign action="refresh" because this method is expensive. Assigning that action
|
||||||
* name will cause the UI to do it upon expanding the node, which we <em>do not</em> want.
|
* name will cause the UI to do it upon expanding the node, which we <em>do not</em> want.
|
||||||
|
|||||||
+6
-116
@@ -1,11 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<context>
|
<context>
|
||||||
<schema name="Debugger" elementResync="NEVER" attributeResync="ALWAYS">
|
<schema name="Debugger" elementResync="NEVER" attributeResync="ALWAYS">
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="EventScope" />
|
<interface name="EventScope" />
|
||||||
<interface name="Launcher" />
|
|
||||||
<interface name="ActiveScope" />
|
|
||||||
<interface name="FocusScope" />
|
<interface name="FocusScope" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
@@ -20,7 +16,6 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="_event_process" schema="OBJECT" hidden="yes" />
|
<attribute name="_event_process" schema="OBJECT" hidden="yes" />
|
||||||
<attribute name="_event_thread" schema="OBJECT" hidden="yes" />
|
<attribute name="_event_thread" schema="OBJECT" hidden="yes" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_focus" schema="OBJECT" required="no" hidden="yes" />
|
<attribute name="_focus" schema="OBJECT" required="no" hidden="yes" />
|
||||||
<attribute name="_system" schema="OBJECT" hidden="no" />
|
<attribute name="_system" schema="OBJECT" hidden="no" />
|
||||||
<attribute name="Available" schema="AvailableContainer" fixed="yes" />
|
<attribute name="Available" schema="AvailableContainer" fixed="yes" />
|
||||||
@@ -73,9 +68,7 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="KernelConnector" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="KernelConnector" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Launcher" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||||
@@ -87,9 +80,7 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessAttachConnector" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessAttachConnector" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Launcher" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||||
@@ -101,9 +92,7 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ProcessLaunchConnector" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ProcessLaunchConnector" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Launcher" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||||
@@ -115,9 +104,7 @@
|
|||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="TraceOrDumpConnector" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="TraceOrDumpConnector" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Launcher" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_parameters" schema="MAP_PARAMETERS" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||||
@@ -131,17 +118,8 @@
|
|||||||
<schema name="VirtualMachine" elementResync="NEVER" attributeResync="ONCE">
|
<schema name="VirtualMachine" elementResync="NEVER" attributeResync="ONCE">
|
||||||
<interface name="Process" />
|
<interface name="Process" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Interpreter" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_accessible" schema="BOOL" hidden="yes" />
|
<attribute name="_accessible" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
@@ -168,7 +146,6 @@
|
|||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Available" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Available" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Attachable" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_pid" schema="LONG" hidden="yes" required="yes" />
|
<attribute name="_pid" schema="LONG" hidden="yes" required="yes" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
@@ -236,16 +213,6 @@
|
|||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Attacher" />
|
|
||||||
<interface name="Attachable" />
|
|
||||||
<!-- interface name="Launcher" / -->
|
|
||||||
<interface name="Deletable" />
|
|
||||||
<interface name="Detachable" />
|
|
||||||
<interface name="Killable" />
|
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_pid" schema="LONG" hidden="yes" />
|
<attribute name="_pid" schema="LONG" hidden="yes" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
@@ -258,8 +225,6 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="_state" schema="EXECUTION_STATE" required="no" hidden="yes" />
|
<attribute name="_state" schema="EXECUTION_STATE" required="no" hidden="yes" />
|
||||||
<attribute name="_accessible" schema="BOOL" required="yes" hidden="yes" />
|
<attribute name="_accessible" schema="BOOL" required="yes" hidden="yes" />
|
||||||
<attribute name="_supported_attach_kinds" schema="SET_ATTACH_KIND" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_supported_step_kinds" schema="SET_STEP_KIND" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Memory" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Memory" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
@@ -296,25 +261,8 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="VOID" />
|
<attribute schema="VOID" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="DebugContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="Aggregate" />
|
|
||||||
<element schema="OBJECT" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
|
||||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute name="Breakpoints" schema="BreakpointContainer" required="yes" fixed="no" />
|
|
||||||
<attribute schema="ANY" />
|
|
||||||
</schema>
|
|
||||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointLocationContainer" />
|
|
||||||
<interface name="BreakpointSpecContainer" />
|
|
||||||
<element schema="BreakpointSpec" />
|
<element schema="BreakpointSpec" />
|
||||||
<attribute name="_supported_breakpoint_kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||||
@@ -328,12 +276,9 @@
|
|||||||
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="BreakpointSpec" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="BreakpointSpec" />
|
<interface name="BreakpointSpec" />
|
||||||
<interface name="BreakpointLocation" />
|
<interface name="BreakpointLocation" />
|
||||||
<interface name="Deletable" />
|
|
||||||
<element schema="OBJECT" />
|
<element schema="OBJECT" />
|
||||||
<attribute name="_expression" schema="STRING" required="yes" hidden="yes" />
|
<attribute name="_expression" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute name="_kinds" schema="SET_BREAKPOINT_KIND" required="yes" hidden="yes" />
|
<attribute name="_kinds" schema="STRING" required="yes" hidden="yes" />
|
||||||
<attribute name="_container" schema="BreakpointContainer" />
|
|
||||||
<attribute name="_affects" schema="LIST_OBJECT" hidden="yes" />
|
|
||||||
<attribute name="_spec" schema="BreakpointSpec" />
|
<attribute name="_spec" schema="BreakpointSpec" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||||
@@ -362,7 +307,6 @@
|
|||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Event" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Event" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Deletable" />
|
|
||||||
<element schema="OBJECT" />
|
<element schema="OBJECT" />
|
||||||
<attribute name="_enabled" schema="BOOL" required="yes" hidden="yes" />
|
<attribute name="_enabled" schema="BOOL" required="yes" hidden="yes" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
@@ -375,57 +319,12 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="SymbolContainer" canonical="yes" elementResync="ONCE" attributeResync="NEVER">
|
|
||||||
<interface name="SymbolNamespace" />
|
|
||||||
<element schema="Symbol" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
|
||||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="ANY" />
|
|
||||||
</schema>
|
|
||||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="Symbol" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="_namespace" schema="SymbolContainer" />
|
|
||||||
<attribute name="_data_type" schema="DATA_TYPE" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_size" schema="LONG" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_value" schema="ADDRESS" hidden="yes" />
|
|
||||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="RegisterContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="RegisterContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="RegisterContainer" />
|
<interface name="RegisterContainer" />
|
||||||
<interface name="RegisterBank" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="RegisterDescriptor" elementResync="NEVER" attributeResync="NEVER">
|
|
||||||
<interface name="Register" />
|
|
||||||
<element schema="VOID" />
|
|
||||||
<attribute name="_length" schema="INT" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_container" schema="RegisterContainer" />
|
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
|
||||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
|
||||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_value" schema="ANY" required="yes" hidden="yes" />
|
|
||||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
|
||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
|
||||||
<attribute schema="VOID" />
|
|
||||||
</schema>
|
|
||||||
<schema name="Stack" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Stack" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Stack" />
|
<interface name="Stack" />
|
||||||
<element schema="StackFrame" />
|
<element schema="StackFrame" />
|
||||||
@@ -553,17 +452,14 @@
|
|||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="CanonicalMethodContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="CanonicalMethodContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Method" />
|
<element schema="Method" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="MethodContainer" canonical="no" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="MethodContainer" canonical="no" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Method" />
|
<element schema="Method" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="MethodProxy" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="MethodProxy" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="SectionContainer" />
|
|
||||||
<element schema="Method" />
|
<element schema="Method" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="Method" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Method" elementResync="NEVER" attributeResync="NEVER">
|
||||||
@@ -701,13 +597,13 @@
|
|||||||
<attribute name="Type" schema="Type" />
|
<attribute name="Type" schema="Type" />
|
||||||
<attribute schema="ANY" />
|
<attribute schema="ANY" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ClassObjecReferenceContainer" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ClassObjectReferenceContainer" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<element schema="ClassObjecReference" />
|
<element schema="ClassObjectReference" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ClassObjecReferenceProxy" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ClassObjectReferenceProxy" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<element schema="ClassObjecReference" />
|
<element schema="ClassObjectReference" />
|
||||||
</schema>
|
</schema>
|
||||||
<schema name="ClassObjecReference" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ClassObjectReference" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<element schema="ANY" />
|
<element schema="ANY" />
|
||||||
<attribute name="ReflectedType" schema="ReferenceTypeProxy" />
|
<attribute name="ReflectedType" schema="ReferenceTypeProxy" />
|
||||||
<attribute name="Relations" schema="ObjectRelations" required="no" fixed="yes" />
|
<attribute name="Relations" schema="ObjectRelations" required="no" fixed="yes" />
|
||||||
@@ -750,7 +646,6 @@
|
|||||||
<schema name="ThreadGroupReference" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="ThreadGroupReference" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Steppable" />
|
|
||||||
<element schema="ANY" />
|
<element schema="ANY" />
|
||||||
<attribute name="Parent" schema="ThreadGroupReferenceProxy" />
|
<attribute name="Parent" schema="ThreadGroupReferenceProxy" />
|
||||||
<attribute name="Relations" schema="ObjectRelations" required="no" fixed="yes" />
|
<attribute name="Relations" schema="ObjectRelations" required="no" fixed="yes" />
|
||||||
@@ -775,12 +670,8 @@
|
|||||||
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
<schema name="Thread" elementResync="NEVER" attributeResync="NEVER">
|
||||||
<interface name="Thread" />
|
<interface name="Thread" />
|
||||||
<interface name="Aggregate" />
|
<interface name="Aggregate" />
|
||||||
<interface name="Access" />
|
|
||||||
<interface name="Activatable" />
|
<interface name="Activatable" />
|
||||||
<interface name="ExecutionStateful" />
|
<interface name="ExecutionStateful" />
|
||||||
<interface name="Resumable" />
|
|
||||||
<interface name="Steppable" />
|
|
||||||
<interface name="Interruptible" />
|
|
||||||
<element schema="VOID" />
|
<element schema="VOID" />
|
||||||
<attribute name="_tid" schema="INT" hidden="yes" />
|
<attribute name="_tid" schema="INT" hidden="yes" />
|
||||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||||
@@ -793,7 +684,6 @@
|
|||||||
<attribute name="_order" schema="INT" hidden="yes" />
|
<attribute name="_order" schema="INT" hidden="yes" />
|
||||||
<attribute name="_accessible" schema="BOOL" required="yes" hidden="yes" />
|
<attribute name="_accessible" schema="BOOL" required="yes" hidden="yes" />
|
||||||
<attribute name="_state" schema="EXECUTION_STATE" required="no" hidden="yes" />
|
<attribute name="_state" schema="EXECUTION_STATE" required="no" hidden="yes" />
|
||||||
<attribute name="_supported_step_kinds" schema="SET_STEP_KIND" required="yes" fixed="yes" hidden="yes" />
|
|
||||||
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
||||||
<attribute name="Id" schema="OBJECT" />
|
<attribute name="Id" schema="OBJECT" />
|
||||||
<attribute name="Name" schema="OBJECT" />
|
<attribute name="Name" schema="OBJECT" />
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -33,7 +33,6 @@ dependencies {
|
|||||||
testImplementation project(path: ':Generic', configuration: 'testArtifacts')
|
testImplementation project(path: ':Generic', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Debugger', configuration: 'testArtifacts')
|
testImplementation project(path: ':Debugger', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
|
|
||||||
testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts')
|
testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -27,8 +27,6 @@ import org.jdom.JDOMException;
|
|||||||
import com.google.protobuf.ByteString;
|
import com.google.protobuf.ByteString;
|
||||||
|
|
||||||
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiHandler;
|
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiHandler;
|
||||||
import ghidra.dbg.target.schema.*;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.lang.*;
|
import ghidra.program.model.lang.*;
|
||||||
import ghidra.rmi.trace.TraceRmi;
|
import ghidra.rmi.trace.TraceRmi;
|
||||||
@@ -36,6 +34,8 @@ import ghidra.rmi.trace.TraceRmi.*;
|
|||||||
import ghidra.rmi.trace.TraceRmi.Language;
|
import ghidra.rmi.trace.TraceRmi.Language;
|
||||||
import ghidra.rmi.trace.TraceRmi.Value.Builder;
|
import ghidra.rmi.trace.TraceRmi.Value.Builder;
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
|
import ghidra.trace.model.target.schema.*;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.Swing;
|
import ghidra.util.Swing;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ public class RmiClient {
|
|||||||
private static RmiMethodRegistry methodRegistry;
|
private static RmiMethodRegistry methodRegistry;
|
||||||
private Deque<RequestResult> requests = new LinkedList<>();
|
private Deque<RequestResult> requests = new LinkedList<>();
|
||||||
|
|
||||||
public static TargetObjectSchema loadSchema(String resourceName, String rootName) {
|
public static TraceObjectSchema loadSchema(String resourceName, String rootName) {
|
||||||
XmlSchemaContext schemaContext;
|
XmlSchemaContext schemaContext;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -820,7 +820,7 @@ public class RmiClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetObjectSchema getSchema(String schema) {
|
public TraceObjectSchema getSchema(String schema) {
|
||||||
return schemaContext.getSchema(new SchemaName(schema));
|
return schemaContext.getSchema(new SchemaName(schema));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-10
@@ -18,10 +18,9 @@ package ghidra.app.plugin.core.debug.client.tracermi;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.lang.reflect.Parameter;
|
import java.lang.reflect.Parameter;
|
||||||
|
|
||||||
import ghidra.dbg.target.TargetMethod;
|
import ghidra.trace.model.target.iface.TraceObjectMethod.ParameterDescription;
|
||||||
import ghidra.dbg.target.TargetMethod.ParameterDescription;
|
import ghidra.trace.model.target.schema.*;
|
||||||
import ghidra.dbg.target.schema.*;
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
|
|
||||||
public class RmiRemoteMethod {
|
public class RmiRemoteMethod {
|
||||||
|
|
||||||
@@ -31,12 +30,12 @@ public class RmiRemoteMethod {
|
|||||||
private String display;
|
private String display;
|
||||||
private String description;
|
private String description;
|
||||||
private RmiRemoteMethodParameter[] params;
|
private RmiRemoteMethodParameter[] params;
|
||||||
private TargetObjectSchema schema;
|
private TraceObjectSchema schema;
|
||||||
private RmiMethods instance;
|
private RmiMethods instance;
|
||||||
private Method m;
|
private Method m;
|
||||||
|
|
||||||
public RmiRemoteMethod(SchemaContext schemaContext, String name, String action, String display,
|
public RmiRemoteMethod(SchemaContext schemaContext, String name, String action, String display,
|
||||||
String description, TargetObjectSchema schema, RmiMethods instance, Method m) {
|
String description, TraceObjectSchema schema, RmiMethods instance, Method m) {
|
||||||
this.schemaContext = schemaContext;
|
this.schemaContext = schemaContext;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.action = action;
|
this.action = action;
|
||||||
@@ -49,10 +48,10 @@ public class RmiRemoteMethod {
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Parameter p : m.getParameters()) {
|
for (Parameter p : m.getParameters()) {
|
||||||
ParameterDescription<?> desc = TargetMethod.ParameterDescription.annotated(p);
|
ParameterDescription<?> desc = ParameterDescription.annotated(p);
|
||||||
TargetObjectSchema pschema;
|
TraceObjectSchema pschema;
|
||||||
if (desc.type != RmiTraceObject.class) {
|
if (desc.type != RmiTraceObject.class) {
|
||||||
pschema = EnumerableTargetObjectSchema.schemaForPrimitive(desc.type);
|
pschema = PrimitiveTraceObjectSchema.schemaForPrimitive(desc.type);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pschema = schemaContext.getSchema(new SchemaName(desc.schema));
|
pschema = schemaContext.getSchema(new SchemaName(desc.schema));
|
||||||
@@ -86,7 +85,7 @@ public class RmiRemoteMethod {
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetObjectSchema getSchema() {
|
public TraceObjectSchema getSchema() {
|
||||||
return schema;
|
return schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -15,19 +15,19 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.client.tracermi;
|
package ghidra.app.plugin.core.debug.client.tracermi;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.rmi.trace.TraceRmi.*;
|
import ghidra.rmi.trace.TraceRmi.*;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
|
||||||
public class RmiRemoteMethodParameter {
|
public class RmiRemoteMethodParameter {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final TargetObjectSchema schema;
|
private final TraceObjectSchema schema;
|
||||||
private final boolean required;
|
private final boolean required;
|
||||||
private final Object defaultValue;
|
private final Object defaultValue;
|
||||||
private final String display;
|
private final String display;
|
||||||
private final String description;
|
private final String description;
|
||||||
|
|
||||||
public RmiRemoteMethodParameter(String name, TargetObjectSchema schema, boolean required,
|
public RmiRemoteMethodParameter(String name, TraceObjectSchema schema, boolean required,
|
||||||
Object defaultValue, String display, String description) {
|
Object defaultValue, String display, String description) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.schema = schema;
|
this.schema = schema;
|
||||||
|
|||||||
+3
-3
@@ -21,12 +21,12 @@ import java.util.concurrent.locks.ReadWriteLock;
|
|||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import ghidra.app.plugin.core.debug.client.tracermi.RmiClient.RequestResult;
|
import ghidra.app.plugin.core.debug.client.tracermi.RmiClient.RequestResult;
|
||||||
import ghidra.dbg.target.schema.SchemaContext;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.lang.RegisterValue;
|
import ghidra.program.model.lang.RegisterValue;
|
||||||
import ghidra.rmi.trace.TraceRmi.*;
|
import ghidra.rmi.trace.TraceRmi.*;
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
|
import ghidra.trace.model.target.schema.SchemaContext;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
import ghidra.util.LockHold;
|
import ghidra.util.LockHold;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ public class RmiTrace {
|
|||||||
RmiTraceObject parent = proxyObject(d.getParent());
|
RmiTraceObject parent = proxyObject(d.getParent());
|
||||||
Lifespan span = Lifespan.span(d.getSpan().getMin(), d.getSpan().getMax());
|
Lifespan span = Lifespan.span(d.getSpan().getMin(), d.getSpan().getMax());
|
||||||
Object value = client.argToObject(id, d.getValue());
|
Object value = client.argToObject(id, d.getValue());
|
||||||
TargetObjectSchema schema = client.getSchema(client.argToType(d.getValue()));
|
TraceObjectSchema schema = client.getSchema(client.argToType(d.getValue()));
|
||||||
result.add(new RmiTraceObjectValue(parent, span, d.getKey(), value, schema));
|
result.add(new RmiTraceObjectValue(parent, span, d.getKey(), value, schema));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.client.tracermi;
|
package ghidra.app.plugin.core.debug.client.tracermi;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
|
||||||
public record RmiTraceObjectValue(RmiTraceObject parent, Lifespan span, String key, Object value,
|
public record RmiTraceObjectValue(RmiTraceObject parent, Lifespan span, String key, Object value,
|
||||||
TargetObjectSchema schema) {}
|
TraceObjectSchema schema) {}
|
||||||
|
|||||||
+2
-7
@@ -24,14 +24,13 @@ import javax.swing.JLabel;
|
|||||||
|
|
||||||
import ghidra.app.plugin.core.debug.gui.AbstractDebuggerParameterDialog;
|
import ghidra.app.plugin.core.debug.gui.AbstractDebuggerParameterDialog;
|
||||||
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiTarget.Missing;
|
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiTarget.Missing;
|
||||||
import ghidra.dbg.target.TargetObject;
|
|
||||||
import ghidra.dbg.target.schema.SchemaContext;
|
|
||||||
import ghidra.debug.api.ValStr;
|
import ghidra.debug.api.ValStr;
|
||||||
import ghidra.debug.api.tracermi.RemoteParameter;
|
import ghidra.debug.api.tracermi.RemoteParameter;
|
||||||
import ghidra.framework.options.SaveState;
|
import ghidra.framework.options.SaveState;
|
||||||
import ghidra.framework.plugintool.AutoConfigState.ConfigStateField;
|
import ghidra.framework.plugintool.AutoConfigState.ConfigStateField;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
|
import ghidra.trace.model.target.schema.SchemaContext;
|
||||||
|
|
||||||
public class RemoteMethodInvocationDialog extends AbstractDebuggerParameterDialog<RemoteParameter> {
|
public class RemoteMethodInvocationDialog extends AbstractDebuggerParameterDialog<RemoteParameter> {
|
||||||
|
|
||||||
@@ -84,11 +83,7 @@ public class RemoteMethodInvocationDialog extends AbstractDebuggerParameterDialo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<?> parameterType(RemoteParameter parameter) {
|
protected Class<?> parameterType(RemoteParameter parameter) {
|
||||||
Class<?> type = ctx.getSchema(parameter.type()).getType();
|
return ctx.getSchema(parameter.type()).getType();
|
||||||
if (TargetObject.class.isAssignableFrom(type)) {
|
|
||||||
return TraceObject.class;
|
|
||||||
}
|
|
||||||
return type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
-1
@@ -36,7 +36,6 @@ import ghidra.app.plugin.core.terminal.TerminalListener;
|
|||||||
import ghidra.app.services.*;
|
import ghidra.app.services.*;
|
||||||
import ghidra.app.services.DebuggerTraceManagerService.ActivationCause;
|
import ghidra.app.services.DebuggerTraceManagerService.ActivationCause;
|
||||||
import ghidra.async.AsyncUtils;
|
import ghidra.async.AsyncUtils;
|
||||||
import ghidra.dbg.util.ShellUtils;
|
|
||||||
import ghidra.debug.api.ValStr;
|
import ghidra.debug.api.ValStr;
|
||||||
import ghidra.debug.api.action.AutoMapSpec;
|
import ghidra.debug.api.action.AutoMapSpec;
|
||||||
import ghidra.debug.api.modules.DebuggerMissingProgramActionContext;
|
import ghidra.debug.api.modules.DebuggerMissingProgramActionContext;
|
||||||
|
|||||||
+1
-1
@@ -27,12 +27,12 @@ import javax.swing.Icon;
|
|||||||
|
|
||||||
import generic.theme.GIcon;
|
import generic.theme.GIcon;
|
||||||
import generic.theme.Gui;
|
import generic.theme.Gui;
|
||||||
import ghidra.dbg.util.ShellUtils;
|
|
||||||
import ghidra.debug.api.ValStr;
|
import ghidra.debug.api.ValStr;
|
||||||
import ghidra.debug.api.tracermi.LaunchParameter;
|
import ghidra.debug.api.tracermi.LaunchParameter;
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
import ghidra.framework.plugintool.AutoConfigState.PathIsDir;
|
import ghidra.framework.plugintool.AutoConfigState.PathIsDir;
|
||||||
import ghidra.framework.plugintool.AutoConfigState.PathIsFile;
|
import ghidra.framework.plugintool.AutoConfigState.PathIsFile;
|
||||||
|
import ghidra.pty.ShellUtils;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+3
-3
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -17,10 +17,10 @@ package ghidra.app.plugin.core.debug.service.tracermi;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.target.ActionName;
|
import ghidra.debug.api.target.ActionName;
|
||||||
import ghidra.debug.api.tracermi.*;
|
import ghidra.debug.api.tracermi.*;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
public record RecordRemoteMethod(TraceRmiHandler handler, String name, ActionName action,
|
public record RecordRemoteMethod(TraceRmiHandler handler, String name, ActionName action,
|
||||||
String display, String description, Map<String, RemoteParameter> parameters,
|
String display, String description, Map<String, RemoteParameter> parameters,
|
||||||
|
|||||||
+3
-3
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.service.tracermi;
|
package ghidra.app.plugin.core.debug.service.tracermi;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.tracermi.RemoteParameter;
|
import ghidra.debug.api.tracermi.RemoteParameter;
|
||||||
import ghidra.program.model.address.AddressOverflowException;
|
import ghidra.program.model.address.AddressOverflowException;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
public record RecordRemoteParameter(TraceRmiHandler handler, String name, SchemaName type,
|
public record RecordRemoteParameter(TraceRmiHandler handler, String name, SchemaName type,
|
||||||
boolean required, ValueSupplier defaultValue, String display, String description)
|
boolean required, ValueSupplier defaultValue, String display, String description)
|
||||||
|
|||||||
+7
-8
@@ -35,10 +35,6 @@ import ghidra.app.plugin.core.debug.disassemble.DebuggerDisassemblerPlugin;
|
|||||||
import ghidra.app.plugin.core.debug.disassemble.TraceDisassembleCommand;
|
import ghidra.app.plugin.core.debug.disassemble.TraceDisassembleCommand;
|
||||||
import ghidra.app.services.DebuggerControlService;
|
import ghidra.app.services.DebuggerControlService;
|
||||||
import ghidra.app.services.DebuggerTraceManagerService;
|
import ghidra.app.services.DebuggerTraceManagerService;
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.dbg.target.schema.XmlSchemaContext;
|
|
||||||
import ghidra.dbg.util.PathPattern;
|
|
||||||
import ghidra.dbg.util.PathUtils;
|
|
||||||
import ghidra.debug.api.progress.CloseableTaskMonitor;
|
import ghidra.debug.api.progress.CloseableTaskMonitor;
|
||||||
import ghidra.debug.api.target.ActionName;
|
import ghidra.debug.api.target.ActionName;
|
||||||
import ghidra.debug.api.target.Target;
|
import ghidra.debug.api.target.Target;
|
||||||
@@ -60,6 +56,9 @@ import ghidra.trace.model.guest.TracePlatform;
|
|||||||
import ghidra.trace.model.memory.*;
|
import ghidra.trace.model.memory.*;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
import ghidra.trace.model.target.TraceObject.ConflictResolution;
|
import ghidra.trace.model.target.TraceObject.ConflictResolution;
|
||||||
|
import ghidra.trace.model.target.path.*;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
import ghidra.trace.model.target.schema.XmlSchemaContext;
|
||||||
import ghidra.trace.model.time.TraceSnapshot;
|
import ghidra.trace.model.time.TraceSnapshot;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
@@ -652,12 +651,12 @@ public class TraceRmiHandler extends AbstractTraceRmiConnection {
|
|||||||
.getCompilerSpecByID(new CompilerSpecID(compiler.getId()));
|
.getCompilerSpecByID(new CompilerSpecID(compiler.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static TraceObjectKeyPath toKeyPath(ObjPath path) {
|
protected static KeyPath toKeyPath(ObjPath path) {
|
||||||
return TraceObjectKeyPath.parse(path.getPath());
|
return KeyPath.parse(path.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static PathPattern toPathPattern(ObjPath path) {
|
protected static PathPattern toPathPattern(ObjPath path) {
|
||||||
return new PathPattern(PathUtils.parse(path.getPath()));
|
return PathFilter.parse(path.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Lifespan toLifespan(Span span) {
|
protected static Lifespan toLifespan(Span span) {
|
||||||
@@ -686,7 +685,7 @@ public class TraceRmiHandler extends AbstractTraceRmiConnection {
|
|||||||
return ObjSpec.newBuilder().setId(object.getKey()).build();
|
return ObjSpec.newBuilder().setId(object.getKey()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static ObjPath makeObjPath(TraceObjectKeyPath path) {
|
protected static ObjPath makeObjPath(KeyPath path) {
|
||||||
return ObjPath.newBuilder().setPath(path.toString()).build();
|
return ObjPath.newBuilder().setPath(path.toString()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+72
-91
@@ -30,13 +30,6 @@ import ghidra.app.plugin.core.debug.service.target.AbstractTarget;
|
|||||||
import ghidra.app.services.DebuggerConsoleService;
|
import ghidra.app.services.DebuggerConsoleService;
|
||||||
import ghidra.app.services.DebuggerTraceManagerService;
|
import ghidra.app.services.DebuggerTraceManagerService;
|
||||||
import ghidra.async.*;
|
import ghidra.async.*;
|
||||||
import ghidra.dbg.target.*;
|
|
||||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
|
||||||
import ghidra.dbg.target.schema.*;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.dbg.util.PathMatcher;
|
|
||||||
import ghidra.dbg.util.PathPredicates;
|
|
||||||
import ghidra.dbg.util.PathPredicates.Align;
|
|
||||||
import ghidra.debug.api.ValStr;
|
import ghidra.debug.api.ValStr;
|
||||||
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
||||||
import ghidra.debug.api.model.DebuggerSingleObjectPathActionContext;
|
import ghidra.debug.api.model.DebuggerSingleObjectPathActionContext;
|
||||||
@@ -48,17 +41,20 @@ import ghidra.pcode.utils.Utils;
|
|||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.lang.Register;
|
import ghidra.program.model.lang.Register;
|
||||||
import ghidra.program.model.lang.RegisterValue;
|
import ghidra.program.model.lang.RegisterValue;
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.*;
|
||||||
import ghidra.trace.model.Trace;
|
|
||||||
import ghidra.trace.model.breakpoint.*;
|
import ghidra.trace.model.breakpoint.*;
|
||||||
import ghidra.trace.model.breakpoint.TraceBreakpointKind.TraceBreakpointKindSet;
|
import ghidra.trace.model.breakpoint.TraceBreakpointKind.TraceBreakpointKindSet;
|
||||||
import ghidra.trace.model.guest.TracePlatform;
|
import ghidra.trace.model.guest.TracePlatform;
|
||||||
import ghidra.trace.model.memory.TraceMemoryRegion;
|
import ghidra.trace.model.memory.*;
|
||||||
import ghidra.trace.model.memory.TraceObjectMemoryRegion;
|
|
||||||
import ghidra.trace.model.stack.*;
|
import ghidra.trace.model.stack.*;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
import ghidra.trace.model.thread.TraceObjectThread;
|
import ghidra.trace.model.target.iface.*;
|
||||||
import ghidra.trace.model.thread.TraceThread;
|
import ghidra.trace.model.target.info.TraceObjectInterfaceUtils;
|
||||||
|
import ghidra.trace.model.target.path.*;
|
||||||
|
import ghidra.trace.model.target.path.PathFilter.Align;
|
||||||
|
import ghidra.trace.model.target.schema.*;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
import ghidra.trace.model.thread.*;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
|
||||||
@@ -110,16 +106,16 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TargetExecutionState getThreadExecutionState(TraceThread thread) {
|
public TraceExecutionState getThreadExecutionState(TraceThread thread) {
|
||||||
if (!(thread instanceof TraceObjectThread tot)) {
|
if (!(thread instanceof TraceObjectThread tot)) {
|
||||||
Msg.error(this, "Non-object thread with Trace RMI!");
|
Msg.error(this, "Non-object thread with Trace RMI!");
|
||||||
return TargetExecutionState.ALIVE;
|
return TraceExecutionState.ALIVE;
|
||||||
}
|
}
|
||||||
return tot.getObject().getExecutionState(getSnap());
|
return tot.getObject().getExecutionState(getSnap());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TraceThread getThreadForSuccessor(TraceObjectKeyPath path) {
|
public TraceThread getThreadForSuccessor(KeyPath path) {
|
||||||
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -130,7 +126,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TraceStackFrame getStackFrameForSuccessor(TraceObjectKeyPath path) {
|
public TraceStackFrame getStackFrameForSuccessor(KeyPath path) {
|
||||||
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
TraceObject object = trace.getObjectManager().getObjectByCanonicalPath(path);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -203,15 +199,15 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TraceObjectValue attrEnabled =
|
TraceObjectValue attrEnabled =
|
||||||
object.getAttribute(getSnap(), TargetTogglable.ENABLED_ATTRIBUTE_NAME);
|
object.getAttribute(getSnap(), TraceObjectTogglable.KEY_ENABLED);
|
||||||
boolean enabled = attrEnabled != null && attrEnabled.getValue() instanceof Boolean b && b;
|
boolean enabled = attrEnabled != null && attrEnabled.getValue() instanceof Boolean b && b;
|
||||||
return !enabled;
|
return !enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Object findArgumentForSchema(ActionName action, ActionContext context,
|
protected Object findArgumentForSchema(ActionName action, ActionContext context,
|
||||||
TargetObjectSchema schema, boolean allowContextObject, boolean allowCoordsObject,
|
TraceObjectSchema schema, boolean allowContextObject, boolean allowCoordsObject,
|
||||||
boolean allowSuitableObject) {
|
boolean allowSuitableObject) {
|
||||||
if (schema instanceof EnumerableTargetObjectSchema prim) {
|
if (schema instanceof PrimitiveTraceObjectSchema prim) {
|
||||||
return switch (prim) {
|
return switch (prim) {
|
||||||
case OBJECT -> findObject(context, allowContextObject, allowCoordsObject);
|
case OBJECT -> findObject(context, allowContextObject, allowCoordsObject);
|
||||||
case ADDRESS -> findAddress(context);
|
case ADDRESS -> findAddress(context);
|
||||||
@@ -225,9 +221,9 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (allowSuitableObject) {
|
if (allowSuitableObject) {
|
||||||
return object.querySuitableSchema(schema);
|
return object.findSuitableSchema(schema);
|
||||||
}
|
}
|
||||||
if (object.getTargetSchema() == schema) {
|
if (object.getSchema() == schema) {
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -246,7 +242,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
Msg.trace(this, "No root schema, yet: " + trace);
|
Msg.trace(this, "No root schema, yet: " + trace);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TargetObjectSchema schema = ctx.getSchemaOrNull(type);
|
TraceObjectSchema schema = ctx.getSchemaOrNull(type);
|
||||||
if (schema == null) {
|
if (schema == null) {
|
||||||
Msg.error(this, "Schema " + type + " not in trace! " + trace);
|
Msg.error(this, "Schema " + type + " not in trace! " + trace);
|
||||||
return null;
|
return null;
|
||||||
@@ -275,19 +271,19 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TargetExecutionState getStateOf(TraceObject object) {
|
private TraceExecutionState getStateOf(TraceObject object) {
|
||||||
try {
|
try {
|
||||||
return object.getExecutionState(getSnap());
|
return object.getExecutionState(getSnap());
|
||||||
}
|
}
|
||||||
catch (NoSuchElementException e) {
|
catch (NoSuchElementException e) {
|
||||||
return TargetExecutionState.TERMINATED;
|
return TraceExecutionState.TERMINATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean whenState(TraceObject object,
|
private boolean whenState(TraceObject object,
|
||||||
Predicate<TargetExecutionState> predicate) {
|
Predicate<TraceExecutionState> predicate) {
|
||||||
try {
|
try {
|
||||||
TargetExecutionState state = getStateOf(object);
|
TraceExecutionState state = getStateOf(object);
|
||||||
return state == null || predicate.test(state);
|
return state == null || predicate.test(state);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
@@ -300,7 +296,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
long score = 0;
|
long score = 0;
|
||||||
for (Object o : args.values()) {
|
for (Object o : args.values()) {
|
||||||
if (o instanceof TraceObject obj) {
|
if (o instanceof TraceObject obj) {
|
||||||
score += obj.getCanonicalPath().getKeyList().size();
|
score += obj.getCanonicalPath().size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return score;
|
return score;
|
||||||
@@ -315,7 +311,8 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
RemoteParameter firstParam = method.parameters()
|
RemoteParameter firstParam = method.parameters()
|
||||||
.values()
|
.values()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(p -> TargetObject.class.isAssignableFrom(ctx.getSchema(p.type()).getType()))
|
.filter(
|
||||||
|
p -> TraceObjectInterfaceUtils.isTraceObject(ctx.getSchema(p.type()).getType()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
if (firstParam == null) {
|
if (firstParam == null) {
|
||||||
@@ -405,7 +402,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
.values()
|
.values()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(p -> {
|
.filter(p -> {
|
||||||
TargetObjectSchema schema = ctx.getSchemaOrNull(p.type());
|
TraceObjectSchema schema = ctx.getSchemaOrNull(p.type());
|
||||||
if (schema == null) {
|
if (schema == null) {
|
||||||
Msg.error(this,
|
Msg.error(this,
|
||||||
"Method " + method + " refers to invalid schema name: " + p.type());
|
"Method " + method + " refers to invalid schema name: " + p.type());
|
||||||
@@ -489,22 +486,22 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupportsFocus() {
|
public boolean isSupportsFocus() {
|
||||||
TargetObjectSchema schema = trace.getObjectManager().getRootSchema();
|
TraceObjectSchema schema = trace.getObjectManager().getRootSchema();
|
||||||
if (schema == null) {
|
if (schema == null) {
|
||||||
Msg.trace(this, "Checked for focus support before root schema is available");
|
Msg.trace(this, "Checked for focus support before root schema is available");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return schema
|
return schema
|
||||||
.getInterfaces()
|
.getInterfaces()
|
||||||
.contains(TargetFocusScope.class) &&
|
.contains(TraceObjectFocusScope.class) &&
|
||||||
!connection.getMethods().getByAction(ActionName.ACTIVATE).isEmpty();
|
!connection.getMethods().getByAction(ActionName.ACTIVATE).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TraceObjectKeyPath getFocus() {
|
public KeyPath getFocus() {
|
||||||
TraceObjectValue focusVal = trace.getObjectManager()
|
TraceObjectValue focusVal = trace.getObjectManager()
|
||||||
.getRootObject()
|
.getRootObject()
|
||||||
.getAttribute(getSnap(), TargetFocusScope.FOCUS_ATTRIBUTE_NAME);
|
.getAttribute(getSnap(), TraceObjectFocusScope.KEY_FOCUS);
|
||||||
if (focusVal == null || !focusVal.isObject()) {
|
if (focusVal == null || !focusVal.isObject()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -552,17 +549,17 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
protected static boolean typeMatches(RemoteMethod method, RemoteParameter param,
|
protected static boolean typeMatches(RemoteMethod method, RemoteParameter param,
|
||||||
SchemaContext ctx, Class<?> type) {
|
SchemaContext ctx, Class<?> type) {
|
||||||
TargetObjectSchema sch = ctx.getSchemaOrNull(param.type());
|
TraceObjectSchema sch = ctx.getSchemaOrNull(param.type());
|
||||||
if (sch == null) {
|
if (sch == null) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
"The parameter '%s' of method '%s' refers to a non-existent schema '%s'"
|
"The parameter '%s' of method '%s' refers to a non-existent schema '%s'"
|
||||||
.formatted(param.name(), method.name(), param.type()));
|
.formatted(param.name(), method.name(), param.type()));
|
||||||
}
|
}
|
||||||
if (type == TargetObject.class) {
|
if (type == TraceObject.class) {
|
||||||
// The method cannot impose any further restriction. It must accept any object.
|
// The method cannot impose any further restriction. It must accept any object.
|
||||||
return sch == EnumerableTargetObjectSchema.OBJECT;
|
return sch == PrimitiveTraceObjectSchema.OBJECT;
|
||||||
}
|
}
|
||||||
else if (TargetObject.class.isAssignableFrom(type)) {
|
else if (TraceObjectInterface.class.isAssignableFrom(type)) {
|
||||||
return sch.getInterfaces().contains(type);
|
return sch.getInterfaces().contains(type);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -651,14 +648,13 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
return matchers(hasFocusTime, hasFocusSnap, hasFocus);
|
return matchers(hasFocusTime, hasFocusSnap, hasFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ActivateMatcher> makeBySpecificity(TargetObjectSchema rootSchema,
|
static List<ActivateMatcher> makeBySpecificity(TraceObjectSchema rootSchema,
|
||||||
TraceObjectKeyPath path) {
|
KeyPath path) {
|
||||||
List<ActivateMatcher> result = new ArrayList<>();
|
List<ActivateMatcher> result = new ArrayList<>();
|
||||||
List<String> keyList = path.getKeyList();
|
result.addAll(makeAllFor((path.size() + 1) * 3,
|
||||||
result.addAll(makeAllFor((keyList.size() + 1) * 3,
|
new TypeParamSpec("focus", TraceObject.class)));
|
||||||
new TypeParamSpec("focus", TargetObject.class)));
|
List<TraceObjectSchema> schemas = rootSchema.getSuccessorSchemas(path);
|
||||||
List<TargetObjectSchema> schemas = rootSchema.getSuccessorSchemas(keyList);
|
for (int i = path.size(); i > 0; i--) { // Inclusive on both ends
|
||||||
for (int i = keyList.size(); i > 0; i--) { // Inclusive on both ends
|
|
||||||
result.addAll(
|
result.addAll(
|
||||||
makeAllFor(i * 3, new SchemaParamSpec("focus", schemas.get(i).getName())));
|
makeAllFor(i * 3, new SchemaParamSpec("focus", schemas.get(i).getName())));
|
||||||
}
|
}
|
||||||
@@ -675,7 +671,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
record ReadMemMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record ReadMemMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final ReadMemMatcher HAS_PROC_RANGE = new ReadMemMatcher(2, List.of(
|
static final ReadMemMatcher HAS_PROC_RANGE = new ReadMemMatcher(2, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("range", AddressRange.class)));
|
new TypeParamSpec("range", AddressRange.class)));
|
||||||
static final ReadMemMatcher HAS_RANGE = new ReadMemMatcher(1, List.of(
|
static final ReadMemMatcher HAS_RANGE = new ReadMemMatcher(1, List.of(
|
||||||
new TypeParamSpec("range", AddressRange.class)));
|
new TypeParamSpec("range", AddressRange.class)));
|
||||||
@@ -684,7 +680,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
record WriteMemMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record WriteMemMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final WriteMemMatcher HAS_PROC_START_DATA = new WriteMemMatcher(2, List.of(
|
static final WriteMemMatcher HAS_PROC_START_DATA = new WriteMemMatcher(2, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("start", Address.class),
|
new TypeParamSpec("start", Address.class),
|
||||||
new TypeParamSpec("data", byte[].class)));
|
new TypeParamSpec("data", byte[].class)));
|
||||||
static final WriteMemMatcher HAS_START_DATA = new WriteMemMatcher(1, List.of(
|
static final WriteMemMatcher HAS_START_DATA = new WriteMemMatcher(1, List.of(
|
||||||
@@ -695,45 +691,43 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
record ReadRegsMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record ReadRegsMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final ReadRegsMatcher HAS_CONTAINER = new ReadRegsMatcher(3, List.of(
|
static final ReadRegsMatcher HAS_CONTAINER = new ReadRegsMatcher(3, List.of(
|
||||||
new TypeParamSpec("container", TargetRegisterContainer.class)));
|
new TypeParamSpec("container", TraceObjectRegisterContainer.class)));
|
||||||
static final ReadRegsMatcher HAS_BANK = new ReadRegsMatcher(2, List.of(
|
|
||||||
new TypeParamSpec("bank", TargetRegisterBank.class)));
|
|
||||||
static final ReadRegsMatcher HAS_REGISTER = new ReadRegsMatcher(1, List.of(
|
static final ReadRegsMatcher HAS_REGISTER = new ReadRegsMatcher(1, List.of(
|
||||||
new TypeParamSpec("register", TargetRegister.class)));
|
new TypeParamSpec("register", TraceObjectRegister.class)));
|
||||||
static final List<ReadRegsMatcher> ALL = matchers(HAS_CONTAINER, HAS_BANK, HAS_REGISTER);
|
static final List<ReadRegsMatcher> ALL = matchers(HAS_CONTAINER, HAS_REGISTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
record WriteRegMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record WriteRegMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final WriteRegMatcher HAS_FRAME_NAME_VALUE = new WriteRegMatcher(3, List.of(
|
static final WriteRegMatcher HAS_FRAME_NAME_VALUE = new WriteRegMatcher(3, List.of(
|
||||||
new TypeParamSpec("frame", TargetStackFrame.class),
|
new TypeParamSpec("frame", TraceObjectStackFrame.class),
|
||||||
new TypeParamSpec("name", String.class),
|
new TypeParamSpec("name", String.class),
|
||||||
new TypeParamSpec("value", byte[].class)));
|
new TypeParamSpec("value", byte[].class)));
|
||||||
static final WriteRegMatcher HAS_THREAD_NAME_VALUE = new WriteRegMatcher(2, List.of(
|
static final WriteRegMatcher HAS_THREAD_NAME_VALUE = new WriteRegMatcher(2, List.of(
|
||||||
new TypeParamSpec("thread", TargetThread.class),
|
new TypeParamSpec("thread", TraceObjectThread.class),
|
||||||
new TypeParamSpec("name", String.class),
|
new TypeParamSpec("name", String.class),
|
||||||
new TypeParamSpec("value", byte[].class)));
|
new TypeParamSpec("value", byte[].class)));
|
||||||
static final WriteRegMatcher HAS_REG_VALUE = new WriteRegMatcher(1, List.of(
|
static final WriteRegMatcher HAS_REG_VALUE = new WriteRegMatcher(1, List.of(
|
||||||
new TypeParamSpec("register", TargetRegister.class),
|
new TypeParamSpec("register", TraceObjectRegister.class),
|
||||||
new TypeParamSpec("value", byte[].class)));
|
new TypeParamSpec("value", byte[].class)));
|
||||||
static final List<WriteRegMatcher> ALL = matchers(HAS_FRAME_NAME_VALUE, HAS_REG_VALUE);
|
static final List<WriteRegMatcher> ALL = matchers(HAS_FRAME_NAME_VALUE, HAS_REG_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
record BreakExecMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record BreakExecMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final BreakExecMatcher HAS_PROC_ADDR_COND_CMDS = new BreakExecMatcher(8, List.of(
|
static final BreakExecMatcher HAS_PROC_ADDR_COND_CMDS = new BreakExecMatcher(8, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("address", Address.class),
|
new TypeParamSpec("address", Address.class),
|
||||||
new NameParamSpec("condition", String.class),
|
new NameParamSpec("condition", String.class),
|
||||||
new NameParamSpec("commands", String.class)));
|
new NameParamSpec("commands", String.class)));
|
||||||
static final BreakExecMatcher HAS_PROC_ADDR_COND = new BreakExecMatcher(7, List.of(
|
static final BreakExecMatcher HAS_PROC_ADDR_COND = new BreakExecMatcher(7, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("address", Address.class),
|
new TypeParamSpec("address", Address.class),
|
||||||
new NameParamSpec("condition", String.class)));
|
new NameParamSpec("condition", String.class)));
|
||||||
static final BreakExecMatcher HAS_PROC_ADDR_CMDS = new BreakExecMatcher(6, List.of(
|
static final BreakExecMatcher HAS_PROC_ADDR_CMDS = new BreakExecMatcher(6, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("address", Address.class),
|
new TypeParamSpec("address", Address.class),
|
||||||
new NameParamSpec("commands", String.class)));
|
new NameParamSpec("commands", String.class)));
|
||||||
static final BreakExecMatcher HAS_PROC_ADDR = new BreakExecMatcher(5, List.of(
|
static final BreakExecMatcher HAS_PROC_ADDR = new BreakExecMatcher(5, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("address", Address.class)));
|
new TypeParamSpec("address", Address.class)));
|
||||||
static final BreakExecMatcher HAS_ADDR_COND_CMDS = new BreakExecMatcher(4, List.of(
|
static final BreakExecMatcher HAS_ADDR_COND_CMDS = new BreakExecMatcher(4, List.of(
|
||||||
new TypeParamSpec("address", Address.class),
|
new TypeParamSpec("address", Address.class),
|
||||||
@@ -755,20 +749,20 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
// TODO: Probably need a better way to deal with optional requirements
|
// TODO: Probably need a better way to deal with optional requirements
|
||||||
record BreakAccMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record BreakAccMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final BreakAccMatcher HAS_PROC_RNG_COND_CMDS = new BreakAccMatcher(8, List.of(
|
static final BreakAccMatcher HAS_PROC_RNG_COND_CMDS = new BreakAccMatcher(8, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("range", AddressRange.class),
|
new TypeParamSpec("range", AddressRange.class),
|
||||||
new NameParamSpec("condition", String.class),
|
new NameParamSpec("condition", String.class),
|
||||||
new NameParamSpec("commands", String.class)));
|
new NameParamSpec("commands", String.class)));
|
||||||
static final BreakAccMatcher HAS_PROC_RNG_COND = new BreakAccMatcher(7, List.of(
|
static final BreakAccMatcher HAS_PROC_RNG_COND = new BreakAccMatcher(7, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("range", AddressRange.class),
|
new TypeParamSpec("range", AddressRange.class),
|
||||||
new NameParamSpec("condition", String.class)));
|
new NameParamSpec("condition", String.class)));
|
||||||
static final BreakAccMatcher HAS_PROC_RNG_CMDS = new BreakAccMatcher(6, List.of(
|
static final BreakAccMatcher HAS_PROC_RNG_CMDS = new BreakAccMatcher(6, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("range", AddressRange.class),
|
new TypeParamSpec("range", AddressRange.class),
|
||||||
new NameParamSpec("commands", String.class)));
|
new NameParamSpec("commands", String.class)));
|
||||||
static final BreakAccMatcher HAS_PROC_RNG = new BreakAccMatcher(5, List.of(
|
static final BreakAccMatcher HAS_PROC_RNG = new BreakAccMatcher(5, List.of(
|
||||||
new TypeParamSpec("process", TargetProcess.class),
|
new TypeParamSpec("process", TraceObjectProcess.class),
|
||||||
new TypeParamSpec("range", AddressRange.class)));
|
new TypeParamSpec("range", AddressRange.class)));
|
||||||
static final BreakAccMatcher HAS_RNG_COND_CMDS = new BreakAccMatcher(4, List.of(
|
static final BreakAccMatcher HAS_RNG_COND_CMDS = new BreakAccMatcher(4, List.of(
|
||||||
new TypeParamSpec("range", AddressRange.class),
|
new TypeParamSpec("range", AddressRange.class),
|
||||||
@@ -789,19 +783,19 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
|
|
||||||
record DelBreakMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record DelBreakMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final DelBreakMatcher HAS_LOC = new DelBreakMatcher(2, List.of(
|
static final DelBreakMatcher HAS_LOC = new DelBreakMatcher(2, List.of(
|
||||||
new TypeParamSpec("location", TargetBreakpointLocation.class)));
|
new TypeParamSpec("location", TraceObjectBreakpointLocation.class)));
|
||||||
static final DelBreakMatcher HAS_SPEC = new DelBreakMatcher(1, List.of(
|
static final DelBreakMatcher HAS_SPEC = new DelBreakMatcher(1, List.of(
|
||||||
new TypeParamSpec("specification", TargetBreakpointSpec.class)));
|
new TypeParamSpec("specification", TraceObjectBreakpointSpec.class)));
|
||||||
static final List<DelBreakMatcher> ALL = matchers(HAS_LOC, HAS_SPEC);
|
static final List<DelBreakMatcher> ALL = matchers(HAS_LOC, HAS_SPEC);
|
||||||
static final List<DelBreakMatcher> SPEC = matchers(HAS_SPEC);
|
static final List<DelBreakMatcher> SPEC = matchers(HAS_SPEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
record ToggleBreakMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
record ToggleBreakMatcher(int score, List<ParamSpec> spec) implements MethodMatcher {
|
||||||
static final ToggleBreakMatcher HAS_LOC = new ToggleBreakMatcher(2, List.of(
|
static final ToggleBreakMatcher HAS_LOC = new ToggleBreakMatcher(2, List.of(
|
||||||
new TypeParamSpec("location", TargetBreakpointLocation.class),
|
new TypeParamSpec("location", TraceObjectBreakpointLocation.class),
|
||||||
new TypeParamSpec("enabled", Boolean.class)));
|
new TypeParamSpec("enabled", Boolean.class)));
|
||||||
static final ToggleBreakMatcher HAS_SPEC = new ToggleBreakMatcher(1, List.of(
|
static final ToggleBreakMatcher HAS_SPEC = new ToggleBreakMatcher(1, List.of(
|
||||||
new TypeParamSpec("specification", TargetBreakpointSpec.class),
|
new TypeParamSpec("specification", TraceObjectBreakpointSpec.class),
|
||||||
new TypeParamSpec("enabled", Boolean.class)));
|
new TypeParamSpec("enabled", Boolean.class)));
|
||||||
static final List<ToggleBreakMatcher> ALL = matchers(HAS_LOC, HAS_SPEC);
|
static final List<ToggleBreakMatcher> ALL = matchers(HAS_LOC, HAS_SPEC);
|
||||||
static final List<ToggleBreakMatcher> SPEC = matchers(HAS_SPEC);
|
static final List<ToggleBreakMatcher> SPEC = matchers(HAS_SPEC);
|
||||||
@@ -928,7 +922,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
return AsyncUtils.nil();
|
return AsyncUtils.nil();
|
||||||
}
|
}
|
||||||
|
|
||||||
SchemaName name = object.getTargetSchema().getName();
|
SchemaName name = object.getSchema().getName();
|
||||||
MatchedMethod activate = matches.getBest("activate_" + name, ActionName.ACTIVATE,
|
MatchedMethod activate = matches.getBest("activate_" + name, ActionName.ACTIVATE,
|
||||||
() -> ActivateMatcher.makeBySpecificity(trace.getObjectManager().getRootSchema(),
|
() -> ActivateMatcher.makeBySpecificity(trace.getObjectManager().getRootSchema(),
|
||||||
object.getCanonicalPath()));
|
object.getCanonicalPath()));
|
||||||
@@ -939,7 +933,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
Map<String, Object> args = new HashMap<>();
|
Map<String, Object> args = new HashMap<>();
|
||||||
RemoteParameter paramFocus = activate.params.get("focus");
|
RemoteParameter paramFocus = activate.params.get("focus");
|
||||||
args.put(paramFocus.name(),
|
args.put(paramFocus.name(),
|
||||||
object.querySuitableSchema(getSchemaContext().getSchema(paramFocus.type())));
|
object.findSuitableSchema(getSchemaContext().getSchema(paramFocus.type())));
|
||||||
RemoteParameter paramTime = activate.params.get("time");
|
RemoteParameter paramTime = activate.params.get("time");
|
||||||
if (paramTime != null) {
|
if (paramTime != null) {
|
||||||
args.put(paramTime.name(), coords.getTime().toString());
|
args.put(paramTime.name(), coords.getTime().toString());
|
||||||
@@ -974,7 +968,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected SchemaContext getSchemaContext() {
|
protected SchemaContext getSchemaContext() {
|
||||||
TargetObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
TraceObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
||||||
if (rootSchema == null) {
|
if (rootSchema == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -987,7 +981,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
Lifespan.at(getSnap()),
|
Lifespan.at(getSnap()),
|
||||||
new AddressRangeImpl(space.getMinAddress(), space.getMaxAddress()))) {
|
new AddressRangeImpl(space.getMinAddress(), space.getMaxAddress()))) {
|
||||||
TraceObject obj = ((TraceObjectMemoryRegion) region).getObject();
|
TraceObject obj = ((TraceObjectMemoryRegion) region).getObject();
|
||||||
return obj.queryCanonicalAncestorsTargetInterface(TargetProcess.class)
|
return obj.findCanonicalAncestorsInterface(TraceObjectProcess.class)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
}
|
}
|
||||||
@@ -1092,7 +1086,7 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
Msg.error(this, "Non-object trace with TraceRmi!");
|
Msg.error(this, "Non-object trace with TraceRmi!");
|
||||||
return AsyncUtils.nil();
|
return AsyncUtils.nil();
|
||||||
}
|
}
|
||||||
TraceObject container = tot.getObject().queryRegisterContainer(frame);
|
TraceObject container = tot.getObject().findRegisterContainer(frame);
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
Msg.error(this,
|
Msg.error(this,
|
||||||
"Cannot find register container for thread,frame: " + thread + "," + frame);
|
"Cannot find register container for thread,frame: " + thread + "," + frame);
|
||||||
@@ -1110,25 +1104,11 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
keys.add("[" + lower + "]");
|
keys.add("[" + lower + "]");
|
||||||
}
|
}
|
||||||
Set<TraceObject> regs = container
|
Set<TraceObject> regs = container
|
||||||
.querySuccessorsTargetInterface(Lifespan.at(getSnap()), TargetRegister.class,
|
.findSuccessorsInterface(Lifespan.at(getSnap()), TraceObjectRegister.class,
|
||||||
true)
|
true)
|
||||||
.filter(p -> keys.contains(p.getLastEntry().getEntryKey().toLowerCase()))
|
.filter(p -> keys.contains(p.getLastEntry().getEntryKey().toLowerCase()))
|
||||||
.map(r -> r.getDestination(null))
|
.map(r -> r.getDestination(null))
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
RemoteParameter paramBank = readRegs.params.get("bank");
|
|
||||||
if (paramBank != null) {
|
|
||||||
Set<TraceObject> banks = regs.stream()
|
|
||||||
.flatMap(r -> r.queryCanonicalAncestorsTargetInterface(TargetRegisterBank.class)
|
|
||||||
.findFirst()
|
|
||||||
.stream())
|
|
||||||
.collect(Collectors.toSet());
|
|
||||||
AsyncFence fence = new AsyncFence();
|
|
||||||
banks.stream().forEach(b -> {
|
|
||||||
fence.include(requestCaches.readRegs(b, readRegs.method, Map.of(
|
|
||||||
paramBank.name(), b)));
|
|
||||||
});
|
|
||||||
return fence.ready();
|
|
||||||
}
|
|
||||||
RemoteParameter paramRegister = readRegs.params.get("register");
|
RemoteParameter paramRegister = readRegs.params.get("register");
|
||||||
if (paramRegister != null) {
|
if (paramRegister != null) {
|
||||||
AsyncFence fence = new AsyncFence();
|
AsyncFence fence = new AsyncFence();
|
||||||
@@ -1142,17 +1122,18 @@ public class TraceRmiTarget extends AbstractTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected TraceObject findRegisterObject(TraceObjectThread thread, int frame, String name) {
|
protected TraceObject findRegisterObject(TraceObjectThread thread, int frame, String name) {
|
||||||
TraceObject container = thread.getObject().queryRegisterContainer(frame);
|
TraceObject container = thread.getObject().findRegisterContainer(frame);
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
Msg.error(this, "No register container for thread=" + thread + ",frame=" + frame);
|
Msg.error(this, "No register container for thread=" + thread + ",frame=" + frame);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PathMatcher matcher = container.getTargetSchema().searchFor(TargetRegister.class, true);
|
PathMatcher matcher =
|
||||||
PathPredicates pred = matcher.applyKeys(Align.RIGHT, name)
|
container.getSchema().searchFor(TraceObjectRegister.class, true);
|
||||||
|
PathFilter filter = matcher.applyKeys(Align.RIGHT, name)
|
||||||
.or(matcher.applyKeys(Align.RIGHT, name.toLowerCase()))
|
.or(matcher.applyKeys(Align.RIGHT, name.toLowerCase()))
|
||||||
.or(matcher.applyKeys(Align.RIGHT, name.toUpperCase()));
|
.or(matcher.applyKeys(Align.RIGHT, name.toUpperCase()));
|
||||||
TraceObjectValPath regValPath =
|
TraceObjectValPath regValPath =
|
||||||
container.getCanonicalSuccessors(pred).findFirst().orElse(null);
|
container.getCanonicalSuccessors(filter).findFirst().orElse(null);
|
||||||
if (regValPath == null) {
|
if (regValPath == null) {
|
||||||
Msg.error(this, "Cannot find register object for " + name + " in " + container);
|
Msg.error(this, "Cannot find register object for " + name + " in " + container);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+9
-9
@@ -32,15 +32,15 @@ import ghidra.app.plugin.core.debug.gui.InvocationDialogHelper;
|
|||||||
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteMethod;
|
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteMethod;
|
||||||
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteParameter;
|
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteParameter;
|
||||||
import ghidra.async.SwingExecutorService;
|
import ghidra.async.SwingExecutorService;
|
||||||
import ghidra.dbg.target.TargetMethod.Param;
|
|
||||||
import ghidra.dbg.target.TargetMethod.ParameterDescription;
|
|
||||||
import ghidra.dbg.target.schema.*;
|
|
||||||
import ghidra.dbg.target.schema.EnumerableTargetObjectSchema.MinimalSchemaContext;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.ValStr;
|
import ghidra.debug.api.ValStr;
|
||||||
import ghidra.debug.api.tracermi.RemoteMethod;
|
import ghidra.debug.api.tracermi.RemoteMethod;
|
||||||
import ghidra.debug.api.tracermi.RemoteParameter;
|
import ghidra.debug.api.tracermi.RemoteParameter;
|
||||||
import ghidra.framework.options.PropertyBoolean;
|
import ghidra.framework.options.PropertyBoolean;
|
||||||
|
import ghidra.trace.model.target.iface.TraceObjectMethod.Param;
|
||||||
|
import ghidra.trace.model.target.iface.TraceObjectMethod.ParameterDescription;
|
||||||
|
import ghidra.trace.model.target.schema.*;
|
||||||
|
import ghidra.trace.model.target.schema.PrimitiveTraceObjectSchema.MinimalSchemaContext;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
public class RemoteMethodInvocationDialogTest extends AbstractGhidraHeadedDebuggerTest {
|
public class RemoteMethodInvocationDialogTest extends AbstractGhidraHeadedDebuggerTest {
|
||||||
|
|
||||||
@@ -53,14 +53,14 @@ public class RemoteMethodInvocationDialogTest extends AbstractGhidraHeadedDebugg
|
|||||||
params.put(parameter.name(), parameter);
|
params.put(parameter.name(), parameter);
|
||||||
}
|
}
|
||||||
return new TestRemoteMethod(m.getName(), null, "Test", "A test method", params,
|
return new TestRemoteMethod(m.getName(), null, "Test", "A test method", params,
|
||||||
EnumerableTargetObjectSchema.schemaForPrimitive(m.getReturnType()));
|
PrimitiveTraceObjectSchema.schemaForPrimitive(m.getReturnType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TestRemoteParameter createParameter(Parameter p) {
|
public static TestRemoteParameter createParameter(Parameter p) {
|
||||||
ParameterDescription<?> desc = ParameterDescription.annotated(p);
|
ParameterDescription<?> desc = ParameterDescription.annotated(p);
|
||||||
TargetObjectSchema schema = EnumerableTargetObjectSchema.schemaForPrimitive(desc.type);
|
TraceObjectSchema schema = PrimitiveTraceObjectSchema.schemaForPrimitive(desc.type);
|
||||||
if (schema == EnumerableTargetObjectSchema.OBJECT ||
|
if (schema == PrimitiveTraceObjectSchema.OBJECT ||
|
||||||
schema == EnumerableTargetObjectSchema.ANY) {
|
schema == PrimitiveTraceObjectSchema.ANY) {
|
||||||
schema = CTX.getSchema(new SchemaName(desc.schema));
|
schema = CTX.getSchema(new SchemaName(desc.schema));
|
||||||
}
|
}
|
||||||
return new TestRemoteParameter(desc.name, schema, desc.required, desc.defaultValue,
|
return new TestRemoteParameter(desc.name, schema, desc.required, desc.defaultValue,
|
||||||
|
|||||||
+3
-3
@@ -38,13 +38,13 @@ import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiClient.Tx;
|
|||||||
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiPlugin;
|
import ghidra.app.plugin.core.debug.service.tracermi.TraceRmiPlugin;
|
||||||
import ghidra.app.services.DebuggerControlService;
|
import ghidra.app.services.DebuggerControlService;
|
||||||
import ghidra.app.services.TraceRmiService;
|
import ghidra.app.services.TraceRmiService;
|
||||||
import ghidra.dbg.target.schema.SchemaContext;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.dbg.target.schema.XmlSchemaContext;
|
|
||||||
import ghidra.debug.api.control.ControlMode;
|
import ghidra.debug.api.control.ControlMode;
|
||||||
import ghidra.debug.api.target.Target;
|
import ghidra.debug.api.target.Target;
|
||||||
import ghidra.debug.api.tracermi.TraceRmiAcceptor;
|
import ghidra.debug.api.tracermi.TraceRmiAcceptor;
|
||||||
import ghidra.debug.api.tracermi.TraceRmiConnection;
|
import ghidra.debug.api.tracermi.TraceRmiConnection;
|
||||||
|
import ghidra.trace.model.target.schema.SchemaContext;
|
||||||
|
import ghidra.trace.model.target.schema.XmlSchemaContext;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
|
|
||||||
public class TraceRmiConnectionManagerProviderTest extends AbstractGhidraHeadedDebuggerTest {
|
public class TraceRmiConnectionManagerProviderTest extends AbstractGhidraHeadedDebuggerTest {
|
||||||
|
|||||||
+26
-25
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -25,20 +25,21 @@ import db.Transaction;
|
|||||||
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerTest;
|
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerTest;
|
||||||
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteMethod;
|
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteMethod;
|
||||||
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteParameter;
|
import ghidra.app.plugin.core.debug.service.tracermi.TestTraceRmiConnection.TestRemoteParameter;
|
||||||
import ghidra.dbg.target.schema.EnumerableTargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.target.ActionName;
|
import ghidra.debug.api.target.ActionName;
|
||||||
import ghidra.debug.api.tracermi.RemoteMethod;
|
import ghidra.debug.api.tracermi.RemoteMethod;
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
import ghidra.trace.model.target.TraceObject.ConflictResolution;
|
import ghidra.trace.model.target.TraceObject.ConflictResolution;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
|
import ghidra.trace.model.target.schema.PrimitiveTraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
|
|
||||||
public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateObjectGivenObject() throws Throwable {
|
public void testRemoteMethodValidateObjectGivenObject() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("obj", EnumerableTargetObjectSchema.OBJECT.getName(), true,
|
new TestRemoteParameter("obj", PrimitiveTraceObjectSchema.OBJECT.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
createTrace();
|
createTrace();
|
||||||
@@ -56,8 +57,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateObjectGivenProcess() throws Throwable {
|
public void testRemoteMethodValidateObjectGivenProcess() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("obj", EnumerableTargetObjectSchema.OBJECT.getName(), true,
|
new TestRemoteParameter("obj", PrimitiveTraceObjectSchema.OBJECT.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
createTrace();
|
createTrace();
|
||||||
@@ -66,7 +67,7 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
try (Transaction tx = tb.startTransaction()) {
|
try (Transaction tx = tb.startTransaction()) {
|
||||||
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
||||||
process =
|
process =
|
||||||
tb.trace.getObjectManager().createObject(TraceObjectKeyPath.parse("Processes[0]"));
|
tb.trace.getObjectManager().createObject(KeyPath.parse("Processes[0]"));
|
||||||
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,8 +77,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void testRemoteMethodValidateObjectGivenInt() throws Throwable {
|
public void testRemoteMethodValidateObjectGivenInt() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("obj", EnumerableTargetObjectSchema.OBJECT.getName(), true,
|
new TestRemoteParameter("obj", PrimitiveTraceObjectSchema.OBJECT.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
method.validate(Map.of("obj", 1));
|
method.validate(Map.of("obj", 1));
|
||||||
@@ -86,7 +87,7 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateProcessGivenProcess() throws Throwable {
|
public void testRemoteMethodValidateProcessGivenProcess() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("proc", new SchemaName("Process"), true,
|
new TestRemoteParameter("proc", new SchemaName("Process"), true,
|
||||||
null, "Proc1", "A Process argument"));
|
null, "Proc1", "A Process argument"));
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
try (Transaction tx = tb.startTransaction()) {
|
try (Transaction tx = tb.startTransaction()) {
|
||||||
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
||||||
process =
|
process =
|
||||||
tb.trace.getObjectManager().createObject(TraceObjectKeyPath.parse("Processes[0]"));
|
tb.trace.getObjectManager().createObject(KeyPath.parse("Processes[0]"));
|
||||||
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +107,7 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void testRemoteMethodValidateProcessGivenInt() throws Throwable {
|
public void testRemoteMethodValidateProcessGivenInt() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("proc", new SchemaName("Process"), true,
|
new TestRemoteParameter("proc", new SchemaName("Process"), true,
|
||||||
null, "Proc1", "A Process argument"));
|
null, "Proc1", "A Process argument"));
|
||||||
|
|
||||||
@@ -122,8 +123,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateAnyGivenInteger() throws Throwable {
|
public void testRemoteMethodValidateAnyGivenInteger() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("arg", EnumerableTargetObjectSchema.ANY.getName(), true,
|
new TestRemoteParameter("arg", PrimitiveTraceObjectSchema.ANY.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
method.validate(Map.of("arg", 1));
|
method.validate(Map.of("arg", 1));
|
||||||
@@ -132,8 +133,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateAnyGivenObject() throws Throwable {
|
public void testRemoteMethodValidateAnyGivenObject() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("arg", EnumerableTargetObjectSchema.ANY.getName(), true,
|
new TestRemoteParameter("arg", PrimitiveTraceObjectSchema.ANY.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
createTrace();
|
createTrace();
|
||||||
@@ -151,8 +152,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateAnyGivenProcess() throws Throwable {
|
public void testRemoteMethodValidateAnyGivenProcess() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("arg", EnumerableTargetObjectSchema.ANY.getName(), true,
|
new TestRemoteParameter("arg", PrimitiveTraceObjectSchema.ANY.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
createTrace();
|
createTrace();
|
||||||
@@ -161,7 +162,7 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
try (Transaction tx = tb.startTransaction()) {
|
try (Transaction tx = tb.startTransaction()) {
|
||||||
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
tb.trace.getObjectManager().createRootObject(CTX.getSchema(new SchemaName("Session")));
|
||||||
process =
|
process =
|
||||||
tb.trace.getObjectManager().createObject(TraceObjectKeyPath.parse("Processes[0]"));
|
tb.trace.getObjectManager().createObject(KeyPath.parse("Processes[0]"));
|
||||||
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
process.insert(Lifespan.nowOn(0), ConflictResolution.DENY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,8 +172,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testRemoteMethodValidateIntegerGivenInteger() throws Throwable {
|
public void testRemoteMethodValidateIntegerGivenInteger() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("arg", EnumerableTargetObjectSchema.INT.getName(), true,
|
new TestRemoteParameter("arg", PrimitiveTraceObjectSchema.INT.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
method.validate(Map.of("arg", 1));
|
method.validate(Map.of("arg", 1));
|
||||||
@@ -181,8 +182,8 @@ public class RemoteMethodTest extends AbstractGhidraHeadedDebuggerTest {
|
|||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void testRemoteMethodValidateIntegerGivenLong() throws Throwable {
|
public void testRemoteMethodValidateIntegerGivenLong() throws Throwable {
|
||||||
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
RemoteMethod method = new TestRemoteMethod("test", ActionName.name("test"), "Test",
|
||||||
"A test method", EnumerableTargetObjectSchema.VOID.getName(),
|
"A test method", PrimitiveTraceObjectSchema.VOID.getName(),
|
||||||
new TestRemoteParameter("arg", EnumerableTargetObjectSchema.INT.getName(), true,
|
new TestRemoteParameter("arg", PrimitiveTraceObjectSchema.INT.getName(), true,
|
||||||
null, "Arg1", "An argument"));
|
null, "Arg1", "An argument"));
|
||||||
|
|
||||||
method.validate(Map.of("arg", 1L));
|
method.validate(Map.of("arg", 1L));
|
||||||
|
|||||||
+5
-5
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -20,11 +20,11 @@ import static org.junit.Assert.assertEquals;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.channels.SocketChannel;
|
import java.nio.channels.SocketChannel;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.XmlSchemaContext;
|
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
import ghidra.rmi.trace.TraceRmi.*;
|
import ghidra.rmi.trace.TraceRmi.*;
|
||||||
import ghidra.rmi.trace.TraceRmi.Compiler;
|
import ghidra.rmi.trace.TraceRmi.Compiler;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.XmlSchemaContext;
|
||||||
|
|
||||||
public class TestTraceRmiClient {
|
public class TestTraceRmiClient {
|
||||||
final ProtobufSocket<RootMessage> socket;
|
final ProtobufSocket<RootMessage> socket;
|
||||||
@@ -128,7 +128,7 @@ public class TestTraceRmiClient {
|
|||||||
socket.recv());
|
socket.recv());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createRootObject(int traceId, TargetObjectSchema schema) throws IOException {
|
public void createRootObject(int traceId, TraceObjectSchema schema) throws IOException {
|
||||||
String xmlCtx = XmlSchemaContext.serialize(schema.getContext());
|
String xmlCtx = XmlSchemaContext.serialize(schema.getContext());
|
||||||
socket.send(RootMessage.newBuilder()
|
socket.send(RootMessage.newBuilder()
|
||||||
.setRequestCreateRootObject(RequestCreateRootObject.newBuilder()
|
.setRequestCreateRootObject(RequestCreateRootObject.newBuilder()
|
||||||
|
|||||||
+5
-5
@@ -27,14 +27,14 @@ import java.util.stream.Stream;
|
|||||||
import db.Transaction;
|
import db.Transaction;
|
||||||
import ghidra.app.services.DebuggerTargetService;
|
import ghidra.app.services.DebuggerTargetService;
|
||||||
import ghidra.async.*;
|
import ghidra.async.*;
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
|
||||||
import ghidra.debug.api.target.ActionName;
|
import ghidra.debug.api.target.ActionName;
|
||||||
import ghidra.debug.api.target.Target;
|
import ghidra.debug.api.target.Target;
|
||||||
import ghidra.debug.api.tracermi.*;
|
import ghidra.debug.api.tracermi.*;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.SchemaName;
|
||||||
import ghidra.trace.model.time.TraceSnapshot;
|
import ghidra.trace.model.time.TraceSnapshot;
|
||||||
|
|
||||||
public abstract class TestTraceRmiConnection extends AbstractTraceRmiConnection {
|
public abstract class TestTraceRmiConnection extends AbstractTraceRmiConnection {
|
||||||
@@ -70,13 +70,13 @@ public abstract class TestTraceRmiConnection extends AbstractTraceRmiConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TestRemoteMethod(String name, ActionName action, String display, String description,
|
public TestRemoteMethod(String name, ActionName action, String display, String description,
|
||||||
Map<String, RemoteParameter> parameters, TargetObjectSchema retType) {
|
Map<String, RemoteParameter> parameters, TraceObjectSchema retType) {
|
||||||
this(name, action, display, description, parameters, retType.getName(),
|
this(name, action, display, description, parameters, retType.getName(),
|
||||||
new AsyncPairingQueue<>(), new AsyncPairingQueue<>());
|
new AsyncPairingQueue<>(), new AsyncPairingQueue<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestRemoteMethod(String name, ActionName action, String display, String description,
|
public TestRemoteMethod(String name, ActionName action, String display, String description,
|
||||||
TargetObjectSchema retType, RemoteParameter... parameters) {
|
TraceObjectSchema retType, RemoteParameter... parameters) {
|
||||||
this(name, action, display, description, Stream.of(parameters)
|
this(name, action, display, description, Stream.of(parameters)
|
||||||
.collect(Collectors.toMap(RemoteParameter::name, p -> p)),
|
.collect(Collectors.toMap(RemoteParameter::name, p -> p)),
|
||||||
retType);
|
retType);
|
||||||
@@ -110,7 +110,7 @@ public abstract class TestTraceRmiConnection extends AbstractTraceRmiConnection
|
|||||||
|
|
||||||
public record TestRemoteParameter(String name, SchemaName type, boolean required,
|
public record TestRemoteParameter(String name, SchemaName type, boolean required,
|
||||||
Object defaultValue, String display, String description) implements RemoteParameter {
|
Object defaultValue, String display, String description) implements RemoteParameter {
|
||||||
public TestRemoteParameter(String name, TargetObjectSchema type, boolean required,
|
public TestRemoteParameter(String name, TraceObjectSchema type, boolean required,
|
||||||
Object defaultValue, String display, String description) {
|
Object defaultValue, String display, String description) {
|
||||||
this(name, type.getName(), required, defaultValue, display, description);
|
this(name, type.getName(), required, defaultValue, display, description);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -25,7 +25,6 @@ eclipse.project.name = 'Debug Debugger'
|
|||||||
dependencies {
|
dependencies {
|
||||||
api project(':Debugger-api')
|
api project(':Debugger-api')
|
||||||
api project(':Framework-AsyncComm')
|
api project(':Framework-AsyncComm')
|
||||||
api project(':Framework-Debugging')
|
|
||||||
api project(':Framework-TraceModeling')
|
api project(':Framework-TraceModeling')
|
||||||
api project(':Base')
|
api project(':Base')
|
||||||
api project(':ByteViewer')
|
api project(':ByteViewer')
|
||||||
@@ -36,7 +35,6 @@ dependencies {
|
|||||||
testImplementation project(path: ':Generic', configuration: 'testArtifacts')
|
testImplementation project(path: ':Generic', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Base', configuration: 'testArtifacts')
|
testImplementation project(path: ':Base', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
|
|
||||||
testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts')
|
testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts')
|
||||||
testImplementation project(path: ':Project', configuration: 'testArtifacts')
|
testImplementation project(path: ':Project', configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/* ###
|
|
||||||
* IP: GHIDRA
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package ghidra.app.plugin.core.debug.event;
|
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
|
|
||||||
import ghidra.dbg.DebuggerObjectModel;
|
|
||||||
import ghidra.framework.plugintool.PluginEvent;
|
|
||||||
|
|
||||||
public class ModelActivatedPluginEvent extends PluginEvent {
|
|
||||||
static final String NAME = "Model Focus";
|
|
||||||
|
|
||||||
private final WeakReference<DebuggerObjectModel> newModelRef;
|
|
||||||
|
|
||||||
public ModelActivatedPluginEvent(String source, DebuggerObjectModel model) {
|
|
||||||
super(source, NAME);
|
|
||||||
this.newModelRef = new WeakReference<>(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebuggerObjectModel getActiveModel() {
|
|
||||||
return newModelRef.get();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+7
-8
@@ -16,7 +16,6 @@
|
|||||||
package ghidra.app.plugin.core.debug.gui.memory;
|
package ghidra.app.plugin.core.debug.gui.memory;
|
||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@@ -27,15 +26,15 @@ import docking.ReusableDialogComponentProvider;
|
|||||||
import docking.widgets.model.GAddressRangeField;
|
import docking.widgets.model.GAddressRangeField;
|
||||||
import docking.widgets.model.GSpanField;
|
import docking.widgets.model.GSpanField;
|
||||||
import ghidra.app.plugin.core.debug.utils.MiscellaneousUtils;
|
import ghidra.app.plugin.core.debug.utils.MiscellaneousUtils;
|
||||||
import ghidra.dbg.target.TargetMemoryRegion;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.memory.TraceMemoryFlag;
|
import ghidra.trace.model.memory.TraceMemoryFlag;
|
||||||
import ghidra.trace.model.target.TraceObjectKeyPath;
|
import ghidra.trace.model.memory.TraceObjectMemoryRegion;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
import ghidra.util.layout.PairLayout;
|
import ghidra.util.layout.PairLayout;
|
||||||
|
|
||||||
public class DebuggerAddRegionDialog extends ReusableDialogComponentProvider {
|
public class DebuggerAddRegionDialog extends ReusableDialogComponentProvider {
|
||||||
@@ -155,17 +154,17 @@ public class DebuggerAddRegionDialog extends ReusableDialogComponentProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected String computeDefaultPath(DebuggerCoordinates current) {
|
protected String computeDefaultPath(DebuggerCoordinates current) {
|
||||||
TargetObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
TraceObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
||||||
if (rootSchema == null) {
|
if (rootSchema == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
List<String> suitable = rootSchema.searchForSuitableContainer(TargetMemoryRegion.class,
|
KeyPath suitable = rootSchema.searchForSuitableContainer(TraceObjectMemoryRegion.class,
|
||||||
current.getPath().getKeyList());
|
current.getPath());
|
||||||
if (suitable == null) {
|
if (suitable == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return TraceObjectKeyPath.of(suitable).index("New").toString();
|
return suitable.index("New").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setValues(DebuggerCoordinates current) {
|
protected void setValues(DebuggerCoordinates current) {
|
||||||
|
|||||||
+18
-19
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.gui.memory;
|
package ghidra.app.plugin.core.debug.gui.memory;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -23,8 +22,6 @@ import docking.widgets.table.TableColumnDescriptor;
|
|||||||
import ghidra.app.plugin.core.debug.gui.model.*;
|
import ghidra.app.plugin.core.debug.gui.model.*;
|
||||||
import ghidra.app.plugin.core.debug.gui.model.ObjectTableModel.ValueRow;
|
import ghidra.app.plugin.core.debug.gui.model.ObjectTableModel.ValueRow;
|
||||||
import ghidra.app.plugin.core.debug.gui.model.columns.*;
|
import ghidra.app.plugin.core.debug.gui.model.columns.*;
|
||||||
import ghidra.dbg.target.*;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
import ghidra.debug.api.model.DebuggerObjectActionContext;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.framework.plugintool.Plugin;
|
import ghidra.framework.plugintool.Plugin;
|
||||||
@@ -32,9 +29,11 @@ import ghidra.framework.plugintool.ServiceProvider;
|
|||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.address.AddressRange;
|
import ghidra.program.model.address.AddressRange;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.memory.TraceMemoryRegion;
|
import ghidra.trace.model.memory.*;
|
||||||
import ghidra.trace.model.memory.TraceObjectMemoryRegion;
|
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
import ghidra.trace.model.thread.TraceObjectProcess;
|
||||||
|
|
||||||
public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceObjectMemoryRegion> {
|
public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceObjectMemoryRegion> {
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
private static class RegionStartColumn extends AbstractTraceValueObjectAddressColumn {
|
private static class RegionStartColumn extends AbstractTraceValueObjectAddressColumn {
|
||||||
public RegionStartColumn() {
|
public RegionStartColumn() {
|
||||||
super(TargetMemoryRegion.RANGE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_RANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,7 +82,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
private static class RegionEndColumn extends AbstractTraceValueObjectAddressColumn {
|
private static class RegionEndColumn extends AbstractTraceValueObjectAddressColumn {
|
||||||
public RegionEndColumn() {
|
public RegionEndColumn() {
|
||||||
super(TargetMemoryRegion.RANGE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_RANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -99,7 +98,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
private static class RegionLengthColumn extends AbstractTraceValueObjectLengthColumn {
|
private static class RegionLengthColumn extends AbstractTraceValueObjectLengthColumn {
|
||||||
public RegionLengthColumn() {
|
public RegionLengthColumn() {
|
||||||
super(TargetMemoryRegion.RANGE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_RANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -121,7 +120,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
public static class RegionReadColumn extends RegionFlagColumn {
|
public static class RegionReadColumn extends RegionFlagColumn {
|
||||||
public RegionReadColumn() {
|
public RegionReadColumn() {
|
||||||
super(TargetMemoryRegion.READABLE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_READABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -132,7 +131,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
public static class RegionWriteColumn extends RegionFlagColumn {
|
public static class RegionWriteColumn extends RegionFlagColumn {
|
||||||
public RegionWriteColumn() {
|
public RegionWriteColumn() {
|
||||||
super(TargetMemoryRegion.WRITABLE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_WRITABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -143,7 +142,7 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
public static class RegionExecuteColumn extends RegionFlagColumn {
|
public static class RegionExecuteColumn extends RegionFlagColumn {
|
||||||
public RegionExecuteColumn() {
|
public RegionExecuteColumn() {
|
||||||
super(TargetMemoryRegion.EXECUTABLE_ATTRIBUTE_NAME);
|
super(TraceObjectMemoryRegion.KEY_EXECUTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -173,9 +172,9 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static ModelQuery successorRegions(TargetObjectSchema rootSchema, List<String> path) {
|
protected static ModelQuery successorRegions(TraceObjectSchema rootSchema, KeyPath path) {
|
||||||
TargetObjectSchema schema = rootSchema.getSuccessorSchema(path);
|
TraceObjectSchema schema = rootSchema.getSuccessorSchema(path);
|
||||||
return new ModelQuery(schema.searchFor(TargetMemoryRegion.class, path, true));
|
return new ModelQuery(schema.searchFor(TraceObjectMemoryRegion.class, path, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Set<TraceMemoryRegion> getSelectedRegions(DebuggerObjectActionContext ctx) {
|
protected Set<TraceMemoryRegion> getSelectedRegions(DebuggerObjectActionContext ctx) {
|
||||||
@@ -193,23 +192,23 @@ public class DebuggerRegionsPanel extends AbstractObjectsTableBasedPanel<TraceOb
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ModelQuery computeQuery(TraceObject object) {
|
protected ModelQuery computeQuery(TraceObject object) {
|
||||||
TargetObjectSchema rootSchema = object.getRoot().getTargetSchema();
|
TraceObjectSchema rootSchema = object.getRoot().getSchema();
|
||||||
List<String> seedPath = object.getCanonicalPath().getKeyList();
|
KeyPath seedPath = object.getCanonicalPath();
|
||||||
List<String> processPath = rootSchema.searchForAncestor(TargetProcess.class, seedPath);
|
KeyPath processPath = rootSchema.searchForAncestor(TraceObjectProcess.class, seedPath);
|
||||||
if (processPath != null) {
|
if (processPath != null) {
|
||||||
ModelQuery result = successorRegions(rootSchema, processPath);
|
ModelQuery result = successorRegions(rootSchema, processPath);
|
||||||
if (!result.isEmpty()) {
|
if (!result.isEmpty()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<String> memoryPath = rootSchema.searchForSuitable(TargetMemory.class, seedPath);
|
KeyPath memoryPath = rootSchema.searchForSuitable(TraceObjectMemory.class, seedPath);
|
||||||
if (memoryPath != null) {
|
if (memoryPath != null) {
|
||||||
ModelQuery result = successorRegions(rootSchema, memoryPath);
|
ModelQuery result = successorRegions(rootSchema, memoryPath);
|
||||||
if (!result.isEmpty()) {
|
if (!result.isEmpty()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return successorRegions(rootSchema, List.of());
|
return successorRegions(rootSchema, KeyPath.ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedRegions(Set<TraceMemoryRegion> sel) {
|
public void setSelectedRegions(Set<TraceMemoryRegion> sel) {
|
||||||
|
|||||||
+5
-3
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -35,6 +35,8 @@ import ghidra.framework.plugintool.*;
|
|||||||
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
|
import ghidra.trace.model.target.iface.TraceObjectInterface;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
|
|
||||||
public abstract class AbstractObjectsTableBasedPanel<U extends TraceObjectInterface>
|
public abstract class AbstractObjectsTableBasedPanel<U extends TraceObjectInterface>
|
||||||
extends ObjectsTablePanel
|
extends ObjectsTablePanel
|
||||||
@@ -136,7 +138,7 @@ public abstract class AbstractObjectsTableBasedPanel<U extends TraceObjectInterf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activatePath(TraceObjectKeyPath path) {
|
public void activatePath(KeyPath path) {
|
||||||
if (current.getTrace() == null) {
|
if (current.getTrace() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+22
-21
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -63,6 +63,7 @@ import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
|||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
|
import ghidra.trace.model.target.path.KeyPath;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
protected PathsTablePanel attributesTablePanel;
|
protected PathsTablePanel attributesTablePanel;
|
||||||
|
|
||||||
/*testing*/ DebuggerCoordinates current = DebuggerCoordinates.NOWHERE;
|
/*testing*/ DebuggerCoordinates current = DebuggerCoordinates.NOWHERE;
|
||||||
/*testing*/ TraceObjectKeyPath path = TraceObjectKeyPath.of();
|
/*testing*/ KeyPath path = KeyPath.of();
|
||||||
|
|
||||||
@AutoServiceConsumed
|
@AutoServiceConsumed
|
||||||
protected DebuggerTraceManagerService traceManager;
|
protected DebuggerTraceManagerService traceManager;
|
||||||
@@ -433,7 +434,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
mainPanel.revalidate();
|
mainPanel.revalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void activatePath(TraceObjectKeyPath path) {
|
protected void activatePath(KeyPath path) {
|
||||||
if (current.getTrace() == null) {
|
if (current.getTrace() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -457,7 +458,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activatePath(TraceObjectKeyPath path) {
|
public void activatePath(KeyPath path) {
|
||||||
DebuggerModelProvider.this.activatePath(path);
|
DebuggerModelProvider.this.activatePath(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -510,7 +511,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
List<AbstractNode> sel = objectsTreePanel.getSelectedItems();
|
List<AbstractNode> sel = objectsTreePanel.getSelectedItems();
|
||||||
if (sel.size() == 1) {
|
if (sel.size() == 1) {
|
||||||
TraceObjectValue value = sel.get(0).getValue();
|
TraceObjectValue value = sel.get(0).getValue();
|
||||||
setPath(value == null ? TraceObjectKeyPath.of() : value.getCanonicalPath(),
|
setPath(value == null ? KeyPath.of() : value.getCanonicalPath(),
|
||||||
objectsTreePanel, EventOrigin.INTERNAL_GENERATED);
|
objectsTreePanel, EventOrigin.INTERNAL_GENERATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -674,7 +675,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
@Override
|
@Override
|
||||||
public boolean verify(JComponent input) {
|
public boolean verify(JComponent input) {
|
||||||
try {
|
try {
|
||||||
TraceObjectKeyPath path = TraceObjectKeyPath.parse(pathField.getText());
|
KeyPath path = KeyPath.parse(pathField.getText());
|
||||||
setPath(path, null, EventOrigin.USER_GENERATED);
|
setPath(path, null, EventOrigin.USER_GENERATED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -687,7 +688,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
goButton = new JButton("Go");
|
goButton = new JButton("Go");
|
||||||
ActionListener gotoPath = evt -> {
|
ActionListener gotoPath = evt -> {
|
||||||
try {
|
try {
|
||||||
TraceObjectKeyPath path = TraceObjectKeyPath.parse(pathField.getText());
|
KeyPath path = KeyPath.parse(pathField.getText());
|
||||||
activatePath(path);
|
activatePath(path);
|
||||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
|
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
|
||||||
}
|
}
|
||||||
@@ -854,7 +855,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
SaveState dataState = new SaveState();
|
SaveState dataState = new SaveState();
|
||||||
this.writeDataState(dataState);
|
this.writeDataState(dataState);
|
||||||
// Selection is not saved to the tool state
|
// Selection is not saved to the tool state
|
||||||
Set<TraceObjectKeyPath> selection = this.objectsTreePanel.getSelectedKeyPaths();
|
Set<KeyPath> selection = this.objectsTreePanel.getSelectedKeyPaths();
|
||||||
// coords are omitted by main window
|
// coords are omitted by main window
|
||||||
// also, cannot save unless trace is in a project
|
// also, cannot save unless trace is in a project
|
||||||
clone.coordinatesActivated(current);
|
clone.coordinatesActivated(current);
|
||||||
@@ -908,7 +909,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
if (values.size() != 1) {
|
if (values.size() != 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TraceObjectKeyPath canonicalPath = values.get(0).getChild().getCanonicalPath();
|
KeyPath canonicalPath = values.get(0).getChild().getCanonicalPath();
|
||||||
setPath(canonicalPath);
|
setPath(canonicalPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -917,12 +918,12 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
return mainPanel;
|
return mainPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TraceObjectKeyPath findAsSibling(TraceObject object) {
|
protected KeyPath findAsSibling(TraceObject object) {
|
||||||
Trace trace = current.getTrace();
|
Trace trace = current.getTrace();
|
||||||
if (trace == null) {
|
if (trace == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TraceObjectKeyPath parentPath = path.parent();
|
KeyPath parentPath = path.parent();
|
||||||
if (parentPath == null) {
|
if (parentPath == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -940,7 +941,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TraceObjectKeyPath findAsParent(TraceObject object) {
|
protected KeyPath findAsParent(TraceObject object) {
|
||||||
Trace trace = current.getTrace();
|
Trace trace = current.getTrace();
|
||||||
if (trace == null) {
|
if (trace == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -953,7 +954,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
if (sel == null) {
|
if (sel == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (TraceObjectKeyPath p = sel.getCanonicalPath(); p != null; p = p.parent()) {
|
for (KeyPath p = sel.getCanonicalPath(); p != null; p = p.parent()) {
|
||||||
if (objectManager.getObjectByCanonicalPath(p) == object) {
|
if (objectManager.getObjectByCanonicalPath(p) == object) {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
@@ -985,7 +986,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
if (findAsParent(object) != null) {
|
if (findAsParent(object) != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TraceObjectKeyPath sibling = findAsSibling(object);
|
KeyPath sibling = findAsSibling(object);
|
||||||
if (sibling != null) {
|
if (sibling != null) {
|
||||||
objectsTreePanel.setSelectedKeyPaths(List.of(sibling));
|
objectsTreePanel.setSelectedKeyPaths(List.of(sibling));
|
||||||
setPath(sibling);
|
setPath(sibling);
|
||||||
@@ -1002,7 +1003,7 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPath(TraceObjectKeyPath path, JComponent source, EventOrigin origin) {
|
protected void setPath(KeyPath path, JComponent source, EventOrigin origin) {
|
||||||
if (Objects.equals(this.path, path) && getTreeSelection() != null) {
|
if (Objects.equals(this.path, path) && getTreeSelection() != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1018,11 +1019,11 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
attributesTablePanel.setQuery(ModelQuery.attributesOf(path));
|
attributesTablePanel.setQuery(ModelQuery.attributesOf(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPath(TraceObjectKeyPath path) {
|
public void setPath(KeyPath path) {
|
||||||
setPath(path, null, EventOrigin.API_GENERATED);
|
setPath(path, null, EventOrigin.API_GENERATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TraceObjectKeyPath getPath() {
|
public KeyPath getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1137,11 +1138,11 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
return showMethodsInTree;
|
return showMethodsInTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setTreeSelection(TraceObjectKeyPath path, EventOrigin origin) {
|
protected void setTreeSelection(KeyPath path, EventOrigin origin) {
|
||||||
objectsTreePanel.setSelectedKeyPaths(List.of(path), origin);
|
objectsTreePanel.setSelectedKeyPaths(List.of(path), origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setTreeSelection(TraceObjectKeyPath path) {
|
protected void setTreeSelection(KeyPath path) {
|
||||||
setTreeSelection(path, EventOrigin.API_GENERATED);
|
setTreeSelection(path, EventOrigin.API_GENERATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1189,6 +1190,6 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
|
|||||||
coordinatesActivated(coords);
|
coordinatesActivated(coords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setPath(TraceObjectKeyPath.parse(saveState.getString(KEY_PATH, "")));
|
setPath(KeyPath.parse(saveState.getString(KEY_PATH, "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-5
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -17,11 +17,11 @@ package ghidra.app.plugin.core.debug.gui.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import ghidra.dbg.util.PathPredicates;
|
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
import ghidra.trace.model.target.TraceObjectValue;
|
import ghidra.trace.model.target.TraceObjectValue;
|
||||||
|
import ghidra.trace.model.target.path.PathFilter;
|
||||||
|
|
||||||
public interface DisplaysModified {
|
public interface DisplaysModified {
|
||||||
/**
|
/**
|
||||||
@@ -140,8 +140,7 @@ public interface DisplaysModified {
|
|||||||
return isEdgesDiffer(newContains ? value : null, diffEdge);
|
return isEdgesDiffer(newContains ? value : null, diffEdge);
|
||||||
}
|
}
|
||||||
TraceObjectValue diffEdge = diffTrace.getObjectManager()
|
TraceObjectValue diffEdge = diffTrace.getObjectManager()
|
||||||
.getValuePaths(Lifespan.at(diffSnap),
|
.getValuePaths(Lifespan.at(diffSnap), PathFilter.pattern(value.getCanonicalPath()))
|
||||||
PathPredicates.pattern(value.getCanonicalPath().getKeyList()))
|
|
||||||
.findAny()
|
.findAny()
|
||||||
.map(p -> p.getLastEntry())
|
.map(p -> p.getLastEntry())
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|||||||
+5
-5
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -19,9 +19,9 @@ import java.util.stream.*;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import ghidra.dbg.target.TargetObject;
|
|
||||||
import ghidra.trace.model.target.TraceObject;
|
import ghidra.trace.model.target.TraceObject;
|
||||||
import ghidra.trace.model.target.TraceObjectValue;
|
import ghidra.trace.model.target.TraceObjectValue;
|
||||||
|
import ghidra.trace.model.target.iface.TraceObjectInterface;
|
||||||
import ghidra.util.HTMLUtilities;
|
import ghidra.util.HTMLUtilities;
|
||||||
import ghidra.util.NumericUtilities;
|
import ghidra.util.NumericUtilities;
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ public interface DisplaysObjectValues {
|
|||||||
|
|
||||||
default String getObjectType(TraceObjectValue edge) {
|
default String getObjectType(TraceObjectValue edge) {
|
||||||
TraceObject object = edge.getChild();
|
TraceObject object = edge.getChild();
|
||||||
return object.getTargetSchema().getName().toString();
|
return object.getSchema().getName().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
default String getObjectLinkToolTip(TraceObjectValue edge) {
|
default String getObjectLinkToolTip(TraceObjectValue edge) {
|
||||||
@@ -132,7 +132,7 @@ public interface DisplaysObjectValues {
|
|||||||
default String getObjectDisplay(TraceObjectValue edge) {
|
default String getObjectDisplay(TraceObjectValue edge) {
|
||||||
TraceObject object = edge.getChild();
|
TraceObject object = edge.getChild();
|
||||||
TraceObjectValue displayAttr =
|
TraceObjectValue displayAttr =
|
||||||
object.getAttribute(getSnap(), TargetObject.DISPLAY_ATTRIBUTE_NAME);
|
object.getAttribute(getSnap(), TraceObjectInterface.KEY_DISPLAY);
|
||||||
if (displayAttr != null) {
|
if (displayAttr != null) {
|
||||||
return displayAttr.getValue().toString();
|
return displayAttr.getValue().toString();
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-40
@@ -15,50 +15,51 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.gui.model;
|
package ghidra.app.plugin.core.debug.gui.model;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import ghidra.dbg.target.schema.EnumerableTargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
|
||||||
import ghidra.dbg.target.schema.TargetObjectSchema.AttributeSchema;
|
|
||||||
import ghidra.dbg.util.*;
|
|
||||||
import ghidra.trace.model.Lifespan;
|
import ghidra.trace.model.Lifespan;
|
||||||
import ghidra.trace.model.Trace;
|
import ghidra.trace.model.Trace;
|
||||||
import ghidra.trace.model.target.*;
|
import ghidra.trace.model.target.*;
|
||||||
|
import ghidra.trace.model.target.path.*;
|
||||||
|
import ghidra.trace.model.target.schema.PrimitiveTraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema;
|
||||||
|
import ghidra.trace.model.target.schema.TraceObjectSchema.AttributeSchema;
|
||||||
|
|
||||||
public class ModelQuery {
|
public class ModelQuery {
|
||||||
public static final ModelQuery EMPTY = new ModelQuery(PathPredicates.EMPTY);
|
public static final ModelQuery EMPTY = new ModelQuery(PathFilter.NONE);
|
||||||
// TODO: A more capable query language, e.g., with WHERE clauses.
|
// TODO: A more capable query language, e.g., with WHERE clauses.
|
||||||
// Could also want math expressions for the conditionals... Hmm.
|
// Could also want math expressions for the conditionals... Hmm.
|
||||||
// They need to be user enterable, so just a Java API won't suffice.
|
// They need to be user enterable, so just a Java API won't suffice.
|
||||||
|
|
||||||
public static ModelQuery parse(String queryString) {
|
public static ModelQuery parse(String queryString) {
|
||||||
return new ModelQuery(PathPredicates.parse(queryString));
|
return new ModelQuery(PathFilter.parse(queryString));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModelQuery elementsOf(TraceObjectKeyPath path) {
|
public static ModelQuery elementsOf(KeyPath path) {
|
||||||
return new ModelQuery(new PathPattern(PathUtils.extend(path.getKeyList(), "[]")));
|
return new ModelQuery(new PathPattern(path.index("")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModelQuery attributesOf(TraceObjectKeyPath path) {
|
public static ModelQuery attributesOf(KeyPath path) {
|
||||||
return new ModelQuery(new PathPattern(PathUtils.extend(path.getKeyList(), "")));
|
return new ModelQuery(new PathPattern(path.key("")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final PathPredicates predicates;
|
private final PathFilter filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: This should probably be more capable, but for now, just support simple path patterns
|
* TODO: This should probably be more capable, but for now, just support simple path patterns
|
||||||
*
|
*
|
||||||
* @param predicates the patterns
|
* @param filter the filter
|
||||||
*/
|
*/
|
||||||
public ModelQuery(PathPredicates predicates) {
|
public ModelQuery(PathFilter filter) {
|
||||||
this.predicates = predicates;
|
this.filter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "<ModelQuery: " + predicates.toString() + ">";
|
return "<ModelQuery: " + filter.toString() + ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -70,7 +71,7 @@ public class ModelQuery {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelQuery that = (ModelQuery) obj;
|
ModelQuery that = (ModelQuery) obj;
|
||||||
if (!Objects.equals(this.predicates, that.predicates)) {
|
if (!Objects.equals(this.filter, that.filter)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -82,7 +83,7 @@ public class ModelQuery {
|
|||||||
* @return the string
|
* @return the string
|
||||||
*/
|
*/
|
||||||
public String toQueryString() {
|
public String toQueryString() {
|
||||||
return predicates.getSingletonPattern().toPatternString();
|
return filter.getSingletonPattern().toPatternString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,7 +96,7 @@ public class ModelQuery {
|
|||||||
public Stream<TraceObject> streamObjects(Trace trace, Lifespan span) {
|
public Stream<TraceObject> streamObjects(Trace trace, Lifespan span) {
|
||||||
TraceObjectManager objects = trace.getObjectManager();
|
TraceObjectManager objects = trace.getObjectManager();
|
||||||
TraceObject root = objects.getRootObject();
|
TraceObject root = objects.getRootObject();
|
||||||
return objects.getValuePaths(span, predicates)
|
return objects.getValuePaths(span, filter)
|
||||||
.map(p -> p.getDestinationValue(root))
|
.map(p -> p.getDestinationValue(root))
|
||||||
.filter(v -> v instanceof TraceObject)
|
.filter(v -> v instanceof TraceObject)
|
||||||
.map(v -> (TraceObject) v);
|
.map(v -> (TraceObject) v);
|
||||||
@@ -103,32 +104,32 @@ public class ModelQuery {
|
|||||||
|
|
||||||
public Stream<TraceObjectValue> streamValues(Trace trace, Lifespan span) {
|
public Stream<TraceObjectValue> streamValues(Trace trace, Lifespan span) {
|
||||||
TraceObjectManager objects = trace.getObjectManager();
|
TraceObjectManager objects = trace.getObjectManager();
|
||||||
return objects.getValuePaths(span, predicates).map(p -> {
|
return objects.getValuePaths(span, filter).map(p -> {
|
||||||
TraceObjectValue last = p.getLastEntry();
|
TraceObjectValue last = p.getLastEntry();
|
||||||
return last == null ? objects.getRootObject().getCanonicalParent(0) : last;
|
return last == null ? objects.getRootObject().getCanonicalParent(0) : last;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream<TraceObjectValPath> streamPaths(Trace trace, Lifespan span) {
|
public Stream<TraceObjectValPath> streamPaths(Trace trace, Lifespan span) {
|
||||||
return trace.getObjectManager().getValuePaths(span, predicates).map(p -> p);
|
return trace.getObjectManager().getValuePaths(span, filter).map(p -> p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TargetObjectSchema> computeSchemas(Trace trace) {
|
public List<TraceObjectSchema> computeSchemas(Trace trace) {
|
||||||
TargetObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
TraceObjectSchema rootSchema = trace.getObjectManager().getRootSchema();
|
||||||
if (rootSchema == null) {
|
if (rootSchema == null) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
return predicates.getPatterns()
|
return filter.getPatterns()
|
||||||
.stream()
|
.stream()
|
||||||
.map(p -> rootSchema.getSuccessorSchema(p.asPath()))
|
.map(p -> rootSchema.getSuccessorSchema(p.asPath()))
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetObjectSchema computeSingleSchema(Trace trace) {
|
public TraceObjectSchema computeSingleSchema(Trace trace) {
|
||||||
List<TargetObjectSchema> schemas = computeSchemas(trace);
|
List<TraceObjectSchema> schemas = computeSchemas(trace);
|
||||||
if (schemas.size() != 1) {
|
if (schemas.size() != 1) {
|
||||||
return EnumerableTargetObjectSchema.OBJECT;
|
return PrimitiveTraceObjectSchema.OBJECT;
|
||||||
}
|
}
|
||||||
return schemas.get(0);
|
return schemas.get(0);
|
||||||
}
|
}
|
||||||
@@ -143,7 +144,7 @@ public class ModelQuery {
|
|||||||
* @return the list of attributes
|
* @return the list of attributes
|
||||||
*/
|
*/
|
||||||
public Stream<AttributeSchema> computeAttributes(Trace trace) {
|
public Stream<AttributeSchema> computeAttributes(Trace trace) {
|
||||||
TargetObjectSchema schema = computeSingleSchema(trace);
|
TraceObjectSchema schema = computeSingleSchema(trace);
|
||||||
return schema.getAttributeSchemas()
|
return schema.getAttributeSchemas()
|
||||||
.entrySet()
|
.entrySet()
|
||||||
.stream()
|
.stream()
|
||||||
@@ -155,12 +156,12 @@ public class ModelQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean includes(Lifespan span, PathPattern pattern, TraceObjectValue value) {
|
protected static boolean includes(Lifespan span, PathPattern pattern, TraceObjectValue value) {
|
||||||
List<String> asPath = pattern.asPath();
|
KeyPath asPath = pattern.asPath();
|
||||||
if (asPath.isEmpty()) {
|
if (asPath.isRoot()) {
|
||||||
// If the pattern is the root, then only match the "root value"
|
// If the pattern is the root, then only match the "root value"
|
||||||
return value.getParent() == null;
|
return value.getParent() == null;
|
||||||
}
|
}
|
||||||
if (!PathPredicates.keyMatches(PathUtils.getKey(asPath), value.getEntryKey())) {
|
if (!PathFilter.keyMatches(asPath.key(), value.getEntryKey())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TraceObject parent = value.getParent();
|
TraceObject parent = value.getParent();
|
||||||
@@ -188,7 +189,7 @@ public class ModelQuery {
|
|||||||
if (!span.intersects(value.getLifespan())) {
|
if (!span.intersects(value.getLifespan())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (PathPattern pattern : predicates.getPatterns()) {
|
for (PathPattern pattern : filter.getPatterns()) {
|
||||||
if (includes(span, pattern, value)) {
|
if (includes(span, pattern, value)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -204,16 +205,16 @@ public class ModelQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if any of the value's paths could be an ancestor of a result
|
// Check if any of the value's paths could be an ancestor of a result
|
||||||
List<String> asPath = new ArrayList<>(pattern.asPath());
|
KeyPath asPath = pattern.asPath();
|
||||||
// Destroy the pattern from the right, thus iterating each ancestor
|
// Destroy the pattern from the right, thus iterating each ancestor
|
||||||
while (!asPath.isEmpty()) {
|
while (!asPath.isRoot()) {
|
||||||
// The value's key much match somewhere in the pattern to be involved
|
// The value's key much match somewhere in the pattern to be involved
|
||||||
if (!PathPredicates.keyMatches(PathUtils.getKey(asPath), value.getEntryKey())) {
|
if (!PathFilter.keyMatches(asPath.key(), value.getEntryKey())) {
|
||||||
asPath.remove(asPath.size() - 1);
|
asPath = asPath.parent();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// If it does, then check if any path to the value's parent matches the rest
|
// If it does, then check if any path to the value's parent matches the rest
|
||||||
asPath.remove(asPath.size() - 1);
|
asPath = asPath.parent();
|
||||||
if (parent.getAncestors(span, new PathPattern(asPath))
|
if (parent.getAncestors(span, new PathPattern(asPath))
|
||||||
.anyMatch(v -> v.getSource(parent).isRoot())) {
|
.anyMatch(v -> v.getSource(parent).isRoot())) {
|
||||||
return true;
|
return true;
|
||||||
@@ -233,15 +234,15 @@ public class ModelQuery {
|
|||||||
if (!span.intersects(value.getLifespan())) {
|
if (!span.intersects(value.getLifespan())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (PathPattern pattern : predicates.getPatterns()) {
|
for (PathPattern pattern : filter.getPatterns()) {
|
||||||
if (involves(span, pattern, value)) {
|
if (involves(span, pattern, value)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return predicates.isEmpty();
|
return filter.isNone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user