From af921006d3792fa28d1070f015dcfd145e082ed2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 25 Feb 2022 14:47:27 +0100 Subject: [lldb] Remove the global platform list This patch moves the platform creation and selection logic into the per-debugger platform lists. I've tried to keep functional changes to a minimum -- the main (only) observable difference in this change is that APIs, which select a platform by name (e.g., Debugger::SetCurrentPlatform) will not automatically pick up a platform associated with another debugger (or no debugger at all). I've also added several tests for this functionality -- one of the pleasant consequences of the debugger isolation is that it is now possible to test the platform selection and creation logic. This is a product of the discussion at . Differential Revision: https://reviews.llvm.org/D120810 --- lldb/packages/Python/lldbsuite/test/dotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py') diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 489e6ce..a9ca741 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -902,6 +902,7 @@ def run_suite(): (configuration.lldb_platform_name)) lldb.remote_platform = lldb.SBPlatform( configuration.lldb_platform_name) + lldb.selected_platform = lldb.remote_platform if not lldb.remote_platform.IsValid(): print( "error: unable to create the LLDB platform named '%s'." % @@ -918,7 +919,6 @@ def run_suite(): err = lldb.remote_platform.ConnectRemote(platform_connect_options) if err.Success(): print("Connected.") - lldb.selected_platform = lldb.remote_platform else: print("error: failed to connect to remote platform using URL '%s': %s" % ( configuration.lldb_platform_url, err)) -- cgit v1.1