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 Details

    • GuestInstructionContext

      protected GuestInstructionContext()
  • Method Details

    • getAddress

      public Address getAddress()
      Description copied from interface: InstructionContext
      Get the instruction address that this context corresponds to.
      Specified by:
      getAddress in interface InstructionContext
      Returns:
      instruction address
    • getProcessorContext

      public ProcessorContextView getProcessorContext()
      Description copied from interface: InstructionContext
      Get 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:
      getProcessorContext in interface InstructionContext
      Returns:
      the read-only processor context
    • getMemBuffer

      public MemBuffer getMemBuffer()
      Description copied from interface: InstructionContext
      Get the read-only memory buffer containing the instruction bytes. Its position will correspond to the instruction address.
      Specified by:
      getMemBuffer in interface InstructionContext
      Returns:
      instruction memory buffer
    • getParserContext

      public ParserContext getParserContext() throws MemoryAccessException
      Description copied from interface: InstructionContext
      Get the instruction parser context for the instruction which corresponds to this context object.
      Specified by:
      getParserContext in interface InstructionContext
      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: InstructionContext
      Get 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:
      getParserContext in interface InstructionContext
      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.