[lldb-dev] Trying to use socketpair for lldb-server fails
Demi Obenour via lldb-dev
lldb-dev at lists.llvm.org
Fri Jul 21 18:54:13 PDT 2017
Sadly, that gives me nothing in the log file. Also,
ConnectionFileDescriptor::Connect already seems to handle this case.
Running strace on all child processes gives a “Operation not permitted”
error from setsid(). That seems like the culprit, which is strange.
Would you mind providing the value you used for LLDB_SERVER_LOG_CHANNELS?
On Fri, Jul 21, 2017 at 2:55 PM Ted Woodward <ted.woodward at codeaurora.org>
> The first thing I'd do is use the lldb logging mechanism. lldb-server
> 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
> be written to
> LLDB_SERVER_LOG_CHANNELS - this contains the channels and categories to
> logging on for. The format is "channel category:channel category...". If
> 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
> ConnectionFileDescriptor::Connect. The log for this would be "lldb
> 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-bounces at lists.llvm.org] On Behalf Of
> > Obenour via lldb-dev
> > Sent: Wednesday, July 19, 2017 7:44 PM
> > To: lldb-dev at 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
> > how to debug the problem?
> > Sincerely,
> > Demi
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev