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] [lldb-mi] unable to debug GTK applications

2019-02-26 Thread Eran Ifrah via lldb-dev
Hi,

I am not sure if this is the correct mailing list for this question, so
excuse me if its not.
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 lldb-6.0 on Debian stretch


Any hints?

-- 
Eran Ifrah,
Author of CodeLite, a cross platform open source C/C++ IDE:
http://www.codelite.org
CodeLite IDE Blog: http://codeliteide.blogspot.com/
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev