[PDB] Fix section contributions
authorReid Kleckner <rnk@google.com>
Thu, 3 Aug 2017 21:15:09 +0000 (21:15 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 3 Aug 2017 21:15:09 +0000 (21:15 +0000)
commit175af4bcc78189d48dbf27f36db5de0a51ac98fe
tree46492ef8a928eac18f6ffff32ec57a0f14ee81f9
parent144ee2b4d772e38ec5f183cb2e015417d9af5c57
[PDB] Fix section contributions

Summary:
PDB section contributions are supposed to use output section indices and
offsets, not input section indices and offsets.

This allows the debugger to look up the index of the module that it
should look up in the modules stream for symbol information. With this
change, windbg can now find line tables, but it still cannot print local
variables.

Fixes PR34048

Reviewers: zturner

Subscribers: hiraditya, ruiu, llvm-commits

Differential Revision: https://reviews.llvm.org/D36285

llvm-svn: 309987
lld/COFF/PDB.cpp
lld/COFF/PDB.h
lld/COFF/Writer.cpp
lld/test/COFF/pdb-publics-import.test
lld/test/COFF/pdb.test
llvm/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp