ROSE 0.11.145.147
Public Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter Class Reference

Description

Creates GraphViz files from Partitioner data.

This class operates in these steps:

Step 2 (choosing vertices and edges) is accomplished via vertexOrganization and edgeOrganization methods and the Organization::select method invoked on their return values. Step 3 (setting labels and other attributes) is performed the same way, but with Organization::label and Organization::attributes methods. This class also has a number of "select" methods that perform steps 2 and 3 at the same time; these methods adjust labels and attributes only when selecting a previously unselected vertex, edge, or subgraph–otherwise they use the label and attributes that were previously specified. Step 4 is normally achieved by invoking the emit method, but the class also defines other emitters that combine a "select" method of the same name with emit.

Function::Ptr f1=..., f2=...;
gv.showInstructions(true);
gv.useFunctionSubgraphs(true);
gv.selectFunctionGraph(f1);
gv.emit(std::cout);
Creates GraphViz files from Partitioner data.
Definition GraphViz.h:436
PartitionerConstPtr partitioner()
Property: partitioner.
Definition GraphViz.h:471
Reference-counting intrusive smart pointer.

Definition at line 436 of file GraphViz.h.

#include <Rose/BinaryAnalysis/Partitioner2/GraphViz.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter:
Collaboration graph
[legend]

Public Member Functions

PartitionerConstPtr partitioner ()
 Property: partitioner.
 
void selectInterval (const AddressInterval &)
 Selects vertices in some interval.
 
void selectIntraFunction (const FunctionPtr &)
 Select vertices and intra-function edges for one function.
 
void selectFunctionCallees (const FunctionPtr &)
 Select outgoing edges to neighboring vertices.
 
void selectFunctionCallers (const FunctionPtr &)
 Select incoming edges from neighboring vertices.
 
void deselectReturnEdges ()
 Deselect all function return edges.
 
void deselectUnusedVertex (ControlFlowGraph::ConstVertexIterator)
 Deselect a vertex if it has no selected incident edges.
 
void deselectUnusedVertexType (VertexType)
 Deselect vertices of specified type if they have no selected incident edges.
 
void selectNeighbors (bool selectInEdges=true, bool selectOutEdges=true)
 Select neighboring vertices.
 
CfgEmitterselectWholeGraph ()
 Selects graph elements for whole-graph output.
 
CfgEmitterselectFunctionGraph (const FunctionPtr &)
 Selects the CFG for one function.
 
CfgEmitterselectIntervalGraph (const AddressInterval &interval)
 Selects vertices that start within some interval.
 
void emitWholeGraph (std::ostream &)
 Dump entire control flow graph.
 
void emitFunctionGraph (std::ostream &, const FunctionPtr &)
 Dump control flow graph for one function.
 
void emitIntervalGraph (std::ostream &, const AddressInterval &)
 Dump control flow graph for some address interval.
 
void assignFunctionSubgraphs ()
 Assign vertices and edges to subgraphs.
 
virtual std::string sourceLocation (const ControlFlowGraph::ConstVertexIterator &) const
 Source location for vertex.
 
virtual std::string functionLabel (const FunctionPtr &) const
 Label for function vertex.
 
virtual Attributes functionAttributes (const FunctionPtr &) const
 Attributes for function vertex.
 
 CfgEmitter (const PartitionerConstPtr &)
 Constructor.
 
 CfgEmitter (const PartitionerConstPtr &, const ControlFlowGraph &)
 Constructor.
 
bool useFunctionSubgraphs () const
 Property: use function subgraphs.
 
void useFunctionSubgraphs (bool b)
 Property: use function subgraphs.
 
bool showInstructions () const
 Property: show basic block instructions.
 
void showInstructions (bool b)
 Property: show basic block instructions.
 
bool showInstructionAddresses () const
 Property: show instruction addresses.
 
void showInstructionAddresses (bool b)
 Property: show instruction addresses.
 
