Dyninst Namespace Reference

Namespaces

namespace  DataflowAPI
namespace  Dwarf
namespace  IBS
namespace  ppc32
namespace  ppc64
namespace  SymtabAPI
namespace  x86
namespace  x86_64

Data Structures

class  LoadedLib
struct  LoadedLibCmp
class  AddressTranslate
class  NodeIteratorImpl
class  NodeIteratorSet
class  NodeFromEdgeSet
class  NodeSearchIterator
class  NodeIteratorPredicateObj
class  NodeIteratorPredicateFunc
class  SerializerXML
class  SerializerBin
class  SerDes
class  SerDesXML
class  SerDesBin
class  SerFile
class  SpecAdaptor
class  SpecAdaptor< S, T * >
class  AddressTranslateAIX
class  LoadedLibAIX
class  ProcessReaderProc
class  FCNode
class  FileCache
struct  LibCmp
class  AddressTranslateSysV
class  AddressTranslateWin
class  AnnotationClassBase
class  AnnotationClass
struct  ser_rec_t
class  AnnotatableDense
class  AnnotatableSparse
class  Buffer
class  MachRegister
class  AST
class  ASTVisitor
class  Edge
class  EdgeIterator
class  EdgeIteratorImpl
class  EdgeIteratorSet
class  Graph
class  interval
class  SimpleInterval
class  IBSNode
class  IBSTree
class  Node
class  PhysicalNode
class  VirtualNode
class  NodeIterator
class  ProcessReader
class  Serializable
class  SerializerBase
class  AnnotationContainer
struct  get_first
 Functor to get the first element of a pair. Use with STL functions like transform(). More...
struct  get_second
 Functor to get the second element of a pair. Use with STL functions like transform(). More...
struct  do_to_first_ftor
 Applies a ftor to the first element of a pair. More...
struct  do_to_second_ftor
 Applies a ftor to the second element of a pair. More...
struct  Symbol_t
struct  Section_t
struct  SymSegment
class  SymReader
class  SymbolReaderFactory
struct  VariableLocation
class  Elf_X
class  Elf_X_Phdr
class  Elf_X_Shdr
class  Elf_X_Data
class  Elf_X_Versym
class  Elf_X_Verdaux
class  Elf_X_Verdef
class  Elf_X_Vernaux
class  Elf_X_Verneed
class  Elf_X_Sym
class  Elf_X_Rel
class  Elf_X_Rela
class  Elf_X_Dyn
class  Elf_X_Nhdr
struct  OperandParser
struct  x86OperandParser
struct  ppcOperandParser
class  ArgTree
class  SystemTapEntries
struct  SymCacheEntry
class  SymElf
class  SymElfFactory

Typedefs

typedef Serializable *(* ser_func_t )(void *, SerializerBase *, const char *)
typedef unsigned short AnnotationClassID
typedef bool(* anno_cmp_func_t )(void *, void *)
typedef unsigned long MachRegisterVal
typedef unsigned long Address
typedef unsigned long Offset
typedef int PID
typedef int PROC_HANDLE
typedef int LWP
typedef long THR_ID

Enumerations

enum  sparse_or_dense_anno_t { sparse, dense }
enum  ser_post_op_t { sp_add_anno = 2, sp_rem_anno = 3, sp_add_cont_item = 4, sp_rem_cont_item = 5 }
enum  Architecture {
  Arch_none = 0x00000000, Arch_x86 = 0x14000000, Arch_x86_64 = 0x18000000, Arch_ppc32 = 0x24000000,
  Arch_ppc64 = 0x28000000
}
enum  OSType {
  OSNone, Linux, FreeBSD, Windows,
  VxWorks, BlueGeneL, BlueGeneP, BlueGeneQ
}
enum  storageClass { storageUnset, storageAddr, storageReg, storageRegOffset }
enum  storageRefClass { storageRefUnset, storageRef, storageNoRef }

Functions

