2011-12-10 02:09:40 +08:00
|
|
|
// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
|
2013-01-26 05:44:53 +08:00
|
|
|
// RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
|
2011-12-10 02:09:40 +08:00
|
|
|
|
|
|
|
.globl _bar
|
|
|
|
_bar:
|
|
|
|
movl $0, %eax
|
|
|
|
L1: leave
|
|
|
|
ret
|
|
|
|
_foo:
|
2012-01-11 01:52:29 +08:00
|
|
|
_baz:
|
2011-12-10 02:09:40 +08:00
|
|
|
nop
|
|
|
|
.data
|
|
|
|
_x: .long 1
|
|
|
|
|
|
|
|
// CHECK: file format Mach-O 32-bit i386
|
|
|
|
|
|
|
|
// CHECK: .debug_abbrev contents:
|
|
|
|
// CHECK: Abbrev table for offset: 0x00000000
|
|
|
|
// CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_yes
|
2015-12-23 09:57:31 +08:00
|
|
|
// CHECK: DW_AT_stmt_list DW_FORM_sec_offset
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_low_pc DW_FORM_addr
|
|
|
|
// CHECK: DW_AT_high_pc DW_FORM_addr
|
|
|
|
// CHECK: DW_AT_name DW_FORM_string
|
|
|
|
// CHECK: DW_AT_comp_dir DW_FORM_string
|
|
|
|
// CHECK: DW_AT_producer DW_FORM_string
|
|
|
|
// CHECK: DW_AT_language DW_FORM_data2
|
|
|
|
|
2012-01-11 01:52:29 +08:00
|
|
|
// CHECK: [2] DW_TAG_label DW_CHILDREN_yes
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_name DW_FORM_string
|
|
|
|
// CHECK: DW_AT_decl_file DW_FORM_data4
|
|
|
|
// CHECK: DW_AT_decl_line DW_FORM_data4
|
|
|
|
// CHECK: DW_AT_low_pc DW_FORM_addr
|
|
|
|
// CHECK: DW_AT_prototyped DW_FORM_flag
|
|
|
|
|
|
|
|
// CHECK: [3] DW_TAG_unspecified_parameters DW_CHILDREN_no
|
|
|
|
|
|
|
|
|
|
|
|
// CHECK: .debug_info contents:
|
|
|
|
|
|
|
|
// We don't check the leading addresses these are at.
|
|
|
|
// CHECK: DW_TAG_compile_unit [1] *
|
2015-12-23 09:57:31 +08:00
|
|
|
// CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
|
|
|
|
// CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008)
|
|
|
|
// We don't check the file name as it is a temp directory
|
|
|
|
// CHECK: DW_AT_name [DW_FORM_string]
|
|
|
|
// We don't check the DW_AT_comp_dir which is the current working directory
|
2011-12-13 08:34:14 +08:00
|
|
|
// CHECK: DW_AT_producer [DW_FORM_string] ("llvm-mc (based on {{.*}})")
|
2014-09-05 15:21:40 +08:00
|
|
|
// CHECK: DW_AT_language [DW_FORM_data2] (DW_LANG_Mips_Assembler)
|
2011-12-10 02:09:40 +08:00
|
|
|
|
2012-01-11 01:52:29 +08:00
|
|
|
// CHECK: DW_TAG_label [2] *
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_name [DW_FORM_string] ("bar")
|
2014-09-22 20:36:04 +08:00
|
|
|
// CHECK: DW_AT_decl_file [DW_FORM_data4] ([[FILE:".*gen-dwarf.s"]])
|
2014-09-05 15:21:50 +08:00
|
|
|
// CHECK: DW_AT_decl_line [DW_FORM_data4] (5)
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
|
|
|
|
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
|
|
|
|
|
|
|
|
// CHECK: DW_TAG_unspecified_parameters [3]
|
|
|
|
|
|
|
|
// CHECK: NULL
|
|
|
|
|
2012-01-11 01:52:29 +08:00
|
|
|
// CHECK: DW_TAG_label [2] *
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_name [DW_FORM_string] ("foo")
|
2014-09-22 20:36:04 +08:00
|
|
|
// CHECK: DW_AT_decl_file [DW_FORM_data4] ([[FILE]])
|
2014-09-05 15:21:50 +08:00
|
|
|
// CHECK: DW_AT_decl_line [DW_FORM_data4] (9)
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007)
|
2012-01-11 01:52:29 +08:00
|
|
|
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
|
|
|
|
|
|
|
|
// CHECK: DW_TAG_unspecified_parameters [3]
|
|
|
|
|
|
|
|
// CHECK: NULL
|
|
|
|
|
|
|
|
// CHECK: DW_TAG_label [2] *
|
|
|
|
// CHECK: DW_AT_name [DW_FORM_string] ("baz")
|
2014-09-22 20:36:04 +08:00
|
|
|
// CHECK: DW_AT_decl_file [DW_FORM_data4] ([[FILE]])
|
2014-09-05 15:21:50 +08:00
|
|
|
// CHECK: DW_AT_decl_line [DW_FORM_data4] (10)
|
2012-01-11 01:52:29 +08:00
|
|
|
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007)
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
|
|
|
|
|
|
|
|
// CHECK: DW_TAG_unspecified_parameters [3]
|
|
|
|
|
|
|
|
// CHECK: NULL
|
|
|
|
|
|
|
|
// CHECK: NULL
|
|
|
|
|
|
|
|
// CHECK: .debug_aranges contents:
|
|
|
|
// CHECK: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
|
|
|
|
|
2012-11-27 09:40:36 +08:00
|
|
|
// CHECK: .debug_line contents:
|
2011-12-10 02:09:40 +08:00
|
|
|
// CHECK: Line table prologue:
|
|
|
|
// We don't check the total_length as it includes lengths of temp paths
|
2016-12-16 13:10:11 +08:00
|
|
|
// CHECK: version: 4
|
2011-12-10 02:09:40 +08:00
|
|
|
// We don't check the prologue_length as it too includes lengths of temp paths
|
|
|
|
// CHECK: min_inst_length: 1
|
|
|
|
// CHECK: default_is_stmt: 1
|
|
|
|
// CHECK: line_base: -5
|
|
|
|
// CHECK: line_range: 14
|
|
|
|
// CHECK: opcode_base: 13
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_copy] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_advance_pc] = 1
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_advance_line] = 1
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_file] = 1
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_column] = 1
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_negate_stmt] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_basic_block] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_const_add_pc] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_prologue_end] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0
|
|
|
|
// CHECK: standard_opcode_lengths[DW_LNS_set_isa] = 1
|
|
|
|
// We don't check include_directories as it has a temp path
|
|
|
|
// CHECK: Dir Mod Time File Len File Name
|
|
|
|
// CHECK: ---- ---------- ---------- ---------------------------
|
|
|
|
// CHECK: file_names[ 1] 1 0x00000000 0x00000000 gen-dwarf.s
|
|
|
|
|
2014-02-15 03:27:53 +08:00
|
|
|
// CHECK: Address Line Column File ISA Discriminator Flags
|
|
|
|
// CHECK: ------------------ ------ ------ ------ --- ------------- -------------
|
|
|
|
// CHECK: 0x0000000000000000 6 0 1 0 0 is_stmt
|
|
|
|
// CHECK: 0x0000000000000005 7 0 1 0 0 is_stmt
|
|
|
|
// CHECK: 0x0000000000000006 8 0 1 0 0 is_stmt
|
|
|
|
// CHECK: 0x0000000000000007 11 0 1 0 0 is_stmt
|
|
|
|
// CHECK: 0x0000000000000008 11 0 1 0 0 is_stmt end_sequence
|