[Lldb-commits] [PATCH] D70954: [lldb] Don't put compile unit name into the support file list

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 3 04:32:18 PST 2019


labath created this revision.
labath added reviewers: clayborg, JDevlieghere.
Herald added a subscriber: aprantl.
Herald added a reviewer: jdoerfert.
Herald added a project: LLDB.

Lldb's "format-independent" debug info made use of the fact that DWARF
(<=4) did not use the file index zero, and reused the support file index
zero for storing the compile unit name.

While this provided some convenience for DWARF<=4, it meant that the PDB
plugin needed to artificially remap file indices in order to free up
index 0. Furthermore, DWARF v5 make file index 0 legal, which meant that
similar remapping would be needed in the dwarf plugin too.

What this patch does instead is remove the requirement of having the
compile unit name in the index 0. It is not that useful since the name
can always be fetched from the CompileUnit object. Remapping code in the
pdb plugin(s) has been removed or simplified.

DWARF plugin has started inserting an empty FileSpec at index 0 to
ensure the indices keep matching up. In a follow-up patch, I'll start
adding the file zero in case of DWARF v5.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70954

Files:
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  lldb/source/Symbol/CompileUnit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70954.231871.patch
Type: text/x-patch
Size: 5433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191203/197b5de4/attachment-0001.bin>


More information about the lldb-commits mailing list