void COMMON_EXPORT serialize_debug_init ()
bool start_xml_elem (void *writer, const char *tag)
bool end_xml_elem (void *)
template<class S , class T >
void sd_translate (S *sd, T &it, const char *tag)
static int open_map_fd (PID pid)
bool annotation_debug_flag ()
void annotations_debug_init ()
int annotatable_printf (const char *format,...)
bool void_ptr_cmp_func (void *v1, void *v2)
bool is_input (SerializerBase *sb)
bool is_output (SerializerBase *sb)
bool serialize_annotation_list (void *id, std::vector< ser_rec_t > &sers, SerializerBase *sb, const char *tag)
bool serialize_post_annotation (void *parent, void *anno, SerializerBase *sb, AnnotationClassBase *acb, sparse_or_dense_anno_t sod, const char *tag)
bool add_annotations (SerializerBase *sb, AnnotatableSparse *an, std::vector< ser_rec_t > &sers)
bool add_annotations (SerializerBase *sb, AnnotatableDense *an, std::vector< ser_rec_t > &sers)
bool & serializer_debug_flag ()
Serializableser_func_wrapper (void *it, SerializerBase *sb, const char *tag)
int serializer_printf (const char *format,...)
const char * serPostOp2Str (ser_post_op_t s)
SerializerBasecreateSerializer (SerContextBase *scs, std::string ser_name, std::string file, ser_type_t ser_type, iomode_t mode, bool verbose)
AnnotatableSparsefind_sparse_annotatable (SerializerBase *serializer, void *id)
AnnotatableDensefind_dense_annotatable (SerializerBase *serializer, void *id)
bool isEOF (SerializerBase *sb)
void printSerErr (const SerializerError &err)
bool isOutput (SerializerBase *ser)
bool isBinary (SerializerBase *ser)
bool sb_is_input (SerializerBase *sb)
bool sb_is_output (SerializerBase *sb)
SerializerBasegetExistingOutputSB (Serializable *s)
SerializerBasegetExistingOutputSB (unsigned short ndx)
bool ser_operation (SerializerBase *sb, ser_post_op_t &op, const char *tag)
void throw_ser_err (const char *file__, unsigned int line, const char *msg)
void serialize_annotatable_id (SerializerBase *sb, void *&id, const char *tag)
bool set_sb_annotatable_sparse_map (SerializerBase *sb, AnnotatableSparse *as, void *id)
bool set_sb_annotatable_dense_map (SerializerBase *sb, AnnotatableDense *ad, void *id)
unsigned short get_serializer_index (SerializerBase *sb)
void annotation_start (SerializerBase *sb, AnnotationClassID &a_id, void *&lparent_id, sparse_or_dense_anno_t &lsod, const char *)
void annotation_end (SerializerBase *sb)
void annotation_container_start (SerializerBase *sb, void *&id)
void annotation_container_end (SerializerBase *sb)
void annotation_container_item_start (SerializerBase *sb, void *&id)
void annotation_container_item_end (SerializerBase *sb)
void vector_start (SerializerBase *sb, unsigned long &nelem, const char *tag)
void vector_end (SerializerBase *sb)
AnnotationContainerBase * get_container (void *parent_id)
bool deserialize_container_item (AnnotationContainerBase *acb, SerializerBase *sb)
bool deserialize_container_item (SerializerBase *sb, void *parent_id)
bool write_xml_elem (void *, const char *, const char *,...)
bool start_xml_elem (SerDesXML &s, const char *tag)
bool end_xml_elem (SerDesXML &s)
bool ifxml_start_element (SerializerBase *sb, const char *tag)
COMMON_EXPORT bool ifxml_end_element (SerializerBase *sb, const char *)
COMMON_EXPORT unsigned addrHashCommon (const Address &addr)
COMMON_EXPORT unsigned addrHash (const Address &iaddr)
COMMON_EXPORT unsigned ptrHash (const void *iaddr)
COMMON_EXPORT unsigned ptrHash (void *iaddr)
COMMON_EXPORT unsigned addrHash4 (const Address &iaddr)
COMMON_EXPORT unsigned addrHash16 (const Address &iaddr)
unsigned stringhash (const std::string &s)
std::string itos (int in)
std::string utos (unsigned in)
bool pattern_match (const char *p, const char *s, bool checkCase)
bool wildcardEquiv (const std::string &us, const std::string &them, bool checkCase)
const char * platform_string ()
map< string, SymElf * > * getSymelfCache ()
int newAnnotationClass ()
COMMON_EXPORT bool isSegmentRegister (int regClass)
COMMON_EXPORT unsigned getArchAddressWidth (Dyninst::Architecture arch)
 DEF_REGISTER (InvalidReg, 0|Arch_none,"abstract")
 DEF_REGISTER (FrameBase, 1|Arch_none,"abstract")
 DEF_REGISTER (ReturnAddr, 2|Arch_none,"abstract")
 DEF_REGISTER (StackTop, 3|Arch_none,"abstract")
 DEF_REGISTER (CFA, 4|Arch_none,"abstract")
