1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/DebugInfo
Pavel Labath 5c09a7f1ed DWARFVerifier: Check "completeness" of .debug_names section
Summary:
This patch implements a check which makes sure all entries required by
the DWARF v5 specification are present in the Name Index. The algorithm
tries to follow the wording of Section 6.1.1.1 of the spec as closely as
possible.

The main deviation from it is that instead of a whitelist-based approach
in the spec "The name index must contain an entry for each debugging
information entry that defines a named subprogram, label, variable,
type, or namespace" I chose a blacklist-based one, where I consider
everything to be "in" and then remove the entries that don't make sense.
I did this because it has more potential for catching interesting cases
and the above is a bit vague (it uses plain words like "variable" and
"subprogram", but the rest of the section speaks about specific TAGs).

This approach has raised some interesting questions, the main one being
whether enumerator values should be indexed. The consensus seems to be
that they should, although it does not follow from section 6.1.1.1.
For the time being I made the verifier ignore these, as LLVM does not do
this yet, and I wanted to get a clean run when verifying generated debug
info.

Another interesting case was the DW_TAG_imported_declaration. It was not
immediately clear to me whether this should go in or not, but currently
it is not indexed, and (unlike the enumerators) in does not seem to cause
problems for LLDB, so I've also ignored it.

Reviewers: JDevlieghere, aprantl, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D46583

llvm-svn: 331868
2018-05-09 12:06:17 +00:00
..
CodeView [CodeView] Initial support for emitting S_THUNK32 symbols for compiler... 2018-04-16 16:53:57 +00:00
DWARF DWARFVerifier: Check "completeness" of .debug_names section 2018-05-09 12:06:17 +00:00
MSF [MSF] Default to FPM2, and always mark FPM pages allocated. 2018-03-29 18:34:15 +00:00
PDB [LLD/PDB] Emit first section contribution for DBI Module Descriptor. 2018-04-20 18:00:46 +00:00
Symbolize Fix build broken by r326959 2018-03-08 00:07:26 +00:00
CMakeLists.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00