summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/Inputs
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2019-12-20 13:51:18 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2020-01-02 17:16:18 +0000
commit3aeb741535235cb9cbfe2a84e50f52effed2d3ad (patch)
tree8972f53d006f472d06884492342b94266e6d96e6 /lld/test/ELF/Inputs
parent89d6c288ba5adb20d92142e9425f7ab79b8f159e (diff)
downloadbcm5719-llvm-3aeb741535235cb9cbfe2a84e50f52effed2d3ad.tar.gz
bcm5719-llvm-3aeb741535235cb9cbfe2a84e50f52effed2d3ad.zip
[test][ELF] Verify debug line corruption messages are printed once
LLD warns if it encounters malformed debug data when parsing line information for an undefined reference. We only want to warn once. This patch adds additional checking to make sure the warnings are printed only once, both for variables within the same program and variables in later line programs. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D71759
Diffstat (limited to 'lld/test/ELF/Inputs')
-rw-r--r--lld/test/ELF/Inputs/undef-bad-debug.s26
1 files changed, 21 insertions, 5 deletions
diff --git a/lld/test/ELF/Inputs/undef-bad-debug.s b/lld/test/ELF/Inputs/undef-bad-debug.s
index e3e9f5edb9d..d52710b2efd 100644
--- a/lld/test/ELF/Inputs/undef-bad-debug.s
+++ b/lld/test/ELF/Inputs/undef-bad-debug.s
@@ -1,7 +1,9 @@
.section .text,"ax"
sym:
- .quad zed6
+ .quad zed6a
sym2:
+ .quad zed6b
+sym3:
.quad zed7
.section .debug_line,"",@progbits
@@ -32,6 +34,13 @@ sym2:
.byte 1 # DW_LNS_copy
.byte 2 # DW_LNS_advance_pc
.byte 8
+ .byte 0, 9, 2 # DW_LNE_set_address
+ .quad sym2
+ .byte 3 # DW_LNS_advance_line
+ .byte 10
+ .byte 1 # DW_LNS_copy
+ .byte 2 # DW_LNS_advance_pc
+ .byte 8
.byte 0, 1, 1 # DW_LNE_end_sequence
.Lunit_end:
@@ -55,7 +64,7 @@ sym2:
.byte 0
.Lprologue2_end:
.byte 0, 9, 2 # DW_LNE_set_address
- .quad sym2
+ .quad sym3
.byte 3 # DW_LNS_advance_line
.byte 10
.byte 1 # DW_LNS_copy
@@ -81,10 +90,15 @@ sym2:
.byte 1 # Abbrev [1] 0xb:0x79 DW_TAG_compile_unit
.long .Lunit # DW_AT_stmt_list
.byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_variable
- .long .Linfo_string # DW_AT_name
+ .long .Linfo_string0 # DW_AT_name
# DW_AT_external
.byte 1 # DW_AT_decl_file
.byte 3 # DW_AT_decl_line
+ .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_variable
+ .long .Linfo_string1 # DW_AT_name
+ # DW_AT_external
+ .byte 1 # DW_AT_decl_file
+ .byte 6 # DW_AT_decl_line
.byte 0 # End Of Children Mark
.Lcu_end:
@@ -128,7 +142,9 @@ sym2:
.byte 0 # EOM(3)
.section .debug_str,"MS",@progbits,1
-.Linfo_string:
+.Linfo_string0:
.asciz "sym"
-.Linfo2_string:
+.Linfo_string1:
.asciz "sym2"
+.Linfo2_string:
+ .asciz "sym3"
OpenPOWER on IntegriCloud