int ThrIDToTid (Dyninst::THR_ID id)
template<typename Functor >
do_to_first_ftor< Functor > do_to_first (const Functor &f)
 Type-inferring adapter function for do_to_first_ftor.
template<typename Functor >
do_to_second_ftor< Functor > do_to_second (const Functor &f)
 Type-inferring adapter function for do_to_second_ftor.
COMMON_EXPORT const char * storageClass2Str (storageClass sc)
COMMON_EXPORT const char * storageRefClass2Str (storageRefClass sc)

Variables

FileCache files
bool dyn_debug_annotations = false
COMMON_EXPORT int AnnotationClass_nextId
bool dyn_debug_serializer = false

Detailed Description

Templape class for Interval Binary Search Tree. The implementation is based on a red-black tree (derived from our codeRange implementation) to control the tree height and thus insertion and search cost.

Unlike our codeRangeTree, this data structure can represent overlapping intervals. It is useful for executing stabbing queries and more generally for finding invervals that overlap a particular interval. A stabbing query requires O(log(N) + L) time in the worst case, where L is the number of overlapping intervals, and insertion requires O(log^2(N)) time (compare to O(log(N)) for a standard RB-tree).

This class requires a worst case storage O(N log(N))

For more information:

{Hanson90theibs-tree:, author = {Eric N. Hanson and Moez Chaabouni}, title = {The IBS-tree: A data structure for finding all intervals that overlap a point}, institution = {}, year = {1990} } EXTREMELY IMPORTANT XXX: Assuming that all intervals have lower bound predicate <= and upper bound predicate > ; that is, intervals are [a,b)

This file contains some utility functions for dealing with the STL. In particular, this mostly contains functors and adaptors for dealing with std::pair inside STL algorithms.


Typedef Documentation

typedef unsigned long Dyninst::Address

Definition at line 113 of file dyntypes.h.

typedef bool(* Dyninst::anno_cmp_func_t)(void *, void *)

Definition at line 66 of file Annotatable.h.

typedef unsigned short Dyninst::AnnotationClassID

Definition at line 65 of file Annotatable.h.

typedef int Dyninst::LWP

Definition at line 130 of file dyntypes.h.

typedef unsigned long Dyninst::MachRegisterVal

Definition at line 45 of file dyn_regs.h.

typedef unsigned long Dyninst::Offset

Definition at line 114 of file dyntypes.h.

typedef int Dyninst::PID

Definition at line 128 of file dyntypes.h.

typedef int Dyninst::PROC_HANDLE

Definition at line 129 of file dyntypes.h.

typedef Serializable*(* Dyninst::ser_func_t)(void *, SerializerBase *, const char *)

Definition at line 55 of file Annotatable.h.

typedef long Dyninst::THR_ID

Definition at line 131 of file dyntypes.h.


Enumeration Type Documentation

Enumerator:
Arch_none 
Arch_x86 
Arch_x86_64 
Arch_ppc32 
Arch_ppc64 

Definition at line 48 of file dyn_regs.h.

Enumerator:
OSNone 
Linux 
FreeBSD 
Windows 
VxWorks 
BlueGeneL 
BlueGeneP 
BlueGeneQ 

Definition at line 146 of file dyntypes.h.

Enumerator:
sp_add_anno 
sp_rem_anno 
sp_add_cont_item 
sp_rem_cont_item 

Definition at line 165 of file Annotatable.h.

Enumerator:
sparse 
dense 

