From: Adrian Freihofer <[email protected]> The value was stored in RecipeGdbCross.gdbserver_port_next, which nothing ever read. The ports actually handed out come from the class wide counter DebuggerCrossConfig._port_next, which is shared by the gdbserver and lldb-server configurations and always started at its hardcoded 1234, so -G had no effect at all.
Seed that counter instead, which also makes the option a way to move all debug servers of one invocation out of the way of another one running concurrently on the same host. Signed-off-by: Adrian Freihofer <[email protected]> --- scripts/lib/devtool/ide_sdk.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index a987c37f06..e1a9d1774e 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -123,7 +123,6 @@ class RecipeGdbCross(RecipeNative): super().__init__('gdb-cross-' + target_arch, target_arch) self.target_device = target_device self.gdb = None - self.gdbserver_port_next = int(args.gdbserver_port_start) self.config_db = {} def __find_gdbserver(self, config, tinfoil): @@ -1856,6 +1855,7 @@ def ide_setup(args, config, basepath, workspace): if args.mode == DevtoolIdeMode.modified: logger.info("Setting up workspaces for modified recipe: %s" % str(recipes_modified_names)) + DebuggerCrossConfig._port_next = int(args.gdbserver_port_start) debuggers = {} for recipe_name in recipes_modified_names: recipe_modified = RecipeModified( @@ -2049,7 +2049,9 @@ def register_commands(subparsers, context): '-t', '--target', default='[email protected]', help='Live target machine running an ssh server: user@hostname.') parser_ide_sdk.add_argument( - '-G', '--gdbserver-port-start', default="1234", help='port where gdbserver is listening.') + '-G', '--gdbserver-port-start', default="1234", + help='First port used by the debug servers on the target. Each debug ' + 'configuration consumes one port, counting up from here.') parser_ide_sdk.add_argument( '-c', '--no-host-check', help='Disable ssh host key checking', action='store_true') parser_ide_sdk.add_argument( -- 2.55.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#246084): https://lists.openembedded.org/g/openembedded-core/message/246084 Mute This Topic: https://lists.openembedded.org/mt/121302027/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
