Package ghidra.pcode.emu

# Class ModifiedPcodeThread.GlueEmulate

java.lang.Object
ghidra.pcode.emulate.Emulate
ghidra.pcode.emu.ModifiedPcodeThread.GlueEmulate

Enclosing class:
  `ModifiedPcodeThread<T>`

protected class ModifiedPcodeThread.GlueEmulate extends Emulate
Glue for incorporating state modifiers

This allows the modifiers to change the context and counter of the thread.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GlueEmulate(SleighLanguage lang, MemoryState s, BreakTable b)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RegisterValue`
  `getContextRegisterValue()`
  Returns the current context register value.
  `Address`
  `getExecuteAddress()`
  Returns the currently executing machine address.
  `Language`
  `getLanguage()`
  `void`
  `setContextRegisterValue(RegisterValue regValue)`
  Sets the context register value at the current execute address.
  `void`
  `setExecuteAddress(Address addr)`
  Set the current execution address and cache the pcode translation of the machine instruction at that address

  ### Methods inherited from class ghidra.pcode.emulate.Emulate

  `dispose, executeBranch, executeBranchind, executeCall, executeCallind, executeCallother, executeConditionalBranch, executeIndirect, executeInstruction, executeLoad, executeMultiequal, executeStore, fallthruOp, getExecutionState, getLastExecuteAddress, getMemoryState, getNewDisassemblerContext, isInstructionStart`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GlueEmulate

    public GlueEmulate(SleighLanguage lang, MemoryState s, BreakTable b)

- ## Method Details

  - ### getLanguage

    public Language getLanguage()
    Overrides:
      `getLanguage` in class `Emulate`

  - ### setExecuteAddress

    public void setExecuteAddress(Address addr)
    Description copied from class: `Emulate`
    Set the current execution address and cache the pcode translation of the machine instruction at that address
    Overrides:
      `setExecuteAddress` in class `Emulate`
    Parameters:
      `addr` - is the address where execution should continue

  - ### getExecuteAddress

    public Address getExecuteAddress()
    Description copied from class: `Emulate`
    Returns the currently executing machine address.
    Overrides:
      `getExecuteAddress` in class `Emulate`
    Returns:
      the currently executing machine address

  - ### setContextRegisterValue

    public void setContextRegisterValue(RegisterValue regValue)
    Description copied from class: `Emulate`
    Sets the context register value at the current execute address. The Emulator should not be running when this method is invoked. Only flowing context bits should be set, as non-flowing bits will be cleared prior to parsing on instruction. In addition, any future context state set by the pcode emitter will take precedence over context set using this method. This method is primarily intended to be used to establish the initial context state.
    Overrides:
      `setContextRegisterValue` in class `Emulate`
    Parameters:
      `regValue` -

  - ### getContextRegisterValue

    public RegisterValue getContextRegisterValue()
    Description copied from class: `Emulate`
    Returns the current context register value. The context value returned reflects its state when the previously executed instruction was parsed/executed. The context value returned will feed into the next instruction to be parsed with its non-flowing bits cleared and any future context state merged in. If no instruction has been executed, the explicitly set context will be returned. A null value is returned if no context register is defined by the language or initial context has not been set.
    Overrides:
      `getContextRegisterValue` in class `Emulate`