Definition at line 153 of file Annotatable.h.

Enumerator:
storageUnset 
storageAddr 
storageReg 
storageRegOffset 

Definition at line 48 of file VariableLocation.h.

Enumerator:
storageRefUnset 
storageRef 
storageNoRef 

Definition at line 63 of file VariableLocation.h.


Function Documentation

COMMON_EXPORT bool Dyninst::add_annotations ( SerializerBase *  sb,
AnnotatableDense *  an,
std::vector< ser_rec_t > &  sers 
)
COMMON_EXPORT bool Dyninst::add_annotations ( SerializerBase *  sb,
AnnotatableSparse *  an,
std::vector< ser_rec_t > &  sers 
)
COMMON_EXPORT unsigned Dyninst::addrHash ( const Address iaddr  ) 
COMMON_EXPORT unsigned Dyninst::addrHash16 ( const Address iaddr  ) 
COMMON_EXPORT unsigned Dyninst::addrHash4 ( const Address iaddr  ) 
COMMON_EXPORT unsigned Dyninst::addrHashCommon ( const Address addr  ) 
COMMON_EXPORT int Dyninst::annotatable_printf ( const char *  format,
  ... 
)
void Dyninst::annotation_container_end ( SerializerBase sb  ) 

Definition at line 2127 of file serialize-bin.C.

void Dyninst::annotation_container_item_end ( SerializerBase sb  ) 

Definition at line 2137 of file serialize-bin.C.

void Dyninst::annotation_container_item_start ( SerializerBase sb,
void *&  id 
)

Definition at line 2132 of file serialize-bin.C.

void Dyninst::annotation_container_start ( SerializerBase sb,
void *&  id 
)

Definition at line 2122 of file serialize-bin.C.

COMMON_EXPORT bool Dyninst::annotation_debug_flag (  ) 
void Dyninst::annotation_end ( SerializerBase sb  ) 

Definition at line 2117 of file serialize-bin.C.

void Dyninst::annotation_start ( SerializerBase sb,
AnnotationClassID &  a_id,
void *&  lparent_id,
sparse_or_dense_anno_t lsod,
const char *   
)

Definition at line 2109 of file serialize-bin.C.

References FILE__, and serialize_printf.

void Dyninst::annotations_debug_init (  ) 

Definition at line 73 of file Annotatable.C.

References dyn_debug_annotations, and fprintf.

Referenced by Dyninst::AnnotationClassBase::AnnotationClassBase().

SerializerBase* Dyninst::createSerializer ( SerContextBase *  scs,
std::string  ser_name,
std::string  file,
ser_type_t  ser_type,
iomode_t  mode,
bool  verbose 
)

Definition at line 363 of file serialize-bin.C.

References FILE__, fprintf, and serialize_printf.

Dyninst::DEF_REGISTER ( CFA  ,
4|  Arch_none,
"abstract"   
)
Dyninst::DEF_REGISTER ( StackTop  ,
3|  Arch_none,
"abstract"   
)
Dyninst::DEF_REGISTER ( ReturnAddr  ,
2|  Arch_none,
"abstract"   
)
Dyninst::DEF_REGISTER ( FrameBase  ,
1|  Arch_none,
"abstract"   
)
Dyninst::DEF_REGISTER ( InvalidReg  ,
0|  Arch_none,
"abstract"   
)

For interpreting constants: Lowest 16 bits (0x000000ff) is base register ID Next 16 bits (0x0000ff00) is the aliasing and subrange ID- used on x86/x86_64 to distinguish between things like EAX and AH Next 16 bits (0x00ff0000) are the register category, GPR/FPR/MMX/... Top 16 bits (0xff000000) are the architecture.

These values/layout are not guaranteed to remain the same as part of the public interface, and may change.

bool Dyninst::deserialize_container_item ( SerializerBase sb,
void *  parent_id 
)

Definition at line 2173 of file serialize-bin.C.

References FILE__, and fprintf.

bool Dyninst::deserialize_container_item ( AnnotationContainerBase *  acb,
SerializerBase sb 
)

Definition at line 2163 of file serialize-bin.C.

References FILE__, and fprintf.

