[Lldb-commits] [PATCH] D53822: [NativePDB] Add tests for dumping global variables of class type

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 29 10:50:02 PDT 2018


zturner created this revision.
zturner added reviewers: lemo, aleksandr.urakov.

Previous patches added support for dumpign global variables of builtin types, so this patch does the same for class types.

For the most part, everything just worked, there was only one minor bug fix needed, which was that when a variable is of a modified class type (const, volatile, etc), we can't resolve the forward decl in `CreateAndCacheType`, so when it comes time to call `CompleteType`, one of our asserts was firing because we expected a Class, Struct, Enum, or Union, but we were getting an `LF_MODIFIER`.  The other issue was that one of my tests added an array member, and we hadn't yet handled them, so I just went ahead and handled them since it was easy.

There's probably room for lots of interesting test cases here, but these are the ones I was able to come up with.


https://reviews.llvm.org/D53822

Files:
  lldb/lit/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
  lldb/lit/SymbolFile/NativePDB/global-classes.cpp
  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: D53822.171537.patch
Type: text/x-patch
Size: 14743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181029/79f3aced/attachment.bin>


More information about the lldb-commits mailing list