OSDN Git Service

[PDB] Emit old fpo data to the PDB file.
authorZachary Turner <zturner@google.com>
Wed, 12 Sep 2018 21:02:01 +0000 (21:02 +0000)
committerZachary Turner <zturner@google.com>
Wed, 12 Sep 2018 21:02:01 +0000 (21:02 +0000)
commit69d3b58106974e3d93b9be8183d0ce60eef1a3cf
tree57b7b4aed23af2dfd0967157b40c1a2179b4cf56
parentf0f4c09005fad7801b6f1499c172b0b2893c9023
[PDB] Emit old fpo data to the PDB file.

r342003 added support for emitting FPO data from the
DEBUG_S_FRAMEDATA subsection of the .debug$S section to the PDB
file.  However, that is not the end of the story.  FPO can end
up in two different destinations in a PDB, each corresponding to
a different FPO data source.

The case handled by r342003 involves copying data from the
DEBUG_S_FRAMEDATA subsection of the .debug$S section to the
"New FPO" stream in the PDB, which is then referred to by the
DBI stream.  The case handled by this patch involves copying
records from the .debug$F section of an object file to the "FPO"
stream (or perhaps more aptly, the "Old FPO" stream) in the PDB
file, which is also referred to by the DBI stream.

The formats are largely similar, and the difference is mostly
only visible in masm generated object files, such as some of the
low-level CRT object files like memcpy.  MASM doesn't appear to
support writing the DEBUG_S_FRAMEDATA subsection, and instead
just writes these records to the .debug$F section.

Although clang-cl does not emit a .debug$F section ever, lld still
needs to support it so we have good debugging for CRT functions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342080 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
include/llvm/Object/COFF.h
lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
tools/llvm-pdbutil/DumpOutputStyle.cpp
tools/llvm-pdbutil/DumpOutputStyle.h