[PATCH] D43286: WIP: .debug_names generation

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 05:21:44 PST 2018


labath created this revision.
Herald added subscribers: llvm-commits, JDevlieghere, aprantl.
Herald added a reviewer: JDevlieghere.

This isn't ready for a full-on review yet, but I wanted to put it up to
get some early feedback and provide context for the refactor of the
apple-table generation code.

Things that I know about which are wrong:

- it's not fully wired up to the data sources (right now it only indexes names, and not types, namespaces, etc.).
- we should emit either the apple tables or the dwarf5 ones, not both of them together.
- missing tests.

Things I'd like feedback on:

- is it OK to reach into DWARFDebug this way to get the information I need? (list of CUs, DIE-to-CU mapping)
- type units: is it ok to just not support them in the first implementation (we don't generate dwarf5-compatible type units anyway)

Other things to notice:

- This implementation is not fully data-source-agnostic like the apple one. I tried writing such implementation initially, but I ended up getting tangled up in abstractions before I was even half-way finished. The reason for that is that this table needs to know a lot more about the surrounding world than the apple tables (list of CUs, TUs; set of abbreviations, etc.). We may need an implementation of this which uses a different data source in the future (lld, or some version dsymutil --update), but I think it will be easier to design such an interface once we have an actual consumer in front of us.
- Right now I generate uniform entries for each entry (DIE offset and possibly CU index), and there are bits of code in here which assume that. Once we have type units, this will need to be generalized a bit, but I still think we should need at most two abbreviations for each Tag (one for tags in CUs, and one for tags in TUs).


Repository:
  rL LLVM

https://reviews.llvm.org/D43286

Files:
  include/llvm/CodeGen/AccelTable.h
  include/llvm/MC/MCObjectFileInfo.h
  lib/CodeGen/AsmPrinter/AccelTable.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/MC/MCObjectFileInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43286.134204.patch
Type: text/x-patch
Size: 16245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180214/c0a32b7b/attachment.bin>


More information about the llvm-commits mailing list