Class DefaultPcodeThread.PcodeEmulationLibrary<T>
- Type Parameters:
T
- no particular type, except to match the thread's
- All Implemented Interfaces:
PcodeUseropLibrary<T>
- Enclosing class:
DefaultPcodeThread<T>
TODO: Since p-code userops can now receive the executor, it may be better to receive it, cast it, and obtain the thread, rather than binding a library to each thread.
-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.pcode.exec.AnnotatedPcodeUseropLibrary
AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>, AnnotatedPcodeUseropLibrary.FixedArgsAnnotatedPcodeUseropDefinition<T>, AnnotatedPcodeUseropLibrary.OpExecutor, AnnotatedPcodeUseropLibrary.OpLibrary, AnnotatedPcodeUseropLibrary.OpOutput, AnnotatedPcodeUseropLibrary.OpState, AnnotatedPcodeUseropLibrary.PcodeUserop, AnnotatedPcodeUseropLibrary.VariadicAnnotatedPcodeUseropDefinition<T>
Nested classes/interfaces inherited from interface ghidra.pcode.exec.PcodeUseropLibrary
PcodeUseropLibrary.EmptyPcodeUseropLibrary, PcodeUseropLibrary.PcodeUseropDefinition<T>
-
Field Summary
Fields inherited from class ghidra.pcode.exec.AnnotatedPcodeUseropLibrary
ops
Fields inherited from interface ghidra.pcode.exec.PcodeUseropLibrary
NIL
-
Constructor Summary
ConstructorDescriptionPcodeEmulationLibrary
(DefaultPcodeThread<T> thread) Construct a library to control the given thread -
Method Summary
Modifier and TypeMethodDescriptionvoid
Execute the actual machine instruction at the current program countervoid
Notify the client of a failed Sleigh inject compilation.void
Advance the program counter beyond the current machine instructionvoid
emu_swi()
Interrupt executionMethods inherited from class ghidra.pcode.exec.AnnotatedPcodeUseropLibrary
getMethodLookup, getOperandType, getUserops
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.pcode.exec.PcodeUseropLibrary
compose, getSymbols
-
Constructor Details
-
PcodeEmulationLibrary
Construct a library to control the given thread- Parameters:
thread
- the thread
-
-
Method Details
-
emu_exec_decoded
public void emu_exec_decoded()Execute the actual machine instruction at the current program counterBecause "injects" override the machine instruction, injects which need to defer to the machine instruction must invoke this userop.
- See Also:
-
emu_skip_decoded
public void emu_skip_decoded()Advance the program counter beyond the current machine instructionBecause "injects" override the machine instruction, they must specify the effect on the program counter, lest the thread become caught in an infinite loop on the inject. To emulate fall-through without executing the machine instruction, the inject must invoke this userop.
- See Also:
-
emu_swi
public void emu_swi()Interrupt executionThis immediately throws an
InterruptPcodeExecutionException
. To implement out-of-band breakpoints, inject an invocation of this userop at the desired address.- See Also:
-
emu_injection_err
public void emu_injection_err()Notify the client of a failed Sleigh inject compilation.To avoid pestering the client during emulator set-up, a service may effectively defer notifying the user of Sleigh compilation errors by replacing the erroneous injects with calls to this p-code op. Then, only if and when an erroneous inject is encountered will the client be notified.
-