From: AdrianF <adrian.freihofer@siemens.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH v3 09/13] devtool: ide-sdk: vscode replace scripts
Date: Mon, 26 Jan 2026 08:37:36 +0100 [thread overview]
Message-ID: <20260126073809.468495-10-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20260126073809.468495-1-adrian.freihofer@siemens.com>
From: Adrian Freihofer <adrian.freihofer@siemens.com>
Write the ssh command to start gdbserver on target directly into the
tasks.json. This avoids the need to create one more script file on the
host. It also simplifies manual modifications of VSCode's standard
tasks.json which is much more handy than modifying multiple proprietary
scripts used to launch gdbserver.
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
scripts/lib/devtool/ide_plugins/ide_code.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py
index 3f8c1a44a3..05d513f160 100644
--- a/scripts/lib/devtool/ide_plugins/ide_code.py
+++ b/scripts/lib/devtool/ide_plugins/ide_code.py
@@ -20,6 +20,18 @@ class GdbCrossConfigVSCode(GdbCrossConfig):
super().__init__(image_recipe, modified_recipe, binary,
gdbserver_default_mode)
+ def target_ssh_gdbserver_start_args(self, gdbserver_mode=None):
+ """Get the ssh command arguments to start gdbserver on the target device
+
+ returns something like:
+ ['-p', '2222', 'root@target', '"/bin/sh -c \'/usr/bin/gdbserver --once :1234 /usr/bin/cmake-example\'"']
+ """
+ if gdbserver_mode is None:
+ gdbserver_mode = self.gdbserver_default_mode
+ return self._target_ssh_gdbserver_args() + [
+ self._target_gdbserver_start_cmd(gdbserver_mode)
+ ]
+
def target_ssh_gdbserver_kill_args(self):
"""Get the ssh command arguments to kill gdbserver on the target device
@@ -31,7 +43,7 @@ class GdbCrossConfigVSCode(GdbCrossConfig):
]
def initialize(self):
- self._gen_gdbserver_start_script()
+ pass
class IdeVSCode(IdeBase):
@@ -322,7 +334,8 @@ class IdeVSCode(IdeBase):
"label": gdb_cross_config.id_pretty_mode(gdbserver_mode),
"type": "shell",
"isBackground": True,
- "command": gdb_cross_config.gdbserver_script(gdbserver_mode),
+ "command": gdb_cross_config.gdb_cross.target_device.ssh_sshexec,
+ "args": gdb_cross_config.target_ssh_gdbserver_start_args(gdbserver_mode),
"problemMatcher": [
{
"pattern": [
@@ -466,7 +479,8 @@ class IdeVSCode(IdeBase):
"label": gdb_cross_config.id_pretty(gdbserver_mode),
"type": "shell",
"isBackground": True,
- "command": gdb_cross_config.gdbserver_script(gdbserver_mode),
+ "command": gdb_cross_config.gdb_cross.target_device.ssh_sshexec,
+ "args": gdb_cross_config.target_ssh_gdbserver_start_args(gdbserver_mode),
"problemMatcher": [
{
"pattern": [
--
2.52.0
next prev parent reply other threads:[~2026-01-26 7:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 7:37 [PATCH v3 00/13] IDE SDK Improvements AdrianF
2026-01-26 7:37 ` [PATCH v3 01/13] useradd_base.bbclass: do not use awk AdrianF
2026-01-26 8:18 ` [OE-core] " ChenQi
2026-01-26 12:28 ` Alexander Kanavin
2026-01-26 14:01 ` adrian.freihofer
2026-01-26 20:18 ` Alexander Kanavin
2026-01-26 17:41 ` Peter Kjellerstedt
2026-01-30 14:01 ` Freihofer, Adrian
2026-01-26 7:37 ` [PATCH v3 02/13] devtool: ide-sdk find bitbake-setup init-build-env AdrianF
2026-01-26 7:37 ` [PATCH v3 03/13] oe-selftest: devtool: DevtoolIdeSdkTests debug logging AdrianF
2026-01-26 7:37 ` [PATCH v3 04/13] cpp-example: run as a service AdrianF
2026-01-26 7:37 ` [PATCH v3 05/13] oe-selftest: devtool: check example services are running AdrianF
2026-01-26 7:37 ` [PATCH v3 06/13] devtool: ide-sdk: add gdbserver attach mode support AdrianF
2026-01-26 7:37 ` [PATCH v3 07/13] devtool: ide-sdk: move code to ide_none AdrianF
2026-01-26 7:37 ` [PATCH v3 08/13] devtool: ide-sdk: make install_and_deploy script pass target arg AdrianF
2026-01-26 7:37 ` AdrianF [this message]
2026-01-26 7:37 ` [PATCH v3 10/13] oe-selftest: devtool ide-sdk cover vscode remote debugging AdrianF
2026-01-26 7:37 ` [PATCH v3 11/13] devtool: ide-sdk: evaluate DEBUG_PREFIX_MAP AdrianF
2026-01-26 7:37 ` [PATCH v3 12/13] cpp-example: Add std::vector example AdrianF
2026-01-26 7:37 ` [PATCH v3 13/13] devtool: ide-sdk: Support GDB pretty-printing for C++ STL types AdrianF
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260126073809.468495-10-adrian.freihofer@siemens.com \
--to=adrian.freihofer@siemens.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox