Dyninst::AddressTranslate Class Reference

#include <addrtranslate.h>

Inheritance diagram for Dyninst::AddressTranslate:
AddressTranslateStatic Dyninst::AddressTranslateAIX Dyninst::AddressTranslateSysV Dyninst::AddressTranslateWin

Public Member Functions

virtual COMMON_EXPORT bool refresh ()=0
virtual COMMON_EXPORT ~AddressTranslate ()
COMMON_EXPORT PID getPid ()
COMMON_EXPORT bool getLibAtAddress (Address addr, LoadedLib *&lib)
COMMON_EXPORT bool getLibs (vector< LoadedLib * > &libs_)
COMMON_EXPORT bool getArchLibs (vector< LoadedLib * > &olibs)
COMMON_EXPORT LoadedLibgetLoadedLib (std::string name)
COMMON_EXPORT LoadedLibgetLoadedLib (SymReader *sym)
COMMON_EXPORT LoadedLibgetExecutable ()
virtual COMMON_EXPORT Address getLibraryTrapAddrSysV ()
void setReadAbort (bool b)

Static Public Member Functions

static COMMON_EXPORT
AddressTranslate
createAddressTranslator (PID pid_, ProcessReader *reader_=NULL, SymbolReaderFactory *symfactory_=NULL, PROC_HANDLE phand=INVALID_HANDLE_VALUE, std::string exename=std::string(""), Address interp_base=(Address)-1)
static COMMON_EXPORT
AddressTranslate
createAddressTranslator (ProcessReader *reader_=NULL, SymbolReaderFactory *symfactory_=NULL, std::string exename=std::string(""), Address interp_base=(Address)-1)

Protected Member Functions

 AddressTranslate (PID pid, PROC_HANDLE phand=INVALID_HANDLE_VALUE, std::string exename=std::string(""))

Protected Attributes

PID pid
PROC_HANDLE phandle
bool creation_error
vector< LoadedLib * > libs
std::string exec_name
LoadedLibexec
SymbolReaderFactorysymfactory
bool read_abort

Detailed Description

Definition at line 99 of file addrtranslate.h.


Constructor & Destructor Documentation

AddressTranslate::AddressTranslate ( PID  pid,
PROC_HANDLE  phand = INVALID_HANDLE_VALUE,
std::string  exename = std::string("") 
) [protected]

Definition at line 38 of file addrtranslate.C.

AddressTranslate::~AddressTranslate (  )  [virtual]

Definition at line 154 of file addrtranslate.C.

References exec, and libs.


Member Function Documentation

AddressTranslate * AddressTranslate::createAddressTranslator ( ProcessReader reader_ = NULL,
SymbolReaderFactory symfactory_ = NULL,
std::string  exename = std::string(""),
Address  interp_base = (Address) -1 
) [static]

Definition at line 216 of file addrtranslate-aix.C.

References createAddressTranslator().

AddressTranslate * AddressTranslate::createAddressTranslator ( PID  pid_,
ProcessReader reader_ = NULL,
SymbolReaderFactory symfactory_ = NULL,
PROC_HANDLE  phand = INVALID_HANDLE_VALUE,
std::string  exename = std::string(""),
Address  interp_base = (Address) -1 
) [static]
COMMON_EXPORT bool Dyninst::AddressTranslate::getArchLibs ( vector< LoadedLib * > &  olibs  ) 
LoadedLib * AddressTranslate::getExecutable (  ) 

Definition at line 168 of file addrtranslate.C.

References exec.

Referenced by Dyninst::SymtabAPI::AddressLookup::getExecutable().

bool AddressTranslate::getLibAtAddress ( Address  addr,
LoadedLib *&  lib 
)

This code sets lower_lib_index and higher_lib_index to point to the indexes in libs[] that have dynamic section addresses that are the closest to the target address.

Let's search this list in a not-stupid order. We'll check lower_lib_index and higher_lib_index first (the -1 and -2 cases). If neither of those look right, then we'll just have to walk the entire list.

Definition at line 49 of file addrtranslate.C.

References Dyninst::LoadedLib::getDynamicAddr(), Dyninst::LoadedLib::getMappedRegions(), and libs.

Referenced by Dyninst::SymtabAPI::AddressLookup::getOffset(), and Dyninst::SymtabAPI::AddressLookup::getSymbol().

Address AddressTranslate::getLibraryTrapAddrSysV (  )  [virtual]
bool AddressTranslate::getLibs ( vector< LoadedLib * > &  libs_  ) 
COMMON_EXPORT LoadedLib* Dyninst::AddressTranslate::getLoadedLib ( SymReader sym  ) 
LoadedLib * AddressTranslate::getLoadedLib ( std::string  name  ) 

Definition at line 137 of file addrtranslate.C.

References libs.

PID AddressTranslate::getPid (  ) 

Definition at line 132 of file addrtranslate.C.

References pid.

virtual COMMON_EXPORT bool Dyninst::AddressTranslate::refresh (  )  [pure virtual]
void AddressTranslate::setReadAbort ( bool  b  ) 

Definition at line 149 of file addrtranslate.C.

References read_abort.


Field Documentation

std::string Dyninst::AddressTranslate::exec_name [protected]

Definition at line 102 of file addrtranslate.h.

Referenced by Dyninst::AddressTranslateWin::refresh().

Definition at line 110 of file addrtranslate.h.

Referenced by Dyninst::AddressTranslateSysV::refresh(), and setReadAbort().


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1