DCFG
Dynamic Control Flow Graph
 All Classes Functions
Public Member Functions | List of all members
dcfg_api::DCFG_GRAPH_BASE Class Referenceabstract

Common interface to any structure containing nodes and edges between them, i.e., processes, images, routines, loops and basic blocks. More...

#include <dcfg_api.H>

Inheritance diagram for dcfg_api::DCFG_GRAPH_BASE:
dcfg_api::DCFG_BASIC_BLOCK dcfg_api::DCFG_LOOP dcfg_api::DCFG_LOOP_CONTAINER dcfg_api::DCFG_ROUTINE dcfg_api::DCFG_ROUTINE_CONTAINER dcfg_api::DCFG_IMAGE dcfg_api::DCFG_IMAGE_CONTAINER dcfg_api::DCFG_PROCESS

Public Member Functions

virtual UINT32 get_basic_block_ids (DCFG_ID_CONTAINER &node_ids) const =0
 Get IDs of all basic blocks in the structure.
 
virtual UINT32 get_internal_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of internal edge IDs.
 
virtual UINT32 get_inbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of in-bound edge IDs.
 
virtual UINT32 get_outbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of out-bound edge IDs.
 
virtual UINT64 get_instr_count () const =0
 Get the total dynamic instruction count.
 
virtual UINT64 get_instr_count_for_thread (UINT32 thread_id) const =0
 Get per-thread dynamic instruction count.
 

Detailed Description

Common interface to any structure containing nodes and edges between them, i.e., processes, images, routines, loops and basic blocks.

A single basic block is a special case consisting of one block and no internal edges. Most nodes correspond to basic blocks of the executed binary, but some nodes are "special". See the DCFG documentation for more information.

Member Function Documentation

virtual UINT32 dcfg_api::DCFG_GRAPH_BASE::get_basic_block_ids ( DCFG_ID_CONTAINER node_ids) const
pure virtual

Get IDs of all basic blocks in the structure.

Returns
Number of IDs that were added to node_ids.
Parameters
[out]node_idsContainer to which IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc.
virtual UINT32 dcfg_api::DCFG_GRAPH_BASE::get_inbound_edge_ids ( DCFG_ID_CONTAINER edge_ids) const
pure virtual

Get list of in-bound edge IDs.

These are all edges such that the source node is not within the structure and the target node is within the structure. Note that this set contains all the edges that terminate within the structure, including returns from calls, interrupts, etc., not only those that are considered to "enter" the structure.

Returns
Number of IDs that were added to edge_ids.
Parameters
[out]edge_idsContainer to which IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc.
virtual UINT64 dcfg_api::DCFG_GRAPH_BASE::get_instr_count ( ) const
pure virtual

Get the total dynamic instruction count.

Returns
Count of instructions executed in this structure across all threads.
virtual UINT64 dcfg_api::DCFG_GRAPH_BASE::get_instr_count_for_thread ( UINT32  thread_id) const
pure virtual

Get per-thread dynamic instruction count.

Returns
Count of instructions executed in this structure on specified thread or zero (0) if thread is invalid.
Parameters
[in]thread_idThread number. Typically, threads are consecutively numbered from zero to DCFG_PROCESS::get_highest_thread_id().
virtual UINT32 dcfg_api::DCFG_GRAPH_BASE::get_internal_edge_ids ( DCFG_ID_CONTAINER edge_ids) const
pure virtual

Get list of internal edge IDs.

These are all edges such that both the source and target nodes are within the structure.

Returns
Number of IDs that were added to edge_ids.
Parameters
[out]edge_idsContainer to which IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc.
virtual UINT32 dcfg_api::DCFG_GRAPH_BASE::get_outbound_edge_ids ( DCFG_ID_CONTAINER edge_ids) const
pure virtual

Get list of out-bound edge IDs.

These are all edges such that the source node is within the structure and the target node is not within the structure. Note that this set contains all the edges that originate within the structure, including calls, interrupts, etc., not only those that are considered to "exit" the structure.

Returns
Number of IDs that were added to edge_ids.
Parameters
[out]edge_idsContainer to which edge IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc.

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