Package ghidra.pcode.emu
Interface InstructionDecoder
- All Known Implementing Classes:
SleighInstructionDecoder
public interface InstructionDecoder
A means of decoding machine instructions from the bytes contained in the machine state
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Inform the decoder that the emulator thread just brancheddecodeInstruction
(Address address, RegisterValue context) Decode the instruction starting at the given address using the given contextGet the last instruction decodedint
Get the length of the last decoded instruction, including delay slots
-
Method Details
-
decodeInstruction
Decode the instruction starting at the given address using the given contextThis method cannot return null. If a decode error occurs, it must throw an exception.
- Parameters:
address
- the address to start decodingcontext
- the disassembler/decode context- Returns:
- the instruction
-
branched
Inform the decoder that the emulator thread just branched- Parameters:
address
-
-
getLastInstruction
Instruction getLastInstruction()Get the last instruction decoded- Returns:
- the instruction
-
getLastLengthWithDelays
int getLastLengthWithDelays()Get the length of the last decoded instruction, including delay slots- Returns:
- the length
-