147 lines · yaml
1# This test has an S_GPROC32_ID symbol with an invalid type index. Make sure we2# keep the record, or we'll have unbalanced scopes, which is bad. This situation3# can arise when we can't find the type server PDB.4 5# RUN: yaml2obj %s -o %t.obj6# RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main7# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s8 9# CHECK: Mod 0000 | `{{.*}}pdb-invalid-func-type.yaml.tmp.obj`:10# CHECK: 4 | S_GPROC32 [size = 44] `main`11# CHECK: parent = 0, end = 80, addr = 0001:0000, code size = 312# CHECK: 48 | S_FRAMEPROC [size = 32]13# CHECK: 80 | S_END [size = 4]14 15--- !COFF16header:17 Machine: IMAGE_FILE_MACHINE_AMD6418 Characteristics: [ ]19sections:20 - Name: '.debug$S'21 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]22 Alignment: 123 Subsections:24 - !Symbols25 Records:26 - Kind: S_GPROC32_ID27 ProcSym:28 CodeSize: 329 DbgStart: 030 DbgEnd: 231 # Corrupt function type!32 FunctionType: 410133 Flags: [ ]34 DisplayName: main35 - Kind: S_FRAMEPROC36 FrameProcSym:37 TotalFrameBytes: 038 PaddingFrameBytes: 039 OffsetToPadding: 040 BytesOfCalleeSavedRegisters: 041 OffsetOfExceptionHandler: 042 SectionIdOfExceptionHandler: 043 Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]44 - Kind: S_PROC_ID_END45 ScopeEndSym:46 - !Lines47 CodeSize: 348 Flags: [ ]49 RelocOffset: 050 RelocSegment: 051 Blocks:52 - FileName: 'c:\src\llvm-project\build\t.c'53 Lines:54 - Offset: 055 LineStart: 156 IsStatement: true57 EndDelta: 058 Columns:59 - !FileChecksums60 Checksums:61 - FileName: 'c:\src\llvm-project\build\t.c'62 Kind: MD563 Checksum: 270A878DCC1B845655B162F56C4F502064 - !StringTable65 Strings:66 - 'c:\src\llvm-project\build\t.c'67 Relocations:68 - VirtualAddress: 4469 SymbolName: main70 Type: IMAGE_REL_AMD64_SECREL71 - VirtualAddress: 4872 SymbolName: main73 Type: IMAGE_REL_AMD64_SECTION74 - VirtualAddress: 10075 SymbolName: main76 Type: IMAGE_REL_AMD64_SECREL77 - VirtualAddress: 10478 SymbolName: main79 Type: IMAGE_REL_AMD64_SECTION80 - Name: '.debug$T'81 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]82 Alignment: 183 Types:84 - Kind: LF_ARGLIST85 ArgList:86 ArgIndices: [ 0 ]87 - Kind: LF_PROCEDURE88 Procedure:89 ReturnType: 11690 CallConv: NearC91 Options: [ None ]92 ParameterCount: 093 ArgumentList: 409694 - Kind: LF_FUNC_ID95 FuncId:96 ParentScope: 097 FunctionType: 409798 Name: main99 - Name: '.text$mn'100 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]101 Alignment: 16102 SectionData: 33C0C3103symbols:104 - Name: '.debug$S'105 Value: 0106 SectionNumber: 1107 SimpleType: IMAGE_SYM_TYPE_NULL108 ComplexType: IMAGE_SYM_DTYPE_NULL109 StorageClass: IMAGE_SYM_CLASS_STATIC110 SectionDefinition:111 Length: 328112 NumberOfRelocations: 4113 NumberOfLinenumbers: 0114 CheckSum: 0115 Number: 0116 - Name: '.debug$T'117 Value: 0118 SectionNumber: 2119 SimpleType: IMAGE_SYM_TYPE_NULL120 ComplexType: IMAGE_SYM_DTYPE_NULL121 StorageClass: IMAGE_SYM_CLASS_STATIC122 SectionDefinition:123 Length: 564124 NumberOfRelocations: 0125 NumberOfLinenumbers: 0126 CheckSum: 0127 Number: 0128 - Name: '.text$mn'129 Value: 0130 SectionNumber: 3131 SimpleType: IMAGE_SYM_TYPE_NULL132 ComplexType: IMAGE_SYM_DTYPE_NULL133 StorageClass: IMAGE_SYM_CLASS_STATIC134 SectionDefinition:135 Length: 3136 NumberOfRelocations: 0137 NumberOfLinenumbers: 0138 CheckSum: 4021952397139 Number: 0140 - Name: main141 Value: 0142 SectionNumber: 3143 SimpleType: IMAGE_SYM_TYPE_NULL144 ComplexType: IMAGE_SYM_DTYPE_FUNCTION145 StorageClass: IMAGE_SYM_CLASS_EXTERNAL146...147