1# REQUIRES: lld 2 3# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o 4# RUN: ld.lld %t.o -o %t -z separate-code 5# RUN: lldb-test symbols --find=function --name=inl --function-flags=method %t \ 6# RUN: | FileCheck %s 7 8# CHECK: Function: {{.*}} mangled = "_Z8externali" 9# CHECK: Blocks: {{.*}} range = [0x00201000-0x00201002) 10# CHECK-NEXT: range = [0x00201000-0x00201002), name = "inl", mangled = _ZN1S3inlEi 11 12 13# Generated via: 14# clang -O2 -g -S 15 16# from file: 17# int forward(int); 18# struct S { 19# static int inl(int a) { return forward(a); } 20# }; 21# int external(int a) { return S::inl(a); } 22 23# and then simplified. 24 25 .text 26_Z8externali: 27.Lfunc_begin0: 28 jmp _Z7forwardi 29.Lfunc_end0: 30 31.globl _start 32_start: 33_Z7forwardi: 34 ret 35 36 .section .debug_str,"MS",@progbits,1 37.Linfo_string0: 38 .asciz "clang version 7.0.0 (trunk 332830) (llvm/trunk 332835) with manual modifications" 39.Linfo_string3: 40 .asciz "_ZN1S3inlEi" 41.Linfo_string4: 42 .asciz "inl" 43.Linfo_string6: 44 .asciz "S" 45.Linfo_string8: 46 .asciz "_Z8externali" 47.Linfo_string9: 48 .asciz "external" 49 .section .debug_abbrev,"",@progbits 50 .byte 1 # Abbreviation Code 51 .byte 17 # DW_TAG_compile_unit 52 .byte 1 # DW_CHILDREN_yes 53 .byte 37 # DW_AT_producer 54 .byte 14 # DW_FORM_strp 55 .byte 19 # DW_AT_language 56 .byte 5 # DW_FORM_data2 57 .byte 17 # DW_AT_low_pc 58 .byte 1 # DW_FORM_addr 59 .byte 18 # DW_AT_high_pc 60 .byte 6 # DW_FORM_data4 61 .byte 0 # EOM(1) 62 .byte 0 # EOM(2) 63 .byte 2 # Abbreviation Code 64 .byte 19 # DW_TAG_structure_type 65 .byte 1 # DW_CHILDREN_yes 66 .byte 3 # DW_AT_name 67 .byte 14 # DW_FORM_strp 68 .byte 11 # DW_AT_byte_size 69 .byte 11 # DW_FORM_data1 70 .byte 0 # EOM(1) 71 .byte 0 # EOM(2) 72 .byte 3 # Abbreviation Code 73 .byte 46 # DW_TAG_subprogram 74 .byte 0 # DW_CHILDREN_no 75 .byte 110 # DW_AT_linkage_name 76 .byte 14 # DW_FORM_strp 77 .byte 3 # DW_AT_name 78 .byte 14 # DW_FORM_strp 79 .byte 0 # EOM(1) 80 .byte 0 # EOM(2) 81 .byte 6 # Abbreviation Code 82 .byte 46 # DW_TAG_subprogram 83 .byte 0 # DW_CHILDREN_no 84 .byte 71 # DW_AT_specification 85 .byte 19 # DW_FORM_ref4 86 .byte 32 # DW_AT_inline 87 .byte 11 # DW_FORM_data1 88 .byte 0 # EOM(1) 89 .byte 0 # EOM(2) 90 .byte 8 # Abbreviation Code 91 .byte 46 # DW_TAG_subprogram 92 .byte 1 # DW_CHILDREN_yes 93 .byte 17 # DW_AT_low_pc 94 .byte 1 # DW_FORM_addr 95 .byte 18 # DW_AT_high_pc 96 .byte 6 # DW_FORM_data4 97 .byte 110 # DW_AT_linkage_name 98 .byte 14 # DW_FORM_strp 99 .byte 3 # DW_AT_name 100 .byte 14 # DW_FORM_strp 101 .byte 0 # EOM(1) 102 .byte 0 # EOM(2) 103 .byte 10 # Abbreviation Code 104 .byte 29 # DW_TAG_inlined_subroutine 105 .byte 1 # DW_CHILDREN_yes 106 .byte 49 # DW_AT_abstract_origin 107 .byte 19 # DW_FORM_ref4 108 .byte 17 # DW_AT_low_pc 109 .byte 1 # DW_FORM_addr 110 .byte 18 # DW_AT_high_pc 111 .byte 6 # DW_FORM_data4 112 .byte 0 # EOM(1) 113 .byte 0 # EOM(2) 114 .byte 0 # EOM(3) 115 .section .debug_info,"",@progbits 116.Lcu_begin0: 117 .long .Lcu_end0-.Lcu_start0 # Length of Unit 118.Lcu_start0: 119 .short 4 # DWARF version number 120 .long .debug_abbrev # Offset Into Abbrev. Section 121 .byte 8 # Address Size (in bytes) 122 .byte 1 # Abbrev [1] 0xb:0x9e DW_TAG_compile_unit 123 .long .Linfo_string0 # DW_AT_producer 124 .short 4 # DW_AT_language 125 .quad .Lfunc_begin0 # DW_AT_low_pc 126 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 127 .byte 2 # Abbrev [2] 0x2a:0x1f DW_TAG_structure_type 128 .long .Linfo_string6 # DW_AT_name 129 .byte 1 # DW_AT_byte_size 130.Linl_spec: 131 .byte 3 # Abbrev [3] 0x33:0x15 DW_TAG_subprogram 132 .long .Linfo_string3 # DW_AT_linkage_name 133 .long .Linfo_string4 # DW_AT_name 134 .byte 0 # End Of Children Mark 135.Linl_abstract: 136 .byte 6 # Abbrev [6] 0x50:0x12 DW_TAG_subprogram 137 .long .Linl_spec # DW_AT_specification 138 .byte 1 # DW_AT_inline 139.Linl_a_abstract: 140 .byte 8 # Abbrev [8] 0x62:0x46 DW_TAG_subprogram 141 .quad .Lfunc_begin0 # DW_AT_low_pc 142 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 143 .long .Linfo_string8 # DW_AT_linkage_name 144 .long .Linfo_string9 # DW_AT_name 145 .byte 10 # Abbrev [10] 0x8c:0x1b DW_TAG_inlined_subroutine 146 .long .Linl_abstract # DW_AT_abstract_origin 147 .quad .Lfunc_begin0 # DW_AT_low_pc 148 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 149 .byte 0 # End Of Children Mark 150 .byte 0 # End Of Children Mark 151 .byte 0 # End Of Children Mark 152.Lcu_end0: 153