forked from OSchip/llvm-project
216 lines
11 KiB
Plaintext
216 lines
11 KiB
Plaintext
This test verifies that we produce PDBs compatible with MSVC in various ways.
|
|
We check in a cl-generated object file, PDB, and original source which serve
|
|
as the "baseline" for us to measure against. Then we link the same object
|
|
file with LLD and compare the two PDBs. Since the baseline object file and
|
|
PDB are already checked in, we just run LLD on the object file.
|
|
|
|
RUN: rm -f %T/pdb-diff-lld.pdb %T/pdb-diff-lld.exe
|
|
RUN: lld-link /debug /pdb:%T/pdb-diff-lld.pdb /out:%T/pdb-diff-lld.exe /nodefaultlib \
|
|
RUN: /entry:main %S/Inputs/pdb-diff.obj
|
|
RUN: llvm-pdbutil diff -result -values=false -left-bin-root=%S -right-bin-root=D:/src/llvm-mono/lld/test/COFF/ \
|
|
RUN: %T/pdb-diff-lld.pdb %S/Inputs/pdb-diff-cl.pdb | FileCheck %s
|
|
|
|
CHECK: ----------------------
|
|
CHECK-NEXT: | MSF Super Block |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: | File | |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: | Block Size | I |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: | Block Count |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: | Unknown 1 | I |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: | Directory Size |
|
|
CHECK-NEXT: |----------------+---|
|
|
CHECK-NEXT: ------------------------------------
|
|
CHECK-NEXT: | Stream Directory |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | File | |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Stream Count | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Old MSF Directory | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | PDB Stream | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | TPI Stream | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | DBI Stream | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | IPI Stream | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | New FPO Data | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Section Header Data | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Named Stream "/names" | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Named Stream "/LinkInfo" | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Module "Inputs\pdb-diff.obj" | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Module "* Linker *" | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | TPI Hash | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | IPI Hash | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Public Symbol Hash | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Global Symbol Hash | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Symbol Records | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: ------------------------------------
|
|
CHECK-NEXT: | String Table |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | File | |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Number of Strings | D |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Hash Version | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Byte Size |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Signature | I |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | Empty Strings |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | {{.*}}pdb-diff.cpp | {{[EI]}} |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | $T0 $ebp = $...p $T0 8 + = | D |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: | d:\src\llvm-...er internal) | D |
|
|
CHECK-NEXT: |------------------------------+---|
|
|
CHECK-NEXT: ----------------------------
|
|
CHECK-NEXT: | PDB Stream |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | File | |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Stream Size |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Age | I |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Guid | D |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Signature | D |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Version | I |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Features (set) | I |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Feature | I |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Named Stream Size |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | Named Streams (map) | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | /names | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: | /LinkInfo | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------+---|
|
|
CHECK-NEXT: ----------------------------------------------
|
|
CHECK-NEXT: | DBI Stream |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | File | |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Dbi Version | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Age | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Machine | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Flags | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Build Major | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Build Minor | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Build Number | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | PDB DLL Version | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | PDB DLL RBLD | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (FPO) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (Exception) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (Fixup) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (OmapToSrc) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (OmapFromSrc) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (SectionHdr) | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (TokenRidMap) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (Xdata) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (Pdata) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (NewFPO) | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | DBG (SectionHdrOrig) | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Globals Stream | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Publics Stream | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Symbol Records | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Has CTypes | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Is Incrementally Linked | D |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Is Stripped | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Module Count | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Source File Count | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Module "Inputs\pdb-diff.obj" |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Modi | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Obj File Name | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Debug Stream | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - C11 Byte Size | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - C13 Byte Size | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - # of files | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Pdb File Path Index | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Source File Name Index | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Symbol Byte Size |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | Module "* Linker *" |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Modi | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Obj File Name | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Debug Stream | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - C11 Byte Size | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - C13 Byte Size | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - # of files | I |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Pdb File Path Index | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Source File Name Index | {{[EI]}} |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
CHECK-NEXT: | - Symbol Byte Size |
|
|
CHECK-NEXT: |----------------------------------------+---|
|
|
|
|
|