1# This test produces a stripped version of the object file and adds a 2# gnu-debuglink section to it linking to the unstripped version of the object 3# file. Then the unstripped version is stripped to keep only debug info to 4# cause its crc to change. In this case the object files still have the 5# synthetic PDB build id that LLD adds even for the mingw target. Because this 6# build id still matches, the debug info shall still be loaded from the 7# gnu-debuglink reference. 8 9# RUN: yaml2obj %s -o %t 10# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped 11# RUN: llvm-strip --only-keep-debug %t 12# RUN: lldb-test object-file %t.stripped | FileCheck %s 13 14# CHECK: Name: .debug_info 15# CHECK-NEXT: Type: dwarf-info 16 17--- !COFF 18OptionalHeader: 19 AddressOfEntryPoint: 5152 20 ImageBase: 5368709120 21 SectionAlignment: 4096 22 FileAlignment: 512 23 MajorOperatingSystemVersion: 6 24 MinorOperatingSystemVersion: 0 25 MajorImageVersion: 0 26 MinorImageVersion: 0 27 MajorSubsystemVersion: 6 28 MinorSubsystemVersion: 0 29 Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI 30 DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ] 31 SizeOfStackReserve: 1048576 32 SizeOfStackCommit: 4096 33 SizeOfHeapReserve: 1048576 34 SizeOfHeapCommit: 4096 35 Debug: 36 RelativeVirtualAddress: 16384 37 Size: 28 38header: 39 Machine: IMAGE_FILE_MACHINE_AMD64 40 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ] 41sections: 42 - Name: .text 43 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] 44 VirtualAddress: 4096 45 VirtualSize: 64 46 SectionData: DEADBEEFBAADF00D 47 - Name: .data 48 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] 49 VirtualAddress: 8192 50 VirtualSize: 64 51 SectionData: DEADBEEFBAADF00D 52 - Name: .buildid 53 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] 54 VirtualAddress: 16384 55 VirtualSize: 53 56 SectionData: 00000000E5038E620000000002000000190000001C4000001C300000525344534674A52A37FB4C784C4C44205044422E0100000000 57 - Name: .debug_info 58 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ] 59 VirtualAddress: 20480 60 VirtualSize: 64 61 SectionData: DEADBEEFBAADF00D 62symbols: [] 63... 64