[Lldb-commits] [PATCH] D56461: [NativePDB] Add support for parsing typedefs and make lldb-test work with the native reader.

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 8 15:59:46 PST 2019


zturner created this revision.
zturner added reviewers: aleksandr.urakov, amccarth, lemo, labath.
Herald added a subscriber: aprantl.

Typedefs are represented as `S_UDT` records in the globals stream.  This creates a strange situation where "types" are actually represented as "symbols", so they need special handling.

In order to test this, we don't just use lldb and print out some variables causing the AST to get created, because variables whose type is a typedef will have debug info referencing the original type, not the typedef.  So we use `lldb-test` instead which will parse all debug info in the entire file.  This exposed some problems with `lldb-test` and the native reader, mainly that certain types of obscure symbols which we can find when iterating every single record would trigger crashes.  These have been fixed as well so that `lldb-test` can be used to test this functionality.

After this patch, I think most of the remaining DIA PDB tests can be re-written as native PDB tests, so hopefully this means we cane eliminate the DIA reader quite soon.


https://reviews.llvm.org/D56461

Files:
  lldb/include/lldb/Symbol/CompileUnit.h
  lldb/lit/SymbolFile/NativePDB/typedefs.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
  lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.h
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56461.180759.patch
Type: text/x-patch
Size: 24829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190108/f6989857/attachment-0001.bin>


More information about the lldb-commits mailing list