Package ghidra.pcode.emu
Class DefaultPcodeThread.PcodeThreadExecutor<T>
java.lang.Object
ghidra.pcode.exec.PcodeExecutor<T>
ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor<T>
- Type Parameters:
T- the type of variables in the emulator
- 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
FieldsFields inherited from class ghidra.pcode.exec.PcodeExecutor
arithmetic, language, pc, pcSize, reason, state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbranchToAddress(PcodeOp op, Address target) Extension point: Called when execution branches to a target addressprotected voidcheckLoad(AddressSpace space, T offset, int size) Extension point: logic preceding a loadprotected voidcheckStore(AddressSpace space, T offset, int size) Extension point: logic preceding a storevoidexecuteSleigh(String source) Compile and execute a block of SleighGet the thread owning this executorprotected voidonMissingUseropDef(PcodeOp op, PcodeFrame frame, String opName, PcodeUseropLibrary<T> library) Extension point: Behavior when a userop definition was not found in the libraryvoidstepOp(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<T> library) Step one p-code opMethods inherited from class ghidra.pcode.exec.PcodeExecutor
badOp, begin, begin, branchInternal, branchToOffset, branchToOffset, checkInjectedTarget, doExecuteBranch, doExecuteIndirectBranch, execute, execute, executeBinaryOp, executeBranch, executeCall, executeCallother, executeConditionalBranch, executeIndirectBranch, executeIndirectCall, executeLoad, executeReturn, executeStore, executeUnaryOp, finish, getArithmetic, getBranchTarget, getCallotherOpNumber, getConditionalBranchPredicate, getIndirectBranchTarget, getIntConst, getLanguage, getLoadStoreOffset, getLoadStoreSpace, getReason, getState, getStoreValue, 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:PcodeExecutorCompile and execute a block of Sleigh- Overrides:
executeSleighin classPcodeExecutor<T>- Parameters:
source- the Sleigh source
-
stepOp
Description copied from class:PcodeExecutorStep one p-code op- Overrides:
stepOpin classPcodeExecutor<T>- Parameters:
op- the opframe- the current framelibrary- the library, invoked in case ofPcodeOp.CALLOTHER
-
checkLoad
Description copied from class:PcodeExecutorExtension point: logic preceding a load- Overrides:
checkLoadin 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:PcodeExecutorExtension point: logic preceding a store- Overrides:
checkStorein 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:PcodeExecutorExtension point: Called when execution branches to a target addressNOTE: This is not called for the fall-through case
- Overrides:
branchToAddressin classPcodeExecutor<T>- Parameters:
target- the target address
-
onMissingUseropDef
protected void onMissingUseropDef(PcodeOp op, PcodeFrame frame, String opName, PcodeUseropLibrary<T> library) Description copied from class:PcodeExecutorExtension point: Behavior when a userop definition was not found in the libraryThe default behavior is to throw a
SleighLinkException.- Overrides:
onMissingUseropDefin 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
-