Transitioning to Linux local debugging via lldb-gdbserver

Hi all,

As you may have noticed, we have been busily adding remote debugging support to Linux. One of the processes that run on the remote target is lldb-gdbserver (or llgs for short).

We have also been working on a second path for debugging local linux processes. instead of lldb calling the ptrace APIs directly, it launches an llgs instance and communicates with it via the remote debug protocol.

This has two advantages.

  1. There is more code shared between the remote debugging code path and the local debugging code path. If a feature works in remote, it probably works locally and vice-versa.

  2. It makes us more architecturally similar to OSX (which also does local debugging via a connection to debugserver).

This path is called LLGS local. We think that this configuration is now at parity with (or better than) local linux debugging.

It is currently invoked if you have an environment variable defined “PLATFORM_LINUX_FORCE_LLGS_LOCAL”

We would like to switch to LLGS local as the default path and only use the non-LLGS path if someone has an environment variable defined “PLATFORM_LINUX_DISABLE_LLGS_LOCAL”

Later, if all goes well, we would like to remove non-LLGS local debugging support to simplify the codebase and avoid confusion.



Perhaps obvious, but please make sure it’s only the default on Linux.

Yeah, will it be available in the 3.5 series and when? :slight_smile:

What about overhead, for instance when hitting things like discussed here: ?