Interface to information about an O/S process. More...
#include <dcfg_api.H>
Public Member Functions | |
virtual DCFG_ID | get_process_id () const =0 |
Get the process ID. | |
virtual UINT32 | get_highest_thread_id () const =0 |
Get the highest thread ID. | |
virtual UINT32 | get_basic_block_ids_by_addr (UINT64 addr, DCFG_ID_CONTAINER &node_ids) const =0 |
Get basic block ID(s) containing given address in this process. | |
virtual UINT32 | get_start_node_id () const =0 |
Get ID of start node. | |
virtual UINT32 | get_end_node_id () const =0 |
Get ID of end node. | |
virtual UINT32 | get_unknown_node_id () const =0 |
Get ID of unknown node. | |
virtual DCFG_ID | get_edge_id (DCFG_ID source_node_id, DCFG_ID target_node_id) const =0 |
Get the ID of an edge given its source and target nodes. | |
virtual UINT32 | get_successor_node_ids (DCFG_ID source_node_id, DCFG_ID_CONTAINER &node_ids) const =0 |
Get the set of target nodes that have an edge from the given source. | |
virtual UINT32 | get_predecessor_node_ids (DCFG_ID target_node_id, DCFG_ID_CONTAINER &node_ids) const =0 |
Get the set of source nodes that have an edge to the given target. | |
virtual DCFG_EDGE_CPTR | get_edge_info (DCFG_ID edge_id) const =0 |
Get access to data for an edge. | |
virtual DCFG_BASIC_BLOCK_CPTR | get_basic_block_info (DCFG_ID node_id) const =0 |
Get access to data for a basic block. | |
virtual bool | is_special_node (DCFG_ID node_id) const =0 |
Determine whether a node ID refers to any "special" (non-basic-block) node. | |
virtual bool | is_start_node (DCFG_ID node_id) const =0 |
Determine whether a node ID refers to the special non-basic-block start node. | |
virtual bool | is_end_node (DCFG_ID node_id) const =0 |
Determine whether a node ID refers to the special non-basic-block end node. | |
virtual bool | is_unknown_node (DCFG_ID node_id) const =0 |
Determine whether a node ID refers to the special non-basic-block "unknown" node. | |
![]() | |
virtual UINT32 | get_image_ids (DCFG_ID_CONTAINER &image_ids) const =0 |
Get the set of image IDs. | |
virtual DCFG_IMAGE_CPTR | get_image_info (DCFG_ID image_id) const =0 |
Get access to data for an image. | |
![]() | |
virtual UINT32 | get_routine_ids (DCFG_ID_CONTAINER &node_ids) const =0 |
Get the set of routine IDs. | |
virtual DCFG_ROUTINE_CPTR | get_routine_info (DCFG_ID routine_id) const =0 |
Get access to data for a routine. | |
![]() | |
virtual UINT32 | get_loop_ids (DCFG_ID_CONTAINER &node_ids) const =0 |
Get the set of loop IDs. | |
virtual DCFG_LOOP_CPTR | get_loop_info (DCFG_ID loop_id) const =0 |
Get access to data for a loop. | |
![]() | |
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. | |
Interface to information about an O/S process.
|
pure virtual |
Get basic block ID(s) containing given address in this process.
It is possible to get zero or more IDs returned: zero if the address appears in no basic blocks, one if it appears in exactly one block in one image, and more than one if it is not unique. Basic blocks may not be unique if a dynamically-linked process unloads one image and loads another image in an overlapping address region.
node_ids
. [in] | addr | Virtual address that can appear anywhere within a basic block. |
[out] | node_ids | Container to which basic-block 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. |
|
pure virtual |
Get access to data for a basic block.
NULL
if node_id
refers to a "special" node or is invalid. [in] | node_id | ID of desired basic block. |
|
pure virtual |
Get the ID of an edge given its source and target nodes.
[in] | source_node_id | ID number of node the edge is coming from. |
[in] | target_node_id | ID number of node the edge is going to. |
|
pure virtual |
Get access to data for an edge.
NULL
if edge_id
is invalid. [in] | edge_id | ID of desired edge. |
|
pure virtual |
Get ID of end node.
This is a "special" node that is not a basic block. It is the target node of the edge from the last basic block executed in each thread.
|
pure virtual |
Get the highest thread ID.
The lowest thread ID is zero (0). Typically, threads are consecutively numbered from zero to DCFG_PROCESS::get_highest_thread_id().
|
pure virtual |
Get the set of source nodes that have an edge to the given target.
Predecessor node sets are used in various graph algorithms.
node_ids
. [in] | target_node_id | ID number of target node. |
[out] | node_ids | Container to which source node 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. |
|
pure virtual |
Get the process ID.
|
pure virtual |
Get ID of start node.
This is a "special" node that is not a basic block. It is the source node of the edge to the first basic block executed in each thread.
|
pure virtual |
Get the set of target nodes that have an edge from the given source.
Successor node sets are used in various graph algorithms.
node_ids
. [in] | source_node_id | ID number of source node. |
[out] | node_ids | Container to which target node 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. |
|
pure virtual |
Get ID of unknown node.
This is a "special" node that is not a basic block. It is a placeholder for any section of executable code for which basic-block data cannot be obtained. An unknown node should not appear in a well-formed graph.
|
pure virtual |
Determine whether a node ID refers to the special non-basic-block end node.
true
if end node, false
otherwise. [in] | node_id | ID of node in question. |
|
pure virtual |
Determine whether a node ID refers to any "special" (non-basic-block) node.
This could be a start, end, or unknown node. If this returns false
it does not necessarily mean that the node is a basic-block; it could be that the ID is invalid.
true
if node is special, false
otherwise. [in] | node_id | ID of node in question. |
|
pure virtual |
Determine whether a node ID refers to the special non-basic-block start node.
true
if start node, false
otherwise. [in] | node_id | ID of node in question. |
|
pure virtual |
Determine whether a node ID refers to the special non-basic-block "unknown" node.
A well-formed DCFG should not have any unknown nodes.
true
if unknown node, false
otherwise. [in] | node_id | ID of node in question. |