Class ModifiedPcodeThread<T>
- Type Parameters:
- T- the type of variables in the emulator
- All Implemented Interfaces:
- PcodeThread<T>
- Direct Known Subclasses:
- AuxPcodeThread,- BytesPcodeThread
 All machines that include a concrete state piece, i.e., all emulators, should use threads derived
 from this class. This implementation assumes that the modified state can be concretized. This
 doesn't necessarily require the machine to be a concrete emulator, but an abstract machine must
 avoid or handle ConcretionErrors arising from state modifiers.
 
 
 For a complete example of a p-code emulator, see PcodeEmulator.
 
 
 TODO: "State modifiers" are a feature of the older Emulator. They are crudely
 incorporated into threads extended from this abstract class, so that they do not yet need to be
 ported to this emulator.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classGlue for incorporating state modifiersprotected classFor incorporating the state modifier's userop behaviorsNested classes/interfaces inherited from class ghidra.pcode.emu.DefaultPcodeThreadDefaultPcodeThread.PcodeEmulationLibrary<T>, DefaultPcodeThread.PcodeThreadExecutor<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Emulateprotected final EmulateInstructionStateModifierPart of the glue that makes existing state modifiers work in new emulation frameworkFields inherited from class ghidra.pcode.emu.DefaultPcodeThreadarithmetic, contextreg, decoder, defaultContext, executor, frame, injects, instruction, language, pc, state
- 
Constructor SummaryConstructorsConstructorDescriptionModifiedPcodeThread(String name, AbstractPcodeMachine<T> machine) Construct a new thread with the given name belonging to the given machine
- 
Method SummaryModifier and TypeMethodDescriptionprotected EmulateInstructionStateModifierConstruct a modifier for the given languageprotected PcodeUseropLibrary<T> A factory method to create the complete userop library for this threadvoidoverrideCounter(Address counter) Set the thread's program counter and write the pc register of its executor stateprotected voidExtension point: Extra behavior after executing an instructionMethods inherited from class ghidra.pcode.emu.DefaultPcodeThreadadvanceAfterFinished, assertCompletedInstruction, assertMidInstruction, assignContext, beginInstructionOrInject, branchToAddress, checkLoad, checkStore, clearAllInjects, clearInject, createExecutor, createInstructionDecoder, createThreadState, doPluggableInitialization, dropInstruction, executeInstruction, finishInstruction, getArithmetic, getContext, getContextAfterCommits, getContextAfterCommits, getCounter, getExecutor, getFrame, getInject, getInstruction, getLanguage, getMachine, getName, getState, getUseropLibrary, inject, isSuspended, onMissingUseropDef, overrideContext, overrideContextWithDefault, preExecuteInstruction, reInitialize, run, setCounter, setSuspended, skipInstruction, skipPcodeOp, stepInstruction, stepPatch, stepPcodeOp, stepped, swi, writeContext, writeCounterMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.emu.PcodeThreadstepInstruction, stepPcodeOp
- 
Field Details- 
modifierPart of the glue that makes existing state modifiers work in new emulation frameworkNOTE: These are instantiated one per thread, rather than sharing one across the machine, because some of the modifiers are stateful and assume a single-threaded model. The best way to mitigate that assumption is to ensure a modifier is responsible for only a single thread, even though a machine may have multiple threads. 
- 
emulate
 
- 
- 
Constructor Details- 
ModifiedPcodeThreadConstruct a new thread with the given name belonging to the given machine- Parameters:
- name- the name of the new thread
- machine- the machine to which the new thread belongs
- See Also:
 
 
- 
- 
Method Details- 
createModifierConstruct a modifier for the given language- Returns:
- the state modifier
 
- 
createUseropLibraryDescription copied from class:DefaultPcodeThreadA factory method to create the complete userop library for this threadThe returned library must compose the containing machine's shared userop library. See PcodeUseropLibrary.compose(PcodeUseropLibrary).- Overrides:
- createUseropLibraryin class- DefaultPcodeThread<T>
- Returns:
- the thread's complete userop library
 
- 
overrideCounterDescription copied from interface:PcodeThreadSet the thread's program counter and write the pc register of its executor stateWarning: Setting the counter into the middle of group constructs, e.g., parallel instructions or delay-slotted instructions, may cause undefined behavior. - Specified by:
- overrideCounterin interface- PcodeThread<T>
- Overrides:
- overrideCounterin class- DefaultPcodeThread<T>
- Parameters:
- counter- the new target address
- See Also:
 
- 
postExecuteInstructionprotected void postExecuteInstruction()Description copied from class:DefaultPcodeThreadExtension point: Extra behavior after executing an instructionThis is currently used for incorporating state modifiers from the older Emulatorframework. There is likely utility here when porting those to this framework.- Overrides:
- postExecuteInstructionin class- DefaultPcodeThread<T>
 
 
-