194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t 2767295f1143db4ed844ea9d25f9758e624c35302Eli Bendersky// RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s 394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby.globl _bar 594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby_bar: 694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby movl $0, %eax 794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin EnderbyL1: leave 894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby ret 994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby_foo: 1038fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby_baz: 1194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby nop 1294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby.data 1394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby_x: .long 1 1494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 1594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: file format Mach-O 32-bit i386 1694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 1794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: .debug_abbrev contents: 1894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: Abbrev table for offset: 0x00000000 1994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_yes 2094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_stmt_list DW_FORM_data4 2194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_low_pc DW_FORM_addr 2294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_high_pc DW_FORM_addr 2394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_name DW_FORM_string 2494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_comp_dir DW_FORM_string 2594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_producer DW_FORM_string 2694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_language DW_FORM_data2 2794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 2838fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: [2] DW_TAG_label DW_CHILDREN_yes 2994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_name DW_FORM_string 3094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_file DW_FORM_data4 3194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_line DW_FORM_data4 3294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_low_pc DW_FORM_addr 3394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_prototyped DW_FORM_flag 3494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 3594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: [3] DW_TAG_unspecified_parameters DW_CHILDREN_no 3694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 3794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 3894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: .debug_info contents: 3994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 4094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check the leading addresses these are at. 4194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_TAG_compile_unit [1] * 4294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_stmt_list [DW_FORM_data4] (0x00000000) 4394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) 4494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008) 4594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check the file name as it is a temp directory 4694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_name [DW_FORM_string] 4794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check the DW_AT_comp_dir which is the current working directory 485a3d4c983069f0646065b773a7c11a900f9ff94aNick Lewycky// CHECK: DW_AT_producer [DW_FORM_string] ("llvm-mc (based on {{.*}})") 4994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_language [DW_FORM_data2] (0x8001) 5094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 5138fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_TAG_label [2] * 5294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_name [DW_FORM_string] ("bar") 5394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) 5494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x00000005) 5594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) 5694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) 5794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 5894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_TAG_unspecified_parameters [3] 5994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 6094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: NULL 6194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 6238fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_TAG_label [2] * 6394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_name [DW_FORM_string] ("foo") 6494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) 6594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x00000009) 6694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007) 6738fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) 6838fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby 6938fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_TAG_unspecified_parameters [3] 7038fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby 7138fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: NULL 7238fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby 7338fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_TAG_label [2] * 7438fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_AT_name [DW_FORM_string] ("baz") 7538fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) 7638fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x0000000a) 7738fdb7d9fc40e9f29c3156b6625cac8d91d562e1Kevin Enderby// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007) 7894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) 7994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 8094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: DW_TAG_unspecified_parameters [3] 8194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 8294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: NULL 8394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 8494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: NULL 8594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 8694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: .debug_aranges contents: 8794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 8894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 89eb6363adf05b65b0ec079ad7cbcb871acdb60a8cEric Christopher// CHECK: .debug_line contents: 9094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: Line table prologue: 9194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check the total_length as it includes lengths of temp paths 9294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: version: 2 9394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check the prologue_length as it too includes lengths of temp paths 9494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: min_inst_length: 1 9594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: default_is_stmt: 1 9694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: line_base: -5 9794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: line_range: 14 9894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: opcode_base: 13 9994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_copy] = 0 10094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_advance_pc] = 1 10194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_advance_line] = 1 10294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_file] = 1 10394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_column] = 1 10494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_negate_stmt] = 0 10594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_basic_block] = 0 10694c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_const_add_pc] = 0 10794c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1 10894c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_prologue_end] = 0 10994c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0 11094c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: standard_opcode_lengths[DW_LNS_set_isa] = 1 11194c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// We don't check include_directories as it has a temp path 11294c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: Dir Mod Time File Len File Name 11394c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: ---- ---------- ---------- --------------------------- 11494c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby// CHECK: file_names[ 1] 1 0x00000000 0x00000000 gen-dwarf.s 11594c2e85bea1ab1b837a4c055ccc83d5cd32dd027Kevin Enderby 11636b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: Address Line Column File ISA Discriminator Flags 11736b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: ------------------ ------ ------ ------ --- ------------- ------------- 11836b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: 0x0000000000000000 6 0 1 0 0 is_stmt 11936b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: 0x0000000000000005 7 0 1 0 0 is_stmt 12036b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: 0x0000000000000006 8 0 1 0 0 is_stmt 12136b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: 0x0000000000000007 11 0 1 0 0 is_stmt 12236b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines// CHECK: 0x0000000000000008 11 0 1 0 0 is_stmt end_sequence 123