gdb: upgrade to 17.1
v5 cover gdb: upgrade to 17.1
From: Sunil Dora <[email protected]>
Upgrade GDB from 16.3 to 17.1.
This upgrade resolves build issues with newer toolchains and musl-based systems. Two fixes are included to address musl compatibility and AArch64 kernel header changes.
The previously carried Readline 8.3 alpha backport is no longer needed and has been removed.
Changes in v5:
- Fixed patchtest errors
Changes in v4:
- Filed upstream bug for header visibility issue
- Coordinated with upstream and added workaround
- https://sourceware.org/bugzilla/show_bug.cgi?id=33926
Changes in v3:
- Fixed GDB custom baudrate issue and submitted upstream
- https://sourceware.org/pipermail/gdb-patches/2026-March/225952.html
- https://sourceware.org/bugzilla/show_bug.cgi?id=33747
Changes in v2:
- Updated patch metadata and commit title
Changes in v1:
- Initial submission upgrading GDB
Build-tested on:
- x86-64 (glibc)
- x86-64 (musl)
- aarch64 (glibc)
- aarch64 (musl)
root@qemuarm64:~# gdb --version GNU gdb (GDB) 17.1
root@qemuarm64:~# ldd /usr/bin/gdb
/usr/lib/ld-musl-aarch64.so.1 (0xffff8f690000)
libc.so => /usr/lib/ld-musl-aarch64.so.1 (0xffff8f690000)Sunil Dora (1):
gdb: Upgrade 16.3 -> 17.1
...ian_16.3.bb => gdb-cross-canadian_17.1.bb} | 0
.../{gdb-cross_16.3.bb => gdb-cross_17.1.bb} | 0
meta/recipes-devtools/gdb/gdb.inc | 5 +-
...-ser-unix-modernize-Linux-custom-bau.patch | 249 ++++++++++++++++++
.../gdb/0009-Readline-8.3-alpha-release.patch | 164 ------------
...support-fix-AArch64-struct-user_gcs-.patch | 181 +++++++++++++
.../gdb/{gdb_16.3.bb => gdb_17.1.bb} | 0
7 files changed, 433 insertions(+), 166 deletions(-)
rename meta/recipes-devtools/gdb/{gdb-cross-canadian_16.3.bb => gdb-cross-canadian_17.1.bb} (100%)
rename meta/recipes-devtools/gdb/{gdb-cross_16.3.bb => gdb-cross_17.1.bb} (100%)
create mode 100644 meta/recipes-devtools/gdb/gdb/0009-PR-gdb-33747-gdb-ser-unix-modernize-Linux-custom-bau.patch
delete mode 100644 meta/recipes-devtools/gdb/gdb/0009-Readline-8.3-alpha-release.patch
create mode 100644 meta/recipes-devtools/gdb/gdb/0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch
rename meta/recipes-devtools/gdb/{gdb_16.3.bb => gdb_17.1.bb} (100%)Signature · 1 line
2.49.0
PATCH v5 1/1 gdb: Upgrade 16.3 -> 17.1
From: Sunil Dora <[email protected]>
GDB 17.1 includes the following changes and enhancements:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-17.1-release
* x86-64 CET shadow stack support
* Debugging Linux programs that use AArch64 Guarded Control Stacks
* GDB record feature now supports rv64gc architectures
* 'info threads' command support for two new options '-stopped' and '-running' to limit the list of displayed threads.
* On Linux and FreeBSD, the addresses shown by the 'info sharedlibrary' command are now for the full memory range allocated to the shared library.
* Linux checkpoints now work with multiple inferiors
* Improved linker namespace support
* Warnings and error messages now start with an emoji (warning sign, or cross mark) if supported by the host charset. Configurable.
* Built-in support for TLS on Linux as backup when libthread_db is not available. Supported on the x86_64, aarch64, ppc64, s390x, and riscv architectures, when compiled with GLIBC or MUSL.
* New command "set riscv numeric-register-names" to display risc-v registers using their numeric names instead of their ABI names.
* The Alpha target now supports target descriptions.
* Python API enhancements
* Support for Python versions older than 3.4 has been removed.
Dropped 0009-Readline-8.3-alpha-release.patch
Added 0009-PR-gdb-33747-gdb-ser-unix-modernize-Linux-custom-bau.patch Added 0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch
---
...ian_16.3.bb => gdb-cross-canadian_17.1.bb} | 0
.../{gdb-cross_16.3.bb => gdb-cross_17.1.bb} | 0
meta/recipes-devtools/gdb/gdb.inc | 5 +-
...-ser-unix-modernize-Linux-custom-bau.patch | 248 ++++++++++++++++++
.../gdb/0009-Readline-8.3-alpha-release.patch | 164 ------------
...support-fix-AArch64-struct-user_gcs-.patch | 181 +++++++++++++
.../gdb/{gdb_16.3.bb => gdb_17.1.bb} | 0
7 files changed, 432 insertions(+), 166 deletions(-)
rename meta/recipes-devtools/gdb/{gdb-cross-canadian_16.3.bb => gdb-cross-canadian_17.1.bb} (100%)
rename meta/recipes-devtools/gdb/{gdb-cross_16.3.bb => gdb-cross_17.1.bb} (100%)
create mode 100644 meta/recipes-devtools/gdb/gdb/0009-PR-gdb-33747-gdb-ser-unix-modernize-Linux-custom-bau.patch
delete mode 100644 meta/recipes-devtools/gdb/gdb/0009-Readline-8.3-alpha-release.patch
create mode 100644 meta/recipes-devtools/gdb/gdb/0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch
rename meta/recipes-devtools/gdb/{gdb_16.3.bb => gdb_17.1.bb} (100%)meta/recipes-devtools/gdb/gdb-cross-canadian_17.1.bb renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_16.3.bb +0 -0
meta/recipes-devtools/gdb/gdb-cross_17.1.bb renamed from meta/recipes-devtools/gdb/gdb-cross_16.3.bb +0 -0
meta/recipes-devtools/gdb/gdb.inc +3 -2
@@ -13,6 +13,7 @@ SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ file://0006-Fix-invalid-sigprocmask-call.patch \ file://0007-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ file://0008-Add-fix-for-packages-that-are-not-compatible-with-C2.patch \ - file://0009-Readline-8.3-alpha-release.patch \ + file://0009-PR-gdb-33747-gdb-ser-unix-modernize-Linux-custom-bau.patch \ + file://0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch \ " -SRC_URI[sha256sum] = "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5" +SRC_URI[sha256sum] = "14996f5f74c9f68f5a543fdc45bca7800207f91f92aeea6c2e791822c7c6d876"
meta/recipes-devtools/gdb/gdb/0009-PR-gdb-33747-gdb-ser-unix-modernize-Linux-custom-bau.patch new file +248 -0
248 lines not on this page · raw message
meta/recipes-devtools/gdb/gdb/0009-Readline-8.3-alpha-release.patch deleted +0 -164
164 lines not on this page · raw message
meta/recipes-devtools/gdb/gdb/0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch new file +181 -0
181 lines not on this page · raw message
meta/recipes-devtools/gdb/gdb_17.1.bb renamed from meta/recipes-devtools/gdb/gdb_16.3.bb +0 -0
Signature · 1 line
2.49.0
Re: [OE-core] [PATCH V5 1/1] gdb: Upgrade 16.3 -> 17.1
meta/recipes-devtools/gdb/gdb/0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch line 36
Quoted 10 lines · Sunil Kumar via lists.openembedded.org
meta/recipes-devtools/gdb/gdb/0010-PR-gdb-33926-gdbsupport-fix-AArch64-struct-user_gcs-.patch new file +10
-0+Backport of upstream fix by Thiago Jung Bauermann: + [PATCH v4 6/6] GDB: aarch64-linux: Fix build failure on musl systems + https://sourceware.org/pipermail/gdb-patches/2026-February/225010.html + +adapted to the GDB 17.1 layout where struct user_gcs still resides in +gdb/arch/aarch64-gcs-linux.h. + +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33926 + +Upstream-Status: Pending
If this is a backport of something that landed in upstream master, then it should say 'Backport [link to upstream commit]'. If it hasn't been merged yet and only been submitted upstream, then it should say Submitted [where]. But Pending is not an appropriate status here, as it means something is preventing the patch from being submitted, or it isn't clear whether it should be submitted (and either reason should be included and explained).
Alex
Re: [PATCH V5 1/1] gdb: Upgrade 16.3 -> 17.1
Quoted 4 lines · Alexander Kanavin
But Pending is not an appropriate status here, as
it means something is preventing the patch from being submitted, or it isn't clear whether it should be submitted
Hi Alex,
Thanks for the Feedback.
You're right — "Pending" isn't the best fit here. The patch is a partial adaptation/backport of Thiago Jung Bauermann’s V4 series, which is still under review on gdb-patches and has not landed in master yet. ( https://sourceware.org/pipermail/gdb-patches/2026-March/225502.html )
Thiago has indicated he will prepare a 17.1-specific version once the master series is resolved.
I’ve updated the Upstream-Status line to:
Upstream-Status: Submitted [gdb-patches, Thiago Jung Bauermann v4 series (not yet merged): https://sourceware.org/pipermail/gdb-patches/2026-March/225502.html — partial adaptation for the GDB 17.1 header layout]
Would you prefer using Backport [...] here instead, even though there is no master commit yet, or does Submitted better reflect the current upstream situation?
Thanks,
Sunil Dora
Re: [OE-core] [PATCH V5 1/1] gdb: Upgrade 16.3 -> 17.1
Quoted 2 lines · Sunil Kumar via lists.openembedded.org
Would you prefer using Backport [...] here instead, even though there is no master commit yet, or does Submitted better reflect the current upstream situation?
Backport status should come with a link to a commit on upstream repository's trunk branch (e.g. master or main), and if there is nothing yet, then Submitted is the right status.
Alex
Re: [PATCH V5 1/1] gdb: Upgrade 16.3 -> 17.1
Quoted 4 lines · Alexander Kanavin
Backport status should come with a link to a commit on upstream repository's trunk branch (e.g. master or main), and if there is nothing yet, then Submitted is the right status.
Hi Alex,
Thank you. I discussed with Thiago, and he has now submitted a backported patch for this.
https://sourceware.org/pipermail/gdb-patches/2026-March/226049.html
I’ll send a v6 shortly.
Thanks,
Sunil