[LLVMdev] Questions about DWARF handling (esp. re: file and line data)
Alex
alexinbeijing at gmail.com
Fri May 29 02:17:57 PDT 2015
Dear LLVM devs,
I'm just working on the LLVM assembler's handling of .file and .line
directives. I've noticed some strange things and am wondering if there is a
reason the code works the way it does.
1. MCContext keeps a map of number -> MCDwarfLineTable called
MCDwarfLineTablesCUMap. However, as far as I can see, the only compilation
unit number which is *ever* used is zero! If this is true, then the map is
not serving any useful purpose.
What was the intention of the CU ID numbers? If multiple .file directives
appear in the asm, each one should open a new "CU", is that not so?
2. Although it appears that each MCDwarfLineTable should be for a single
compilation unit, MCDwarfLineTable has a *vector* called MCDwarfFiles (so
each MCDwarfLineTable can have multiple files).
Although you can have references to multiple files in the same
MCDwarfLineTable, it appears that the only one which is ever used is the
first one! MCDwarfLineTable doesn't do any recordkeeping to remember which
line number data belongs to which file, either.
------------------------
I can go through the code and clean up some of these inconsistencies, but I
need to know how it is *intended* to work. Can someone explain?
Thanks,
Alex Dowad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150529/17edec7b/attachment.html>
More information about the llvm-dev
mailing list