summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-02-18 11:12:18 +0000
committerTamas Berghammer <tberghammer@google.com>2016-02-18 11:12:18 +0000
commit6b63b148512a6bff3fb4b943d11923f41b696467 (patch)
tree69953784c824e1761e2dae1509ed1a51f93f6345 /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
parenta6560ebe4c4bc540d6eb8cbfd60fe0788194c90c (diff)
downloadbcm5719-llvm-6b63b148512a6bff3fb4b943d11923f41b696467.tar.gz
bcm5719-llvm-6b63b148512a6bff3fb4b943d11923f41b696467.zip
Improve the handling of missing elf symtab and missing symbol sizes
* Generate artificial symbol names from eh_fame during symbol parsing so these symbols are already present when we calcualte the size of the symbols where 0 is specified. * Fix symbol size calculation for the last symbol in the file where it have to last until the end of the parent section. This is the re-commit of the original change after fixing some test failures on OSX. Differential revision: http://reviews.llvm.org/D16996 llvm-svn: 261205
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 5d4c2178211..0b86403354a 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -4518,7 +4518,6 @@ ObjectFileMachO::ParseSymtab ()
if (function_starts_count > 0)
{
- char synthetic_function_symbol[PATH_MAX];
uint32_t num_synthetic_function_symbols = 0;
for (i=0; i<function_starts_count; ++i)
{
@@ -4533,7 +4532,6 @@ ObjectFileMachO::ParseSymtab ()
num_syms = sym_idx + num_synthetic_function_symbols;
sym = symtab->Resize (num_syms);
}
- uint32_t synthetic_function_symbol_idx = 0;
for (i=0; i<function_starts_count; ++i)
{
const FunctionStarts::Entry *func_start_entry = function_starts.GetEntryAtIndex (i);
@@ -4568,13 +4566,8 @@ ObjectFileMachO::ParseSymtab ()
{
symbol_byte_size = section_end_file_addr - symbol_file_addr;
}
- snprintf (synthetic_function_symbol,
- sizeof(synthetic_function_symbol),
- "___lldb_unnamed_function%u$$%s",
- ++synthetic_function_symbol_idx,
- module_sp->GetFileSpec().GetFilename().GetCString());
sym[sym_idx].SetID (synthetic_sym_id++);
- sym[sym_idx].GetMangled().SetDemangledName(ConstString(synthetic_function_symbol));
+ sym[sym_idx].GetMangled().SetDemangledName(GetNextSyntheticSymbolName());
sym[sym_idx].SetType (eSymbolTypeCode);
sym[sym_idx].SetIsSynthetic (true);
sym[sym_idx].GetAddressRef() = symbol_addr;
OpenPOWER on IntegriCloud