Enabling logging from the host gdbserver

Using lldb 3.8.0, what enables logging output from the daughter “gdbserver” process, e.g. with a tree of processes like this:

_ /bin/bash
_ ./lldb-server platform --listen *:1234 --log-file test.log --log-channels lldb all:gdb-remote all
_ ./lldb-server gdbserver 127.0.0.1:0 --native-regs --pipe 7

_ ./simple_x86

generated by these lldb commands:

(lldb) platform select remote-linux

(lldb) platform connect connect://localhost:1234

(lldb) target create simple_x86

(lldb) process launch -s

what I want to see is the lldb and gdb-remote logging from the “gdbserver” host but only the “platform” process output is written to the “test.log” file.

How can I enable logging for the daughter “gdbserver”?

Hi,

you can set environment variables when lunching the "platform"
instance to enable logging in the "gdbserver" instance:
LLDB_DEBUGSERVER_LOG_FILE=/path/to/log/file
LLDB_SERVER_LOG_CHANNELS="lldb all:gdb-remote all"

Also, depending on what you are trying to achieve, it may be easier to
run the gdbserver manually (perhaps in a debugger) and attach to it
from lldb via "process connect"...

cheers,
pl