Re: [lldb-dev] Host is now dependency free

2019-03-08 Thread Nico Weber via lldb-dev
Awesome :) Thanks much for working on this!

On Fri, Mar 8, 2019 at 4:01 PM Zachary Turner via lldb-dev <
lldb-dev@lists.llvm.org> wrote:

> It's been a long time coming and a lot of work to get here, but Host is
> now dependency free.  While this may not be enforced in the Xcode project
> (unless someone changes it to not link against any other libraries /
> targets), as of r355730 this is  enforced in the CMake build, so if new
> dependencies are introduced, it will break most non-OSX build bots.
>
> Mostly just throwing this out there so people are aware.
>
> The good news is that this gets us one step closer to a shared libraries
> build as well as a real C++ modules build, as well as being able to create
> small debugger-related tools that are not full blown debuggers.
>
> For the curious, the remaining cycles in the build graph (as well as their
> outgoing edge counts) are:
>
> 4 deps to break: lldb/Commands [3->] lldb/Expression [1->] lldb/Commands
> 5 deps to break: lldb/Plugins/SymbolFile/DWARF [4->] lldb/Expression [1->]
> lldb/Plugins/SymbolFile/DWARF
> 5 deps to break: lldb/Plugins/Language/ObjC [4->]
> lldb/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime [1->]
> lldb/Plugins/Language/ObjC
> 6 deps to break: lldb/Interpreter [1->] lldb/Breakpoint [5->]
> lldb/Interpreter
> 6 deps to break: lldb/Plugins/ScriptInterpreter/Python [2->] lldb/API
> [4->] lldb/Plugins/ScriptInterpreter/Python
> 13 deps to break: lldb/Plugins/Language/ObjC [12->] lldb/Symbol [1->]
> lldb/Plugins/Language/ObjC
> 14 deps to break: lldb/Interpreter [10->] lldb/DataFormatters [4->]
> lldb/Interpreter
> 22 deps to break: lldb/Plugins/SymbolFile/PDB [21->] lldb/Symbol [1->]
> lldb/Plugins/SymbolFile/PDB
> 23 deps to break: lldb/Target [3->] lldb/DataFormatters [20->] lldb/Target
> 26 deps to break: lldb/Expression [1->]
> lldb/Plugins/ExpressionParser/Clang [25->] lldb/Expression
> 29 deps to break: lldb/Plugins/Language/CPlusPlus [26->] lldb/Core [3->]
> lldb/Plugins/Language/CPlusPlus
> 29 deps to break: lldb/Plugins/Language/ObjC [27->] lldb/Core [2->]
> lldb/Plugins/Language/ObjC
> 29 deps to break: lldb/Core [14->] lldb/DataFormatters [15->] lldb/Core
> 33 deps to break: lldb/Expression [30->] lldb/Symbol [3->] lldb/Expression
> 37 deps to break: lldb/Expression [33->] lldb/Core [4->] lldb/Expression
> 38 deps to break: lldb/Target [1->] lldb/Plugins/Language/ObjC [37->]
> lldb/Target
> 42 deps to break: lldb/Interpreter [19->] lldb/Target [23->]
> lldb/Interpreter
> 42 deps to break: lldb/Breakpoint [39->] lldb/Core [3->] lldb/Breakpoint
> 49 deps to break: lldb/Interpreter [25->] lldb/Core [24->] lldb/Interpreter
> 51 deps to break: lldb/Target [4->] lldb/Plugins/ExpressionParser/Clang
> [47->] lldb/Target
> 55 deps to break: lldb/Plugins/SymbolFile/DWARF [54->] lldb/Symbol [1->]
> lldb/Plugins/SymbolFile/DWARF
> 62 deps to break: lldb/Plugins/ExpressionParser/Clang [58->] lldb/Symbol
> [4->] lldb/Plugins/ExpressionParser/Clang
> 69 deps to break: lldb/Target [38->] lldb/Breakpoint [31->] lldb/Target
> 72 deps to break: lldb/Target [13->] lldb/Expression [59->] lldb/Target
> 72 deps to break: lldb/Utility [71->] lldb [1->] lldb/Utility
> 104 deps to break: lldb/Target [64->] lldb/Symbol [40->] lldb/Target
> 128 deps to break: lldb/Target [7->] lldb/Plugins/Process/Utility [121->]
> lldb/Target
> 201 deps to break: lldb/Core [110->] lldb/Symbol [91->] lldb/Core
> 227 deps to break: lldb/Target [127->] lldb/Core [100->] lldb/Target
>
> Found by running scripts/analyze-project-deps.py
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Host is now dependency free

2019-03-08 Thread Adrian Prantl via lldb-dev
That's great news! I'm looking forward to having more fine-grained LLDB C++ 
modules.

