This is an archive of the discontinued LLVM Phabricator instance.

Make llvm-pdbdump print CodeView type records
ClosedPublic

Authored by zturner on May 6 2016, 8:58 AM.

Diff Detail

Event Timeline

zturner updated this revision to Diff 56422.May 6 2016, 8:58 AM
zturner retitled this revision from to Make llvm-pdbdump print CodeView type records.
zturner updated this object.
zturner added reviewers: rnk, amccarth.
zturner added a subscriber: llvm-commits.
amccarth edited edge metadata.May 6 2016, 10:04 AM

The code LGTM. I don't know much about the lit tests yet.

Please include context in future diffs.

rnk accepted this revision.May 6 2016, 10:57 AM
rnk edited edge metadata.

lgtm

include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
82–83

Woops, this comment is not accurate. Probably worth updating in this CL. This was part of a past bad idea to have this thing work on parts of non-contiguous type streams.

include/llvm/DebugInfo/CodeView/TypeDumper.h
34

You should document that this needs to be called in order on a type stream, otherwise it won't be able to cross-reference type indices to past type records.

tools/llvm-pdbdump/llvm-pdbdump.cpp
365–366

Any reason not to pass this boolean in above as the PrintRecordBytes to the dumper constructor instead of printing the bytes manually here? If you prefer "Bytes" to "LeafData" we can totally change it.

This revision is now accepted and ready to land.May 6 2016, 10:57 AM
zturner added inline comments.May 6 2016, 11:09 AM
tools/llvm-pdbdump/llvm-pdbdump.cpp
365–366

Because both the type record and the binary data are conditional based on different conditions. In other words, if someone passed -dump-tpi-record-bytes but not -dump-tpi-records then they would want to see the block data but not the record data, and there's no way to do that. I could change the interface to the type dumper, but this seemed simpler.

Also I can't commit this until the Error patch is in, since this one depends on that.

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r268808.