mbox series

[00/19] devtool: ide-sdk: Enhance debugging and testing

Message ID 20250918210754.477049-1-adrian.freihofer@siemens.com
Headers show
Series devtool: ide-sdk: Enhance debugging and testing | expand

Message

AdrianF Sept. 18, 2025, 9:07 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

This patch series enhances the devtool ide-sdk functionality with
improvements to debugging capabilities, service integration, and
developer workflow optimization.

Enhancements:
- GDB Pretty-Printing: Added support for C++ STL type pretty-printing
  using GCC Python helper scripts, making complex STL containers
  readable during debugging sessions
- Multiple Debug Modes: Introduced gdbserver attach mode support for
  debugging running services alongside the existing --once mode
  - Service Detection: Automatic detection of binaries that run as
    services.
    For these binaries an additional --attach debug configuration gets
    generated.
- Improved Path Mapping: Enhanced DEBUG_PREFIX_MAP evaluation for
  better source file location during remote debugging
- BitBake-Free Deployment: Eliminated bitbake dependency during daily
  development workflow, making deployment self-contained and faster.
  This patch was rejected one or two years ago. Usually I try to not
  "send the same crap again". However, I think the situation changed a
  bit, since then:
  - All alternative approaches which were discussed turned out as not
    feasible. bitbake -b does not work.
    Bitbake's server mode does no longer observe the recipes via
    inotify. This gives up the idea of using bitbake as a server
    running behind an IDE.
  - The patch proved to work very well and did not break since more
    than a year or two? So it does not seem to be that problematic.
    If that would change, reverting it should be possible at any time.
  - Using the ide-sdk with this patch versus without this patch makes a
    major difference from a usability perspective. It's much quicker
    and it's much more predictable.
- Kernel Module Support: Basic support for kernel module development
  with proper environment setup. There is no automated deployment or
  e.g. support for kgdb. But compiling works as for other plugins.
- VSCode plugin: Write the commands for starting the remote gdbserver
  directly into the launch.json file which makes it much simpler to
  understand and tweak.

Testing improvements:
- Systemd/SysV Support: Extended C++ examples to run as both one-shot
  executables and long-running services with proper user/group
  management for two reasons:
  - Testing remote debugging with attached mode
  - Test the deploy script which runs on pseudo and should preserve the
    user and group flags also during the development.
- Added full remote debugging test coverage for VSCode with launch.json
  and tasks.json with Qemu.
- GDB pretty-printing validation for STL containers
- Proper file ownership verification with pseudo
- Added comprehensive debug logging and better error reporting for
  oe-selftest -r devtool.DevtoolIdeSdkTests

Adrian Freihofer (19):
  fedora_essential.sh: add util-linux-script package
  oe-selftest: cpp-example meson version warning
  oe-selftest: devtool: add missing imports
  meta-skeleton: fix spaces in assignment
  devtool: ide-sdk deploy-target without bitbake
  oe-selftest: devtool: DevtoolIdeSdkTests debug logging
  cpp-example: run as a service
  oe-selftest: devtool: check example services are running
  devtool: ide-sdk: make install_and_deploy script pass target arg
  devtool: ide-sdk: add gdbserver attach mode support
  devtool: ide-sdk: vscode remove scripts
  devtool: ide-sdk: move code to ide_none
  oe-selftest: devtool ide-sdk cover vscode remote debugging
  devtool: ide-sdk: evaluate DEBUG_PREFIX_MAP
  cpp-example: Add std::vector example
  devtool: ide-sdk: Support GDB pretty-printing for C++ STL types
  oe-selftest: devtool: add test for gdb pretty-printing
  module.bbclass: move environment setup to kernel_module.py
  devtool: ide-sdk: support kernel module development

 .../host_packages_scripts/fedora_essential.sh |   2 +-
 .../recipes-test/cpp/cpp-example.inc          |  52 +-
 .../recipes-test/cpp/files/CMakeLists.txt     |  14 +-
 .../recipes-test/cpp/files/config.h.in        |  10 +
 .../cpp/files/cpp-example-lib.cpp             |  29 +
 .../cpp/files/cpp-example-lib.hpp             |   3 +
 .../recipes-test/cpp/files/cpp-example.conf   |   3 +
 .../recipes-test/cpp/files/cpp-example.cpp    |  46 +-
 .../recipes-test/cpp/files/cpp-example.init   |  84 +++
 .../cpp/files/cpp-example.service             |  12 +
 .../recipes-test/cpp/files/meson.build        |  21 +-
 .../cpp/files/test-cpp-example.cpp            |   2 +
 .../recipes-test/cpp/meson-example.bb         |   2 +
 .../linux/linux-yocto-custom.bb               |   2 +-
 meta/classes-recipe/module.bbclass            |  21 +-
 meta/lib/oe/kernel_module.py                  |  22 +
 meta/lib/oeqa/selftest/cases/devtool.py       | 494 +++++++++++++++---
 scripts/lib/devtool/ide_plugins/__init__.py   | 234 ++++-----
 scripts/lib/devtool/ide_plugins/ide_code.py   | 222 ++++++--
 scripts/lib/devtool/ide_plugins/ide_none.py   | 140 ++++-
 scripts/lib/devtool/ide_sdk.py                | 384 +++++++++++++-
 scripts/lib/devtool/standard.py               |   7 +-
 22 files changed, 1483 insertions(+), 323 deletions(-)
 create mode 100644 meta-selftest/recipes-test/cpp/files/config.h.in
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example.conf
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example.init
 create mode 100644 meta-selftest/recipes-test/cpp/files/cpp-example.service
 create mode 100644 meta/lib/oe/kernel_module.py