This is an archive of the discontinued LLVM Phabricator instance.

Parse each module's module info stream
ClosedPublic

Authored by zturner on May 6 2016, 11:36 AM.

Details

Summary

This basically jsut pulls the major components of the module debug info stream out. It doesn't interpret any of this data semantically because that requires more investigation. But hopefully this at least presents a high level picture of what data is in each module's debug info stream. Subsequent patches will dig deeper and try to parse the symbol substream and the line info substreams.

Diff Detail

Event Timeline

zturner updated this revision to Diff 56442.May 6 2016, 11:36 AM
zturner retitled this revision from to Parse each module's module info stream.
zturner updated this object.
zturner added reviewers: ruiu, rnk.
zturner added a subscriber: llvm-commits.
rnk edited edge metadata.May 6 2016, 12:50 PM

All of this code is still dead. Are you sure you don't want to hold off on committing this until some kind of byte dumping is hooked up from llvm-pdbdump?

include/llvm/DebugInfo/PDB/Raw/ModStream.h
11

Wouldn't the header guard be named ...RAW_MODSTREAM_H?

lib/DebugInfo/PDB/CMakeLists.txt
36

consider sorting these at some point

lib/DebugInfo/PDB/Raw/ModStream.cpp
32

Same thought as before about adding errorCorruptFile or something.

ruiu added inline comments.May 6 2016, 2:58 PM
lib/DebugInfo/PDB/Raw/ByteStream.cpp
27–29

Why do you manage ownership by hand instead of unique_ptr?

zturner added inline comments.May 6 2016, 3:01 PM
lib/DebugInfo/PDB/Raw/ByteStream.cpp
27–29

Whether or not the data is owned should be optional. I could change the bool to a unique_ptr and only initialize it optionally, seems like that would work and be fine.

zturner updated this revision to Diff 56481.May 6 2016, 4:46 PM
zturner edited edge metadata.

Updated based on suggestions. Also now dumps some information from each module's stream, so that it's not dead code anymore.

rnk accepted this revision.May 9 2016, 9:53 AM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.May 9 2016, 9:53 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r268942.