blob: 39065a4d05f1e6d29ab8205034973f49b7ee0b07 [file] [log] [blame]
Oliver Stannardd306c3c2014-06-19 16:35:19 +00001// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp
2// RUN: llvm-dwarfdump %t | FileCheck -check-prefix DWARF %s
3// RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s
4
5 .section foo, "ax"
6b:
7 mov r1, r1
8
9// DWARF: .debug_abbrev contents:
10// DWARF: Abbrev table for offset: 0x00000000
11// DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes
Paul Robinson22d0d312015-12-23 01:57:31 +000012// DWARF: DW_AT_stmt_list DW_FORM_sec_offset
Oliver Stannardd306c3c2014-06-19 16:35:19 +000013// 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// DWARF-NOT: 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] ("b")
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
35// DWARF: .debug_line contents:
36// DWARF: 0x0000000000000000 7 0 1 0 0 is_stmt
37// DWARF-NEXT: 0x0000000000000004 7 0 1 0 0 is_stmt end_sequence
38
39
40// DWARF: .debug_ranges contents:
41// DWARF-NOT: {{0-9a-f}}
42// DWARF: .debug_pubnames contents:
43
44
45
46// RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
47// RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev
48// RELOC-NEXT: 0000000c R_ARM_ABS32 .debug_line
Eric Christopherb0a78ca2014-06-19 20:00:13 +000049// RELOC-NEXT: R_ARM_ABS32 foo
50// RELOC-NEXT: R_ARM_ABS32 foo
51// RELOC-NEXT: R_ARM_ABS32 foo
Oliver Stannardd306c3c2014-06-19 16:35:19 +000052
53// RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_ranges]:
54
55// RELOC: RELOCATION RECORDS FOR [.rel.debug_aranges]:
56// RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info
57// RELOC-NEXT: 00000010 R_ARM_ABS32 foo