From: Adrian Freihofer <[email protected]> The ATTACH launch config now uses the extended-remote protocol, which makes cppdbg show a picker listing every process running on the target. In modified-recipe mode the binary to attach to is already known, so the picker is only extra clicking, and on a busy target it can make finding the right process among unrelated ones tedious.
Set "processFilter" to a regex matching the deployed binary's path so cppdbg pre-selects it instead of showing the full process list. This is a recent cpptools feature; until it ships in a released cpptools, cppdbg silently ignores it and falls back to showing the full unfiltered process list. Require cpptools version that supports processFilter https://github.com/microsoft/vscode-cpptools/pull/14684 Signed-off-by: Adrian Freihofer <[email protected]> --- meta/lib/oeqa/selftest/cases/devtool.py | 1 + scripts/lib/devtool/ide_plugins/ide_code.py | 1 + 2 files changed, 2 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 3a407a5162..a4b7a83094 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -3569,6 +3569,7 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests): # from the process instead of killing it. self.assertTrue(config.get("useExtendedRemote"), f"Configuration '{config['name']}' should use useExtendedRemote") self.assertNotIn("cwd", config, f"Configuration '{config['name']}' should not set cwd in attach mode") + self.assertTrue(config.get("processFilter"), f"Configuration '{config['name']}' should use processFilter") else: self.fail(f"Configuration '{config['name']}' has unexpected request type: {config['request']}") diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py index 937c63a4a5..6effbac654 100644 --- a/scripts/lib/devtool/ide_plugins/ide_code.py +++ b/scripts/lib/devtool/ide_plugins/ide_code.py @@ -387,6 +387,7 @@ class IdeVSCode(IdeBase): # this configuration is generated. Stopping the session detaches # from the process instead of killing it. launch_config["useExtendedRemote"] = True + launch_config["processFilter"] = "(^| )%s( |$)" % cross_debug_config.binary.binary_path else: # cwd, environment and externalConsole configure the process the # debugger starts, they are not part of the attach schema. -- 2.55.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#245237): https://lists.openembedded.org/g/openembedded-core/message/245237 Mute This Topic: https://lists.openembedded.org/mt/121125165/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
