llvm.org GIT mirror llvm / b7509c6
Tests for r211273 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211279 91177308-0d34-0410-b5e6-96231b3b80d8 Oliver Stannard 6 years ago
4 changed file(s) with 219 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp
1 // RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s
2 // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s
3 // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 2 2>&1 | FileCheck -check-prefix VERSION %s
4 // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 1 2>&1 | FileCheck -check-prefix DWARF1 %s
5 // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 5 2>&1 | FileCheck -check-prefix DWARF5 %s
6 .section .text, "ax"
7 a:
8 mov r0, r0
9
10 .section foo, "ax"
11 b:
12 mov r1, r1
13
14 // DWARF: .debug_abbrev contents:
15 // DWARF: Abbrev table for offset: 0x00000000
16 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes
17 // DWARF: DW_AT_stmt_list DW_FORM_data4
18 // DWARF: DW_AT_ranges DW_FORM_data4
19 // DWARF: DW_AT_name DW_FORM_string
20 // DWARF: DW_AT_comp_dir DW_FORM_string
21 // DWARF: DW_AT_producer DW_FORM_string
22 // DWARF: DW_AT_language DW_FORM_data2
23
24 // DWARF: .debug_info contents:
25 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]
26 // CHECK-NOT-DWARF: DW_TAG_
27 // DWARF: DW_AT_ranges [DW_FORM_data4] (0x00000000)
28
29 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] *
30 // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("a")
31
32 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] *
33 // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("b")
34
35
36 // DWARF: .debug_aranges contents:
37 // DWARF-NEXT: Address Range Header: length = 0x00000024, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
38 // DWARF-NEXT: [0x00000000 - 0x00000004)
39 // DWARF-NEXT: [0x00000000 - 0x00000004)
40
41
42 // DWARF: .debug_line contents:
43 // DWARF: 0x0000000000000000 9 0 1 0 0 is_stmt
44 // DWARF-NEXT: 0x0000000000000004 9 0 1 0 0 is_stmt end_sequence
45 // DWARF-NEXT: 0x0000000000000000 13 0 1 0 0 is_stmt
46 // DWARF-NEXT: 0x0000000000000004 13 0 1 0 0 is_stmt end_sequence
47
48
49 // DWARF: .debug_ranges contents:
50 // DWARF: 00000000 ffffffff 00000000
51 // DWARF: 00000000 00000000 00000004
52 // DWARF: 00000000 ffffffff 00000000
53 // DWARF: 00000000 00000000 00000004
54 // DWARF: 00000000
55
56
57
58 // RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
59 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev
60 // RELOC-NEXT: 0000000c R_ARM_ABS32 .debug_line
61 // RELOC-NEXT: 00000010 R_ARM_ABS32 .debug_ranges
62 // RELOC-NEXT: 0000004f R_ARM_ABS32 .text
63 // RELOC-NEXT: 00000061 R_ARM_ABS32 foo
64
65 // RELOC: RELOCATION RECORDS FOR [.rel.debug_ranges]:
66 // RELOC-NEXT: 00000004 R_ARM_ABS32 .text
67 // RELOC-NEXT: 00000014 R_ARM_ABS32 foo
68
69 // RELOC: RELOCATION RECORDS FOR [.rel.debug_aranges]:
70 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info
71 // RELOC-NEXT: 00000010 R_ARM_ABS32 .text
72 // RELOC-NEXT: 00000018 R_ARM_ABS32 foo
73
74
75 // VERSION: {{.*}} error: DWARF2 only supports one section per compilation unit
76
77 // DWARF1: Dwarf version 1 is not supported.
78 // DWARF5: Dwarf version 5 is not supported.
0 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp
1 // RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s
2 // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s
3
4 // If there is no code in an assembly file, no debug info is produced
5
6 .section .data, "aw"
7 a:
8 .long 42
9
10 // DWARF: .debug_abbrev contents:
11 // DWARF-NEXT: < EMPTY >
12
13 // DWARF: .debug_info contents:
14
15 // DWARF: .debug_aranges contents:
16
17 // DWARF: .debug_line contents:
18
19 // DWARF: .debug_ranges contents:
20
21
22 // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_info]:
23
24 // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_ranges]:
25
26 // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_aranges]:
0 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp
1 // RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s
2 // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s
3
4 .section foo, "ax"
5 b:
6 mov r1, r1
7
8 // DWARF: .debug_abbrev contents:
9 // DWARF: Abbrev table for offset: 0x00000000
10 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes
11 // DWARF: DW_AT_stmt_list DW_FORM_data4
12 // DWARF: DW_AT_low_pc DW_FORM_addr
13 // DWARF: DW_AT_high_pc DW_FORM_addr
14 // DWARF: DW_AT_name DW_FORM_string
15 // DWARF: DW_AT_comp_dir DW_FORM_string
16 // DWARF: DW_AT_producer DW_FORM_string
17 // DWARF: DW_AT_language DW_FORM_data2
18
19 // DWARF: .debug_info contents:
20 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]
21 // DWARF-NOT: DW_TAG_
22 // DWARF: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
23 // DWARF: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000004)
24
25 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] *
26 // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("b")
27
28
29 // DWARF: .debug_aranges contents:
30 // DWARF-NEXT: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
31 // DWARF-NEXT: [0x00000000 - 0x00000004)
32
33
34 // DWARF: .debug_line contents:
35 // DWARF: 0x0000000000000000 7 0 1 0 0 is_stmt
36 // DWARF-NEXT: 0x0000000000000004 7 0 1 0 0 is_stmt end_sequence
37
38
39 // DWARF: .debug_ranges contents:
40 // DWARF-NOT: {{0-9a-f}}
41 // DWARF: .debug_pubnames contents:
42
43
44
45 // RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
46 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev
47 // RELOC-NEXT: 0000000c R_ARM_ABS32 .debug_line
48 // RELOC-NEXT: 00000010 R_ARM_ABS32 foo
49 // RELOC-NEXT: 00000014 R_ARM_ABS32 foo
50 // RELOC-NEXT: 00000053 R_ARM_ABS32 foo
51
52 // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_ranges]:
53
54 // RELOC: RELOCATION RECORDS FOR [.rel.debug_aranges]:
55 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info
56 // RELOC-NEXT: 00000010 R_ARM_ABS32 foo
0 // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp
1 // RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s
2 // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s
3
4 .section .text, "ax"
5 a:
6 mov r0, r0
7
8
9 // DWARF: .debug_abbrev contents:
10 // DWARF: Abbrev table for offset: 0x00000000
11 // DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes
12 // DWARF: DW_AT_stmt_list DW_FORM_data4
13 // DWARF: DW_AT_low_pc DW_FORM_addr
14 // DWARF: DW_AT_high_pc DW_FORM_addr
15 // DWARF: DW_AT_name DW_FORM_string
16 // DWARF: DW_AT_comp_dir DW_FORM_string
17 // DWARF: DW_AT_producer DW_FORM_string
18 // DWARF: DW_AT_language DW_FORM_data2
19
20 // DWARF: .debug_info contents:
21 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]
22 // CHECK-NOT-DWARF: DW_TAG_
23 // DWARF: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
24 // DWARF: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000004)
25
26 // DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] *
27 // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("a")
28
29
30 // DWARF: .debug_aranges contents:
31 // DWARF-NEXT: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
32 // DWARF-NEXT: [0x00000000 - 0x00000004)
33
34 // DWARF: .debug_line contents:
35 // DWARF: 0x0000000000000000 7 0 1 0 0 is_stmt
36 // DWARF-NEXT: 0x0000000000000004 7 0 1 0 0 is_stmt end_sequence
37
38
39 // DWARF: .debug_ranges contents:
40 // DWARF-NOT: {{0-9a-f}}
41 // DWARF: .debug_pubnames contents:
42
43
44 // RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
45 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev
46 // RELOC-NEXT: 0000000c R_ARM_ABS32 .debug_line
47 // RELOC-NEXT: 00000010 R_ARM_ABS32 .text
48 // RELOC-NEXT: 00000014 R_ARM_ABS32 .text
49 // RELOC-NEXT: 00000053 R_ARM_ABS32 .text
50
51 // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_ranges]:
52
53 // RELOC: RELOCATION RECORDS FOR [.rel.debug_aranges]:
54 // RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info
55 // RELOC-NEXT: 00000010 R_ARM_ABS32 .text