#include <Elf_X.h>
Public Member Functions | |
| void | end () |
| Elf * | e_elfp () const |
| unsigned char * | e_ident () const |
| unsigned short | e_type () const |
| unsigned short | e_machine () const |
| unsigned long | e_version () const |
| unsigned long | e_entry () const |
| unsigned long | e_phoff () const |
| unsigned long | e_shoff () const |
| unsigned long | e_flags () const |
| unsigned short | e_ehsize () const |
| unsigned short | e_phentsize () const |
| unsigned short | e_phnum () const |
| unsigned short | e_shentsize () const |
| unsigned short | e_shnum () const |
| unsigned short | e_shstrndx () const |
| const char * | e_rawfile (size_t &nbytes) const |
| Elf_X * | e_next (Elf_X *ref) |
| Elf_X * | e_rand (unsigned offset) |
| void | e_ident (unsigned char *input) |
| void | e_type (unsigned short input) |
| void | e_machine (unsigned short input) |
| void | e_version (unsigned long input) |
| void | e_entry (unsigned long input) |
| void | e_phoff (unsigned long input) |
| void | e_shoff (unsigned long input) |
| void | e_flags (unsigned long input) |
| void | e_ehsize (unsigned short input) |
| void | e_phentsize (unsigned short input) |
| void | e_phnum (unsigned short input) |
| void | e_shentsize (unsigned short input) |
| void | e_shnum (unsigned short input) |
| void | e_shstrndx (unsigned short input) |
| bool | isValid () const |
| int | wordSize () const |
| Elf_X_Phdr & | get_phdr (unsigned int i=0) |
| Elf_X_Shdr & | get_shdr (unsigned int i) |
| bool | findDebugFile (std::string origfilename, std::string &output_name, char *&output_buffer, unsigned long &output_buffer_size) |
Static Public Member Functions | |
| static Elf_X * | newElf_X (int input, Elf_Cmd cmd, Elf_X *ref=NULL, std::string name=std::string()) |
| static Elf_X * | newElf_X (char *mem_image, size_t mem_size, std::string name=std::string()) |
Protected Member Functions | |
| Elf_X () | |
| Elf_X (int input, Elf_Cmd cmd, Elf_X *ref=NULL) | |
| Elf_X (char *mem_image, size_t mem_size) | |
| ~Elf_X () | |
Protected Attributes | |
| Elf * | elf |
| Elf32_Ehdr * | ehdr32 |
| Elf64_Ehdr * | ehdr64 |
| Elf32_Phdr * | phdr32 |
| Elf64_Phdr * | phdr64 |
| int | filedes |
| bool | is64 |
| bool | isArchive |
| std::vector< Elf_X_Shdr > | shdrs |
| std::vector< Elf_X_Phdr > | phdrs |
| unsigned int | ref_count |
| std::string | filename |
| char * | cached_debug_buffer |
| unsigned long | cached_debug_size |
| std::string | cached_debug_name |
| bool | cached_debug |
Static Protected Attributes | |
| static std::map< std::pair < std::string, int >, Elf_X * > | elf_x_by_fd |
| static std::map< std::pair < std::string, char * >, Elf_X * > | elf_x_by_ptr |
Definition at line 67 of file Elf_X.h.
| Elf_X::Elf_X | ( | int | input, | |
| Elf_Cmd | cmd, | |||
| Elf_X * | ref = NULL | |||
| ) | [protected] |
| Elf_X::Elf_X | ( | char * | mem_image, | |
| size_t | mem_size | |||
| ) | [protected] |
| Elf_X::~Elf_X | ( | ) | [protected] |
Definition at line 220 of file Elf_X.C.
References elf_x_by_fd, and elf_x_by_ptr.
| void Elf_X::e_ehsize | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_ehsize | ( | ) | const |
| Elf * Elf_X::e_elfp | ( | ) | const |
Definition at line 238 of file Elf_X.C.
References elf.
Referenced by e_next(), Elf_X(), Dyninst::SymtabAPI::emitElf::emitElf(), Dyninst::SymtabAPI::emitElf64::emitElf64(), Dyninst::Dwarf::DwarfHandle::init_dbg(), and Dyninst::SymtabAPI::Archive::parseMember().
| void Elf_X::e_entry | ( | unsigned long | input | ) |
| unsigned long Elf_X::e_entry | ( | ) | const |
| void Elf_X::e_flags | ( | unsigned long | input | ) |
| unsigned long Elf_X::e_flags | ( | ) | const |
| void Elf_X::e_ident | ( | unsigned char * | input | ) |
| unsigned char * Elf_X::e_ident | ( | ) | const |
| void Elf_X::e_machine | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_machine | ( | ) | const |
Definition at line 257 of file Elf_X.C.
References ehdr32, ehdr64, and is64.
Referenced by getRelTypeByElfMachine(), Dyninst::SymElf::init(), Dyninst::Dwarf::DwarfHandle::init_dbg(), and Dyninst::SystemTapEntries::parse().
| void Elf_X::e_phentsize | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_phentsize | ( | ) | const |
| void Elf_X::e_phnum | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_phnum | ( | ) | const |
Definition at line 312 of file Elf_X.C.
References ehdr32, ehdr64, and is64.
Referenced by Elf_X(), Dyninst::SymtabAPI::Object::find_code_and_data(), Dyninst::SymElf::getInterpreterName(), Dyninst::SymElf::getSegment(), Dyninst::SymtabAPI::Object::loaded_elf(), Dyninst::SymElf::numSegments(), Dyninst::SymtabAPI::Object::Object(), and pdelf_check_ehdr().
| void Elf_X::e_phoff | ( | unsigned long | input | ) |
| unsigned long Elf_X::e_phoff | ( | ) | const |
| Elf_X * Elf_X::e_rand | ( | unsigned | offset | ) |
| const char * Elf_X::e_rawfile | ( | size_t & | nbytes | ) | const |
Definition at line 340 of file Elf_X.C.
References elf.
Referenced by Dyninst::SymElf::getInterpreterName().
| void Elf_X::e_shentsize | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_shentsize | ( | ) | const |
| void Elf_X::e_shnum | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_shnum | ( | ) | const |
Definition at line 326 of file Elf_X.C.
References ehdr32, ehdr64, and is64.
Referenced by Dyninst::SymElf::createSymCache(), Elf_X(), Dyninst::SymtabAPI::Object::get_valid_memory_areas(), Dyninst::SymElf::getContainingSymbol(), Dyninst::SymElf::getSectionByAddress(), Dyninst::SymElf::getSectionByName(), Dyninst::SymElf::getSymbolByName(), Dyninst::Dwarf::DwarfHandle::hasFrameData(), Dyninst::SymElf::init(), Dyninst::SymtabAPI::Object::loaded_elf(), Dyninst::SymtabAPI::Object::parse_all_relocations(), Dyninst::SystemTapEntries::parseAllNotes(), and pdelf_check_ehdr().
| void Elf_X::e_shoff | ( | unsigned long | input | ) |
| unsigned long Elf_X::e_shoff | ( | ) | const |
| void Elf_X::e_shstrndx | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_shstrndx | ( | ) | const |
Definition at line 333 of file Elf_X.C.
References ehdr32, ehdr64, and is64.
Referenced by Dyninst::SymElf::getSectionByName(), Dyninst::SymElf::getSectionName(), Dyninst::Dwarf::DwarfHandle::hasFrameData(), Dyninst::SymElf::init(), and pdelf_get_shnames().
| void Elf_X::e_type | ( | unsigned short | input | ) |
| unsigned short Elf_X::e_type | ( | ) | const |
Definition at line 250 of file Elf_X.C.
References ehdr32, ehdr64, and is64.
Referenced by Dyninst::SymtabAPI::Object::load_object(), Dyninst::SymtabAPI::Object::load_shared_object(), Dyninst::SymtabAPI::Object::loaded_elf(), Dyninst::SymtabAPI::Object::Object(), pdelf_check_ehdr(), and Dyninst::Elf_X_Shdr::sh_addr().
| void Elf_X::e_version | ( | unsigned long | input | ) |
| unsigned long Elf_X::e_version | ( | ) | const |
| void Elf_X::end | ( | ) |
Definition at line 201 of file Elf_X.C.
References ref_count.
Referenced by Dyninst::Dwarf::DwarfHandle::locate_dbg_file(), Dyninst::SymtabAPI::Archive::parseMember(), and Dyninst::SymElf::~SymElf().
| bool Dyninst::Elf_X::findDebugFile | ( | std::string | origfilename, | |
| std::string & | output_name, | |||
| char *& | output_buffer, | |||
| unsigned long & | output_buffer_size | |||
| ) |
Referenced by Dyninst::Dwarf::DwarfHandle::locate_dbg_file().
| Elf_X_Phdr & Elf_X::get_phdr | ( | unsigned int | i = 0 |
) |
Definition at line 457 of file Elf_X.C.
References is64, phdr32, phdr64, and phdrs.
Referenced by Dyninst::SymtabAPI::Object::find_code_and_data(), Dyninst::SymElf::getInterpreterName(), Dyninst::SymElf::getSegment(), and Dyninst::SymtabAPI::Object::loaded_elf().
| Elf_X_Shdr & Elf_X::get_shdr | ( | unsigned int | i | ) |
Definition at line 468 of file Elf_X.C.
References elf, is64, and shdrs.
Referenced by Dyninst::SymElf::createSymCache(), Dyninst::SymtabAPI::Object::get_valid_memory_areas(), Dyninst::SymElf::getContainingSymbol(), Dyninst::SymElf::getSectionAddress(), Dyninst::SymElf::getSectionByAddress(), Dyninst::SymElf::getSectionByName(), Dyninst::SymElf::getSectionName(), Dyninst::SymElf::getSymbolByName(), Dyninst::Dwarf::DwarfHandle::hasFrameData(), Dyninst::SymElf::init(), Dyninst::SymtabAPI::Object::loaded_elf(), Dyninst::SymElf::lookupCachedSymbol(), Dyninst::SystemTapEntries::parseAllNotes(), and pdelf_get_shnames().
| bool Elf_X::isValid | ( | ) | const |
Definition at line 447 of file Elf_X.C.
References ehdr32, and ehdr64.
Referenced by Dyninst::Dwarf::DwarfHandle::locate_dbg_file(), Dyninst::SymtabAPI::Object::Object(), Dyninst::SymElf::SymElf(), and Dyninst::SymElf::~SymElf().
| static Elf_X* Dyninst::Elf_X::newElf_X | ( | char * | mem_image, | |
| size_t | mem_size, | |||
| std::string | name = std::string() | |||
| ) | [static] |
| int Elf_X::wordSize | ( | ) | const |
Definition at line 452 of file Elf_X.C.
References is64.
Referenced by Dyninst::SymElf::getAddressWidth(), Dyninst::SymtabAPI::Object::load_object(), and Dyninst::SymtabAPI::Object::load_shared_object().
bool Dyninst::Elf_X::cached_debug [protected] |
char* Dyninst::Elf_X::cached_debug_buffer [protected] |
std::string Dyninst::Elf_X::cached_debug_name [protected] |
unsigned long Dyninst::Elf_X::cached_debug_size [protected] |
Elf32_Ehdr* Dyninst::Elf_X::ehdr32 [protected] |
Definition at line 120 of file Elf_X.h.
Referenced by e_ehsize(), e_entry(), e_flags(), e_ident(), e_machine(), e_phentsize(), e_phnum(), e_phoff(), e_shentsize(), e_shnum(), e_shoff(), e_shstrndx(), e_type(), e_version(), Elf_X(), and isValid().
Elf64_Ehdr* Dyninst::Elf_X::ehdr64 [protected] |
Definition at line 121 of file Elf_X.h.
Referenced by e_ehsize(), e_entry(), e_flags(), e_ident(), e_machine(), e_phentsize(), e_phnum(), e_phoff(), e_shentsize(), e_shnum(), e_shoff(), e_shstrndx(), e_type(), e_version(), Elf_X(), and isValid().
Elf* Dyninst::Elf_X::elf [protected] |
Definition at line 119 of file Elf_X.h.
Referenced by e_elfp(), e_rand(), e_rawfile(), Elf_X(), and get_shdr().
map< pair< string, int >, Elf_X * > Elf_X::elf_x_by_fd [static, protected] |
map< pair< string, char * >, Elf_X * > Elf_X::elf_x_by_ptr [static, protected] |
int Dyninst::Elf_X::filedes [protected] |
std::string Dyninst::Elf_X::filename [protected] |
bool Dyninst::Elf_X::is64 [protected] |
Definition at line 125 of file Elf_X.h.
Referenced by e_ehsize(), e_entry(), e_flags(), e_ident(), e_machine(), e_phentsize(), e_phnum(), e_phoff(), e_shentsize(), e_shnum(), e_shoff(), e_shstrndx(), e_type(), e_version(), Elf_X(), get_phdr(), get_shdr(), and wordSize().
bool Dyninst::Elf_X::isArchive [protected] |
Elf32_Phdr* Dyninst::Elf_X::phdr32 [protected] |
Definition at line 122 of file Elf_X.h.
Referenced by Elf_X(), and get_phdr().
Elf64_Phdr* Dyninst::Elf_X::phdr64 [protected] |
Definition at line 123 of file Elf_X.h.
Referenced by Elf_X(), and get_phdr().
std::vector<Elf_X_Phdr> Dyninst::Elf_X::phdrs [protected] |
Definition at line 128 of file Elf_X.h.
Referenced by Elf_X(), and get_phdr().
unsigned int Dyninst::Elf_X::ref_count [protected] |
std::vector<Elf_X_Shdr> Dyninst::Elf_X::shdrs [protected] |
Definition at line 127 of file Elf_X.h.
Referenced by Elf_X(), and get_shdr().
1.6.1