Package ghidra.util.state
Class ResultsState
java.lang.Object
ghidra.util.state.ResultsState
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionResultsState
(Address entryPt, FunctionAnalyzer analyzer, Program program, boolean maintainInstructionResults, TaskMonitor monitor) Constructor from a function entry point.ResultsState
(LinkedList<SequenceNumber> flowList, FunctionAnalyzer analyzer, ContextState entryState, boolean maintainInstructionResults, TaskMonitor monitor) Constructor for replaying over a specified set of context states indicated via a flowList. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Set an assumed register value immediately following construction and prior to flow.Returns entry point associated with this results state.Returns set of addresses analyzed with function.Returns collection of frame pointer candidates.Returns list of registers which are read before written.Returns the set of registers which were modifiedReturns the set of registers which were modified yet preserved.getReturnValues
(Varnode varnode) static long
static long
getUnsignedOffset
(Varnode v, int size) static Varnode
simplify
(PcodeOp pcodeOp, Varnode[] values, AddressFactory addrFactory, TaskMonitor monitor) Generate simplified operation
-
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 pointanalyzer
- function analysis call-back handlerprogram
- program containing functionmaintainInstructionResults
- true to maintain the instruction resultsmonitor
- 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 pointsanalyzer
- function analysis call-back handlerentryState
- context state which feeds into the first point within the flowListmaintainInstructionResults
-monitor
- task monitor- Throws:
CancelledException
-
-
Method Details
-
getEntryPoint
Returns entry point associated with this results state. -
getExaminedSet
Returns set of addresses analyzed with function. (In-line functions not included) -
assume
Set an assumed register value immediately following construction and prior to flow.- Parameters:
register
- (context register not permitted)value
-
-
getContextStates
-
simplify
public static Varnode simplify(PcodeOp pcodeOp, Varnode[] values, AddressFactory addrFactory, TaskMonitor monitor) throws CancelledException Generate simplified operation- Parameters:
pcodeOp
- pcode operationvalues
- values associated with pcodeOp inputs- Returns:
- operation output result or simplification of an operation.
- Throws:
CancelledException
-
getFramePointerCandidates
Returns collection of frame pointer candidates. -
getPreservedRegisters
Returns the set of registers which were modified yet preserved. -
getModifiedRegisters
Returns the set of registers which were modified -
getInputRegisters
Returns list of registers which are read before written. -
getStackPointerVarnode
- Returns:
- Varnode that represents the stack pointer register
-
getReturnAddresses
-
getReturnValues
-
getUnsignedOffset
-
getSignedOffset
-