Printing colourData in this code: include <string> static std::string colourData [] { std::string("x"), std::string("y") }; int main() { } fails: Breakpoint 1, main () at ss.cpp:12 12 } (gdb) p colourData $1 = {Python Exception <class 'gdb.error'>: There is no member or method named __short_mask. , Python Exception <class 'gdb.error'>: There is no member or method named __short_mask. } This is caused by files included in the gdb distribution but originating from the libc++ project. gdb-13.1 FreeBSD 13.2 Python-3.9 ==References== * GDB bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=30556 * LLVM bug report: https://github.com/llvm/llvm-project/issues/64398
I think that this tarball bsdjhb-libcxx-gdbpy-03d0d9b_GH0.tar.gz contains an outdated printers.py You should switch to the latest LLVM repository for printers.py
Re-assign to jhb@, as he is maintaining the python scritps
I've added updates to the libcxx-gdbpy scripts for this (and another change) and included it in the GDB 15 update review at https://reviews.freebsd.org/D46232
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=82beca9e630ec9226c58a9cd3ee9adb355e21314 commit 82beca9e630ec9226c58a9cd3ee9adb355e21314 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-09-24 16:08:56 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-09-24 16:08:56 +0000 devel/gdb: Upgrade to 15.1 This includes an update to the bundled libc++ pretty printers with fixes for recent changes in libc++ to std::string and std::unordered_map. PR: 272922 Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D46232 devel/gdb/Makefile | 7 +- devel/gdb/distinfo | 10 +-- devel/gdb/files/extrapatch-kgdb | 102 +++++++++++++-------------- devel/gdb/files/kgdb/aarch64-fbsd-kern.c | 9 +-- devel/gdb/files/kgdb/amd64fbsd-kern.c | 8 +-- devel/gdb/files/kgdb/arm-fbsd-kern.c | 10 +-- devel/gdb/files/kgdb/fbsd-kld.c | 116 +++++++++++++------------------ devel/gdb/files/kgdb/fbsd-kthr.c | 17 ++--- devel/gdb/files/kgdb/fbsd-kvm.c | 10 +-- devel/gdb/files/kgdb/i386fbsd-kern.c | 16 ++--- devel/gdb/files/kgdb/kgdb-main.c | 2 + devel/gdb/files/kgdb/kgdb.h | 2 +- devel/gdb/files/kgdb/mipsfbsd-kern.c | 10 +-- devel/gdb/files/kgdb/ppcfbsd-kern.c | 8 +-- devel/gdb/files/kgdb/riscv-fbsd-kern.c | 8 +-- devel/gdb/files/kgdb/sparc64fbsd-kern.c | 8 +-- devel/gdb/pkg-plist | 5 ++ 17 files changed, 167 insertions(+), 181 deletions(-)