Package ghidra.pcode.emu
Interface PcodeStateInitializer
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
X86PcodeStateInitializer
An extension for preparing execution state for sleigh emulation
As much as possible, it's highly-recommended to use Sleigh execution to perform any modifications. This will help it remain agnostic to various state types.
TODO: Implement annotation-based isApplicable(Language)
?
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> void
initializeMachine
(PcodeMachine<T> machine) The machine's memory state has just been initialized, and additional initialization is needed for Sleigh executiondefault <T> void
initializeThread
(PcodeThread<T> thread) The thread's register state has just been initialized, and additional initialization is needed for Sleigh executionboolean
isApplicable
(Language language) Check if this initializer applies to the given language
-
Method Details
-
isApplicable
Check if this initializer applies to the given language- Parameters:
language
- the language to check- Returns:
- true if it applies, false otherwise
-
initializeMachine
The machine's memory state has just been initialized, and additional initialization is needed for Sleigh executionThere's probably not much preparation of memory
- Type Parameters:
T
- the type of values in the machine state- Parameters:
machine
- the newly-initialized machine
-
initializeThread
The thread's register state has just been initialized, and additional initialization is needed for Sleigh executionInitialization generally consists of setting "virtual" registers using data from the real ones. Virtual registers are those specified in the Sleigh, but which don't actually exist on the target processor. Often, they exist to simplify static analysis, but unfortunately cause a minor headache for dynamic execution.
- Type Parameters:
T
- the type of values in the machine state- Parameters:
thread
- the newly-initialized thread
-