[Lldb-commits] [PATCH] D49282: [cmake] Add option to skip building lldb-server

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 16 11:02:34 PDT 2018


xiaobai added a comment.

In https://reviews.llvm.org/D49282#1163517, @labath wrote:

> I think this is fine (though the meaning of SKIP_LLDB_SERVER is subtly different than SKIP_DEBUGSERVER), but while looking at this I got an idea for a possible improvement.


How is it subtly different? Admittedly I haven't looked in excruciating detail, but I didn't notice any large differences.

> How do you currently convince lldb to use ds2 instead of lldb-server? Do you just set the LLDB_DEBUGSERVER_PATH env var or do you do something more fancy?

That's one way we do that. In some situations we launch ds2 and then tell lldb to connect to it. It just depends on what you're debugging.

> I was thinking we could make the debugserver to use configurable at build time. That way you could build with LLDB_EXTERNAL_DEBUGSERVER=path/to/ds2.exe, which would make lldb automagically know how to launch it, and we would skip building lldb-server as a side effect.

I do think this would be nice, but you might have some problems later on with installation+distribution. For example, if for any reason ds2 is in a separate location on a build machine than an end-user's machine, lldb will not have a good time. This could happen if the path to ds2's build tree is used for LLDB_EXTERNAL_DEBUGSERVER instead of the path to its install location. In some cases, the path to its install location isn't necessarily known ahead of time.

The option would be fine for lldb-server and debugserver though, since they (in general) will have well-known locations if already present on your system (e.g. an xcode related directory).


https://reviews.llvm.org/D49282





More information about the lldb-commits mailing list