1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/tools/llvm-dwarfdump
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
..
X86 DWARFVerifier: Check "completeness" of .debug_names section 2018-05-09 12:06:17 +00:00
cmdline.test dwarfdump: Add support for the --diff option. 2017-12-08 23:32:47 +00:00
lit.local.cfg llvm-dwarfdump: support dumping UUIDs of Mach-O binaries. 2017-09-13 18:22:59 +00:00
uuid32.yaml dwarfdump: Match the --uuid output with that of Darwin dwarfdump. 2018-01-05 21:44:17 +00:00
uuid.yaml dwarfdump: Match the --uuid output with that of Darwin dwarfdump. 2018-01-05 21:44:17 +00:00