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

Jeremiah via lldb-dev lldb-dev at lists.llvm.org
Thu Nov 9 18:19:18 PST 2017


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?


More information about the lldb-dev mailing list