Package ghidra.trace.database.listing
Class DBTraceInstruction.GuestInstructionContext
java.lang.Object
ghidra.trace.database.listing.DBTraceInstruction.GuestInstructionContext
- All Implemented Interfaces:
InstructionContext
- Enclosing class:
DBTraceInstruction
protected class DBTraceInstruction.GuestInstructionContext
extends Object
implements InstructionContext
A context for guest instructions that maps addresses appropriately
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the instruction address that this context corresponds to.Get the read-only memory buffer containing the instruction bytes.Get the instruction parser context for the instruction which corresponds to this context object.getParserContext(Address instructionAddress) Get the instruction parser context which corresponds to the specified instruction address.Get the read-only processor context containing the context-register state state at the corresponding instruction.
-
Constructor Details
-
GuestInstructionContext
protected GuestInstructionContext()
-
-
Method Details
-
getAddress
Description copied from interface:InstructionContextGet the instruction address that this context corresponds to.- Specified by:
getAddressin interfaceInstructionContext- Returns:
- instruction address
-
getProcessorContext
Description copied from interface:InstructionContextGet the read-only processor context containing the context-register state state at the corresponding instruction. This is primarily used during the parse phase to provide the initial context-register state.- Specified by:
getProcessorContextin interfaceInstructionContext- Returns:
- the read-only processor context
-
getMemBuffer
Description copied from interface:InstructionContextGet the read-only memory buffer containing the instruction bytes. Its position will correspond to the instruction address.- Specified by:
getMemBufferin interfaceInstructionContext- Returns:
- instruction memory buffer
-
getParserContext
Description copied from interface:InstructionContextGet the instruction parser context for the instruction which corresponds to this context object.- Specified by:
getParserContextin interfaceInstructionContext- Returns:
- the instruction parser context for the instruction which corresponds to this context object.
- Throws:
MemoryAccessException- if memory error occurred while resolving instruction details.
-
getParserContext
public ParserContext getParserContext(Address instructionAddress) throws UnknownContextException, MemoryAccessException Description copied from interface:InstructionContextGet the instruction parser context which corresponds to the specified instruction address. This may be obtained via either caching or by parsing the instruction at the specified address. The returned ParserContext may be cast to the prototype's implementation without checking. This method will throw an UnknownContextException if a compatible ParserContext is not found at the specified address.- Specified by:
getParserContextin interfaceInstructionContext- Parameters:
instructionAddress- instruction address of requested context- Returns:
- the instruction parser context at the specified instruction address
- Throws:
UnknownContextException- if the instruction at the specified address was not previously parsed or attempting to instantiate context resulted in an exception.MemoryAccessException- if memory error occurred while resolving instruction details.
-