Class ResultsState

java.lang.Object
ghidra.util.state.ResultsState

public class ResultsState extends Object
  • Constructor Details

    • ResultsState

      public ResultsState(Address entryPt, FunctionAnalyzer analyzer, Program program, boolean maintainInstructionResults, TaskMonitor monitor) throws CancelledException
      Constructor from a function entry point. Program context is used to establish the entry context state. Analysis is performed during construction.
      Parameters:
      entryPt - function entry point
      analyzer - function analysis call-back handler
      program - program containing function
      maintainInstructionResults - true to maintain the instruction results
      monitor - task monitor
      Throws:
      CancelledException
    • ResultsState

      public ResultsState(LinkedList<SequenceNumber> flowList, FunctionAnalyzer analyzer, ContextState entryState, boolean maintainInstructionResults, TaskMonitor monitor) throws CancelledException
      Constructor for replaying over a specified set of context states indicated via a flowList. Analysis is performed during construction.
      Parameters:
      flowList - ordered list of context state entry points
      analyzer - function analysis call-back handler
      entryState - context state which feeds into the first point within the flowList
      maintainInstructionResults -
      monitor - task monitor
      Throws:
      CancelledException
  • Method Details

    • getEntryPoint

      public SequenceNumber getEntryPoint()
      Returns entry point associated with this results state.
    • getExaminedSet

      public AddressSetView getExaminedSet()
      Returns set of addresses analyzed with function. (In-line functions not included)
    • assume

      public void assume(Register register, long value)
      Set an assumed register value immediately following construction and prior to flow.
      Parameters:
      register - (context register not permitted)
      value -
    • getContextStates

      public Iterator<ContextState> getContextStates(SequenceNumber seq)
    • simplify

      public static Varnode simplify(PcodeOp pcodeOp, Varnode[] values, AddressFactory addrFactory, TaskMonitor monitor) throws CancelledException
      Generate simplified operation
      Parameters:
      pcodeOp - pcode operation
      values - values associated with pcodeOp inputs
      Returns:
      operation output result or simplification of an operation.
      Throws:
      CancelledException
    • getFramePointerCandidates

      public Collection<ResultsState.FramePointerCandidate> getFramePointerCandidates()
      Returns collection of frame pointer candidates.
    • getPreservedRegisters

      public List<Register> getPreservedRegisters()
      Returns the set of registers which were modified yet preserved.
    • getModifiedRegisters

      public List<Register> getModifiedRegisters()
      Returns the set of registers which were modified
    • getInputRegisters

      public List<Register> getInputRegisters()
      Returns list of registers which are read before written.
    • getStackPointerVarnode

      public Varnode getStackPointerVarnode()
      Returns:
      Varnode that represents the stack pointer register
    • getReturnAddresses

      public Set<SequenceNumber> getReturnAddresses()
    • getReturnValues

      public Set<Varnode> getReturnValues(Varnode varnode)
    • getUnsignedOffset

      public static long getUnsignedOffset(Varnode v, int size)
    • getSignedOffset

      public static long getSignedOffset(Varnode v)