-- adrian

> On Mar 8, 2019, at 1:00 PM, Zachary Turner via lldb-dev 
>  wrote:
> 
> It's been a long time coming and a lot of work to get here, but Host is now 
> dependency free.  While this may not be enforced in the Xcode project (unless 
> someone changes it to not link against any other libraries / targets), as of 
> r355730 this is  enforced in the CMake build, so if new dependencies are 
> introduced, it will break most non-OSX build bots.  
> 
> Mostly just throwing this out there so people are aware.
> 
> The good news is that this gets us one step closer to a shared libraries 
> build as well as a real C++ modules build, as well as being able to create 
> small debugger-related tools that are not full blown debuggers.
> 
> For the curious, the remaining cycles in the build graph (as well as their 
> outgoing edge counts) are:
> 
> 4 deps to break: lldb/Commands [3->] lldb/Expression [1->] lldb/Commands
> 5 deps to break: lldb/Plugins/SymbolFile/DWARF [4->] lldb/Expression [1->] 
> lldb/Plugins/SymbolFile/DWARF
> 5 deps to break: lldb/Plugins/Language/ObjC [4->] 
> lldb/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime [1->] 
> lldb/Plugins/Language/ObjC
> 6 deps to break: lldb/Interpreter [1->] lldb/Breakpoint [5->] lldb/Interpreter
> 6 deps to break: lldb/Plugins/ScriptInterpreter/Python [2->] lldb/API [4->] 
> lldb/Plugins/ScriptInterpreter/Python
> 13 deps to break: lldb/Plugins/Language/ObjC [12->] lldb/Symbol [1->] 
> lldb/Plugins/Language/ObjC
> 14 deps to break: lldb/Interpreter [10->] lldb/DataFormatters [4->] 
> lldb/Interpreter
> 22 deps to break: lldb/Plugins/SymbolFile/PDB [21->] lldb/Symbol [1->] 
> lldb/Plugins/SymbolFile/PDB
> 23 deps to break: lldb/Target [3->] lldb/DataFormatters [20->] lldb/Target
> 26 deps to break: lldb/Expression [1->] lldb/Plugins/ExpressionParser/Clang 
> [25->] lldb/Expression
> 29 deps to break: lldb/Plugins/Language/CPlusPlus [26->] lldb/Core [3->] 
> lldb/Plugins/Language/CPlusPlus
> 29 deps to break: lldb/Plugins/Language/ObjC [27->] lldb/Core [2->] 
> lldb/Plugins/Language/ObjC
> 29 deps to break: lldb/Core [14->] lldb/DataFormatters [15->] lldb/Core
> 33 deps to break: lldb/Expression [30->] lldb/Symbol [3->] lldb/Expression
> 37 deps to break: lldb/Expression [33->] lldb/Core [4->] lldb/Expression
> 38 deps to break: lldb/Target [1->] lldb/Plugins/Language/ObjC [37->] 
> lldb/Target
> 42 deps to break: lldb/Interpreter [19->] lldb/Target [23->] lldb/Interpreter
> 42 deps to break: lldb/Breakpoint [39->] lldb/Core [3->] lldb/Breakpoint
> 49 deps to break: lldb/Interpreter [25->] lldb/Core [24->] lldb/Interpreter
> 51 deps to break: lldb/Target [4->] lldb/Plugins/ExpressionParser/Clang 
> [47->] lldb/Target
> 55 deps to break: lldb/Plugins/SymbolFile/DWARF [54->] lldb/Symbol [1->] 
> lldb/Plugins/SymbolFile/DWARF
> 62 deps to break: lldb/Plugins/ExpressionParser/Clang [58->] lldb/Symbol 
> [4->] lldb/Plugins/ExpressionParser/Clang
> 69 deps to break: lldb/Target [38->] lldb/Breakpoint [31->] lldb/Target
> 72 deps to break: lldb/Target [13->] lldb/Expression [59->] lldb/Target
> 72 deps to break: lldb/Utility [71->] lldb [1->] lldb/Utility
> 104 deps to break: lldb/Target [64->] lldb/Symbol [40->] lldb/Target
> 128 deps to break: lldb/Target [7->] lldb/Plugins/Process/Utility [121->] 
> lldb/Target
> 201 deps to break: lldb/Core [110->] lldb/Symbol [91->] lldb/Core
> 227 deps to break: lldb/Target [127->] lldb/Core [100->] lldb/Target
> 
> Found by running scripts/analyze-project-deps.py
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [RFC]The future of pexpect

2019-03-08 Thread Davide Italiano via lldb-dev
After discussing this privately with Pavel we decided to try updating
pexpect instead.

