2012-12-11 03:51:21 +08:00
|
|
|
; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
|
2013-01-26 05:44:53 +08:00
|
|
|
; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
|
2012-12-01 07:59:06 +08:00
|
|
|
|
|
|
|
@a = common global i32 0, align 4
|
|
|
|
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
|
|
|
2013-03-27 08:07:26 +08:00
|
|
|
!0 = metadata !{i32 786449, metadata !8, null, i32 12, metadata !"clang version 3.3 (trunk 169021) (llvm/trunk 169020)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !1, metadata !3, metadata !"baz.dwo"} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/baz.c] [DW_LANG_C99]
|
2013-02-02 13:56:24 +08:00
|
|
|
!1 = metadata !{i32 0}
|
|
|
|
!3 = metadata !{metadata !5}
|
2013-03-12 06:37:40 +08:00
|
|
|
!5 = metadata !{i32 786484, i32 0, null, metadata !"a", metadata !"a", metadata !"", metadata !6, i32 1, metadata !7, i32 0, i32 1, i32* @a, null} ; [ DW_TAG_variable ] [a] [line 1] [def]
|
2013-03-27 08:07:26 +08:00
|
|
|
!6 = metadata !{i32 786473, metadata !8, null} ; [ DW_TAG_file_type ]
|
|
|
|
!7 = metadata !{i32 786468, null, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
|
2013-03-18 05:13:55 +08:00
|
|
|
!8 = metadata !{metadata !"baz.c", metadata !"/usr/local/google/home/echristo/tmp"}
|
2012-12-01 07:59:06 +08:00
|
|
|
|
|
|
|
; Check that the skeleton compile unit contains the proper attributes:
|
|
|
|
; This DIE has the following attributes: DW_AT_comp_dir, DW_AT_stmt_list,
|
|
|
|
; DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges, DW_AT_dwo_name, DW_AT_dwo_id,
|
|
|
|
; DW_AT_ranges_base, DW_AT_addr_base.
|
|
|
|
|
2013-02-05 15:32:00 +08:00
|
|
|
; CHECK: .debug_abbrev contents:
|
|
|
|
; CHECK: Abbrev table for offset: 0x00000000
|
|
|
|
; CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_no
|
|
|
|
; CHECK: DW_AT_GNU_dwo_name DW_FORM_strp
|
|
|
|
; CHECK: DW_AT_GNU_dwo_id DW_FORM_data8
|
|
|
|
; CHECK: DW_AT_GNU_addr_base DW_FORM_sec_offset
|
|
|
|
; CHECK: DW_AT_low_pc DW_FORM_addr
|
|
|
|
; CHECK: DW_AT_stmt_list DW_FORM_sec_offset
|
|
|
|
; CHECK: DW_AT_comp_dir DW_FORM_strp
|
|
|
|
|
2013-01-03 07:52:13 +08:00
|
|
|
; CHECK: .debug_info contents:
|
2012-12-11 07:34:43 +08:00
|
|
|
; CHECK: DW_TAG_compile_unit
|
2013-01-17 11:00:04 +08:00
|
|
|
; CHECK: DW_AT_GNU_dwo_name [DW_FORM_strp] ( .debug_str[0x00000000] = "baz.dwo")
|
2013-02-05 15:31:55 +08:00
|
|
|
; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x0000000000000000)
|
2013-01-17 11:00:04 +08:00
|
|
|
; CHECK: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000)
|
2012-12-01 07:59:06 +08:00
|
|
|
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
|
2013-01-17 11:00:04 +08:00
|
|
|
; CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
|
|
|
|
; CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000008] = "/usr/local/google/home/echristo/tmp")
|
|
|
|
|
|
|
|
; CHECK: .debug_str contents:
|
|
|
|
; CHECK: 0x00000000: "baz.dwo"
|
|
|
|
; CHECK: 0x00000008: "/usr/local/google/home/echristo/tmp"
|
2012-12-20 06:02:53 +08:00
|
|
|
|
2013-01-16 07:56:56 +08:00
|
|
|
; Check that we're using the right forms.
|
|
|
|
; CHECK: .debug_abbrev.dwo contents:
|
|
|
|
; CHECK: Abbrev table for offset: 0x00000000
|
|
|
|
; CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_yes
|
|
|
|
; CHECK: DW_AT_producer DW_FORM_GNU_str_index
|
|
|
|
; CHECK: DW_AT_language DW_FORM_data2
|
|
|
|
; CHECK: DW_AT_name DW_FORM_GNU_str_index
|
|
|
|
; CHECK: DW_AT_low_pc DW_FORM_GNU_addr_index
|
|
|
|
; CHECK: DW_AT_stmt_list DW_FORM_data4
|
|
|
|
; CHECK: DW_AT_comp_dir DW_FORM_GNU_str_index
|
2013-02-05 15:31:55 +08:00
|
|
|
; CHECK: DW_AT_GNU_dwo_id DW_FORM_data8
|
2013-01-16 07:56:56 +08:00
|
|
|
|
|
|
|
; CHECK: [2] DW_TAG_base_type DW_CHILDREN_no
|
|
|
|
; CHECK: DW_AT_name DW_FORM_GNU_str_index
|
|
|
|
; CHECK: DW_AT_encoding DW_FORM_data1
|
|
|
|
; CHECK: DW_AT_byte_size DW_FORM_data1
|
|
|
|
|
|
|
|
; CHECK: [3] DW_TAG_variable DW_CHILDREN_no
|
|
|
|
; CHECK: DW_AT_name DW_FORM_GNU_str_index
|
|
|
|
; CHECK: DW_AT_type DW_FORM_ref4
|
|
|
|
; CHECK: DW_AT_external DW_FORM_flag_present
|
|
|
|
; CHECK: DW_AT_decl_file DW_FORM_data1
|
|
|
|
; CHECK: DW_AT_decl_line DW_FORM_data1
|
|
|
|
; CHECK: DW_AT_location DW_FORM_block1
|
|
|
|
|
2013-01-03 07:52:13 +08:00
|
|
|
; Check that the rest of the compile units have information.
|
|
|
|
; CHECK: .debug_info.dwo contents:
|
|
|
|
; CHECK: DW_TAG_compile_unit
|
2013-01-08 03:32:41 +08:00
|
|
|
; CHECK: DW_AT_producer [DW_FORM_GNU_str_index] ( indexed (00000000) string = "clang version 3.3 (trunk 169021) (llvm/trunk 169020)")
|
2013-01-03 07:52:13 +08:00
|
|
|
; CHECK: DW_AT_language [DW_FORM_data2] (0x000c)
|
2013-01-08 03:32:41 +08:00
|
|
|
; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000001) string = "baz.c")
|
2013-01-16 07:56:56 +08:00
|
|
|
; CHECK: DW_AT_low_pc [DW_FORM_GNU_addr_index] ( indexed (00000000) address = 0x0000000000000000)
|
2013-02-05 15:31:55 +08:00
|
|
|
; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x0000000000000000)
|
2013-01-03 07:52:13 +08:00
|
|
|
; CHECK: DW_TAG_base_type
|
2013-01-08 03:32:41 +08:00
|
|
|
; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000004) string = "int")
|
2013-01-03 07:52:13 +08:00
|
|
|
; CHECK: DW_TAG_variable
|
2013-01-08 03:32:41 +08:00
|
|
|
; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000003) string = "a")
|
2013-02-05 15:31:55 +08:00
|
|
|
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x001e => {0x0000001e})
|
2013-01-19 06:11:33 +08:00
|
|
|
; CHECK: DW_AT_external [DW_FORM_flag_present] (true)
|
|
|
|
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
|
|
|
|
; CHECK: DW_AT_decl_line [DW_FORM_data1] (0x01)
|
|
|
|
; CHECK: DW_AT_location [DW_FORM_block1] (<0x02> fb 01 )
|
|
|
|
|
2013-01-16 07:56:56 +08:00
|
|
|
|
|
|
|
; CHECK: .debug_str.dwo contents:
|
|
|
|
; CHECK: 0x00000000: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)"
|
|
|
|
; CHECK: 0x00000035: "baz.c"
|
|
|
|
; CHECK: 0x0000003b: "/usr/local/google/home/echristo/tmp"
|
|
|
|
; CHECK: 0x0000005f: "a"
|
|
|
|
; CHECK: 0x00000061: "int"
|
|
|
|
|
|
|
|
; CHECK: .debug_str_offsets.dwo contents:
|
|
|
|
; CHECK: 0x00000000: 00000000
|
|
|
|
; CHECK: 0x00000004: 00000035
|
|
|
|
; CHECK: 0x00000008: 0000003b
|
|
|
|
; CHECK: 0x0000000c: 0000005f
|
|
|
|
; CHECK: 0x00000010: 00000061
|