[llvm-dev] How does LLDB locate the DWARF information stored inside MACH-O .o files produced by LLVM and LLD?

Andrew Kelley via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 23 00:19:13 PDT 2018


When I make a simple test program and call abort() and use LLDB to debug
it, it has address-to-line mapping. If I then delete the .o file and run
LLDB again, it loses the address-to-line mapping. So there must be DWARF
info, or otherwise address-to-line info in the .o file.

I'm parsing the MACH-O executable, which has a LC_SYMTAB  entry, and one of
the entries is the file path of the .o file. So I can find the file that
way. Then I parse the MACH-O .o file, which also has the LC_SYMTAB, as well
as an LC_SEGMENT_64 and LC_DATA_IN_CODE, and then finally a LC_DYSYMTAB.
But I don't see where the address-to-line information is, or any DWARF
information.

Where is LLDB getting this address-to-line info?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180823/a5cf277a/attachment.html>


More information about the llvm-dev mailing list