On Tue, Feb 26, 2019 at 4:42 AM Pavel Labath  wrote:
>
> On 25/02/2019 22:15, Davide Italiano wrote:
> > On Fri, Feb 22, 2019 at 6:32 AM Pavel Labath  wrote:
> >>
> >> On 21/02/2019 19:48, Ted Woodward wrote:
> >>>
> >>>
>  -Original Message-
>  From: lldb-dev  On Behalf Of Pavel 
>  Labath
>  via lldb-dev
>  Sent: Thursday, February 21, 2019 8:35 AM
>  To: Davide Italiano 
>  Cc: LLDB 
>  Subject: [EXT] Re: [lldb-dev] [RFC]The future of pexpect
> 
>  On 21/02/2019 00:03, Davide Italiano wrote:
> > I found out that there are tests that effectively require
> > interactivity. Some of the lldb-mi ones are an example.
> > A common use-case is that of sending SIGTERM in a loop to make sure
> > `lldb-mi` doesn't crash and handle the signal correctly.
> >
> > This functionality is really hard to replicate in lit_as is_.
> > Any ideas on how we could handle this case?
> 
>  How hard is it to import a new version of pexpect which supports python3 
>  and
>  stuff?
> 
>  I'm not sure how the situation is on darwin, but I'd expect (:P) that 
>  most linux
>  systems either already have it installed, or have an easy way to do so. 
>  So we
>  may not even be able to get away with just using the system one and 
>  skipping
>  tests when it's not present.
> 
>  BTW, for lldb-mi I would actually argue that it should *not* use pexpect 
>  :D.
>  Interactivity is one thing, and I'm very much in favour of keeping that 
>  ability,
>  but pexpect is not a prerequisite for that. For me, the main advantage of
>  pexpect is that it emulates a real terminal. However, lldb-mi does not 
>  need
>  that stuff. It doesn't have any command line editing capabilities or 
>  similar. It's
>  expecting to communicate with an IDE over a pipe, and that's it.
> 
>  Given that, it should be fairly easy to rewrite the lldb-mi tests to 
>  work on top
>  of the standard python "subprocess" library. While we're doing that, we 
>  might
>  actually fix some of the issues that have been bugging everyone in the 
>  lldb-mi
>  tests. At least for me, the most annoying thing was that when lldb-mi 
>  fails to
>  produce the expected output, the test does not fail immediately, but 
>  instead
>  the implementation of self.expect("^whatever") waits until the timeout
>  expires, optimistically hoping that it will find some output that match 
>  the
>  pattern.
> 
> >
> > Pavel, I think yours is a really nice idea.
> > I'm no python expert, but I found out making the conversion is
> > relatively simple.
> > I propose a proof-of-concept API and implementation here:
> >
> > https://gist.github.com/dcci/94a4936a227d9c7627b91ae9575b7b68
> >
> > Comments appreciated! Once we agree on how this should look like, I do
> > recommend to have a new lldbMITest base class and incrementally start
> > moving the tests to it.
> > Once we're done, we can delete the old class.
> >
> > Does this sound reasonable?
> >
> > --
> > Davide
> >
>
> Sounds great. Let's ship it. :)
>
> pl
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] Host is now dependency free

2019-03-08 Thread Zachary Turner via lldb-dev
It's been a long time coming and a lot of work to get here, but Host is now
dependency free.  While this may not be enforced in the Xcode project
(unless someone changes it to not link against any other libraries /
targets), as of r355730 this is  enforced in the CMake build, so if new
dependencies are introduced, it will break most non-OSX build bots.

Mostly just throwing this out there so people are aware.

The good news is that this gets us one step closer to a shared libraries
build as well as a real C++ modules build, as well as being able to create
small debugger-related tools that are not full blown debuggers.

For the curious, the remaining cycles in the build graph (as well as their
outgoing edge counts) are:

