Package ghidra.pcode.emu
Class DefaultPcodeThread.PcodeThreadExecutor<T>
java.lang.Object
ghidra.pcode.exec.PcodeExecutor<T>
ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor<T>
- Enclosing class:
DefaultPcodeThread<T>
An executor for the p-code thread
This executor checks for thread suspension and updates the program counter register upon execution of (external) branches.
-
Field Summary
Fields inherited from class ghidra.pcode.exec.PcodeExecutor
arithmetic, language, pc, pcSize, reason, state
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
branchToAddress
(Address target) Extension point: Called when execution branches to a target addressprotected void
checkLoad
(AddressSpace space, T offset, int size) Extension point: logic preceding a loadprotected void
checkStore
(AddressSpace space, T offset, int size) Extension point: logic preceding a storevoid
executeSleigh
(String source) Compile and execute a block of SleighGet the thread owning this executorprotected void
onMissingUseropDef
(PcodeOp op, PcodeFrame frame, String opName, PcodeUseropLibrary<T> library) Extension point: Behavior when a userop definition was not found in the libraryvoid
stepOp
(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<T> library) Step on p-code opMethods inherited from class ghidra.pcode.exec.PcodeExecutor
badOp, begin, begin, branchToOffset, doExecuteBranch, doExecuteIndirectBranch, execute, execute, executeBinaryOp, executeBranch, executeCall, executeCallother, executeConditionalBranch, executeIndirectBranch, executeIndirectCall, executeLoad, executeReturn, executeStore, executeUnaryOp, finish, getArithmetic, getIntConst, getLanguage, getReason, getState, getUseropName, skip, step
-
Field Details
-
thread
-
-
Constructor Details
-
PcodeThreadExecutor
Construct the executor- Parameters:
thread
- the thread this executor supports- See Also:
-
-
Method Details
-
executeSleigh
Description copied from class:PcodeExecutor
Compile and execute a block of Sleigh- Overrides:
executeSleigh
in classPcodeExecutor<T>
- Parameters:
source
- the Sleigh source
-
stepOp
Description copied from class:PcodeExecutor
Step on p-code op- Overrides:
stepOp
in classPcodeExecutor<T>
- Parameters:
op
- the opframe
- the current framelibrary
- the library, invoked in case ofPcodeOp.CALLOTHER
-
checkLoad
Description copied from class:PcodeExecutor
Extension point: logic preceding a load- Overrides:
checkLoad
in classPcodeExecutor<T>
- Parameters:
space
- the address space to be loaded fromoffset
- the offset about to be loaded fromsize
- the size in bytes to be loaded
-
checkStore
Description copied from class:PcodeExecutor
Extension point: logic preceding a store- Overrides:
checkStore
in classPcodeExecutor<T>
- Parameters:
space
- the address space to be stored tooffset
- the offset about to be stored tosize
- the size in bytes to be stored
-
branchToAddress
Description copied from class:PcodeExecutor
Extension point: Called when execution branches to a target addressNOTE: This is not called for the fall-through case
- Overrides:
branchToAddress
in classPcodeExecutor<T>
- Parameters:
target
- the target address
-
onMissingUseropDef
protected void onMissingUseropDef(PcodeOp op, PcodeFrame frame, String opName, PcodeUseropLibrary<T> library) Description copied from class:PcodeExecutor
Extension point: Behavior when a userop definition was not found in the libraryThe default behavior is to throw a
SleighLinkException
.- Overrides:
onMissingUseropDef
in classPcodeExecutor<T>
- Parameters:
op
- the opframe
- the frameopName
- the name of the p-code useroplibrary
- the library
-
getThread
Get the thread owning this executor- Returns:
- the thread
-