[Lldb-commits] [PATCH] D53511: [NativePDB] Support type lookup by name

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 22 10:08:27 PDT 2018


zturner created this revision.
zturner added reviewers: labath, lemo, aleksandr.urakov, stella.stamenova, asmith.
Herald added subscribers: arphaman, mgorny.

This is the minimal set of functionality necessary to support type lookup by name in the native PDB plugin.

For the purposes of testing I decided to bypass `lldb-test` and go with a scripted lldbinit file.  I'm sticking with this approach wherever possible to prove that this is "true" cross-platform debugger functionality.  However, there are definite limitations.  For example, the output format of `type lookup` has some limitations.  It doesn't print the layout of the type in any kind of detail (e.g. field offsets)`, it doesn't support lookup by regex, it doesn't print the underlying type of an enumeration, it doesn't support limiting the scope of the search to specific kinds of types, so there is definitely room for `lldb-test` to come into the picture here to expand the coverage since we have full control over the output format.

I tried to think of some interesting test cases to exercise some edge cases here, but I welcome some ideas for other interesting cases.  I consciously avoided things like bit fields, member functions, pointers to members, and virtual bases because there was a balancing act between implementing a useful piece of functionality and keeping the patch small enough that it can be understandable enough to review meaningfully.

Welcome any feedback.  Hopefully this is getting to the point that maybe it's hackable by others as well, although I'm definitely going to continue working on it.


https://reviews.llvm.org/D53511

Files:
  lldb/lit/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
  lldb/lit/SymbolFile/NativePDB/tag-types.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
  lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
  lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53511.170447.patch
Type: text/x-patch
Size: 51107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181022/da698dac/attachment-0001.bin>


More information about the lldb-commits mailing list