bool showInstructionStackDeltas () const
 Property: show instruction stack deltas.
 
void showInstructionStackDeltas (bool b)
 Property: show instruction stack deltas.
 
bool strikeNoopSequences () const
 Property: strike no-op sequences.
 
void strikeNoopSequences (bool b)
 Property: strike no-op sequences.
 
const Color::HSVfuncEnterColor () const
 Property: color to use for background of function entrance nodes.
 
void funcEnterColor (const Color::HSV &bg)
 Property: color to use for background of function entrance nodes.
 
const Color::HSVfuncReturnColor () const
 Property: color to use for background of function return nodes.
 
void funcReturnColor (const Color::HSV &bg)
 Property: color to use for background of function return nodes.
 
const Color::HSVwarningColor () const
 Property: color to use for background of special nodes and for warnings.
 
void warningColor (const Color::HSV &bg)
 Property: color to use for background of special nodes and for warnings.
 
bool showOutNeighbors () const
 Property: show outgoing edges to neighbor vertices.
 
void showOutNeighbors (bool b)
 Property: show outgoing edges to neighbor vertices.
 
bool showInNeighbors () const
 Property: show incoming edges from neighbor vertices.
 
void showInNeighbors (bool b)
 Property: show incoming edges from neighbor vertices.
 
bool showReturnEdges () const
 Property: show function return edges.
 
void showReturnEdges (bool b)
 Property: show function return edges.
 
const SourceLocationssrcMapper () const
 Property: Address-to-source mapping.
 
SourceLocationssrcMapper ()
 Property: Address-to-source mapping.
 
void srcMapper (const SourceLocations &mapper)
 Property: Address-to-source mapping.
 
virtual std::string vertexLabel (const ControlFlowGraph::ConstVertexIterator &) const
 Label for CFG vertex.
 
std::string vertexLabel (const ControlFlowGraph::Vertex &) const
 Label for CFG vertex.
 
virtual std::string vertexLabelDetailed (const ControlFlowGraph::ConstVertexIterator &) const
 Detailed label for CFG vertex.
 
std::string vertexLabelDetailed (const ControlFlowGraph::Vertex &) const
 Detailed label for CFG vertex.
 
virtual Attributes vertexAttributes (const ControlFlowGraph::ConstVertexIterator &) const
 Attributes for a CFG vertex.
 
Attributes vertexAttributes (const ControlFlowGraph::Vertex &) const
 Attributes for a CFG vertex.
 
virtual std::string edgeLabel (const ControlFlowGraph::ConstEdgeIterator &) const
 Label for CFG edge.
 
std::string edgeLabel (const ControlFlowGraph::Edge &) const
 Label for CFG edge.
 
virtual Attributes edgeAttributes (const ControlFlowGraph::ConstEdgeIterator &) const
 Attributes for a CFG edge.
 
Attributes edgeAttributes (const ControlFlowGraph::Edge &) const
 Attributes for a CFG edge.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
 BaseEmitter ()
 Default constructor.
 
 BaseEmitter (const Graph &g)
 Constructor.
 
void graph (const Graph &g)
 Reset the graph.
 
void selectAll (bool b=true)
 Causes all vertices and edges to be selected.
 
void selectNone ()
 Deselects all vertices and edges.
 
void selectAllVertices (bool b=true)
 Causes all vertices to be selected.
 
void selectAllEdges (bool b=true)
 Causes all edges to be selected.
 
void deselectParallelEdges ()
 Deselect all but one parallel edge.
 
virtual void emit (std::ostream &) const
 Dump selected vertices, edges, and subgraphs.
 
AttributesdefaultGraphAttributes ()
 Property: default graph attributes.
 
const AttributesdefaultGraphAttributes () const
 Property: default graph attributes.
 
AttributesdefaultNodeAttributes ()
 Property: default graph node attributes.
 
