86 lines · plain
1# Test handling of DWARF5 DW_FORM_implicit_const as used by GCC.2 3# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s4# RUN: %lldb %t -o "expression -T -- variable_implicit_const" \5# RUN: -o exit | FileCheck %s6 7# Failing case was:8# error: need to add support for DW_TAG_base_type 'int' encoded with DW_ATE = 0x5, bit_size = 09# CHECK: (int) $0 = 010 11 .bss12 .globl variable_implicit_const13 .type variable_implicit_const, @object14 .size variable_implicit_const, 415variable_implicit_const:16 .long 017.Lvariable_implicit_const_end:18 .section .debug_info,"",@progbits19.Ldebug_info0:20 .long .Ldebug_info0_end - .Ldebug_info0_start # Length of Compilation Unit Info21.Ldebug_info0_start:22 .value 0x5 # DWARF version number23 .byte 0x1 # DW_UT_compile24 .byte 0x8 # Pointer Size (in bytes)25 .long .Ldebug_abbrev0 # Offset Into Abbrev. Section26 .uleb128 0x1 # (DIE DW_TAG_compile_unit)27 # DW_AT_producer28 .string "GNU C17 11.0.0 20210210 (Red Hat 11.0.0-0) -mtune=generic -march=x86-64 -g"29 .byte 0x1d # DW_AT_language30 # DW_AT_name31 .string "var4.c"32 .uleb128 0x2 # (DIE DW_TAG_variable)33 # DW_AT_name34 .string "variable_implicit_const"35 .long .Ltype_int - .Ldebug_info0 # DW_AT_type36 # DW_AT_external37 .uleb128 0x9 # DW_AT_location38 .byte 0x3 # DW_OP_addr39 .quad variable_implicit_const40.Ltype_int:41 .uleb128 0x3 # (DIE DW_TAG_base_type)42 # DW_AT_byte_size43 .byte 0x5 # DW_AT_encoding44 .ascii "int\0" # DW_AT_name45 .byte 0 # end of children of DIE DW_TAG_compile_unit46.Ldebug_info0_end:47 .section .debug_abbrev,"",@progbits48.Ldebug_abbrev0:49 .uleb128 0x1 # (abbrev code)50 .uleb128 0x11 # (TAG: DW_TAG_compile_unit)51 .byte 0x1 # DW_children_yes52 .uleb128 0x25 # (DW_AT_producer)53 .uleb128 0x8 # (DW_FORM_string)54 .uleb128 0x13 # (DW_AT_language)55 .uleb128 0xb # (DW_FORM_data1)56 .uleb128 0x3 # (DW_AT_name)57 .uleb128 0x8 # (DW_FORM_string)58 .byte 059 .byte 060 .uleb128 0x2 # (abbrev code)61 .uleb128 0x34 # (TAG: DW_TAG_variable)62 .byte 0 # DW_children_no63 .uleb128 0x3 # (DW_AT_name)64 .uleb128 0x8 # (DW_FORM_string)65 .uleb128 0x49 # (DW_AT_type)66 .uleb128 0x13 # (DW_FORM_ref4)67 .uleb128 0x3f # (DW_AT_external)68 .uleb128 0x19 # (DW_FORM_flag_present)69 .uleb128 0x2 # (DW_AT_location)70 .uleb128 0x18 # (DW_FORM_exprloc)71 .byte 072 .byte 073 .uleb128 0x3 # (abbrev code)74 .uleb128 0x24 # (TAG: DW_TAG_base_type)75 .byte 0 # DW_children_no76 .uleb128 0xb # (DW_AT_byte_size)77 .uleb128 0x21 # (DW_FORM_implicit_const)78 .sleb128 .Lvariable_implicit_const_end - variable_implicit_const79 .uleb128 0x3e # (DW_AT_encoding)80 .uleb128 0xb # (DW_FORM_data1)81 .uleb128 0x3 # (DW_AT_name)82 .uleb128 0x8 # (DW_FORM_string)83 .byte 084 .byte 085 .byte 086