[lld] r310439 - [PDB] Fix an issue writing the publics stream.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 21:23:59 PDT 2017
Author: zturner
Date: Tue Aug 8 21:23:59 2017
New Revision: 310439
URL: http://llvm.org/viewvc/llvm-project?rev=310439&view=rev
Log:
[PDB] Fix an issue writing the publics stream.
In the refactor to merge the publics and globals stream, a bug
was introduced that wrote the wrong value for one of the fields
of the PublicsStreamHeader. This caused debugging in WinDbg
to break.
We had no way of dumping any of these fields, so in addition to
fixing the bug I've added dumping support for them along with a
test that verifies the correct value is written.
Modified:
lld/trunk/test/COFF/pdb-publics-import.test
lld/trunk/test/COFF/pdb.test
Modified: lld/trunk/test/COFF/pdb-publics-import.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-publics-import.test?rev=310439&r1=310438&r2=310439&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-publics-import.test (original)
+++ lld/trunk/test/COFF/pdb-publics-import.test Tue Aug 8 21:23:59 2017
@@ -11,6 +11,7 @@ RUN: llvm-pdbutil dump %t2.pdb -publics
CHECK: Public Symbols
CHECK-NEXT: ============================================================
+CHECK-NEXT: Records
CHECK-NEXT: 112 | S_PUB32 [size = 20] `main`
CHECK-NEXT: flags = function, addr = 0001:0000
CHECK-NEXT: 64 | S_PUB32 [size = 24] `exportfn1`
Modified: lld/trunk/test/COFF/pdb.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb.test?rev=310439&r1=310438&r2=310439&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb.test (original)
+++ lld/trunk/test/COFF/pdb.test Tue Aug 8 21:23:59 2017
@@ -173,21 +173,26 @@ RAW-NEXT: 0x100A: `ret42-sub.
RAW-NEXT: 0x1008: `D:\b\vc140.pdb`
RAW-NEXT: 0x1006: ` -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X`
RAW: Public Symbols
-RAW-NEXT:============================================================
-RAW-NEXT: 20 | S_PUB32 [size = 20] `main`
-RAW-NEXT: flags = function, addr = 0002:0000
-RAW-NEXT: 0 | S_PUB32 [size = 20] `foo`
-RAW-NEXT: flags = function, addr = 0002:0016
-RAW-NOT: S_PUB32
-RAW-NEXT: Hash Records
-RAW-NEXT: off = 21, refcnt = 1
-RAW-NEXT: off = 1, refcnt = 1
-RAW-NEXT: Hash Buckets
-RAW-NEXT: 0x00000000
-RAW-NEXT: 0x0000000c
-RAW-NEXT: Address Map
-RAW-NEXT: off = 20
-RAW-NEXT: off = 0
+RAW-NEXT: ============================================================
+RAW-NEXT: Publics Header
+RAW-NEXT: sym hash = 556, thunk table addr = 0000:0000
+RAW-NEXT: GSI Header
+RAW-NEXT: sig = 0xFFFFFFFF, hdr = 0xF12F091A, hr size = 16, num buckets = 524
+RAW-NEXT: Records
+RAW-NEXT: 20 | S_PUB32 [size = 20] `main`
+RAW-NEXT: flags = function, addr = 0002:0000
+RAW-NEXT: 0 | S_PUB32 [size = 20] `foo`
+RAW-NEXT: flags = function, addr = 0002:0016
+RAW-NOT: S_PUB32
+RAW-NEXT: Hash Entries
+RAW-NEXT: off = 21, refcnt = 1
+RAW-NEXT: off = 1, refcnt = 1
+RAW-NEXT: Hash Buckets
+RAW-NEXT: 0x00000000
+RAW-NEXT: 0x0000000c
+RAW-NEXT: Address Map
+RAW-NEXT: off = 20
+RAW-NEXT: off = 0
RAW: Section Headers
RAW-NEXT: ============================================================
RAW: SECTION HEADER #1
More information about the llvm-commits
mailing list