const AttributesdefaultNodeAttributes () const
 Property: default graph node attributes.
 
AttributesdefaultEdgeAttributes ()
 Property: default graph edge attributes.
 
const AttributesdefaultEdgeAttributes () const
 Property: default graph edge attributes.
 
const Color::HSVsubgraphColor () const
 Property: color to use for function subgraph background.
 
void subgraphColor (const Color::HSV &bg)
 Property: color to use for function subgraph background.
 
const VertexOrganizationvertexOrganization () const
 Property: Controls which vertices are to appear in the output, and how.
 
VertexOrganizationvertexOrganization ()
 Property: Controls which vertices are to appear in the output, and how.
 
const OrganizationvertexOrganization (size_t vertexId) const
 Property: Controls which vertices are to appear in the output, and how.
 
OrganizationvertexOrganization (size_t vertexId)
 Property: Controls which vertices are to appear in the output, and how.
 
const OrganizationvertexOrganization (const typename G::ConstVertexIterator &vertex) const
 Property: Controls which vertices are to appear in the output, and how.
 
const OrganizationvertexOrganization (const typename G::Vertex &vertex) const
 Property: Controls which vertices are to appear in the output, and how.
 
OrganizationvertexOrganization (const typename G::ConstVertexIterator &vertex)
 Property: Controls which vertices are to appear in the output, and how.
 
OrganizationvertexOrganization (const typename G::Vertex &vertex)
 Property: Controls which vertices are to appear in the output, and how.
 
const EdgeOrganizationedgeOrganization () const
 Property: Controls which edges are to appear in the output, and how.
 
EdgeOrganizationedgeOrganization ()
 Property: Controls which edges are to appear in the output, and how.
 
const OrganizationedgeOrganization (size_t edgeId) const
 Property: Controls which edges are to appear in the output, and how.
 
OrganizationedgeOrganization (size_t edgeId)
 Property: Controls which edges are to appear in the output, and how.
 
const OrganizationedgeOrganization (const typename G::ConstEdgeIterator &edge) const
 Property: Controls which edges are to appear in the output, and how.
 
const OrganizationedgeOrganization (const typename G::Edge &edge) const
 Property: Controls which edges are to appear in the output, and how.
 
OrganizationedgeOrganization (const typename G::ConstEdgeIterator &edge)
 Property: Controls which edges are to appear in the output, and how.
 
OrganizationedgeOrganization (const typename G::Edge &edge)
 Property: Controls which edges are to appear in the output, and how.
 
const SubgraphOrganizationsubgraphOrganization () const
 Property: Controls which subgraphs appear in the output, and how.
 
SubgraphOrganizationsubgraphOrganization ()
 Property: Controls which subgraphs appear in the output, and how.
 
const OrganizationsubgraphOrganization (const std::string &name) const
 Property: Controls which subgraphs appear in the output, and how.
 
OrganizationsubgraphOrganization (const std::string &name)
 Property: Controls which subgraphs appear in the output, and how.
 

Static Public Member Functions

static bool isInterFunctionEdge (const ControlFlowGraph::Edge &)
 Returns true if the edge spans two different functions.
 
static bool isInterFunctionEdge (const ControlFlowGraph::ConstEdgeIterator &)
 Returns true if the edge spans two different functions.
 
static FunctionPtr firstOwningFunction (const ControlFlowGraph::Vertex &)
 First function that owns a vertex.
 
static FunctionPtr firstOwningFunction (const ControlFlowGraph::ConstVertexIterator &v)
 First function that owns a vertex.
 
static FunctionSet owningFunctions (const ControlFlowGraph::Vertex &)
 Functions that own a vertex.
 
static FunctionSet owningFunctions (const ControlFlowGraph::ConstVertexIterator &)
 Functions that own a vertex.
 

Additional Inherited Members

- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
typedef ControlFlowGraph Graph
 
typedef std::vector< OrganizationVertexOrganization
 Organizational information for vertices.
 
