Class CSpecTestPCodeEmulator
java.lang.Object
ghidra.pcode.emu.AbstractPcodeMachine<byte[]>
ghidra.pcode.emu.PcodeEmulator
ghidra.test.compilers.support.CSpecTestPCodeEmulator
- All Implemented Interfaces:
PcodeMachine<byte[]>
An extension of
PcodeEmulator that can load program memory and set up the emulator
to run at a specific function entry point.-
Nested Class Summary
Nested classes/interfaces inherited from interface PcodeMachine
PcodeMachine.AccessKind, PcodeMachine.SwiMode -
Field Summary
Fields inherited from class AbstractPcodeMachine
accessBreakpoints, arithmetic, cb, injects, language, library, stubLibrary, suspended, swiMode, threads, threadsView -
Constructor Summary
ConstructorsConstructorDescriptionCSpecTestPCodeEmulator(Language lang, boolean traceDisabled, int traceLevel) CSpecTestPCodeEmulator(Language lang, boolean traceDisabled, int traceLevel, Consumer<String> logger) -
Method Summary
Modifier and TypeMethodDescriptionprotected BytesPcodeThreadcreateThread(String name) Create BytesPcodeThread object with an overwritten 'createInstructionDecoder' method.PcodeThread<byte[]> prepareFunction(Function func) Load the function entry point context registers into emulator, create stack space, set program counter.Methods inherited from class PcodeEmulator
createArithmetic, createLocalState, createSharedStateMethods inherited from class AbstractPcodeMachine
addAccessBreakpoint, addBreakpoint, assertSleigh, checkLoad, checkStore, clearAccessBreakpoints, clearAllInjects, clearInject, compileSleigh, createThreadStubLibrary, createUseropLibrary, doPluggableInitialization, getAllThreads, getArithmetic, getInject, getLanguage, getPluggableInitializer, getSharedState, getSoftwareInterruptMode, getStubUseropLibrary, getThread, getUseropLibrary, inject, isSuspended, newThread, newThread, setSoftwareInterruptMode, setSuspended, stepped, swi
-
Constructor Details
-
CSpecTestPCodeEmulator
-
CSpecTestPCodeEmulator
-
CSpecTestPCodeEmulator
-
-
Method Details
-
createThread
Create BytesPcodeThread object with an overwritten 'createInstructionDecoder' method.- Overrides:
createThreadin classPcodeEmulator- Parameters:
name- The name of the thread.- Returns:
- the new thread
- See Also:
-
prepareFunction
Load the function entry point context registers into emulator, create stack space, set program counter. Return a emulator thread ready for a run() call- Parameters:
func- The function to prepare the emulator to run.- Returns:
PcodeThread<byte[]>
-