[lldb-dev] Merging/Unification of windows and trunk builds

Virgile Bello virgile.bello at gmail.com
Fri Sep 20 15:51:31 PDT 2013


Quick update: I've just committed to trunk all the patches for MSVC12
(Visual Studio 2013 RC) build support.
It should now be possible to use cmake to generate a Visual Studio solution
(.sln) and compile LLDB under both Visual Studio 2013 and MingW32. This
include all LLDB libraries, not the lldb.exe driver though.
It's probably easy to add Visual Studio 2012 support as well (just a few
changes).

Unsupported:
- lldb.exe driver (Deepak is working on it)
- Python support

I will now focus my work on finishing and merging lldbProcessWindows, so
that LLDB can debug win32 clang/gcc executables with LLDB. My current
version already work for some simple executables so hopefully it shouldn't
be far away.
This should make LLDB usable in real scenarios/products for the Win32
LLVM/Clang toolchain.

Further along the road, it would also be great to support PDB (well, not
even sure about legal aspect of it). It would probably be a priority only
when LLVM/Clang supports the MSVC ABI (I heard there was some work in that
direction), so that MSVC-compiled libraries can be used and debugged on
windows.

Thanks again to all the people who helped for this integration (especially
the authors of the original windows branch).

Virgile


On Wed, Sep 18, 2013 at 8:18 PM, Greg Clayton <gclayton at apple.com> wrote:

