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
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits