Enum Class DebuggerPcodeUtils
- All Implemented Interfaces:
Serializable,Comparable<DebuggerPcodeUtils>,Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA p-code parser that can resolve labels from a trace or its mapped programs.static final recordA wrapper on a byte array to pretty print itstatic final recordThe value of a watch expression including its state, location, and addresses readstatic enumA p-code arithmetic on watch valuesstatic classstatic classNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionbuildWatchExecutor(ServiceProvider provider, DebuggerCoordinates coordinates) Build an executor that can compute watch valuesbuildWatchState(ServiceProvider provider, DebuggerCoordinates coordinates) static PcodeExpressioncompileExpression(ServiceProvider provider, DebuggerCoordinates coordinates, String source) Compile the given Sleigh expression into a p-code program, resolving user labelsstatic PcodeProgramcompileProgram(ServiceProvider provider, DebuggerCoordinates coordinates, String sourceName, String source, PcodeUseropLibrary<?> library) Compile the given Sleigh source into a p-code program, resolving user labelsstatic PcodeExecutor<byte[]> executorForCoordinates(ServiceProvider provider, DebuggerCoordinates coordinates) Get an executor which can be used to evaluate Sleigh expressions at the given coordinatesstatic PcodeExecutorState<byte[]> executorStateForCoordinates(ServiceProvider provider, DebuggerCoordinates coordinates) Get a p-code executor state for the given coordinatesstatic DebuggerPcodeUtilsReturns the enum constant of this class with the specified name.static DebuggerPcodeUtils[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
compileProgram
public static PcodeProgram compileProgram(ServiceProvider provider, DebuggerCoordinates coordinates, String sourceName, String source, PcodeUseropLibrary<?> library) Compile the given Sleigh source into a p-code program, resolving user labelsThe resulting program must only be used with a state bound to the same coordinates. Any symbols which are resolved to labels in the trace or its mapped programs are effectively substituted for their offsets. If a label moves, the program should be recompiled in order to update those substitutions.
- Parameters:
provider- the service provider (usually the tool)coordinates- the coordinates for the trace (and programs) from which labels can be resolved- See Also:
-
compileExpression
public static PcodeExpression compileExpression(ServiceProvider provider, DebuggerCoordinates coordinates, String source) Compile the given Sleigh expression into a p-code program, resolving user labelsThis has the same limitations as
compileProgram(ServiceProvider, DebuggerCoordinates, String, String, PcodeUseropLibrary)- See Also:
-
executorStateForCoordinates
public static PcodeExecutorState<byte[]> executorStateForCoordinates(ServiceProvider provider, DebuggerCoordinates coordinates) Get a p-code executor state for the given coordinatesIf a thread is included, the executor state will have access to both the memory and registers in the context of that thread. Otherwise, only memory access is permitted.
- Parameters:
provider- the service provider (usually the tool)coordinates- the coordinates- Returns:
- the state
-
executorForCoordinates
public static PcodeExecutor<byte[]> executorForCoordinates(ServiceProvider provider, DebuggerCoordinates coordinates) Get an executor which can be used to evaluate Sleigh expressions at the given coordinatesIf a thread is included, the executor will have access to both the memory and registers in the context of that thread. Otherwise, only memory access is permitted.
- Parameters:
provider- the service provider (usually the tool)coordinates- the coordinates- Returns:
- the executor
-
buildWatchState
public static DebuggerPcodeUtils.WatchValuePcodeExecutorState buildWatchState(ServiceProvider provider, DebuggerCoordinates coordinates) -
buildWatchExecutor
public static PcodeExecutor<DebuggerPcodeUtils.WatchValue> buildWatchExecutor(ServiceProvider provider, DebuggerCoordinates coordinates) Build an executor that can compute watch valuesThis computes the concrete value, its state, its address, and the set of physical addresses involved in the computation. CAUTION: This executor's state will attempt to read live machine state, if applicable. Use the executor in a background thread to avoid locking the GUI.
- Parameters:
provider- the service provider (usually the tool)coordinates- the coordinates providing context for the evaluation- Returns:
- an executor for evaluating the watch
-