1 // RUN
: llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
5 -fdebug-compilation-dir
=/tmp
2 // RUN
: llvm-dwarfdump
-v
%t | FileCheck
-check-prefix DWARF
-check-prefix DWARF45
%s
3 // RUN
: llvm-dwarfdump
--debug-line
%t | FileCheck
-check-prefix DWARF-DL
-check-prefix DWARF-DL-
5 -DDWVER
=5 -DDWFILE
=0 %s
4 // RUN
: llvm-objdump
-r
%t | FileCheck
-check-prefix RELOC
-check-prefix RELOC5
%s
5 // RUN
: llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
4 -fdebug-compilation-dir
=/tmp
6 // RUN
: llvm-dwarfdump
-v
%t | FileCheck
-check-prefix DWARF
-check-prefix DWARF45
%s
7 // RUN
: llvm-dwarfdump
--debug-line
%t | FileCheck
-check-prefix DWARF-DL
-check-prefix DWARF-DL-
4 -DDWVER
=4 -DDWFILE
=1 %s
8 // RUN
: llvm-objdump
-r
%t | FileCheck
-check-prefix RELOC
-check-prefix RELOC4
%s
9 // RUN
: llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
3 -fdebug-compilation-dir
=/tmp
10 // RUN
: llvm-dwarfdump
-v
%t | FileCheck
-check-prefix DWARF
-check-prefix DWARF3
%s
11 // RUN
: llvm-dwarfdump
--debug-line
%t | FileCheck
-check-prefix DWARF-DL
-DDWVER
=3 -DDWFILE
=1 %s
12 // RUN
: llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
2 2>&1 | FileCheck
-check-prefix VERSION
%s
13 // RUN
: not llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
1 2>&1 | FileCheck
-check-prefix DWARF1
%s
14 // RUN
: not llvm-mc
< %s
-triple
=armv7-linux-gnueabi
-filetype
=obj
-o
%t -g
-dwarf-version
6 2>&1 | FileCheck
-check-prefix DWARF6
%s
23 // DWARF
: .debug_abbrev contents:
24 // DWARF
: Abbrev table for offset
: 0x00000000
25 // DWARF
: [1] DW_TAG_compile_unit DW_CHILDREN_yes
26 // DWARF3
: DW_AT_stmt_list DW_FORM_data4
27 // DWARF45
: DW_AT_stmt_list DW_FORM_sec_offset
28 // DWARF3
: DW_AT_ranges DW_FORM_data4
29 // DWARF45
: DW_AT_ranges DW_FORM_sec_offset
30 // DWARF
: DW_AT_name DW_FORM_string
31 // DWARF
: DW_AT_comp_dir DW_FORM_string
32 // DWARF
: DW_AT_producer DW_FORM_string
33 // DWARF
: DW_AT_language DW_FORM_data2
35 // DWARF
: .debug_info contents:
36 // DWARF
: 0x
{{[0-9a-f
]+}}: DW_TAG_compile_unit
[1]
38 // DWARF3
: DW_AT_ranges
[DW_FORM_data4
] (0x00000000
39 // DWARF45
: DW_AT_ranges
[DW_FORM_sec_offset
] (0x00000000
41 // DWARF
: 0x
{{[0-9a-f
]+}}: DW_TAG_label
[2] *
42 // DWARF-NEXT
: DW_AT_name
[DW_FORM_string
] ("a")
44 // DWARF
: 0x
{{[0-9a-f
]+}}: DW_TAG_label
[2] *
45 // DWARF-NEXT
: DW_AT_name
[DW_FORM_string
] ("b")
48 // DWARF
: .debug_aranges contents:
49 // DWARF-NEXT
: Address Range Header
: length
= 0x00000024, version
= 0x0002, cu_offset
= 0x00000000, addr_size
= 0x04, seg_size
= 0x00
50 // DWARF-NEXT
: [0x00000000, 0x00000004)
51 // DWARF-NEXT
: [0x00000000, 0x00000004)
54 // DWARF-DL
: .debug_line contents:
55 // DWARF-DL
: version
: [[DWVER
]]
56 // DWARF-DL-
5: address_size
: 4
57 // DWARF-DL-
5: include_directories
[ 0] = "/tmp"
58 // DWARF-DL
: file_names
[ [[DWFILE
]]]:
59 // DWARF-DL
: name
: "{{(<stdin>|-)}}"
60 // DWARF-DL-
5: 0x0000000000000000 17 0 0 0 0 is_stmt
61 // DWARF-DL-
5-NEXT
: 0x0000000000000004 17 0 0 0 0 is_stmt end_sequence
62 // DWARF-DL-
5-NEXT
: 0x0000000000000000 21 0 0 0 0 is_stmt
63 // DWARF-DL-
5-NEXT
: 0x0000000000000004 21 0 0 0 0 is_stmt end_sequence
64 // DWARF-DL-
4: 0x0000000000000000 17 0 1 0 0 is_stmt
65 // DWARF-DL-
4-NEXT
: 0x0000000000000004 17 0 1 0 0 is_stmt end_sequence
66 // DWARF-DL-
4-NEXT
: 0x0000000000000000 21 0 1 0 0 is_stmt
67 // DWARF-DL-
4-NEXT
: 0x0000000000000004 21 0 1 0 0 is_stmt end_sequence
70 // DWARF
: .debug_ranges contents:
71 // DWARF
: 00000000 ffffffff
00000000
72 // DWARF
: 00000000 00000000 00000004
73 // DWARF
: 00000000 ffffffff
00000000
74 // DWARF
: 00000000 00000000 00000004
75 // DWARF
: 00000000 <End of list
>
79 // Offsets are different in DWARF v5 due to different header layout.
80 // RELOC
: RELOCATION RECORDS FOR
[.debug_info]:
81 // RELOC4-NEXT
: 00000006 R_ARM_ABS32
.debug_abbrev
82 // RELOC4-NEXT
: 0000000c R_ARM_ABS32
.debug_line
83 // RELOC4-NEXT
: 00000010 R_ARM_ABS32
.debug_ranges
84 // RELOC5-NEXT
: 00000008 R_ARM_ABS32
.debug_abbrev
85 // RELOC5-NEXT
: 0000000d R_ARM_ABS32
.debug_line
86 // RELOC5-NEXT
: 00000011 R_ARM_ABS32
.debug_ranges
87 // RELOC-NEXT
: R_ARM_ABS32
.text
88 // RELOC-NEXT
: R_ARM_ABS32 foo
90 // RELOC
: RELOCATION RECORDS FOR
[.debug_ranges]:
91 // RELOC-NEXT
: 00000004 R_ARM_ABS32
.text
92 // RELOC-NEXT
: 00000014 R_ARM_ABS32 foo
94 // RELOC
: RELOCATION RECORDS FOR
[.debug_aranges]:
95 // RELOC-NEXT
: 00000006 R_ARM_ABS32
.debug_info
96 // RELOC-NEXT
: 00000010 R_ARM_ABS32
.text
97 // RELOC-NEXT
: 00000018 R_ARM_ABS32 foo
100 // VERSION
: {{.*}} warning: DWARF2 only supports one section per compilation unit
102 // DWARF1
: Dwarf version
1 is
not supported.
103 // DWARF6
: Dwarf version
6 is
not supported.