The first thing I'd do is use the lldb logging mechanism. lldb-server closes its own stdout and stderr, because nobody is interested in output from the server, just from the target. Except when you're debugging the server, so there is an easy way to turn on logging.
Set the following environment variables: LLDB_DEBUGSERVER_LOG_FILE - this contains the path to the file the logs will be written to LLDB_SERVER_LOG_CHANNELS - this contains the channels and categories to turn logging on for. The format is "channel category:channel category...". If you want more than 1 category for a channel, I think "channel cat1 cat2..." works. This is not spelled out very clearly, unfortunately. Quickly glancing at the code, it looks like you need to implement a socketpair connection, and handling of the fd:// connection URL, starting in ConnectionFileDescriptor::Connect. The log for this would be "lldb connection". Ted -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > -----Original Message----- > From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Demi > Obenour via lldb-dev > Sent: Wednesday, July 19, 2017 7:44 PM > To: lldb-dev@lists.llvm.org > Subject: [lldb-dev] Trying to use socketpair for lldb-server fails > > To avoid a local privilage escalation, I am trying to patch LLDB not to use a TCP > socket for local communication. > > The attached patch failed. Would anyone be able to provide suggestions for > how to debug the problem? > > Sincerely, > > Demi _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev