decompiler  1.0.0
Public Member Functions | Private Attributes | List of all members
ghidra::ValueSetSolver::ValueSetEdge Class Reference

An iterator over out-bound edges for a single ValueSet node in a data-flow system. More...

Public Member Functions

 ValueSetEdge (ValueSet *node, const vector< ValueSet *> &roots)
 Construct an iterator over the outbound edges of the given ValueSet node. More...
 
ValueSetgetNext (void)
 Get the ValueSet pointed to by this iterator and advance the iterator. More...
 

Private Attributes

const vector< ValueSet * > * rootEdges
 The list of nodes attached to the simulated root node (or NULL)
 
int4 rootPos
 The iterator position for the simulated root node.
 
Varnodevn
 The Varnode attached to a normal ValueSet node (or NULL)
 
list< PcodeOp * >::const_iterator iter
 The iterator position for a normal ValueSet node.
 

Detailed Description

An iterator over out-bound edges for a single ValueSet node in a data-flow system.

This is a helper class for walking a collection of ValueSets as a graph. Mostly the graph mirrors the data-flow of the Varnodes underlying the ValueSets, but there is support for a simulated root node. This class acts as an iterator over the outgoing edges of a particular ValueSet in the graph.

Constructor & Destructor Documentation

◆ ValueSetEdge()

ghidra::ValueSetSolver::ValueSetEdge::ValueSetEdge ( ValueSet node,
const vector< ValueSet *> &  roots 
)

Construct an iterator over the outbound edges of the given ValueSet node.

Mostly this just forwards the ValueSets attached to output Varnodes of the descendant ops of the Varnode attached to the given node, but this allows for an artificial root node so we can simulate multiple input nodes.

Parameters
nodeis the given ValueSet node (NULL if this is the simulated root)
rootsis the list of input ValueSets to use for the simulated root

References ghidra::ValueSet::getVarnode().

Member Function Documentation

◆ getNext()

ValueSet * ghidra::ValueSetSolver::ValueSetEdge::getNext ( void  )

Get the ValueSet pointed to by this iterator and advance the iterator.

This method assumes all Varnodes with an attached ValueSet have been marked.

Returns
the next ValueSet or NULL if the end of the list is reached

References ghidra::PcodeOp::getOut(), ghidra::Varnode::getValueSet(), and ghidra::Varnode::isMark().

Referenced by ghidra::ValueSetSolver::component(), and ghidra::ValueSetSolver::visit().


The documentation for this class was generated from the following files: