[PATCH] D79962: Fix the verification of DIEs with DW_AT_ranges.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 13:36:23 PDT 2020
clayborg added a comment.
The verification for:
0x0000000b: DW_TAG_compile_unit
DW_AT_name ("/tmp/main.c")
DW_AT_language (DW_LANG_C_plus_plus)
DW_AT_low_pc (0x0000000000000000)
DW_AT_ranges (0x00000000
[0x0000000000000000, 0x0000000000000020)
[0x0000000000000000, 0x0000000000000030)
[0x0000000000001000, 0x0000000000002000))
DW_AT_stmt_list (0x00000000)
0x00000022: DW_TAG_subprogram
DW_AT_name ("stripped1")
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000020)
0x00000033: DW_TAG_subprogram
DW_AT_name ("stripped2")
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000030)
0x00000048: DW_TAG_subprogram
DW_AT_name ("main")
DW_AT_low_pc (0x0000000000001000)
DW_AT_high_pc (0x0000000000002000)
0x00000059: NULL
Now looks like:
$ ../debug/bin/llvm-dwarfdump --verify /tmp/a.out
Verifying /tmp/a.out: file format Mach-O 64-bit x86-64
Verifying .debug_abbrev...
Verifying .debug_info Unit Header Chain...
error: DIE has overlapping ranges in DW_AT_ranges attribute: [0x0000000000000000, 0x0000000000000020) and [0x0000000000000000, 0x0000000000000030)
0x0000000b: DW_TAG_compile_unit
DW_AT_name ("/tmp/main.c")
DW_AT_language (DW_LANG_C_plus_plus)
DW_AT_low_pc (0x0000000000000000)
DW_AT_ranges (0x00000000
[0x0000000000000000, 0x0000000000000020)
[0x0000000000000000, 0x0000000000000030)
[0x0000000000001000, 0x0000000000002000))
DW_AT_stmt_list (0x00000000)
error: DIEs have overlapping address ranges:
0x00000033: DW_TAG_subprogram
DW_AT_name ("stripped2")
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000030)
0x00000022: DW_TAG_subprogram
DW_AT_name ("stripped1")
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000020)
Verifying .debug_info references...
Verifying .debug_types Unit Header Chain...
Errors detected.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79962/new/
https://reviews.llvm.org/D79962
More information about the llvm-commits
mailing list