#include <Archive.h>
Public Types | |
| typedef dyn_hash_map< void *, void *, void_ptr_hasher > | annos_by_type_t |
| typedef std::vector < annos_by_type_t * > | annos_t |
Public Member Functions | |
| ~Archive () | |
| bool | getMember (Symtab *&img, string &member_name) |
| bool | getMemberByOffset (Symtab *&img, Offset memberOffset) |
| bool | getMemberByGlobalSymbol (Symtab *&img, string &symbol_name) |
| bool | getAllMembers (vector< Symtab * > &members) |
| bool | isMemberInArchive (string &member_name) |
| bool | findMemberWithDefinition (Symtab *&obj, string &name) |
| std::string | name () |
| bool | getMembersBySymbol (string name, std::vector< Symtab * > &matches) |
| template<class T > | |
| AN_INLINE bool | addAnnotation (const T *a, AnnotationClass< T > &a_id) |
| bool | operator== (AnnotatableSparse &cmp) |
| template<class T > | |
| AN_INLINE bool | getAnnotation (T *&a, AnnotationClass< T > &a_id) const |
| template<class T > | |
| bool | removeAnnotation (AnnotationClass< T > &a_id) |
| void | serializeAnnotations (SerializerBase *sb, const char *) |
| void | annotationsReport () |
Static Public Member Functions | |
| static bool | openArchive (Archive *&img, string filename) |
| static bool | openArchive (Archive *&img, char *mem_image, size_t image_size) |
| static SymtabError | getLastError () |
| static string | printError (SymtabError err) |
Private Member Functions | |
| Archive (string &filename, bool &err) | |
| Archive (char *mem_image, size_t image_size, bool &err) | |
| bool | parseMember (Symtab *&img, ArchiveMember *member) |
| bool | parseSymbolTable () |
Private Attributes | |
| MappedFile * | mf |
| void * | basePtr |
| dyn_hash_map< string, ArchiveMember * > | membersByName |
| dyn_hash_map< Offset, ArchiveMember * > | membersByOffset |
| std::multimap< string, ArchiveMember * > | membersBySymbol |
| bool | symbolTableParsed |
Static Private Attributes | |
| static vector< Archive * > | allArchives |
| static SymtabError | serr |
| static std::string | errMsg |
Definition at line 74 of file Archive.h.
typedef dyn_hash_map<void *, void *, void_ptr_hasher> Dyninst::AnnotatableSparse::annos_by_type_t [inherited] |
Definition at line 505 of file Annotatable.h.
typedef std::vector<annos_by_type_t *> Dyninst::AnnotatableSparse::annos_t [inherited] |
Definition at line 508 of file Annotatable.h.
| Archive::~Archive | ( | ) |
Definition at line 297 of file Archive.C.
References allArchives, MappedFile::closeMappedFile(), membersByName, and mf.
| Dyninst::SymtabAPI::Archive::Archive | ( | string & | filename, | |
| bool & | err | |||
| ) | [private] |
Referenced by openArchive().
| Archive::Archive | ( | char * | mem_image, | |
| size_t | image_size, | |||
| bool & | err | |||
| ) | [private] |
Definition at line 97 of file Archive-elf.C.
References errMsg, Dyninst::SymtabAPI::Obj_Parsing, and serr.
| AN_INLINE bool Dyninst::AnnotatableSparse::addAnnotation | ( | const T * | a, | |
| AnnotationClass< T > & | a_id | |||
| ) | [inline, inherited] |
Definition at line 754 of file Annotatable.h.
References Dyninst::annotatable_printf(), FILE__, fprintf, Dyninst::getExistingOutputSB(), Dyninst::AnnotationClassBase::getID(), Dyninst::AnnotationClassBase::getName(), Dyninst::AnnotationClassBase::getSerializeFunc(), Dyninst::ser_operation(), Dyninst::serialize_post_annotation(), Dyninst::sp_add_anno, and Dyninst::sparse.
Referenced by Dyninst::SymtabAPI::parseStabString().
| void Dyninst::AnnotatableSparse::annotationsReport | ( | ) | [inline, inherited] |
Definition at line 932 of file Annotatable.h.
References FILE__, Dyninst::AnnotationClassBase::findAnnotationClass(), fprintf, and getTypeName().
| bool Dyninst::SymtabAPI::Archive::findMemberWithDefinition | ( | Symtab *& | obj, | |
| string & | name | |||
| ) |
| bool Archive::getAllMembers | ( | vector< Symtab * > & | members | ) |
Definition at line 243 of file Archive.C.
References membersByName, and parseMember().
| AN_INLINE bool Dyninst::AnnotatableSparse::getAnnotation | ( | T *& | a, | |
| AnnotationClass< T > & | a_id | |||
| ) | const [inline, inherited] |
Definition at line 818 of file Annotatable.h.
Referenced by Dyninst::SymtabAPI::Function::addLocalVar(), Dyninst::SymtabAPI::Function::addParam(), Dyninst::SymtabAPI::Symtab::addUserRegion(), Dyninst::SymtabAPI::Symtab::addUserType(), Dyninst::SymtabAPI::Function::findLocalVariable(), Dyninst::SymtabAPI::Symtab::getAllNewRegions(), Dyninst::SymtabAPI::Function::getLocalVariables(), Dyninst::SymtabAPI::Function::getParams(), Dyninst::SymtabAPI::Symbol::getVersionFileName(), Dyninst::SymtabAPI::Symbol::getVersions(), Dyninst::SymtabAPI::parseStabString(), Dyninst::SymtabAPI::Function::setupParams(), Dyninst::SymtabAPI::Symbol::setVersionFileName(), Dyninst::SymtabAPI::Symbol::setVersions(), Dyninst::SymtabAPI::Function::~Function(), Dyninst::SymtabAPI::Symbol::~Symbol(), and Dyninst::SymtabAPI::Symtab::~Symtab().
| SymtabError Archive::getLastError | ( | ) | [static] |
| bool Archive::getMember | ( | Symtab *& | img, | |
| string & | member_name | |||
| ) |
Definition at line 143 of file Archive.C.
References errMsg, MEMBER_DNE, membersByName, Dyninst::SymtabAPI::No_Such_Member, parseMember(), and serr.
| bool Archive::getMemberByGlobalSymbol | ( | Symtab *& | img, | |
| string & | symbol_name | |||
| ) |
Definition at line 183 of file Archive.C.
References Dyninst::SymtabAPI::Duplicate_Symbol, errMsg, Dyninst::SymtabAPI::ArchiveMember::getSymtab(), MEMBER_DNE, membersBySymbol, Dyninst::SymtabAPI::No_Such_Member, parseMember(), parseSymbolTable(), serr, and symbolTableParsed.
Definition at line 163 of file Archive.C.
References errMsg, MEMBER_DNE, membersByOffset, Dyninst::SymtabAPI::No_Such_Member, parseMember(), and serr.
| bool Dyninst::SymtabAPI::Archive::getMembersBySymbol | ( | string | name, | |
| std::vector< Symtab * > & | matches | |||
| ) |
| bool Dyninst::SymtabAPI::Archive::isMemberInArchive | ( | string & | member_name | ) |
| std::string Archive::name | ( | ) |
Definition at line 84 of file Archive.C.
References MappedFile::filename(), and mf.
Referenced by Dyninst::SymtabAPI::emitElfStatic::resolveSymbols().
| bool Archive::openArchive | ( | Archive *& | img, | |
| char * | mem_image, | |||
| size_t | image_size | |||
| ) | [static] |
Definition at line 116 of file Archive.C.
References allArchives, and Archive().
| static bool Dyninst::SymtabAPI::Archive::openArchive | ( | Archive *& | img, | |
| string | filename | |||
| ) | [static] |
| bool Dyninst::AnnotatableSparse::operator== | ( | AnnotatableSparse & | cmp | ) | [inline, inherited] |
Definition at line 668 of file Annotatable.h.
References FILE__, Dyninst::AnnotationClassBase::findAnnotationClass(), fprintf, Dyninst::AnnotatableSparse::getAnnos(), and Dyninst::AnnotationClassBase::getCmpFunc().
| bool Archive::parseMember | ( | Symtab *& | img, | |
| ArchiveMember * | member | |||
| ) | [private] |
This method is architecture specific
Post-condition: sets serr and errMsg if there is an error sets Symtab field of passed ArchiveMember
Definition at line 105 of file Archive-elf.C.
References basePtr, Dyninst::Elf_X::e_elfp(), Dyninst::Elf_X::end(), errMsg, Dyninst::SymtabAPI::ArchiveMember::getName(), Dyninst::SymtabAPI::ArchiveMember::getOffset(), Dyninst::SymtabAPI::Symtab::member_name_, Dyninst::SymtabAPI::Symtab::member_offset_, Dyninst::SymtabAPI::Obj_Parsing, Dyninst::SymtabAPI::Symtab::openFile(), Dyninst::SymtabAPI::Symtab::parentArchive_, serr, and Dyninst::SymtabAPI::ArchiveMember::setSymtab().
Referenced by getAllMembers(), getMember(), getMemberByGlobalSymbol(), and getMemberByOffset().
| bool Archive::parseSymbolTable | ( | ) | [private] |
This method is architecture specific
Post-condition: sets serr and errMsg if there is an error
Definition at line 152 of file Archive-elf.C.
References basePtr, errMsg, membersByOffset, membersBySymbol, Dyninst::SymtabAPI::Obj_Parsing, serr, and symbolTableParsed.
Referenced by getMemberByGlobalSymbol().
| std::string Archive::printError | ( | SymtabError | err | ) | [static] |
Definition at line 66 of file Archive.C.
References DUPLICATE_SYM, Dyninst::SymtabAPI::Duplicate_Symbol, errMsg, NO_MEMBER, Dyninst::SymtabAPI::No_Such_Member, Dyninst::SymtabAPI::Not_A_File, Dyninst::SymtabAPI::Not_An_Archive, NOT_ARCHIVE, Dyninst::SymtabAPI::Obj_Parsing, PARSE_FAILURE, and UNKNOWN_ERR.
| bool Dyninst::AnnotatableSparse::removeAnnotation | ( | AnnotationClass< T > & | a_id | ) | [inline, inherited] |
Definition at line 843 of file Annotatable.h.
References Dyninst::annotation_debug_flag(), FILE__, fprintf, Dyninst::AnnotationClassBase::getID(), and Dyninst::AnnotationClassBase::getName().
Referenced by Dyninst::SymtabAPI::Function::~Function(), and Dyninst::SymtabAPI::Symbol::~Symbol().
| void Dyninst::AnnotatableSparse::serializeAnnotations | ( | SerializerBase * | sb, | |
| const char * | ||||
| ) | [inline, inherited] |
Definition at line 869 of file Annotatable.h.
References Dyninst::ser_rec_t::acb, Dyninst::add_annotations(), Dyninst::ser_rec_t::data, FILE__, Dyninst::AnnotationClassBase::findAnnotationClass(), fprintf, Dyninst::get_serializer_index(), Dyninst::AnnotationClassBase::getSerializeFunc(), Dyninst::is_input(), Dyninst::is_output(), Dyninst::ser_rec_t::parent_id, Dyninst::serialize_annotation_list(), Dyninst::ser_rec_t::sod, and Dyninst::sparse.
std::vector< Archive * > Archive::allArchives [static, private] |
Definition at line 129 of file Archive.h.
Referenced by openArchive(), and ~Archive().
void* Dyninst::SymtabAPI::Archive::basePtr [private] |
Definition at line 118 of file Archive.h.
Referenced by parseMember(), and parseSymbolTable().
std::string Archive::errMsg [static, private] |
Definition at line 132 of file Archive.h.
Referenced by Archive(), getMember(), getMemberByGlobalSymbol(), getMemberByOffset(), parseMember(), parseSymbolTable(), and printError().
dyn_hash_map<string, ArchiveMember *> Dyninst::SymtabAPI::Archive::membersByName [private] |
Definition at line 120 of file Archive.h.
Referenced by getAllMembers(), getMember(), and ~Archive().
dyn_hash_map<Offset, ArchiveMember *> Dyninst::SymtabAPI::Archive::membersByOffset [private] |
Definition at line 121 of file Archive.h.
Referenced by getMemberByOffset(), and parseSymbolTable().
std::multimap<string, ArchiveMember *> Dyninst::SymtabAPI::Archive::membersBySymbol [private] |
Definition at line 122 of file Archive.h.
Referenced by getMemberByGlobalSymbol(), and parseSymbolTable().
MappedFile* Dyninst::SymtabAPI::Archive::mf [private] |
Definition at line 113 of file Archive.h.
Referenced by name(), and ~Archive().
SymtabError Archive::serr [static, private] |
Definition at line 131 of file Archive.h.
Referenced by Archive(), getLastError(), getMember(), getMemberByGlobalSymbol(), getMemberByOffset(), parseMember(), and parseSymbolTable().
bool Dyninst::SymtabAPI::Archive::symbolTableParsed [private] |
Definition at line 125 of file Archive.h.
Referenced by getMemberByGlobalSymbol(), and parseSymbolTable().
1.6.1