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

Thirumurthi, Ashok ashok.thirumurthi at intel.com
Tue Sep 17 20:36:03 PDT 2013


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

Are you able to apply your patches and test the build and run the suite on other platforms such as 64-bit Ubuntu?  Even if the community helps with pre-commit testing, we'll need to team up to debug regressions.  When I say 'other platforms', a minimum are the platforms that are tested on the buildbots.  It's always nice to test manually on OS/X as well, but that is getting less valuable given the current failures.  I assume that a FreeBSD buildbot and Linux i386 build stages are around the corner as well.

Separately, it would be good to work as a community to add remote testing to the suite.  This is now more practical because of lldb-platform for two reasons.  We can automate more of the platform discovery and test setup (i.e. uploading of a debug server and the application to debug).  Secondly, lldb-platform provides a decent fraction of what we are missing in gdbserver.  So, it would be practical to test on a wider range of platforms using gdbserver + lldb-platform + a register definition file.  The same tests should run against debugserver with a slightly different harness.

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

I'll let the code-owner for the command-line driver (Greg or Jim) make the call here.  If you check-in the #ifdef edition now, would that be with the understanding that there will be a more maintainable solution later?  Incidentally, did you consider using the FreeBSD licensed MinGWEditLine?
    http://mingweditline.sourceforge.net/?Description

> 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> [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<mailto: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<mailto:ripzonetriton at gmail.com>> wrote:
On Sun, Aug 25, 2013 at 1:53 PM, Virgile Bello <virgile.bello at gmail.com<mailto: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<mailto: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/20130918/489a37d3/attachment.html>


More information about the lldb-dev mailing list