typedef std::vector< OrganizationEdgeOrganization
 Organizational information for edges.
 
typedef Sawyer::Container::Map< std::string, OrganizationSubgraphOrganization
 Organizational information for subgraphs.
 
- Protected Types inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
typedef Sawyer::Container::Map< size_t, size_t > VMap
 
- Protected Member Functions inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
size_t emitVertex (std::ostream &, const typename G::ConstVertexIterator &, const Organization &, const VMap &) const
 Emit a single vertex if it hasn't been emitted already.
 
void emitEdge (std::ostream &, const typename G::ConstEdgeIterator &, const Organization &, const VMap &) const
 Emit a single edge.
 
- Protected Attributes inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
Graph graph_
 
VertexOrganization vertexOrganization_
 
EdgeOrganization edgeOrganization_
 
SubgraphOrganization subgraphOrganization_
 
Attributes defaultGraphAttributes_
 
Attributes defaultNodeAttributes_
 
Attributes defaultEdgeAttributes_
 
std::list< PseudoEdge > pseudoEdges_
 
Color::HSV subgraphColor_
 

Constructor & Destructor Documentation

◆ CfgEmitter() [1/2]

Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::CfgEmitter ( const PartitionerConstPtr )
explicit

Constructor.

Constructs a GraphViz emitter that uses the control flow graph (and possibly other data structures) from the specified partitioner, or the provided control flow graph which must be compatible with the partitioner. The GraphViz object will hold a reference to the partitioner, therefore the partitioner should not be deleted before the GraphViz object.

◆ CfgEmitter() [2/2]

Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::CfgEmitter ( const PartitionerConstPtr ,
const ControlFlowGraph  
)

Constructor.

Constructs a GraphViz emitter that uses the control flow graph (and possibly other data structures) from the specified partitioner, or the provided control flow graph which must be compatible with the partitioner. The GraphViz object will hold a reference to the partitioner, therefore the partitioner should not be deleted before the GraphViz object.

Member Function Documentation

◆ partitioner()

PartitionerConstPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::partitioner ( )
inline

Property: partitioner.

The partitioner that's being used, set when this emitter was constructed.

Definition at line 471 of file GraphViz.h.

◆ useFunctionSubgraphs() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::useFunctionSubgraphs ( ) const
inline

Property: use function subgraphs.

When this property is true, GraphViz-emitting methods that adjust the vertex, edge, and/or subgraph organization will create new subgraphs for each function that has selected vertices. The subgraphs will correspond to functions. Vertices that don't appear in any function will likewise not belong to any subgraph.

Definition at line 480 of file GraphViz.h.

◆ useFunctionSubgraphs() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::useFunctionSubgraphs ( bool  b)
inline

Property: use function subgraphs.

When this property is true, GraphViz-emitting methods that adjust the vertex, edge, and/or subgraph organization will create new subgraphs for each function that has selected vertices. The subgraphs will correspond to functions. Vertices that don't appear in any function will likewise not belong to any subgraph.

Definition at line 481 of file GraphViz.h.

◆ showInstructions() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructions ( ) const
inline

Property: show basic block instructions.

When true, vertex labels computed by the GraphViz-emitting methods (as opposed to labels set by the user), will contain the disassembled instructions. Otherwise such labels will consist of only the basic block starting address. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 491 of file GraphViz.h.

◆ showInstructions() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructions ( bool  b)
inline

Property: show basic block instructions.

When true, vertex labels computed by the GraphViz-emitting methods (as opposed to labels set by the user), will contain the disassembled instructions. Otherwise such labels will consist of only the basic block starting address. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 492 of file GraphViz.h.

◆ showInstructionAddresses() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionAddresses ( ) const
inline

Property: show instruction addresses.

When true and basic block instructions are shown (showInstructions), then the address of each instruction is also rendered. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 501 of file GraphViz.h.

◆ showInstructionAddresses() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionAddresses ( bool  b)
inline

Property: show instruction addresses.

When true and basic block instructions are shown (showInstructions), then the address of each instruction is also rendered. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 502 of file GraphViz.h.

◆ showInstructionStackDeltas() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionStackDeltas ( ) const
inline

Property: show instruction stack deltas.

When true and basic block instructions are shown (showInstructions), then each instruction will be preceeded by a two-digit (or more) hexadecimal stack offset. The stack delta appears after the address (if any). This property is expected to be honored by the vertexLabel virtual method.

Definition at line 512 of file GraphViz.h.

◆ showInstructionStackDeltas() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionStackDeltas ( bool  b)
inline

Property: show instruction stack deltas.

When true and basic block instructions are shown (showInstructions), then each instruction will be preceeded by a two-digit (or more) hexadecimal stack offset. The stack delta appears after the address (if any). This property is expected to be honored by the vertexLabel virtual method.

Definition at line 513 of file GraphViz.h.

◆ strikeNoopSequences() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::strikeNoopSequences ( ) const
inline

Property: strike no-op sequences.

Those instructions that are part of a no-op sequence are rendered in a different font (such as strike-through). When two or more sequences overlap, the largest sequence is struck and all overlapping sequences are not processed. For nested squences, this causes all instructions to be struck; for overlapping but non-nested sequences, only the largest one is struck.

Definition at line 524 of file GraphViz.h.

◆ strikeNoopSequences() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::strikeNoopSequences ( bool  b)
inline

Property: strike no-op sequences.

Those instructions that are part of a no-op sequence are rendered in a different font (such as strike-through). When two or more sequences overlap, the largest sequence is struck and all overlapping sequences are not processed. For nested squences, this causes all instructions to be struck; for overlapping but non-nested sequences, only the largest one is struck.

Definition at line 525 of file GraphViz.h.

◆ funcEnterColor() [1/2]

const Color::HSV & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcEnterColor ( ) const
inline

Property: color to use for background of function entrance nodes.

Edges to these nodes are created by converting the background color to a foreground color by inverting the value in HSV space (keeping the same hue and saturation).

Definition at line 535 of file GraphViz.h.

◆ funcEnterColor() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcEnterColor ( const Color::HSV bg)
inline

Property: color to use for background of function entrance nodes.

Edges to these nodes are created by converting the background color to a foreground color by inverting the value in HSV space (keeping the same hue and saturation).

Definition at line 536 of file GraphViz.h.

◆ funcReturnColor() [1/2]

const Color::HSV & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcReturnColor ( ) const
inline

Property: color to use for background of function return nodes.

Definition at line 542 of file GraphViz.h.

◆ funcReturnColor() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcReturnColor ( const Color::HSV bg)
inline

Property: color to use for background of function return nodes.

Definition at line 543 of file GraphViz.h.

◆ warningColor() [1/2]

const Color::HSV & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::warningColor ( ) const
inline

Property: color to use for background of special nodes and for warnings.

Definition at line 549 of file GraphViz.h.

◆ warningColor() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::warningColor ( const Color::HSV bg)
inline

Property: color to use for background of special nodes and for warnings.

Definition at line 550 of file GraphViz.h.

◆ showOutNeighbors() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showOutNeighbors ( ) const
inline

Property: show outgoing edges to neighbor vertices.

If set, then a function selector will also select inter-function edges originating from the selected function, and the incident vertices for those edges. Most of the time the incident vertices will be entry points for called functions.

Definition at line 559 of file GraphViz.h.

◆ showOutNeighbors() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showOutNeighbors ( bool  b)
inline

Property: show outgoing edges to neighbor vertices.

If set, then a function selector will also select inter-function edges originating from the selected function, and the incident vertices for those edges. Most of the time the incident vertices will be entry points for called functions.

Definition at line 560 of file GraphViz.h.

