[Lldb-commits] [PATCH] D82804: Do not set LLDB_DEBUGSERVER_PATH if --out-of-tree-debugserver is passed.

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 29 17:13:25 PDT 2020


vsk added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:366
 
-    if args.server:
+    if args.server and not args.out_of_tree_debugserver:
         os.environ['LLDB_DEBUGSERVER_PATH'] = args.server
----------------
aprantl wrote:
> davide wrote:
> > aprantl wrote:
> > > Does this have any surprising interplay with the existing LLDB_USE_SYSTEM_DEBUGSERVER cmake flag?
> > I don't think so?
> Great. The name made it sound dangerous!
This actually gets rid of some surprising interplay between --server and --out-of-tree-debugserver.

That surprising situation arises due to the fact that the Rosetta debugserver is not built as part of lldb. I.e. when we need to run tests on Apple Silicon under x86_64 emulation, we still build debugserver as arm64 (if at all).

Now, at some point, it was common practice for lldb-dotest to always set --server to path/to/native/build/debugserver: this would break testing under Rosetta emulation, because the arm64 debugserver couldn't interoperate with the emulator.

So that's why it was necessary to prevent --server and --out-of-tree-debugserver from both being in effect at the same time.


================
Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:366
 
-    if args.server:
+    if args.server and not args.out_of_tree_debugserver:
         os.environ['LLDB_DEBUGSERVER_PATH'] = args.server
----------------
vsk wrote:
> aprantl wrote:
> > davide wrote:
> > > aprantl wrote:
> > > > Does this have any surprising interplay with the existing LLDB_USE_SYSTEM_DEBUGSERVER cmake flag?
> > > I don't think so?
> > Great. The name made it sound dangerous!
> This actually gets rid of some surprising interplay between --server and --out-of-tree-debugserver.
> 
> That surprising situation arises due to the fact that the Rosetta debugserver is not built as part of lldb. I.e. when we need to run tests on Apple Silicon under x86_64 emulation, we still build debugserver as arm64 (if at all).
> 
> Now, at some point, it was common practice for lldb-dotest to always set --server to path/to/native/build/debugserver: this would break testing under Rosetta emulation, because the arm64 debugserver couldn't interoperate with the emulator.
> 
> So that's why it was necessary to prevent --server and --out-of-tree-debugserver from both being in effect at the same time.
Now that I think about this a bit more, it could be a good idea to log a warning when args.out_of_tree_debugserver and args.server are both set.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82804/new/

https://reviews.llvm.org/D82804





More information about the lldb-commits mailing list