88 lines · yaml
1# This YAML file will create a .dwp file that has a DWARF32 compile unit whose2# .debug_str_offsets.dwo is in DWARF64 format. This test verifies that3# llvm-dwarfdump can read the strings correctly and dump the4# .debug_str_offsets.dwo info correctly. This paves the way for llvm-dwp to5# promote some .debug_str_offsets tables for .dwo files to be DWARF64 and will6# allow the .debug_str section to be larger than UINT32_MAX size in bytes7# without losing data.8 9# RUN: yaml2obj %s -o %t.dwp10# RUN: llvm-dwarfdump --debug-str-offsets --debug-info %t.dwp | FileCheck %s11 12# CHECK: 0x00000000: Compile Unit: length = 0x0000002a, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = 0x1158980a3c2f811b (next unit at 0x0000002e)13 14# CHECK: 0x00000014: DW_TAG_compile_unit15# CHECK-NEXT: DW_AT_producer ("Apple clang version 17.0.0 (clang-1700.4.4.1)")16# CHECK-NEXT: DW_AT_language (DW_LANG_C_plus_plus_14)17# CHECK-NEXT: DW_AT_name ("main.minimal.cpp")18# CHECK-NEXT: DW_AT_dwo_name ("main.minimal.dwo")19 20# CHECK: 0x0000001a: DW_TAG_subprogram21# CHECK-NEXT: DW_AT_low_pc (indexed (00000000) address = <unresolved>)22# CHECK-NEXT: DW_AT_high_pc (0x0000000f)23# CHECK: DW_AT_name ("main")24# CHECK-NEXT: DW_AT_decl_file (0x00)25# CHECK-NEXT: DW_AT_decl_line (1)26# CHECK-NEXT: DW_AT_type (0x00000029 "int")27# CHECK-NEXT: DW_AT_external (true)28 29# CHECK: 0x00000029: DW_TAG_base_type30# CHECK-NEXT: DW_AT_name ("int")31# CHECK-NEXT: DW_AT_encoding (DW_ATE_signed)32# CHECK-NEXT: DW_AT_byte_size (0x04)33 34# CHECK: 0x0000002d: NULL35 36# CHECK: .debug_str_offsets.dwo contents:37# CHECK-NEXT: 0x00000000: Contribution size = 44, Format = DWARF64, Version = 538# CHECK-NEXT: 0x00000010: 0000000000000000 "main"39# CHECK-NEXT: 0x00000018: 0000000000000005 "int"40# CHECK-NEXT: 0x00000020: 0000000000000009 "Apple clang version 17.0.0 (clang-1700.4.4.1)"41# CHECK-NEXT: 0x00000028: 0000000000000037 "main.minimal.cpp"42# CHECK-NEXT: 0x00000030: 0000000000000048 "main.minimal.dwo"43 44--- !ELF45FileHeader:46 Class: ELFCLASS6447 Data: ELFDATA2LSB48 Type: ET_REL49 Machine: EM_X86_6450 SectionHeaderStringTable: .strtab51Sections:52 - Name: .debug_abbrev.dwo53 Type: SHT_PROGBITS54 Flags: [ SHF_EXCLUDE ]55 AddressAlign: 0x156 Content: 01110125251305032576250000022E00111B1206401803253A0B3B0B49133F19000003240003253E0B0B0B00000057 - Name: .debug_str.dwo58 Type: SHT_PROGBITS59 Flags: [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ]60 AddressAlign: 0x161 EntSize: 0x162 Content: 6D61696E00696E74004170706C6520636C616E672076657273696F6E2031372E302E302028636C616E672D313730302E342E342E3129006D61696E2E6D696E696D616C2E637070006D61696E2E6D696E696D616C2E64776F0063 - Name: .debug_str_offsets.dwo64 Type: SHT_PROGBITS65 Flags: [ SHF_EXCLUDE ]66 AddressAlign: 0x167 Content: 'FFFFFFFF2C000000000000000500000000000000000000000500000000000000090000000000000037000000000000004800000000000000'68 - Name: .debug_info.dwo69 Type: SHT_PROGBITS70 Flags: [ SHF_EXCLUDE ]71 AddressAlign: 0x172 Content: 2A00000005000508000000001B812F3C0A98581101022100030402000F000000015600000129000000030105040073 - Name: .debug_cu_index74 Type: SHT_PROGBITS75 AddressAlign: 0x176 Content: 0500000003000000010000000200000000000000000000001B812F3C0A98581100000000010000000100000003000000060000000000000000000000000000002E0000002E0000001C00000077 - Type: SectionHeaderTable78 Sections:79 - Name: .strtab80 - Name: .debug_abbrev.dwo81 - Name: .debug_str.dwo82 - Name: .debug_str_offsets.dwo83 - Name: .debug_info.dwo84 - Name: .debug_cu_index85 - Name: .symtab86Symbols: []87...88