[lldb-dev] Debugee Unable to Open Window Due to "No available video device"

2017-11-09 Thread Jeremiah via lldb-dev
When using the LLDB API to launch a process from within a program that
has opened a window, I am unable to open a window in the child
process. When the child is using SDL I get "SDL Error: No available
video device"  and when the child is using GLX I get "Failed to open X
display"

I was also getting "error: XDG_RUNTIME_DIR not set in the environment"
but I solved that by setting XDG_RUNTIME_DIR appropriately. However,
this did not fix the window problem.

I also wrote a small test case to demonstrate the problem I'm having
and I hosted it here:
https://github.com/CaptainKraft/lldb-bug/blob/master/main.cpp

Posting the source in the email thread didn't seem like the best
approach, but if you'd like the source via email, I'll be happy to
reply with it.

There are probably a few ways to get around this issue by launching
the process myself and attaching using the LLDB API, but it seems to
me like there would be a way to do this by using just the API. It
would also make the code more difficult to maintain across multiple
platforms.

Is there some way I can use the LLDB API to launch a process without
preventing the child from opening a window?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Debugee Unable to Open Window Due to "No available video device"

2017-11-09 Thread Jeremiah via lldb-dev
Well, that solves the problem. Thank you for the help.

On Thu, Nov 9, 2017 at 7:45 PM, Jim Ingham  wrote:
> Xcode (on OS X) uses the lldb API to launch processes of all sorts including 
> ones that have widows, and has windows open, so this is not a general lldb 
> problem.
>
> lldb doesn’t do all that much magic to launch processes, it just calls 
> posix_spawnp (on OS X) or fork & exec on Linux.  I would be surprised it it 
> is something special about lldb’s launching.  OTOH since you are only passing 
> XDG_RUNTIME_DIR, there’s some environment variable that specifies the window 
> server connection that you’re missing.  I haven’t done X11 programming for 
> ages, but don’t you need to pass DISPLAY?  Anyway, you might try to pass all 
> the variables from your process to the process you are launching and see if 
> that works.
>
> Jim
>
>
>> On Nov 9, 2017, at 6:19 PM, Jeremiah via lldb-dev  
>> wrote:
>>
>> When using the LLDB API to launch a process from within a program that
>> has opened a window, I am unable to open a window in the child
>> process. When the child is using SDL I get "SDL Error: No available
>> video device"  and when the child is using GLX I get "Failed to open X
>> display"
>>
>> I was also getting "error: XDG_RUNTIME_DIR not set in the environment"
>> but I solved that by setting XDG_RUNTIME_DIR appropriately. However,
>> this did not fix the window problem.
>>
>> I also wrote a small test case to demonstrate the problem I'm having
>> and I hosted it here:
>> https://github.com/CaptainKraft/lldb-bug/blob/master/main.cpp
>>
>> Posting the source in the email thread didn't seem like the best
>> approach, but if you'd like the source via email, I'll be happy to
>> reply with it.
>>
>> There are probably a few ways to get around this issue by launching
>> the process myself and attaching using the LLDB API, but it seems to
>> me like there would be a way to do this by using just the API. It
>> would also make the code more difficult to maintain across multiple
>> platforms.
>>
>> Is there some way I can use the LLDB API to launch a process without
>> preventing the child from opening a window?
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] Unable to Locate lldb-server on Ubuntu

2017-11-25 Thread Jeremiah via lldb-dev
On my Pop!_OS machine (which is based on Ubuntu 17.10), using any
version of LLDB above 3.8 gives me the error "process launch failed:
unable to locate lldb-server-x.x.x" but when version 3.8 is installed,
it works just fine.

There are various posts across the web about the same problem on
multipler versions of Ubuntu. The most common solution presented is to
use update-alternatives, but that did not solve the problem for me. I
also checked my bin directories and the binaries for lldb-server are
there for any version I install.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev