Debian Patches

Status for gdb/17.1-4

Patch Description Author Forwarded Bugs Origin Last update
load-versioned-libcc1.patch load-versioned-libcc1
* d/p/load-versioned-libcc1.patch:
- load libcc1.so.0 instead unversioned file.
Hector Oron <zumbi@debian.org> no 2019-02-20
fix-blhc-libiberty.patch libiberty: Pass LDFLAGS
Avoid blhc false positive:

LDFLAGS missing (-Wl,-z,relro): \ mv -f /builds/gdb-team/gdb/debian/output/source_dir/debian/tmp/usr/lib/`x86_64-linux-gnu-gcc -g -O2 -ffile-prefix-map=/builds/gdb-team/gdb/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -print-multi-os-directory`/./libiberty.an /builds/gdb-team/gdb/debian/output/source_dir/debian/tmp/usr/lib/`x86_64-linux-gnu-gcc -g -O2 -ffile-prefix-map=/builds/gdb-team/gdb/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -print-multi-os-directory`/./libiberty.a
Ricardo Ribalda <ricardo@ribalda.com> no 2023-12-04
fix-blhc-chew.patch fix-blhc-chew
===================================================================
Héctor Orón Martínez <zumbi@debian.org> no 2025-01-11
gfdl-dont-build-manpages.patch gfdl-dont-build-manpages Héctor Orón Martínez <zumbi@debian.org> not-needed Debian 2024-07-27
cross.patch gdb fails to cross build from source for three distinct reasons. [...]
3. In bfd/doc, chew.c uses host compiler flags with the build compiler.
This fails badly when compiling for amd64 or arm64.
Helmut Grohne <helmut@subdivi.de> invalid debian
fix-test-failure-loong64-01.patch [PATCH 1/1] gdb: Make test result accurate in breakpoint-in-ro-region.exp

Currently, if no support for hardware breakpoints, when executing:

make check-gdb TESTS="gdb.base/breakpoint-in-ro-region.exp"

the test results of "hbreak" and "si" command are "PASS":

```
(gdb) hbreak *0x120000628^M
No hardware breakpoint support in the target.^M
(gdb) PASS: gdb.base/breakpoint-in-ro-region.exp: probe hbreak support (no support)

si^M
Warning:^M
Cannot insert hardware breakpoint 0.^M
Could not insert hardware breakpoints:^M
You may have requested too many hardware breakpoints/watchpoints.^M
^M
(gdb) PASS: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: step in ro region (cannot insert hw break)
```

This is not accurate, obviously it should be "UNSUPPORTED".
Tiezhu Yang <yangtiezhu@loongson.cn> yes debian upstream upstream, https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=eaf673ca75c2;hp=c5e764a4217eb4b0575c75d42249c164f48f6a27 2026-01-31
fix-test-failure-loong64-02.patch gdb: Fix unexpected failures in breakpoint-in-ro-region.exp
Currently, there is no support for hardware breakpoints on a virtual
machine of LoongArch. When unseting CONFIG_HAVE_HW_BREAKPOINT of the
Linux kernel, there is also no support for hardware breakpoints on a
physical machine of LoongArch.

For the above cases, when executing:

make check-gdb RUNTESTFLAGS="--target_board=native-gdbserver" TESTS="gdb.base/breakpoint-in-ro-region.exp"

there are 4 unexpected failures:

FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: step in ro region
FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: thread advanced
FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted on: auto-hw on: step in ro region
FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted on: auto-hw on: thread advanced

By the way, there are no failures when executing:

make check-gdb TESTS="gdb.base/breakpoint-in-ro-region.exp"

Here are the gdb log messages if no support for hardware breakpoints:

(1) make check-gdb TESTS="gdb.base/breakpoint-in-ro-region.exp"

```
(gdb) hbreak *0x120000628^M
No hardware breakpoint support in the target.^M
(gdb) UNSUPPORTED: gdb.base/breakpoint-in-ro-region.exp: probe hbreak support (no support)

si^M
Warning:^M
Cannot insert hardware breakpoint 0.^M
Could not insert hardware breakpoints:^M
You may have requested too many hardware breakpoints/watchpoints.^M
^M
(gdb) UNSUPPORTED: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: step in ro region (cannot insert hw break)
```

(2) make check-gdb RUNTESTFLAGS="--target_board=native-gdbserver" TESTS="gdb.base/breakpoint-in-ro-region.exp"

```
(gdb) hbreak *0x120000628^M
Hardware assisted breakpoint 3 at 0x120000628: file /home/fedora/build/gdb/testsuite/../../../gdb/gdb/testsuite/gdb.base/breakpoint-in-ro-region.c, line 22.^M
Warning:^M
Cannot insert hardware breakpoint 3:Remote failure reply: 01.^M
^M
(gdb) PASS: gdb.base/breakpoint-in-ro-region.exp: probe hbreak support (support)

si^M
Warning:^M
Cannot insert hardware breakpoint 0:Remote failure reply: 01.^M
^M
(gdb) FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: step in ro region
```

The outputs of "hbreak" and "si" commands are different between gdb and
gdbserver, it should check "Cannot insert hardware breakpoint" anyway.

In my opinion, this fix is not only for LoongArch but also for the other
arch that does not support hardware breakpoints. For example, if disable
CONFIG_PERF_EVENTS, then CONFIG_HAVE_HW_BREAKPOINT will be not set due to

select HAVE_HW_BREAKPOINT if PERF_EVENTS

in arch/loongarch/Kconfig of the Linux kernel code, it can reproduce the
unexpected failures.
Tiezhu Yang <yangtiezhu@loongson.cn> yes debian upstream upstream, https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a4477520f93a 2026-01-31

All known versions for source package 'gdb'

Links