66 lines · plain
1# REQUIRES: zlib2# RUN: yaml2obj -DCLASS=32 -DENDIAN=LSB -DINFO_CHDR=010000005600000001000000 %s -o %t.o3# RUN: llvm-dwp %t.o -o %t4# RUN: llvm-dwarfdump -v %t | FileCheck %s5 6# RUN: yaml2obj -DCLASS=32 -DENDIAN=MSB -DINFO_CHDR=000000010000005600000001 %s -o %t.o7# RUN: llvm-dwp %t.o -o %t8# RUN: llvm-dwarfdump -v %t | FileCheck %s9 10# RUN: yaml2obj -DCLASS=64 -DENDIAN=LSB -DINFO_CHDR=01000000fd7f000056000000000000000100000000000000 %s -o %t.o11# RUN: llvm-dwp %t.o -o %t12# RUN: llvm-dwarfdump -v %t | FileCheck %s13 14# RUN: yaml2obj -DCLASS=64 -DENDIAN=MSB -DINFO_CHDR=0000000100007ffd00000000000000560000000000000001 %s -o %t.o15# RUN: llvm-dwp %t.o -o %t16# RUN: llvm-dwarfdump -v %t | FileCheck %s17 18## Simple test built from this input which produces DWARF long enough to be compressed in the .[z]debug_info section:19##20## void f(int a, int b, int c, int d) {21## }22 23## Since the compression is pretty orthogonal, we're not trying to test that the24## compression library functioned correctly, just that dwp used it to decompress25## the section - so test a few simple features and be done with it.26 27# CHECK: .debug_info.dwo contents:28# CHECK: Compile Unit:29# CHECK: DW_TAG_compile_unit30# CHECK: DW_TAG_subprogram31# CHECK: DW_TAG_formal_parameter32 33--- !ELF34FileHeader:35 Class: ELFCLASS[[CLASS]]36 Data: ELFDATA2[[ENDIAN]]37 Type: ET_REL38 Machine: EM_X86_6439Sections:40 - Name: .debug_loc.dwo41 Type: SHT_PROGBITS42 AddressAlign: 0x143 - Name: .debug_str.dwo44 Type: SHT_PROGBITS45 Flags: [ SHF_MERGE, SHF_STRINGS ]46 AddressAlign: 0x147 EntSize: 0x148 Content: 636C616E672076657273696F6E20332E392E3020287472756E6B203236313232332920286C6C766D2F7472756E6B203236313233342900612E637070005F5A3166696969690066006100696E740062006300640049 - Name: .debug_str_offsets.dwo50 Type: SHT_PROGBITS51 AddressAlign: 0x152 Content: 00000000370000003D00000046000000480000004A0000004E000000500000005200000053 - Name: .debug_info.dwo54 Type: SHT_PROGBITS55 Flags: [ SHF_COMPRESSED ]56 AddressAlign: 0x857 Content: [[INFO_CHDR]]789c0b626060606100010e462083f1e6eb7f7c0d8b756299188480628c614ccc8c8ccc4c136b5818190381024066051b9c59c20e67167040980c2cacac2c0c00109a0afa58 - Name: .debug_abbrev.dwo59 Type: SHT_PROGBITS60 AddressAlign: 0x161 Content: 01110125823E130503823EB142070000022E0111813E120640186E823E03823E3A0B3B0B3F190000030500021803823E3A0B3B0B4913000004240003823E3E0B0B0B00000062 - Name: .debug_line.dwo63 Type: SHT_PROGBITS64 AddressAlign: 0x165 Content: 0D0000000200070000000101FB0E01000066