[PATCH] D31309: [PDB] Use two DBs when dumping the IPI stream

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 14:16:37 PDT 2017


rnk created this revision.

When dumping these records from an object file section, we should use
only one type database. However, when dumping from a PDB, we should use
two: one for the type stream and one for the IPI stream.

Certain type records that normally live in the .debug$T object file
section get moved over to the IPI stream of the PDB file and they get
new indices.

So far, I've noticed that the MSVC linker always moves these records
into IPI:

- LF_FUNC_ID
- LF_MFUNC_ID
- LF_STRING_ID
- LF_SUBSTR_LIST
- LF_BUILDINFO
- LF_UDT_MOD_SRC_LINE

These records have index fields that can point into TPI or IPI. In
particular, LF_SUBSTR_LIST and LF_BUILDINFO point to LF_STRING_ID
records to describe compilation command lines.

I've modified the dumper to have an optional pointer to the item DB, and
to do type name lookup of these fields in that DB. See printItemIndex.
The result is that our pdbdump-headers.test is more faithful to the PDB
contents and the output is less confusing.


https://reviews.llvm.org/D31309

Files:
  include/llvm/DebugInfo/CodeView/TypeDatabase.h
  include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h
  lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
  test/DebugInfo/PDB/pdbdump-headers.test
  tools/llvm-pdbdump/LLVMOutputStyle.cpp
  tools/llvm-pdbdump/LLVMOutputStyle.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31309.92867.patch
Type: text/x-patch
Size: 22549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170323/be785d7e/attachment.bin>


More information about the llvm-commits mailing list