This is an archive of the discontinued LLVM Phabricator instance.

Define DbiStreamBuilder::addSectionMap.
ClosedPublic

Authored by ruiu on Oct 28 2016, 8:02 PM.

Details

Summary

This change enables LLD to construct a Section Map stream in a PDB file.
I do not understand all these fields in the Section Map yet, but it seems
like a copy of a COFF section header in another format.

With this patch, DbiStreamBuilder can emit a Section Map which
llvm-pdbdump can dump.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu updated this revision to Diff 76288.Oct 28 2016, 8:02 PM
ruiu retitled this revision from to Define DbiStreamBuilder::addSectionMap..
ruiu updated this object.
ruiu added a reviewer: zturner.
ruiu added a subscriber: llvm-commits.
zturner accepted this revision.Oct 31 2016, 10:20 AM
zturner edited edge metadata.
zturner added inline comments.
lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
283 ↗(On Diff #76288)

winnt.h defines this value IMAGE_SCN_TYPE_GROUP but it is commented out and says "Reserved". I wonder if that is the same as OMFSegDescFlags::Group. You don't have to add this, just something to think about.

308–309 ↗(On Diff #76288)

Can you use UINT16_MAX?

This revision is now accepted and ready to land.Oct 31 2016, 10:20 AM
This revision was automatically updated to reflect the committed changes.
ruiu added inline comments.Oct 31 2016, 10:56 AM
lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
308–309 ↗(On Diff #76288)

Done.