template<typename Functor >
do_to_first_ftor<Functor> Dyninst::do_to_first ( const Functor &  f  )  [inline]

Type-inferring adapter function for do_to_first_ftor.

Definition at line 71 of file stl_utils.h.

template<typename Functor >
do_to_second_ftor<Functor> Dyninst::do_to_second ( const Functor &  f  )  [inline]

Type-inferring adapter function for do_to_second_ftor.

Definition at line 88 of file stl_utils.h.

bool Dyninst::end_xml_elem ( SerDesXML &  s  ) 

Definition at line 247 of file serialize-xml.C.

References end_xml_elem(), and Dyninst::SerDesXML::writer.

bool Dyninst::end_xml_elem ( void *   ) 

Definition at line 228 of file serialize-xml.C.

References FILE__, and fprintf.

Referenced by end_xml_elem(), and ifxml_end_element().

AnnotatableDense* Dyninst::find_dense_annotatable ( SerializerBase serializer,
void *  id 
)

Definition at line 541 of file serialize-bin.C.

AnnotatableSparse* Dyninst::find_sparse_annotatable ( SerializerBase serializer,
void *  id 
)

Definition at line 535 of file serialize-bin.C.

AnnotationContainerBase* Dyninst::get_container ( void *  parent_id  ) 

Definition at line 2152 of file serialize-bin.C.

References FILE__, and fprintf.

COMMON_EXPORT unsigned short Dyninst::get_serializer_index ( SerializerBase *  sb  ) 
unsigned Dyninst::getArchAddressWidth ( Dyninst::Architecture  arch  ) 
COMMON_EXPORT SerializerBase * Dyninst::getExistingOutputSB ( unsigned short  ndx  ) 
SerializerBase* Dyninst::getExistingOutputSB ( Serializable s  ) 
map< string, SymElf * > * Dyninst::getSymelfCache (  ) 
COMMON_EXPORT bool Dyninst::ifxml_end_element ( SerializerBase *  sb,
const char *   
)
bool Dyninst::ifxml_start_element ( SerializerBase *  sb,
const char *  tag 
)
COMMON_EXPORT bool Dyninst::is_input ( SerializerBase *  sb  ) 
COMMON_EXPORT bool Dyninst::is_output ( SerializerBase *  sb  ) 
bool Dyninst::isBinary ( SerializerBase ser  ) 

Definition at line 616 of file serialize-bin.C.

bool Dyninst::isEOF ( SerializerBase sb  ) 

Definition at line 547 of file serialize-bin.C.

References FILE__, and fprintf.

bool Dyninst::isOutput ( SerializerBase ser  ) 

Definition at line 611 of file serialize-bin.C.

COMMON_EXPORT bool Dyninst::isSegmentRegister ( int  regClass  ) 

Definition at line 274 of file dyn_regs.C.

References Dyninst::x86::SEG.

COMMON_EXPORT std::string Dyninst::itos ( int  in  ) 
int Dyninst::newAnnotationClass (  ) 
static int Dyninst::open_map_fd ( PID  pid  )  [static]

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

References P_open().

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

bool pattern_match ( const char *  p,
const char *  s,
bool  checkCase 
)

Definition at line 124 of file util.C.

References MULTIPLE_WILDCARD_CHAR, and WILDCARD_CHAR.

Referenced by pattern_match(), and regexEquiv().

const char * Dyninst::platform_string (  ) 
void Dyninst::printSerErr ( const SerializerError &  err  ) 

Definition at line 604 of file serialize-bin.C.

References fprintf.

COMMON_EXPORT unsigned Dyninst::ptrHash ( void *  iaddr  ) 
COMMON_EXPORT unsigned Dyninst::ptrHash ( const void *  iaddr  ) 
bool Dyninst::sb_is_input ( SerializerBase sb  ) 

Definition at line 696 of file serialize-bin.C.

bool Dyninst::sb_is_output ( SerializerBase sb  ) 

Definition at line 701 of file serialize-bin.C.

template<class S , class T >
void Dyninst::sd_translate ( S *  sd,
T &  it,
const char *  tag 
) [inline]

Definition at line 658 of file serialize.h.

