[Lldb-commits] [PATCH] D47708: PDB support of function-level linking and splitted functions

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 8 11:52:29 PDT 2018


On Fri, 8 Jun 2018 at 18:48, Leonard Mosescu <mosescu at google.com> wrote:
>
> So what's your take on this particular case? As far as I can see (please correct me if I'm wrong), the LIT-only tests:
>
> 1. Don't cover the case where a function is split into disjoint regions, right?

For this particular case, I don't think having a split function is
particularly interesting. Neither the code under test or the test
itself do anything special with the functions, the just play around
with sequences of PCs and line numbers. I definitely agree a
discontinuous function is an interesting case, but not in the context
of this test/bug.

> 2. Also don't cover the cross-targeting case (ex. the native PDB reader hosted on Linux)
This is not correct. clang and lld are perfectly capable of producing
exes and pdbs on linux. The only reason we don't run these tests on
other platforms is because our pdb reader works only on windows (this
would be great to fix, btw).


> 3. A bug in LLD might inadvertently make the tests pass w/o testing what they are supposed to
>    (let's say that it incorrectly ingores the hardcoded order and lays everything contiguously)
I would hope lld has tests for that.


Taking a step back, I think the place we disagree is on the purpose of
these tests. I view these tests as regression tests, and I don't
expect this test to validate that lldb works with a particular
toolchain. I expect it to check that it works for a particular kind of
input. In this case, that input was a file with discontinuous line
tables. To me, a linker order file (of any linker) sounds like a good
abstraction level for generating that kind of input (on linux, I might
have preferred a .s file with hardcoded .loc directives, but that
doesn't seem to be a thing on windows).

For an integration-level test that checks our integration with say
MSVC 2017, I'd recommend getting dotest-style tests running with that
toolchain.


More information about the lldb-commits mailing list