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
- Direct Known Subclasses:
TaintPcodeThreadExecutor
- 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
ConstructorsChangeConstructorDescriptionPcodeThreadExecutor(DefaultPcodeThread<T> thread) Construct the executor -
Method Summary
ChangeModifier and TypeMethodDescriptionNEWprotected voidafterLoad(PcodeOp op, AddressSpace space, T offset, int size, T value) Extension point: logic proceeding a loadNEWprotected voidafterStore(PcodeOp op, AddressSpace space, T offset, int size, T value) Extension point: logic proceeding a storeNEWprotected voidbeforeLoad(PcodeOp op, AddressSpace space, T offset, int size) Extension point: logic preceding a loadNEWprotected voidbeforeStore(PcodeOp op, AddressSpace space, T offset, int size, T value) Extension point: logic preceding a storeprotected voidbranchToAddress(PcodeOp op, Address target) Extension point: Called when execution branches to a target addressvoidexecuteSleigh(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 opREMOVEDvoidcheckLoad(AddressSpace space, T offset, int size) RemovedREMOVEDvoidcheckStore(AddressSpace space, T offset, int size) RemovedMethods 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
-
beforeLoad NEW
Description copied from class:PcodeExecutorExtension point: logic preceding a load- Overrides:
beforeLoadin classPcodeExecutor<T>- Parameters:
op- the op performing the loadspace- the address space to be loaded fromoffset- the offset about to be loaded fromsize- the size in bytes to be loaded
-
afterLoad NEW
Description copied from class:PcodeExecutorExtension point: logic proceeding a load- Overrides:
afterLoadin classPcodeExecutor<T>- Parameters:
op- the op performing the loadspace- the address space loaded fromoffset- the offset about loaded fromsize- the size in bytes loadedvalue- the value loaded
-
beforeStore NEW
Description copied from class:PcodeExecutorExtension point: logic preceding a store- Overrides:
beforeStorein classPcodeExecutor<T>- Parameters:
op- the op performing the storespace- the address space to be stored tooffset- the offset about to be stored tosize- the size in bytes to be stored
-
afterStore NEW
Description copied from class:PcodeExecutorExtension point: logic proceeding a store- Overrides:
afterStorein classPcodeExecutor<T>- Parameters:
op- the op performing the storespace- the address space to be stored tooffset- the offset about to be stored tosize- the size in bytes to be storedvalue- the value 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
-