brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · efd366d Raw
62 lines · plain
1# This test verifies that an empty range list in the .debug_ranges section2# doesn't crash dsymutil. As clang does not produce this kind of debug3# info anymore, we used this hand-crafted assembly file to produce a testcase4# Compile with:5#        llvm-mc -triple x86_64-apple-darwin -filetype=obj -o 1.o empty_range.o6 7# RUN: dsymutil -f -y %p/dummy-debug-map.map -oso-prepend-path %p/../Inputs/empty_range -o - | llvm-dwarfdump -debug-info - | FileCheck %s8 9        .section	__TEXT,__text,regular,pure_instructions10	.macosx_version_min 10, 1111	.globl	__Z3foov12	.align	4, 0x9013__Z3foov:                               ## @_Z3foov14Lfunc_begin0:15	pushq	%rbp16	movq	%rsp, %rbp17	popq	%rbp18	retq19Lfunc_end0:20	.section	__DWARF,__debug_abbrev,regular,debug21Lsection_abbrev:22	.byte	1                       ## Abbreviation Code23	.byte	17                      ## DW_TAG_compile_unit24	.byte	1                       ## DW_CHILDREN_yes25	.byte	0                       ## EOM(1)26	.byte	0                       ## EOM(2)27	.byte	2                       ## Abbreviation Code28	.byte	46                      ## DW_TAG_subprogram29	.byte	0                       ## DW_CHILDREN_no30	.byte	17                      ## DW_AT_low_pc31	.byte	1                       ## DW_FORM_addr32        .byte   0x55                    ## DW_AT_ranges33        .byte   6                       ## DW_FORM_data434	.byte	0                       ## EOM(1)35	.byte	0                       ## EOM(2)36	.byte	0                       ## EOM(3)37	.section	__DWARF,__debug_info,regular,debug38Lsection_info:39	.long	22                      ## Length of Unit40	.short	2                       ## DWARF version number41	.long	0                       ## Offset Into Abbrev. Section42	.byte	8                       ## Address Size (in bytes)43	.byte	1                       ## Abbrev [1]  DW_TAG_compile_unit44	.byte	2                       ## Abbrev [2] DW_TAG_subprogram45	.quad	Lfunc_begin0            ## DW_AT_low_pc46        .long   0                       ## DW_AT_ranges (pointing at an empty entry)47	.byte	0                       ## End Of Children Mark48	.section	__DWARF,__debug_ranges,regular,debug49Ldebug_range:50        .long 051        .long 052 53# CHECK:  DW_TAG_compile_unit54# CHECK:    DW_TAG_subprogram55# CHECK-NEXT:      DW_AT_low_pc{{.*}}(0x0000000000010000)56# CHECK-NEXT:      DW_AT_ranges{{.*}}(0x00000000)57 58# There was a bug that would use the currently active object file when a59# debug map object isn't found. Check that we only linked one file.60# CHECK-NOT: DW_TAG_compile_unit61 62