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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Oct 28 08:42:19 PDT 2018


labath added a comment.

> 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.

When implementing the debug_names accelerator tables, I also needed to test the lookup funtionality. That's how lldb-test symbols -find=(function|namespace|...) came to be.  However, there I needed to just test that a type is found and not any of it's details, so I just used whatever dumping method we had implemented already. It would definitely be possible to change this dumping format to print more detailed (and FileCheckable) information.

BTW, it might be interesting to take some of the tests in `lit/SymbolFile/DWARF/find-***` and add a `RUN: clang-cl ...` line to them, to verify that the same types/namespaces/variables are found regardless of whether we use DWARF or PDB (right now they test that .debug_names and manual dwarf indexes return the same results).


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53511





More information about the lldb-commits mailing list