]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
devtool: ide-sdk: Support GDB pretty-printing for C++ STL types
authorAdrian Freihofer <adrian.freihofer@siemens.com>
Tue, 3 Feb 2026 22:16:28 +0000 (23:16 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Feb 2026 10:50:23 +0000 (10:50 +0000)
commita69e2baba81b0cd88d58b164433c72e1156424b1
tree13e3ba50471e063367d5cd44fc5828c51337fe21
parente4e8ff14ab51892bdcb176b9eef2741286597db8
devtool: ide-sdk: Support GDB pretty-printing for C++ STL types

GDB requires Python scripts provided by GCC to properly display C++ STL
types. This commit adds support for configuring GDB to use these
pretty-printers in the ide-sdk, covering both the ide_none and ide_code
plugins.

The implementation locates the GCC Python helper scripts in the sysroot
and injects the necessary commands into the GDB initialization files and
IDE debug configurations. This ensures that when debugging C++
applications, STL containers and other complex types are displayed in a
readable format.

Without this:
  (gdb) print numbers
  $1 = {<std::_Vector_base<int, std::allocator<int> >> = {
    _M_impl = {<std::allocator<int>> = {<std::__new_allocator<int>> =
    {<No data fields>}, <No data fields>}, <std::_Vector_base<int,
    std::allocator<int> >::_Vector_impl_data> =
    {_M_start = 0x55555556c370, _M_finish = 0x55555556c37c,
        _M_end_of_storage = 0x55555556c37c}, <No data fields>}},
        <No data fields>}

With this:
  (gdb) print numbers
  $1 = std::vector of length 3, capacity 3 = {1, 2, 3}

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/ide_plugins/ide_code.py
scripts/lib/devtool/ide_plugins/ide_none.py
scripts/lib/devtool/ide_sdk.py