References FILE__, and fprintf.

COMMON_EXPORT Serializable * Dyninst::ser_func_wrapper ( void *  it,
SerializerBase *  sb,
const char *  tag 
)
COMMON_EXPORT bool Dyninst::ser_operation ( SerializerBase *  sb,
ser_post_op_t &  op,
const char *  tag 
)
void Dyninst::serialize_annotatable_id ( SerializerBase sb,
void *&  id,
const char *  tag 
)

Definition at line 1816 of file serialize-bin.C.

COMMON_EXPORT bool Dyninst::serialize_annotation_list ( void *  id,
std::vector< ser_rec_t > &  sers,
SerializerBase *  sb,
const char *  tag 
)
void Dyninst::serialize_debug_init (  ) 

Definition at line 86 of file serialize-bin.C.

References dyn_debug_serializer, and fprintf.

Referenced by Dyninst::SerFile::SerFile().

COMMON_EXPORT bool Dyninst::serialize_post_annotation ( void *  parent,
void *  anno,
SerializerBase *  sb,
AnnotationClassBase *  acb,
sparse_or_dense_anno_t  sod,
const char *  tag 
)
bool& Dyninst::serializer_debug_flag (  ) 

Definition at line 69 of file serialize-bin.C.

References dyn_debug_serializer.

COMMON_EXPORT int Dyninst::serializer_printf ( const char *  format,
  ... 
)
COMMON_EXPORT const char * Dyninst::serPostOp2Str ( ser_post_op_t  s  ) 
bool Dyninst::set_sb_annotatable_dense_map ( SerializerBase sb,
AnnotatableDense ad,
void *  id 
)

Definition at line 1829 of file serialize-bin.C.

bool Dyninst::set_sb_annotatable_sparse_map ( SerializerBase sb,
AnnotatableSparse as,
void *  id 
)

Definition at line 1823 of file serialize-bin.C.

bool Dyninst::start_xml_elem ( SerDesXML &  s,
const char *  tag 
)

Definition at line 243 of file serialize-xml.C.

References start_xml_elem(), and Dyninst::SerDesXML::writer.

bool Dyninst::start_xml_elem ( void *  writer,
const char *  tag 
)

Definition at line 222 of file serialize-xml.C.

References FILE__, and fprintf.

Referenced by ifxml_start_element(), and start_xml_elem().

const char * Dyninst::storageClass2Str ( Dyninst::storageClass  sc  ) 
const char * Dyninst::storageRefClass2Str ( Dyninst::storageRefClass  sc  ) 
COMMON_EXPORT unsigned Dyninst::stringhash ( const std::string &  s  ) 
int Dyninst::ThrIDToTid ( Dyninst::THR_ID  id  ) 

Definition at line 66 of file Types.C.

void Dyninst::throw_ser_err ( const char *  file__,
unsigned int  line,
const char *  msg 
)

Definition at line 1812 of file serialize-bin.C.

COMMON_EXPORT std::string Dyninst::utos ( unsigned  in  ) 
void Dyninst::vector_end ( SerializerBase sb  ) 

Definition at line 2147 of file serialize-bin.C.

void Dyninst::vector_start ( SerializerBase sb,
unsigned long &  nelem,
const char *  tag 
)

Definition at line 2142 of file serialize-bin.C.

bool Dyninst::void_ptr_cmp_func ( void *  v1,
void *  v2 
)
COMMON_EXPORT bool Dyninst::wildcardEquiv ( const std::string &  us,
const std::string &  them,
bool  checkCase 
)
bool Dyninst::write_xml_elem ( void *  ,
const char *  ,
const char *  ,
  ... 
)

Definition at line 234 of file serialize-xml.C.

References FILE__, and fprintf.


Variable Documentation

Definition at line 112 of file Annotatable.C.

Definition at line 67 of file Annotatable.C.

Referenced by annotations_debug_init().

Definition at line 68 of file serialize-bin.C.

Referenced by serialize_debug_init(), and serializer_debug_flag().

Definition at line 70 of file addrtranslate-sysv.C.

Referenced by Dyninst::AddressTranslateSysV::setInterpreter().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1