>
> On Sep 17, 2013, at 6:30 AM, Deepak Panickal <deepak at codeplay.com> wrote:
>
> > Hi,
> >
> > We cannot run the test suite on Windows as we've not added native
> debugging on Windows. A lot of the tests compile a native executable  which
> will not work in Windows. One idea to go about  testing would be to add a
> remote target such as connecting to a remote debugserver.
>
> This is what the "platform" stuff that we merged in will start to be able
> to do. There are going to need to be many modifications to the test suite
> to get it to run remotely. Most of them are making sure we involve the
> platform to install/upload/download files prior to running each test.
> Before running the remote tests a "lldb-platform" binary will need to be
> started on the remote system then in the test suite python code we would
> need to do the equivalent of:
>
> (lldb) platform select remote-linux
> (lldb) platform connect connect://remote.linux.box:1234
>
> Now when we run the tests, we now know we are connected to a remote system
> and after each test suite build we would need to:
> - compile in host
> - install executable or shared libraries on remote host prior to running
> the test
> - then run the program remotely (which should happen automagically if we
> are connected to a remote platform)
> - get any files that are produced by the test (stdout redirected files,
> etc) back onto the host for the test suite to handle
>
> A lot of the platform code has been started, and there is still work to be
> done to finish this off, but the work is _very_ worthwhile.
>
> > As a first focused patch, we can consider the LLDB command-line driver.
>  The current driver depends on libeditline, which is not available on
> Windows. The version we have developed contains a lot of #ifdefs, generally
> because editline has been integrated quite deeply into the driver.
> >
> > Would it be acceptable to add #ifdefs around most of the libedit code to
> get it working on windows, or would refactoring more of the library into
> IOChannel from Driver to allow for a windows-targeted IOChannel be more
> ideal?
> > We pretty much have a version based on #ifdefs ready to go.  Refactoring
> would be cleaner in the long run but take more time to develop.
>
> Abstracting it into a new class is the way to do. The main questions is if
> we try and build this into the LLDB shared library or into just the driver.
> Just the driver for now would suffice. Feel free to make a wrapper class
> for libedit as long as we don't lose any functionality that currently
> exists.
>
> Greg
>
> > Thanks,
> > Deepak
> >
> >
> > On 16/09/2013 17:05, Thirumurthi, Ashok wrote:
> >> Nice to hear, Deepak,
> >>
> >> Are you in a position to run the test suite on Windows?  Have you
> considered breaking down the work into more focused patches?
> >>
> >> I expect that LLDB will be branched in early November (around the time
> of the next llvm developer conference).  That gives folks a chance to meet
> in person to resolve release blockers.  So, it would be good to aim for a
> stable trunk on that time-frame,
> >>
> >> -        Ashok
> >>
> >> From: lldb-dev-bounces at cs.uiuc.edu [mailto:lldb-dev-bounces at cs.uiuc.edu]
> On Behalf Of Deepak Panickal
> >> Sent: Monday, September 16, 2013 10:42 AM
> >> To: lldb-dev at cs.uiuc.edu
> >> Subject: Re: [lldb-dev] Merging/Unification of windows and trunk builds
> >>
> >> Hello all,
> >>
> >> Recently, there has been quite some activity towards more Windows
> support in LLDB. We have been working on this for a while and have created
> a patch based on the Windows branch and the changes Virgile has been
> committing to trunk.
> >>
> >> The aim being for the patch to successfully build in Visual Studio 2012
> for those developers who want 'native' windows support. The November CTP
> version of the Visual Studio 2012 compiler has to be used due to the recent
> C++11 changes in trunk.
> >>
> >> We've created an LLDB driver as well for Windows by removing the
> editline dependency on Windows. This is just support for the lldb library
> itself, we have not added on-windows debugging. We primarily use Windows
> LLDB with the remote plugins.
> >>
> >> The patch will be ready soon as we're doing a final cleanup and we'll
> submit it shortly.
> >>
> >> Thanks,
> >> Deepak
> >>
> >> On 27/08/2013 16:54, Virgile Bello wrote:
> >> Yes sure, I keep in touch with Carlos. He's been very helpful and
> supportive.
> >>
> >> MSVC11 changes are related to the lack of <functional>, and some
> template instantiations issues, so not so huge different but that might be
> enough so that it is better kept as a separate patch/branch until everybody
> migrate to MSVC12? (MSVC11 doesn't support full C++11 which LLDB targets,
> so if we want to keep trunk clean from those issues it seems to be the only
> option).
> >> Note that you can compile it in MSVC11 with toolset vc120.
> >>
> >> For lldbProcessWindows, I will merge it to LLDB.
> >> For the MSVC AD7 debugengine, not sure yet if I will open-source it or
> do a low-cost commercial product out of it.
> >>
> >> Didn't have a chance to check embarcadero code yet, I will do that as
> soon as I am finished with the windows patches. However, it seems they took
> a different approach (using windows implementation of POSIX functions).
> >>
> >> Sincerely,
> >> Virgile
> >>
> >>
> >> On Mon, Aug 26, 2013 at 3:41 AM, João Matos <ripzonetriton at gmail.com>
> wrote:
> >> On Sun, Aug 25, 2013 at 1:53 PM, Virgile Bello <virgile.bello at gmail.com>
> wrote:
> >> I currently target MSVC12 since it is supposed to have better C++11
> support, but going from MSVC12 to MSVC11 is only a few changes.
> >>
> >> If everybody is OK to go this way, most of the windows branch will end
> up being merged.
> >> If people are interested in helping, I could publish the branch so we
> could work on it together.
> >>
> >> After that there might still be some changes in the windows branch that
> I didn't do, so it would be good to evaluate what's left (but probably not
> so much).
> >>
> >> I am OK with this, but better talk with Carlos to make sure you get all
> of the fixes he has been piling on top of the Windows branch. I'll try to
> test your patches with MSVC11 and report whatever problems are found.
> >>
> >> Now, I happen to be working on the
> lldbProcessWindows/lldbDynamicLibraryWindows plugins. Many features are
> working (stack trace, breakpoints, stepping, disassembly, threads, locals,
> etc...).
> >> I currently use it in a MSVC DebugEngine plugin. It's still early stage
> but it's starting to work.
> >>
> >> Let me know what you think!
> >>
> >> This sounds awesome. I'd love to give it a try, are you open-sourcing
> the plugin?
> >>
> >> Also are you re-using any of the work that was open-sourced by
> Embarcadero for the port? I only gave it a quick glance, but it seemed to
> have a lot of code that could be re-used.
> >>
> >> --
> >> João Matos
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> lldb-dev mailing list
> >> lldb-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> >>
> >
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130921/e83be287/attachment.html>


More information about the lldb-dev mailing list