llvm-project/llvm/lib/DebugInfo
George Rimar 6d85c58328 [llvm-dwarfdump] - Stop printing the bogus empty section name on invalid dwarf.
When there is no .debug_addr section for some reason,
llvm-dwarfdump would print the bogus empty section name when dumping ranges
in .debug_info:

DW_AT_ranges [DW_FORM_rnglistx]   (indexed (0x0) rangelist = 0x00000004
    [0x0000000000000000, 0x0000000000000001) ""
    [0x0000000000000000, 0x0000000000000002) "")

That happens because of the code which uses 0 (zero) as a section index as a default value.
The code should use -1ULL instead because technically 0 is a valid zero section index
in ELF and -1ULL is a special constant used that means "no section available".

This is mostly a fix for the overall correctness/safety of the code,
but a test case is provided too.

Differential revision: https://reviews.llvm.org/D55113

llvm-svn: 348115
2018-12-03 10:33:40 +00:00
..
CodeView [CodeView] Add support for ref-qualified member functions. 2018-11-20 22:13:43 +00:00
DWARF [llvm-dwarfdump] - Stop printing the bogus empty section name on invalid dwarf. 2018-12-03 10:33:40 +00:00
MSF [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
PDB Add missing error checking code intended for r347687 2018-11-27 19:14:11 +00:00
Symbolize [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
CMakeLists.txt
LLVMBuild.txt