[Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 19 10:58:50 PST 2016

On Fri, Feb 19, 2016 at 10:43 AM Greg Clayton <clayborg at gmail.com> wrote:

> We should be covering this using API tests that make an example like the
> one above and setting breakpoints in the inline header file. We have many
> tests for this. It is hard to get compilers to generate things that you can
> put in unit tests since they often change.
What I mean is, there's a lot of magic that happens between the high level
of the API test and the low level SymbolFile plugin.  And because of all
that, you can't really write an API test or set of API tests that answers
the question "Is the SymbolFile plugin implemented correctly?"  You can
write some that test whether specific features of the debugger work
correctly.  But only with the inputs you've specified.

For someone implementing a SymbolFile plugin, there's a lot of work that
goes into understanding the expectations of the class and what the methods
are supposed to return in different scenarios.  Having API tests doesn't
really help with this.  On the other hand, if when designing the SymbolFile
plugin architecture, you decide "if `check_inlines` is true, then the
resulting SymbolContextList should satisfy some property", that's very easy
to check with a unit test with just 5-10 lines of C++, and when you have a
large collection of these tests, it becomes very easy for someone
implementing a new one to figure out how to make everything work, or making
changes to an existing SymbolFile without breaking anything (including
things that someone didn't have the foresight to write an API test for).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160219/f5310f6d/attachment.html>

More information about the lldb-commits mailing list