diff options
author | Zachary Turner <zturner@google.com> | 2016-06-02 20:11:22 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-06-02 20:11:22 +0000 |
commit | 7eb6d358afb1461990939b9b364e86f9b1c41eaf (patch) | |
tree | 0242b917eef3693fa9c68c7ba1f59ec53b72b27a /llvm/lib/DebugInfo/CodeView | |
parent | 43578ec2a853b5dc98d63d3fd4c42cd1083ff909 (diff) | |
download | bcm5719-llvm-7eb6d358afb1461990939b9b364e86f9b1c41eaf.tar.gz bcm5719-llvm-7eb6d358afb1461990939b9b364e86f9b1c41eaf.zip |
[llvm-pdbdump] Dump CodeView line information.
This first pass only splits apart the records and dumps the line
info kinds and binary data. Subsequent patches will parse out
the binary data into more useful information and dump it in
detail.
llvm-svn: 271576
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/EnumTables.cpp | 20 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/StreamReader.cpp | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/EnumTables.cpp b/llvm/lib/DebugInfo/CodeView/EnumTables.cpp index b209aa9f98e..edb489767d4 100644 --- a/llvm/lib/DebugInfo/CodeView/EnumTables.cpp +++ b/llvm/lib/DebugInfo/CodeView/EnumTables.cpp @@ -231,6 +231,23 @@ static const EnumEntry<uint32_t> FrameProcSymFlagNames[] = { CV_ENUM_CLASS_ENT(FrameProcedureOptions, GuardCfw), }; +static const EnumEntry<uint32_t> ModuleSubstreamKindNames[] = { + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, None), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, Symbols), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, Lines), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, StringTable), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, FileChecksums), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, FrameData), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, InlineeLines), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, CrossScopeImports), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, CrossScopeExports), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, ILLines), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, FuncMDTokenMap), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, TypeMDTokenMap), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, MergedAssemblyInput), + CV_ENUM_CLASS_ENT(ModuleSubstreamKind, CoffSymbolRVA), +}; + static const EnumEntry<uint16_t> ExportSymFlagNames[] = { CV_ENUM_CLASS_ENT(ExportFlags, IsConstant), CV_ENUM_CLASS_ENT(ExportFlags, IsData), @@ -331,6 +348,9 @@ ArrayRef<EnumEntry<uint32_t>> getFrameProcSymFlagNames() { ArrayRef<EnumEntry<uint16_t>> getExportSymFlagNames() { return makeArrayRef(ExportSymFlagNames); } +ArrayRef<EnumEntry<uint32_t>> getModuleSubstreamKindNames() { + return makeArrayRef(ModuleSubstreamKindNames); +} ArrayRef<EnumEntry<uint8_t>> getThunkOrdinalNames() { return makeArrayRef(ThunkOrdinalNames); } diff --git a/llvm/lib/DebugInfo/CodeView/StreamReader.cpp b/llvm/lib/DebugInfo/CodeView/StreamReader.cpp index 2adf9487e5d..cc5cebc9c43 100644 --- a/llvm/lib/DebugInfo/CodeView/StreamReader.cpp +++ b/llvm/lib/DebugInfo/CodeView/StreamReader.cpp @@ -15,7 +15,7 @@ using namespace llvm; using namespace llvm::codeview; -StreamReader::StreamReader(StreamRef Stream) : Stream(Stream), Offset(0) {} +StreamReader::StreamReader(StreamRef S) : Stream(S), Offset(0) {} Error StreamReader::readBytes(ArrayRef<uint8_t> &Buffer, uint32_t Size) { if (auto EC = Stream.readBytes(Offset, Size, Buffer)) |