OSDN Git Service

[CodeView] Use actual strings for dealing with checksums and lines.
authorZachary Turner <zturner@google.com>
Wed, 3 May 2017 17:11:40 +0000 (17:11 +0000)
committerZachary Turner <zturner@google.com>
Wed, 3 May 2017 17:11:40 +0000 (17:11 +0000)
commitff9459966486be8b7aeef514387a01acd9c87dda
tree3f73ae0a4ff2d5659b2dd472d5c3e23d87a29344
parentf393f97e65551944380adb7611a6e96b4ff8ab8b
[CodeView] Use actual strings for dealing with checksums and lines.

The raw CodeView format references strings by "offsets", but it's
confusing what table the offset refers to.  In the case of line
number information, it's an offset into a buffer of records,
and an indirection is required to get another offset into a
different table to find the final string.  And in the case of
checksum information, there is no indirection, and the offset
refers directly to the location of the string in another buffer.

This would be less confusing if we always just referred to the
strings by their value, and have the library be smart enough
to correctly resolve the offsets on its own from the right
location.

This patch makes that possible.  When either reading or writing,
all the user deals with are strings, and the library does the
appropriate translations behind the scenes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302053 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h
include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h
include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h
include/llvm/DebugInfo/CodeView/StringTable.h
include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h
include/llvm/Support/BinaryStreamArray.h
lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp
lib/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.cpp
lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp
lib/DebugInfo/CodeView/StringTable.cpp
tools/llvm-pdbdump/llvm-pdbdump.cpp