Unconditionally accept symbol sizes from elf
The ELF symbol table always contain the size of the symbols so we don't have to try to guess them based on the address of the next symbol (it is needed for mach-o). The change fixes an issue when a symbol is removed after a 0 size symbol (e.g. because the second one is not public) what previously caused the symbol lookup algorithm to end up with showing the 0 size symbol even for the later addresses (what are not part of any symbol). That symbol lookup error can confuse the user and also confuses the current stack unwinder. Differential revision: http://reviews.llvm.org/D16186 llvm-svn: 258040
This commit is contained in:
@@ -2295,7 +2295,7 @@ ObjectFileELF::ParseSymbols (Symtab *symtab,
|
||||
symbol_section_sp, // Section in which this symbol is defined or null.
|
||||
symbol_value, // Offset in section or symbol value.
|
||||
symbol.st_size), // Size in bytes of this symbol.
|
||||
symbol.st_size != 0, // Size is valid if it is not 0
|
||||
true, // Symbol size is valid
|
||||
has_suffix, // Contains linker annotations?
|
||||
flags); // Symbol flags.
|
||||
symtab->AddSymbol(dc_symbol);
|
||||
@@ -2304,7 +2304,9 @@ ObjectFileELF::ParseSymbols (Symtab *symtab,
|
||||
}
|
||||
|
||||
unsigned
|
||||
ObjectFileELF::ParseSymbolTable(Symtab *symbol_table, user_id_t start_id, lldb_private::Section *symtab)
|
||||
ObjectFileELF::ParseSymbolTable(Symtab *symbol_table,
|
||||
user_id_t start_id,
|
||||
lldb_private::Section *symtab)
|
||||
{
|
||||
if (symtab->GetObjectFile() != this)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user