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

Interface to information about a binary image within a process. More...

#include <dcfg_api.H>

Inheritance diagram for dcfg_api::DCFG_IMAGE:
dcfg_api::DCFG_ROUTINE_CONTAINER dcfg_api::DCFG_LOOP_CONTAINER dcfg_api::DCFG_GRAPH_BASE

Public Member Functions

virtual DCFG_ID get_process_id () const =0
 Get the process ID.
 
virtual DCFG_ID get_image_id () const =0
 Get the image ID.
 
virtual const std::string * get_filename () const =0
 Get the filename of the image.
 
virtual UINT64 get_base_address () const =0
 Get base address of image.
 
virtual UINT64 get_size () const =0
 Get size of image.
 
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 image.
 
- Public Member Functions inherited from dcfg_api::DCFG_ROUTINE_CONTAINER
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.
 
- Public Member Functions inherited from dcfg_api::DCFG_LOOP_CONTAINER
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.
 
- Public Member Functions inherited from dcfg_api::DCFG_GRAPH_BASE
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

Interface to information about a binary image within a process.

Member Function Documentation

virtual UINT64 dcfg_api::DCFG_IMAGE::get_base_address ( ) const
pure virtual

Get base address of image.

Returns
Address where image was loaded into memory by O/S.
virtual UINT32 dcfg_api::DCFG_IMAGE::get_basic_block_ids_by_addr ( UINT64  addr,
DCFG_ID_CONTAINER node_ids 
) const
pure virtual

Get basic block ID(s) containing given address in this image.

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 an image uses self-modifying code (SMC) or other mechanisms that replace code regions. For most images, this will not be the case, and addresses will be unique for a given image.

Returns
Number of IDs that were added to node_ids.
Parameters
[in]addrVirtual address that can appear anywhere within a basic block.
[out]node_idsContainer 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.
virtual const std::string* dcfg_api::DCFG_IMAGE::get_filename ( ) const
pure virtual

Get the filename of the image.

Returns
Pointer to string containing full pathname of image or base name if pathname not available or NULL if no name is available.
virtual DCFG_ID dcfg_api::DCFG_IMAGE::get_image_id ( ) const
pure virtual

Get the image ID.

Returns
ID of this image.
virtual DCFG_ID dcfg_api::DCFG_IMAGE::get_process_id ( ) const
pure virtual

Get the process ID.

Returns
Process ID of this image.
virtual UINT64 dcfg_api::DCFG_IMAGE::get_size ( ) const
pure virtual

Get size of image.

Returns
Size of image as loaded into memory by O/S, in bytes.

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