4 deps to break: lldb/Commands [3->] lldb/Expression [1->] lldb/Commands
5 deps to break: lldb/Plugins/SymbolFile/DWARF [4->] lldb/Expression [1->]
lldb/Plugins/SymbolFile/DWARF
5 deps to break: lldb/Plugins/Language/ObjC [4->]
lldb/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime [1->]
lldb/Plugins/Language/ObjC
6 deps to break: lldb/Interpreter [1->] lldb/Breakpoint [5->]
lldb/Interpreter
6 deps to break: lldb/Plugins/ScriptInterpreter/Python [2->] lldb/API [4->]
lldb/Plugins/ScriptInterpreter/Python
13 deps to break: lldb/Plugins/Language/ObjC [12->] lldb/Symbol [1->]
lldb/Plugins/Language/ObjC
14 deps to break: lldb/Interpreter [10->] lldb/DataFormatters [4->]
lldb/Interpreter
22 deps to break: lldb/Plugins/SymbolFile/PDB [21->] lldb/Symbol [1->]
lldb/Plugins/SymbolFile/PDB
23 deps to break: lldb/Target [3->] lldb/DataFormatters [20->] lldb/Target
26 deps to break: lldb/Expression [1->] lldb/Plugins/ExpressionParser/Clang
[25->] lldb/Expression
29 deps to break: lldb/Plugins/Language/CPlusPlus [26->] lldb/Core [3->]
lldb/Plugins/Language/CPlusPlus
29 deps to break: lldb/Plugins/Language/ObjC [27->] lldb/Core [2->]
lldb/Plugins/Language/ObjC
29 deps to break: lldb/Core [14->] lldb/DataFormatters [15->] lldb/Core
33 deps to break: lldb/Expression [30->] lldb/Symbol [3->] lldb/Expression
37 deps to break: lldb/Expression [33->] lldb/Core [4->] lldb/Expression
38 deps to break: lldb/Target [1->] lldb/Plugins/Language/ObjC [37->]
lldb/Target
42 deps to break: lldb/Interpreter [19->] lldb/Target [23->]
lldb/Interpreter
42 deps to break: lldb/Breakpoint [39->] lldb/Core [3->] lldb/Breakpoint
49 deps to break: lldb/Interpreter [25->] lldb/Core [24->] lldb/Interpreter
51 deps to break: lldb/Target [4->] lldb/Plugins/ExpressionParser/Clang
[47->] lldb/Target
55 deps to break: lldb/Plugins/SymbolFile/DWARF [54->] lldb/Symbol [1->]
lldb/Plugins/SymbolFile/DWARF
62 deps to break: lldb/Plugins/ExpressionParser/Clang [58->] lldb/Symbol
[4->] lldb/Plugins/ExpressionParser/Clang
69 deps to break: lldb/Target [38->] lldb/Breakpoint [31->] lldb/Target
72 deps to break: lldb/Target [13->] lldb/Expression [59->] lldb/Target
72 deps to break: lldb/Utility [71->] lldb [1->] lldb/Utility
104 deps to break: lldb/Target [64->] lldb/Symbol [40->] lldb/Target
128 deps to break: lldb/Target [7->] lldb/Plugins/Process/Utility [121->]
lldb/Target
201 deps to break: lldb/Core [110->] lldb/Symbol [91->] lldb/Core
227 deps to break: lldb/Target [127->] lldb/Core [100->] lldb/Target

Found by running scripts/analyze-project-deps.py
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [lldb-mi] unable to debug GTK applications

2019-03-08 Thread Jan Kratochvil via lldb-dev
On Tue, 26 Feb 2019 14:52:26 +0100, Eran Ifrah via lldb-dev wrote:
> I am trying a GTK application using lldb-mi, however, the application
> terminates immediately with the error message:
> 
> @"15:47:16: Error: Unable to initialize GTK+, is DISPLAY set properly?\r\n"
> 
> Running the same using "pure" lldb works as expected.

Using Eclipse the lldb-server environment is empty as nothing sets it.

I tried the attached patch (a copy from StartDebugserverProcess()) which does
fix it for local debugging but it is apparently a wrong patch as it provides
to the application environment from gdbserver, not from Eclipse as it should
by QEnvironmentHexEncoded packets.

As I should do something else is there some known status of the environment
passing? Isn't it some unimplemented Linux-port feature?


Jan
--- 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -217,6 +217,9 @@ Status GDBRemoteCommunicationServerLLGS::LaunchProcess() {
   m_process_launch_info.SetLaunchInSeparateProcessGroup(true);
   m_process_launch_info.GetFlags().Set(eLaunchFlagDebug);
 
+  // Copy the current environment to the gdbserver instance
+  m_process_launch_info.GetEnvironment() = Host::GetEnvironment();
+
   if (should_forward_stdio) {
 if (llvm::Error Err = m_process_launch_info.SetUpPtyRedirection())
   return Status(std::move(Err));
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [8.0.0 Release] rc4 has been tagged

2019-03-08 Thread Hans Wennborg via lldb-dev
Dear testers,

8.0.0-rc4 was just tagged from the release_80 branch at r355690.

This is similar to rc3, but it contains a few important fixes, notably
for https://llvm.org/PR40890

I'm hoping that this is that last release candidate, so please give it
a good testing. If all looks well, maybe we can get the final tag in
next week.

As usual, please run the test script, share your results, and upload binaries.

I'll publish source tarballs and docs as soon as possible, and
binaries as they become available.

Thanks,
Hans
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev