LLDB mainline
|
Represents a symbol within an ELF symbol table. More...
#include <ELFHeader.h>
Public Member Functions | |
ELFSymbol () | |
unsigned char | getBinding () const |
Returns the binding attribute of the st_info member. | |
unsigned char | getType () const |
Returns the type attribute of the st_info member. | |
void | setBindingAndType (unsigned char binding, unsigned char type) |
Sets the binding and type of the st_info member. | |
bool | Parse (const lldb_private::DataExtractor &data, lldb::offset_t *offset) |
Parse an ELFSymbol entry from the given DataExtractor starting at position offset . | |
void | Dump (lldb_private::Stream *s, uint32_t idx, const lldb_private::DataExtractor *strtab_data, const lldb_private::SectionList *section_list) |
Static Public Member Functions | |
static const char * | bindingToCString (unsigned char binding) |
static const char * | typeToCString (unsigned char type) |
static const char * | sectionIndexToCString (elf_half shndx, const lldb_private::SectionList *section_list) |
Public Attributes | |
elf_addr | st_value |
Absolute or relocatable address. | |
elf_xword | st_size |
Size of the symbol or zero. | |
elf_word | st_name |
Symbol name string index. | |
unsigned char | st_info |
Symbol type and binding attributes. | |
unsigned char | st_other |
Reserved for future use. | |
elf_half | st_shndx |
Section to which this symbol applies. | |
Represents a symbol within an ELF symbol table.
Definition at line 224 of file ELFHeader.h.
ELFSymbol::ELFSymbol | ( | ) |
Definition at line 257 of file ELFHeader.cpp.
|
static |
void ELFSymbol::Dump | ( | lldb_private::Stream * | s, |
uint32_t | idx, | ||
const lldb_private::DataExtractor * | strtab_data, | ||
const lldb_private::SectionList * | section_list | ||
) |
Definition at line 314 of file ELFHeader.cpp.
References bindingToCString(), getBinding(), getType(), lldb_private::DataExtractor::PeekCStr(), lldb_private::Stream::Printf(), sectionIndexToCString(), st_info, st_name, st_other, st_shndx, st_size, st_value, and typeToCString().
|
inline |
Returns the binding attribute of the st_info member.
Definition at line 235 of file ELFHeader.h.
References st_info.
Referenced by Dump(), and ObjectFileELF::ParseSymbols().
|
inline |
Returns the type attribute of the st_info member.
Definition at line 238 of file ELFHeader.h.
References st_info.
Referenced by Dump(), and ObjectFileELF::ParseSymbols().
bool ELFSymbol::Parse | ( | const lldb_private::DataExtractor & | data, |
lldb::offset_t * | offset | ||
) |
Parse an ELFSymbol entry from the given DataExtractor starting at position offset
.
The address size of the DataExtractor determines if a 32 or 64 bit object is to be parsed.
[in] | data | The DataExtractor to read from. The address size of the extractor determines if a 32 or 64 bit object should be read. |
[in,out] | offset | Pointer to an offset in the data. On return the offset will be advanced by the number of bytes read. |
Definition at line 325 of file ELFHeader.cpp.
References lldb_private::DataExtractor::GetAddressByteSize(), GetMaxU64(), lldb_private::DataExtractor::GetU16(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU64(), lldb_private::DataExtractor::GetU8(), st_info, st_name, st_shndx, and st_value.
Referenced by ParsePLTRelocations(), and ObjectFileELF::ParseSymbols().
|
static |
Definition at line 293 of file ELFHeader.cpp.
References lldb_private::ConstString::AsCString(), ENUM_TO_CSTR, lldb_private::Section::GetName(), and lldb_private::SectionList::GetSectionAtIndex().
Referenced by Dump().
|
inline |
Sets the binding and type of the st_info member.
Definition at line 241 of file ELFHeader.h.
References st_info.
|
static |
unsigned char elf::ELFSymbol::st_info |
Symbol type and binding attributes.
Definition at line 228 of file ELFHeader.h.
Referenced by Dump(), getBinding(), getType(), Parse(), ObjectFileELF::ParseSymbols(), and setBindingAndType().
elf_word elf::ELFSymbol::st_name |
Symbol name string index.
Definition at line 227 of file ELFHeader.h.
Referenced by Dump(), Parse(), ParsePLTRelocations(), and ObjectFileELF::ParseSymbols().
unsigned char elf::ELFSymbol::st_other |
Reserved for future use.
Definition at line 229 of file ELFHeader.h.
Referenced by Dump(), and ObjectFileELF::ParseSymbols().
elf_half elf::ELFSymbol::st_shndx |
Section to which this symbol applies.
Definition at line 230 of file ELFHeader.h.
Referenced by Dump(), Parse(), and ObjectFileELF::ParseSymbols().
elf_xword elf::ELFSymbol::st_size |
Size of the symbol or zero.
Definition at line 226 of file ELFHeader.h.
Referenced by Dump(), and ObjectFileELF::ParseSymbols().
elf_addr elf::ELFSymbol::st_value |
Absolute or relocatable address.
Definition at line 225 of file ELFHeader.h.
Referenced by Dump(), Parse(), and ObjectFileELF::ParseSymbols().