1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/ObjectYAML
Zachary Turner f5c6b23b50 [llvm-pdbutil] rewrite the "raw" output style.
After some internal discussions, we agreed that the raw output style had
outlived its usefulness. It was originally created before we had even
thought of dumping to YAML, and it was intended to give us some insight
into the internals of a PDB file. Now we have YAML mode which does
almost exactly this but is more powerful in that it can round-trip back
to a PDB, which the raw mode could not do. So the raw mode had become
purely a maintenance burden.

One option was to just delete it. However, its original goal was to be
as readable as possible while staying close to the "metal" - i.e.
presenting the output in a way that maps directly to the underlying file
format. We don't actually need that last requirement anymore since it's
covered by the yaml mode, so we could repurpose "raw" mode to actually
just be as readable as possible.

This patch implements about 80% of the functionality previously in raw
mode, but in a completely different style that is more akin to what
cvdump outputs. Records are very compressed, often times appearing on
just one line. One nice thing about this is that it makes full record
matching easier, because you can grep for indices, names, and leaf types
on a single line often.

See the tests for some examples of what the new output looks like.

Note that this patch actually regresses the functionality of raw mode in
a few areas, but only because the patch was already unreasonably large
and going 100% would have been even worse. Specifically, this patch is
missing:

The ability to dump module debug subsections (checksums, lines, etc)
The ability to dump section headers
Aside from that everything is here. While goign through the tests fixing
them all up, I found many duplicate tests. They've been deleted. In
subsequent patches I will go through and re-add the missing
functionality.

Differential Revision: https://reviews.llvm.org/D34191

llvm-svn: 305495
2017-06-15 19:34:41 +00:00
..
CMakeLists.txt [ObjectYAML] Split CodeViewYAML into 3 pieces. 2017-05-31 04:17:13 +00:00
CodeViewYAMLDebugSections.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
CodeViewYAMLSymbols.cpp [llvm-pdbutil] rewrite the "raw" output style. 2017-06-15 19:34:41 +00:00
CodeViewYAMLTypes.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
COFFYAML.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
DWARFEmitter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DWARFVisitor.cpp [ObjectYAML] Fix issue with DWARF2 AddrSize 8 2017-03-07 21:34:35 +00:00
DWARFVisitor.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
DWARFYAML.cpp [ObjectYAML] Add support for DWARF5 Unit header 2017-03-07 18:50:58 +00:00
ELFYAML.cpp MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table. 2017-06-14 18:52:12 +00:00
LLVMBuild.txt [CodeView] Move CodeView YAML code to ObjectYAML. 2017-05-30 21:53:05 +00:00
MachOYAML.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
ObjectYAML.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
WasmYAML.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
YAML.cpp