1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o
4 # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q
5 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6 # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.exe | FileCheck --check-prefix=PRECHECK %s
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.bolt | FileCheck --check-prefix=POSTCHECK %s
9 # This test checks that .debug_line gets generated correctly when .debug_info is DWARF5, and .debug_line is DWARF4.
11 # PRECHECK: version: 4
12 # PRECHECK: file_names[ 1]:
13 # PRECHECK-NEXT: name: "main.cpp"
14 # PRECHECK-NEXT: dir_index: 0
15 # PRECHECK-NEXT: mod_time: 0x00000000
16 # PRECHECK-NEXT: length: 0x00000000
18 # POSTCHECK: version: 4
19 # POSTCHECK: file_names[ 1]:
20 # POSTCHECK-NEXT: name: "main.cpp"
21 # POSTCHECK-NEXT: dir_index: 0
22 # POSTCHECK-NEXT: mod_time: 0x00000000
23 # POSTCHECK-NEXT: length: 0x00000000
41 .cfi_def_cfa_offset 16
44 .cfi_def_cfa_register 6
55 .section .debug_info,"",@progbits
68 .quad .Letext0-.Ltext0
85 .section .debug_abbrev,"",@progbits
143 .section .debug_aranges,"",@progbits
152 .quad .Letext0-.Ltext0
155 .section .debug_line,"",@progbits
157 .section .debug_str,"MS",@progbits,1
159 .string "GNU C++14 8.5.0 20210514 (Red Hat 8.5.0-3) -mtune=generic -march=x86-64 -g2 -gdwarf-5"
166 .ident "GCC: (GNU) 8.5.0 20210514 (Red Hat 8.5.0-3)"
167 .section .note.GNU-stack,"",@progbits