JDevlieghere marked 4 inline comments as done.
JDevlieghere added a comment.

Thanks for the feedback Greg, they're all great suggestions.

In D145180#4166302 <https://reviews.llvm.org/D145180#4166302>, @clayborg wrote:

> From reading this it looks like your main use case is to supply additional 
> symbols to an existing stripped binary. Is that correct?

That's one use case, the other one being the interactive crashlogs. I went into 
a bit a bit more detail in the summary.

> Are you aware that each dSYM file has a full copy of the unstripped symbol 
> table already? It removes the debug map entries, but each dSYM copies all non 
> debug map symbols inside of it already. So the same thing from this patch can 
> already be accomplished by stripping a dSYM file of all debug info sections 
> and leaving the symbol table alone, and then using this this minimal dSYM 
> file just to get the symbols.

Yup and for the strip scenario I described above, we wouldn't even have to go 
through a dSYM, we could just have `llvm-strip` emit a Mach-O with only the 
unstripped symbol table and that should work out of the box in LLDB (similar to 
how you can add the unstripped binary with `target symbols add`). But for the 
crashlog use case where we only have an address and a symbol, it would be 
really tedious to have to build the whole symbol table. I really like the idea 
of a textual format for this and it's easy to read and modify. The barrier is 
super low and even if you had nothing but the textual output of `nm` you could 
create one of these JSON files and symbolicate your binary in LLDB.

> Any idea on where the JSON file will live if it is just a companion file for 
> another mach-o or ELF executable? Will it always be next to the mach-o 
> executable? Will we enable a Spotlight importer to find it like we do for 
> dSYM files?

For now I have no plans to have LLDB pick these files up automatically, but 
that's definitely something we could explore in the future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145180/new/

https://reviews.llvm.org/D145180

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to