[lldb-dev] Proposal: Using LLD in tests

Adrian McCarthy via lldb-dev lldb-dev at lists.llvm.org
Thu May 3 14:20:55 PDT 2018


>  (it seems the "native" pdb reading apis in llvm are not all implemented)

Sorry, I missed this thread earlier.  That's true, the native PDB reading
APIs have been started but are not complete.  I'm working on that, mostly
in the context of llvm-pdbutil rather than lldb.

On Tue, May 1, 2018 at 9:14 AM, Pavel Labath via lldb-dev <
lldb-dev at lists.llvm.org> wrote:

> I have created a patch <https://reviews.llvm.org/D46318>, which extends
> lldb-test to support more precise dumping of the symbol information in a
> module. It uses lld to make sure the tests can run on any system (which has
> lld checked out) and to avoid the tests being affected by the environment.
> Let me know what you think of it.
>
> I've also tried using lld for the PDB tests. The lld part worked fine, but
> unfortunately, it seems lldb still depends on the microsoft pdb reader to
> get the symbol information (it seems the "native" pdb reading apis in llvm
> are not all implemented).
>
> On the bright side, it looks like it should be able to produce working (and
> debuggable) MachO binaries using lld. It probably does not support all the
> fancy features that the native darwin linker does, but it seemed to work
> fine for my hello world examples (the only issue I saw was that it is not
> possible to convince it to *not* require the dyld_stub_binder symbol, but
> this can be worked around). I am going to continue experimenting here.
>
>
> On Thu, 19 Apr 2018 at 19:41, Ted Woodward <ted.woodward at codeaurora.org>
> wrote:
>
>
> > Our Windows buildbots use msys for gnuisms. The makefiles in the test
> suite run fine with minimal modifications (just the object delete hack Zach
> put in to use del instead of rm; msys make doesn't accept cmd syntax while
> Cygwin make does). Now, that's using clang to build Hexagon binaries, but
> teaching the makefile to use cl syntax shouldn't be too hard. I've seen it
> done before; same makefile for windows and various unix derivatives, detect
> what OS you were running on and set CFLAGS/CXXFLAGS/LDFLAGS accordingly.
>
> > Ted
>
> > --
> > Qualcomm Innovation Center, Inc.
> > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
> Linux Foundation Collaborative Project
>
> > > -----Original Message-----
> > > From: lldb-dev [mailto:lldb-dev-bounces at lists.llvm.org] On Behalf Of
> Pavel
> > > Labath via lldb-dev
> > > Sent: Thursday, April 19, 2018 12:45 PM
> > > To: Leonard Mosescu <mosescu at google.com>
> > > Cc: aaron.lee.smith at gmail.com; LLDB <lldb-dev at lists.llvm.org>
> > > Subject: Re: [lldb-dev] Proposal: Using LLD in tests
> > >
> > > On Thu, 19 Apr 2018 at 18:19, Leonard Mosescu <mosescu at google.com>
> > > wrote:
> > >
> > > >>    the PDB tests under lit/SymbolFile/PDB need a linker to produce
> > > >> the
> > > program database
> > >
> > >
> > > > With this proposal, would we preserve any coverage for MSVC produced
> > > debug information?
> > >
> > >
> > > Well.. the question there is what are you trying to test? Is it the
> fact your
> > > debugger works with a particular compiler+linker combination (note that
> those
> > > tests already compile with clang-cl), or that your pdb-parsing code is
> sane.
> > > (integration vs. regression test).
> > >
> > > Historically we've only had the former kind of tests (dotest), and
> we've had the
> > > ability (and used it) to run those tests against different kinds of
> compilers. This
> > > is all nice, but it means that a specific test will be testing a
> different thing for
> > > every person who runs it. That's why I would like to build up a suite
> of more
> > > regression-like tests (*). I would say that the tests under lit/***
> should be
> > > regression tests and our goal should be to remove as many system
> > > dependencies as possible, and leave the job of testing integration with
> a
> > > specific toolchain to "dotest" tests (**).
> > >
> > > Technically, the answer to your question is "no", because currently
> dotest tests
> > > don't know how to work with cl+link. Making that work would be an
> interesting
> > > project (although a bit annoying as the Makefiles are full of
> gcc-isms).
> > > However, I don't think that should stop us here.
> > >
> > > (*) Ideally I would like to leave even the compiler out of the equation
> for these
> > > tests, and make it so that the tests always run on the exact same set
> of bytes. I
> > > am hoping I will be able to write at least some tests using .s files.
> However, I
> > > don't think I will do that for all of them, because these files can be
> > > long/verbose/tedious to write.
> > >
> > > (**) However, even "dotest" tests should have a "default" mode which is
> as
> > > hermetic as possible.
> > > _______________________________________________
> > > lldb-dev mailing list
> > > lldb-dev at lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180503/87dcab15/attachment.html>


More information about the lldb-dev mailing list