◆ showInNeighbors() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInNeighbors ( ) const
inline

Property: show incoming edges from neighbor vertices.

If set, then a function selector will also select inter-function edges targeting the selected function, and the incident vertices for those edges. Under certain (usual) circumstances, all incident vertices from the same function are collapsed into a single function vertex and the parallel edges are replaced with a single edge having a label indicating the number of original edges and their types.

Definition at line 571 of file GraphViz.h.

◆ showInNeighbors() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInNeighbors ( bool  b)
inline

Property: show incoming edges from neighbor vertices.

If set, then a function selector will also select inter-function edges targeting the selected function, and the incident vertices for those edges. Under certain (usual) circumstances, all incident vertices from the same function are collapsed into a single function vertex and the parallel edges are replaced with a single edge having a label indicating the number of original edges and their types.

Definition at line 572 of file GraphViz.h.

◆ showReturnEdges() [1/2]

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showReturnEdges ( ) const
inline

Property: show function return edges.

If this property is false, then selector functions that normally add E_FUNCTION_RETURN edges to the output will omit those edges instead by calling deselectReturnEdges.

Definition at line 581 of file GraphViz.h.

◆ showReturnEdges() [2/2]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showReturnEdges ( bool  b)
inline

Property: show function return edges.

If this property is false, then selector functions that normally add E_FUNCTION_RETURN edges to the output will omit those edges instead by calling deselectReturnEdges.

Definition at line 582 of file GraphViz.h.

◆ srcMapper() [1/3]

const SourceLocations & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( ) const
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 590 of file GraphViz.h.

◆ srcMapper() [2/3]

SourceLocations & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( )
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 591 of file GraphViz.h.

◆ srcMapper() [3/3]

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( const SourceLocations mapper)
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 592 of file GraphViz.h.

◆ selectInterval()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectInterval ( const AddressInterval )

Selects vertices in some interval.

Selects all vertices whose starting address falls within the specified interval, then selects all edges that connect any two selected vertices (regardless of whether those vertices were just selected by this method or were previously selected).

◆ selectFunctionCallees()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionCallees ( const FunctionPtr )

Select outgoing edges to neighboring vertices.

These edges typically represent calls to other functions.

◆ selectFunctionCallers()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionCallers ( const FunctionPtr )

Select incoming edges from neighboring vertices.

These edges typically represent calls from other functions. When possible, multiple edges from the same function will be replaced with a single pseudo-edge coming from that function's entry vertex.

◆ deselectReturnEdges()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::deselectReturnEdges ( )

Deselect all function return edges.

Any edge of type E_FUNCTION_RETURN is deselected.

◆ selectNeighbors()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectNeighbors ( bool  selectInEdges = true,
bool  selectOutEdges = true 
)

Select neighboring vertices.

Selects vertices that are neighbors of selected vertices, and the edges that connect them.

◆ selectWholeGraph()

CfgEmitter & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectWholeGraph ( )

Selects graph elements for whole-graph output.

(Re)selects all vertices and edges and gives them default names and attributes according to certain properties defined in this object. The user then has a chance to make adjustments to the organization before calling emit. The emitWholeGraph does the selection and emitting in one step.

◆ selectFunctionGraph()

CfgEmitter & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionGraph ( const FunctionPtr )

Selects the CFG for one function.

Selects all vertices and edges that are part of the specified function. Additionally, any inter-function edges to/from this function and their incident vertices are also selected according to selectFunctionCallees and selectFunctionCallers.

◆ selectIntervalGraph()

CfgEmitter & Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectIntervalGraph ( const AddressInterval interval)

Selects vertices that start within some interval.

Selects all vertices whose starting address falls within the specified interval, plus all edges whose incident vertices are selected. Additionally, neighboring vertices and connective edges are optionally added depending on showOutNeighbors and showInNeighbors.

