[PATCH] D64428: Teach `llvm-pdbutil pretty -native` about `-injected-sources`

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 10:36:19 PDT 2019


thakis created this revision.
thakis added a reviewer: zturner.
Herald added subscribers: hiraditya, mgorny.
Herald added a project: LLVM.

This isn't 100% done yet. I'm looking for high-level feedback at this point.

- `pretty -native -injected-sources` works with this patch, and produces identical output to the dia version

- `-injected-source-content` isn't implemented yet; I'd like to do this before landing it.

- I'd like to get feedback on the high-level design here, since I'm not familiar with how things are supposed to be done in this code. In particular, does the split between NativeEnumInjectedSources and InjectedSourceStream make sense? Are these names consistent with the rest of the code?

- The injected source _writing_ is done in PDBFileBuilder. Now that InjectedSourceStream exists, should there be a InjectedSourceStreamBuilder that does the building part? (If so, probably in a follow-up)

- InjectedSourceStream needs to read a hash table, but it doesn't really need a traits object. So I split HashTable into a super class that doesn't use the traits and a subclass that works as before. This is a bit yucky, and it's likely to change again once I implement `-injected-source-content` so I'd probably just ignore changes in that file for now.

(I wish I had had this when working on PR41626, and when I was looking at natvis stuff again the other day I realized I had almost forgotten all this stuff again. So I figured I'd try to implement this while I still remember it.)


https://reviews.llvm.org/D64428

Files:
  llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h
  llvm/include/llvm/DebugInfo/PDB/Native/InjectedSourceStream.h
  llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumInjectedSources.h
  llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h
  llvm/lib/DebugInfo/PDB/CMakeLists.txt
  llvm/lib/DebugInfo/PDB/Native/InjectedSourceStream.cpp
  llvm/lib/DebugInfo/PDB/Native/NativeEnumInjectedSources.cpp
  llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
  llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
  llvm/test/tools/llvm-pdbutil/injected-sources-native.test
  llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
  llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64428.208735.patch
Type: text/x-patch
Size: 27004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190709/41747da4/attachment-0001.bin>


More information about the llvm-commits mailing list