Skip to content

Commit c463b7e

Browse files
committed
Demostrate where Debug line is wrong
1 parent 25bbe1a commit c463b7e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/test/tools/llvm-dwarfdump/verify_stmt_seq.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@
44

55
# RUN: yaml2obj %s -o verify_stmt_seq.o
66
# RUN: not llvm-dwarfdump -verify -debug-info verify_stmt_seq.o | FileCheck %s --check-prefix=CHECK_INVALID --implicit-check-not=error:
7+
# RUN: llvm-dwarfdump -debug-line -verbose -debug-info verify_stmt_seq.o | FileCheck %s --check-prefix=CHECK_DEBUG_LINE
78

89

910
# CHECK_INVALID: error: DW_AT_LLVM_stmt_sequence offset 0x00000000 is not within the line table bounds [0x0000002e, 0x000000fd)
1011
# CHECK_INVALID: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] (0x00000000)
1112

13+
# 0xd3 would be a valid offset, if the line table wan't ill formed with two rows having the same PC (0x8c).
1214
# CHECK_INVALID: error: DW_AT_LLVM_stmt_sequence offset 0x000000d3 does not point to a valid sequence offset in the line table
1315
# CHECK_INVALID: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] (0x000000d3)
1416

17+
# CHECK_DEBUG_LINE: 0x000000d3: 05 DW_LNS_set_column (85)
18+
# CHECK_DEBUG_LINE-NEXT: 0x000000d5: 0a DW_LNS_set_prologue_end
19+
# CHECK_DEBUG_LINE-NEXT: 0x000000d6: 00 DW_LNE_set_address (0x000000000000008c)
20+
# CHECK_DEBUG_LINE-NEXT: 0x000000e1: 03 DW_LNS_advance_line (30)
21+
# CHECK_DEBUG_LINE-NEXT: 0x000000e3: 01 DW_LNS_copy
22+
# CHECK_DEBUG_LINE-NEXT: 0x000000000000008c 30 85 1 0 0 0 is_stmt prologue_end
23+
# CHECK_DEBUG_LINE-NEXT: 0x000000e4: 00 DW_LNE_end_sequence
24+
# CHECK_DEBUG_LINE-NEXT: 0x000000000000008c 30 85 1 0 0 0 is_stmt end_sequence
25+
1526
# CHECK_INVALID: error: DIE has invalid DW_AT_LLVM_stmt_sequence encoding
1627
# CHECK_INVALID: DW_AT_LLVM_stmt_sequence [DW_FORM_data4] (0x000000a7)
1728

0 commit comments

Comments
 (0)