2015-02-28 08:29:11 +08:00
|
|
|
RUN: cat %p/../Inputs/basic.macho.x86_64 > %t1
|
|
|
|
RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t1
|
|
|
|
RUN: llvm-dwarfdump %t1.dwarf | FileCheck %s
|
|
|
|
RUN: llvm-dsymutil -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64
|
|
|
|
RUN: llvm-dwarfdump %t2 | FileCheck %s
|
2015-03-07 09:25:09 +08:00
|
|
|
RUN: llvm-dsymutil -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-dwarfdump - | FileCheck %s --check-prefix=CHECK --check-prefix=BASIC
|
|
|
|
RUN: llvm-dsymutil -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | llvm-dwarfdump - | FileCheck %s --check-prefix=CHECK --check-prefix=ARCHIVE
|
2015-02-28 08:29:11 +08:00
|
|
|
|
|
|
|
CHECK: file format Mach-O 64-bit x86-64
|
2015-03-05 06:07:44 +08:00
|
|
|
|
|
|
|
CHECK: debug_info contents
|
|
|
|
|
|
|
|
CHECK: Compile Unit:
|
|
|
|
|
|
|
|
CHECK: DW_TAG_compile_unit [1] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_language [DW_FORM_data2] (DW_LANG_C99)
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000040] = "basic1.c")
|
|
|
|
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
|
2015-03-14 02:35:54 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ea0)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_subprogram [2] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000051] = "main")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
|
|
|
|
CHECK: DW_AT_prototyped [DW_FORM_flag] (0x01)
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_external [DW_FORM_flag] (0x01)
|
|
|
|
CHECK: DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public)
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ea0)
|
2015-03-12 02:45:52 +08:00
|
|
|
CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000ec4)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
|
|
|
|
CHECK: DW_TAG_formal_parameter [3]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000056] = "argc")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 )
|
|
|
|
CHECK: DW_TAG_formal_parameter [3]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005b] = "argv")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
|
|
|
|
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006a => {0x0000006a})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 70 )
|
|
|
|
CHECK: NULL
|
|
|
|
CHECK: DW_TAG_base_type [4]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
|
|
|
|
CHECK: DW_AT_byte_size [DW_FORM_data1] (0x04)
|
|
|
|
CHECK: DW_TAG_pointer_type [5]
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006f => {0x0000006f})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_pointer_type [5]
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x00000074})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_const_type [6]
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0079 => {0x00000079})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_base_type [4]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000064] = "char")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed_char)
|
|
|
|
CHECK: DW_AT_byte_size [DW_FORM_data1] (0x01)
|
|
|
|
CHECK: NULL
|
|
|
|
|
|
|
|
CHECK: Compile Unit:
|
|
|
|
|
|
|
|
CHECK: DW_TAG_compile_unit [1] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
|
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000069] = "basic2.c")
|
|
|
|
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
|
2015-03-14 02:35:54 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ed0)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_base_type [4]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_variable [7]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000072] = "private_int")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
|
2015-03-07 09:25:09 +08:00
|
|
|
BASIC: DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 )
|
|
|
|
ARCHIVE: DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 )
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_variable [7]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000007e] = "baz")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_location [DW_FORM_block1] (<0x09> 03 00 10 00 00 01 00 00 00 )
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_subprogram [2] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000082] = "foo")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ed0)
|
2015-03-12 02:45:52 +08:00
|
|
|
CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f19)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
|
|
|
|
CHECK: DW_TAG_formal_parameter [3]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 7c )
|
|
|
|
CHECK: NULL
|
|
|
|
CHECK: DW_TAG_subprogram [8]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f20)
|
2015-03-12 02:45:52 +08:00
|
|
|
CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f37)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
|
|
|
|
CHECK: NULL
|
|
|
|
|
|
|
|
CHECK: Compile Unit:
|
|
|
|
|
|
|
|
CHECK: DW_TAG_compile_unit [1] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
|
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008e] = "basic3.c")
|
|
|
|
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
|
2015-03-14 02:35:54 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f40)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_variable [9]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000097] = "val")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x00000162})
|
2015-03-07 09:25:09 +08:00
|
|
|
BASIC: DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 )
|
|
|
|
ARCHIVE: DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 )
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_volatile_type [10]
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_base_type [4]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHACK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_TAG_subprogram [2] *
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009b] = "bar")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f40)
|
2015-03-12 02:45:52 +08:00
|
|
|
CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f84)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
|
|
|
|
CHECK: DW_TAG_formal_parameter [3]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 )
|
|
|
|
CHECK: NULL
|
|
|
|
CHECK: DW_TAG_subprogram [8]
|
2015-03-07 01:56:30 +08:00
|
|
|
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
|
2015-03-07 07:22:53 +08:00
|
|
|
CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
|
2015-03-07 09:25:09 +08:00
|
|
|
CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f90)
|
2015-03-12 02:45:52 +08:00
|
|
|
CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000fa9)
|
2015-03-05 06:07:44 +08:00
|
|
|
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
|
|
|
|
|
|
|
|
CHECK: NULL
|
|
|
|
|
2015-03-14 23:49:07 +08:00
|
|
|
CHECK: .debug_loc contents
|
|
|
|
CHECK-NOT: Location
|
|
|
|
|
2015-03-14 11:46:51 +08:00
|
|
|
CHECK:.debug_aranges contents:
|
|
|
|
CHECK-NEXT:Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
|
|
|
|
CHECK-NEXT:[0x0000000100000ea0 - 0x0000000100000ec4)
|
|
|
|
CHECK-NEXT:Address Range Header: length = 0x0000003c, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00
|
|
|
|
CHECK-NEXT:[0x0000000100000ed0 - 0x0000000100000f19)
|
|
|
|
CHECK-NEXT:[0x0000000100000f20 - 0x0000000100000f37)
|
|
|
|
CHECK-NEXT:Address Range Header: length = 0x0000003c, version = 0x0002, cu_offset = 0x00000126, addr_size = 0x08, seg_size = 0x00
|
|
|
|
CHECK-NEXT:[0x0000000100000f40 - 0x0000000100000f84)
|
|
|
|
CHECK-NEXT:[0x0000000100000f90 - 0x0000000100000fa9)
|
|
|
|
|