◆ emitWholeGraph()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitWholeGraph ( std::ostream &  )

Dump entire control flow graph.

This is a convenient wrapper around selectWholeGraph and emit.

◆ emitFunctionGraph()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitFunctionGraph ( std::ostream &  ,
const FunctionPtr  
)

Dump control flow graph for one function.

This is a convenient wrapper around selectFunctionGraph and emit.

◆ emitIntervalGraph()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitIntervalGraph ( std::ostream &  ,
const AddressInterval  
)

Dump control flow graph for some address interval.

This is a convenient wrapper around selectIntervalGraph and emit.

◆ firstOwningFunction() [1/2]

static FunctionPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::firstOwningFunction ( const ControlFlowGraph::Vertex &  )
static

First function that owns a vertex.

Returns the first of possibly many functions that own a vertex. "First" is defined as the function listed first in the set returned by CfgVertex::owningFunctions. Returns null if there are no owning functions.

◆ firstOwningFunction() [2/2]

static FunctionPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::firstOwningFunction ( const ControlFlowGraph::ConstVertexIterator &  v)
inlinestatic

First function that owns a vertex.

Returns the first of possibly many functions that own a vertex. "First" is defined as the function listed first in the set returned by CfgVertex::owningFunctions. Returns null if there are no owning functions.

Definition at line 701 of file GraphViz.h.

◆ owningFunctions() [1/2]

static FunctionSet Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::owningFunctions ( const ControlFlowGraph::Vertex &  )
static

Functions that own a vertex.

Returns a set of pointers to the functions that own the specified vertex. Usually a vertex is owned by either zero or one function.

◆ owningFunctions() [2/2]

static FunctionSet Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::owningFunctions ( const ControlFlowGraph::ConstVertexIterator &  )
static

Functions that own a vertex.

Returns a set of pointers to the functions that own the specified vertex. Usually a vertex is owned by either zero or one function.

◆ assignFunctionSubgraphs()

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::assignFunctionSubgraphs ( )

Assign vertices and edges to subgraphs.

Each vertex is assigned to a subgraph, one subgraph per function. If a vertex is owned by more than one function then the "first" function is used, where the definition of "first" is quite arbitrary.

◆ sourceLocation()

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::sourceLocation ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Source location for vertex.

Returns a string indicating the source code location for a vertex. If no information is available then an empty string is returned.

◆ vertexLabel() [1/2]

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabel ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Label for CFG vertex.

Returns the simple label for a CFG vertex. The simple label is usually just an address rather than instructions, etc. The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

◆ vertexLabel() [2/2]

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabel ( const ControlFlowGraph::Vertex &  ) const

Label for CFG vertex.

Returns the simple label for a CFG vertex. The simple label is usually just an address rather than instructions, etc. The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

◆ vertexLabelDetailed() [1/2]

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabelDetailed ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Detailed label for CFG vertex.

The detailed label can be a multi-line value and must include delimiting double quotes or angle brackets with proper escaping of the content. This method should honor the showInstructionAddresses and showInstructionStackDeltas properties.

◆ vertexLabelDetailed() [2/2]

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabelDetailed ( const ControlFlowGraph::Vertex &  ) const

Detailed label for CFG vertex.

The detailed label can be a multi-line value and must include delimiting double quotes or angle brackets with proper escaping of the content. This method should honor the showInstructionAddresses and showInstructionStackDeltas properties.

◆ edgeLabel() [1/2]

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::edgeLabel ( const ControlFlowGraph::ConstEdgeIterator &  ) const
virtual

Label for CFG edge.

The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

◆ edgeLabel() [2/2]

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::edgeLabel ( const ControlFlowGraph::Edge &  ) const

Label for CFG edge.

The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

◆ functionLabel()

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::functionLabel ( const FunctionPtr ) const
virtual

Label for function vertex.

The returned label must include the delimiting double quotes or angle brackets and have proper escaping of contents.


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