[Lldb-commits] [PATCH] D16996: Improve the handling of missing elf symtab and missing symbol sizes
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 8 11:42:09 PST 2016
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
Make sure we use a consistent naming scheme for symbols that don't have names between all ObjectFile subclasses.
================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2929
@@ +2928,3 @@
+ symbol_id, // Symbol table index.
+ "???", // Symbol name.
+ false, // Is the symbol name mangled?
----------------
Use the same naming convention as ObjectFileMachO for these unnamed symbols:
Before starting to parse these symbols:
```
uint32_t synthetic_function_symbol_idx = 0;
```
Then when you find en EH frame FDE that doesn't have a symbol, the name is calculated with:
```
snprintf (synthetic_function_symbol,
sizeof(synthetic_function_symbol),
"___lldb_unnamed_function%u$$%s",
++synthetic_function_symbol_idx,
module_sp->GetFileSpec().GetFilename().GetCString());
```
We could move this into ObjectFile.cpp somehow and then have both ObjectFileELF and ObjectFileMachO use the same function to create the function name. If we do this, we should use a lldb_private::StreamString when making the name.
http://reviews.llvm.org/D16996
More information about the lldb-commits
mailing list