[lld] r281678 - Check /pdb output using llvm-pdbdump.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 15 16:14:40 PDT 2016
Author: ruiu
Date: Thu Sep 15 18:14:40 2016
New Revision: 281678
URL: http://llvm.org/viewvc/llvm-project?rev=281678&view=rev
Log:
Check /pdb output using llvm-pdbdump.
test/COFF/rsds.test checks only RSDS directory in a DLL and
didn't check the validity of the PDF file produced.
(Technically the produced PDB is not valid because it is really
a stub, but this test is still good to have.)
Added:
lld/trunk/test/COFF/pdb.test
Added: lld/trunk/test/COFF/pdb.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb.test?rev=281678&view=auto
==============================================================================
--- lld/trunk/test/COFF/pdb.test (added)
+++ lld/trunk/test/COFF/pdb.test Thu Sep 15 18:14:40 2016
@@ -0,0 +1,86 @@
+# RUN: yaml2obj %s > %t.obj
+# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:DllMain %t.obj
+# RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory %t.pdb | FileCheck %s
+
+# CHECK: MSF:
+# CHECK-NEXT: SuperBlock:
+# CHECK-NEXT: BlockSize: 4096
+# CHECK-NEXT: FreeBlockMap: 1
+# CHECK-NEXT: NumBlocks: 3
+# CHECK-NEXT: NumDirectoryBytes: 4
+# CHECK-NEXT: Unknown1: 0
+# CHECK-NEXT: BlockMapAddr: 1
+# CHECK-NEXT: NumDirectoryBlocks: 1
+# CHECK-NEXT: DirectoryBlocks: [ 2 ]
+# CHECK-NEXT: NumStreams: 0
+# CHECK-NEXT: FileSize: 12288
+# CHECK-NEXT: StreamSizes: [ ]
+# CHECK-NEXT: StreamMap:
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 31C0C3
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .bss
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 3
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 3963538403
+ Number: 1
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: .bss
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ - Name: '@feat.00'
+ Value: 1
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: _DllMain
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
More information about the llvm-commits
mailing list