Re: [PATCH v2 0/8] Remove stabs support from GDB

Luis
2025-10-22T09:49:24Z

Hi,

On 20/10/2025 16:28, Guinevere Larsen wrote:
> Now that GDB 17 has branched, I think we're ready to remov stabs from
> GDB entirely, and the sooner this is merged, the earlier we'll spot any
> problems and the more time will be there to fix them.
>
> This series does just that.
>
> Guinevere Larsen (8):
> gdb: move some stabs functions to gdb/buildsym-legacy.h
> gdb/mdebug: Remove stabs support from mips inferiors
> gdb: Remove stabs support from ELF files
> gdb: Remove stabs support from dbx
> gdb: Remove stabs support for COFF files
> gdb: Remove stabs support from XCOFF inferiors
> gdb: Fully remove stabs code from GDB
> gdb: remove support for dbx from GDB
>
> gdb/Makefile.in | 8 +-
> gdb/NEWS | 4 +
> gdb/arch-utils.c | 6 -
> gdb/arch-utils.h | 3 -
> gdb/buildsym-legacy.h | 10 +
> gdb/buildsym.c | 18 -
> gdb/coffread.c | 133 +-
> gdb/configure | 6 +-
> gdb/configure.ac | 4 +-
> gdb/dbxread.c | 254 -
> gdb/doc/Makefile.in | 46 +-
> gdb/doc/gdb.texinfo | 23 +-
> gdb/doc/stabs.texinfo | 4130 ---------------
> gdb/elfread.c | 146 +-
> gdb/gdb-stabs.h | 176 -
> gdb/gdbarch-gen.c | 22 -
> gdb/gdbarch-gen.h | 4 -
> gdb/gdbarch_components.py | 8 -
> gdb/mdebugread.c | 1781 ++-----
> gdb/microblaze-tdep.c | 8 -
> gdb/mipsread.c | 2 -
> gdb/objfiles.h | 3 -
> gdb/rs6000-aix-nat.c | 1 -
> gdb/sparc-tdep.c | 10 -
> gdb/sparc64-tdep.c | 2 -
> gdb/stabsread.c | 7217 --------------------------
> gdb/stabsread.h | 314 --
> gdb/symmisc.c | 3 -
> gdb/testsuite/gdb.stabs/aout.sed | 16 -
> gdb/testsuite/gdb.stabs/ecoff.sed | 17 -
> gdb/testsuite/gdb.stabs/exclfwd.exp | 57 -
> gdb/testsuite/gdb.stabs/exclfwd.h | 21 -
> gdb/testsuite/gdb.stabs/exclfwd1.c | 34 -
> gdb/testsuite/gdb.stabs/exclfwd2.c | 29 -
> gdb/testsuite/gdb.stabs/gdb11479.c | 76 -
> gdb/testsuite/gdb.stabs/gdb11479.exp | 59 -
> gdb/testsuite/gdb.stabs/hppa.sed | 20 -
> gdb/testsuite/gdb.stabs/weird.def | 900 ----
> gdb/testsuite/gdb.stabs/weird.exp | 309 --
> gdb/testsuite/gdb.stabs/xcoff.sed | 17 -
> gdb/testsuite/lib/gdb.exp | 6 +
> gdb/xcoffread.c | 2014 +------
> 42 files changed, 544 insertions(+), 17373 deletions(-)
> delete mode 100644 gdb/dbxread.c
> delete mode 100644 gdb/doc/stabs.texinfo
> delete mode 100644 gdb/gdb-stabs.h
> delete mode 100644 gdb/stabsread.c
> delete mode 100644 gdb/stabsread.h
> delete mode 100644 gdb/testsuite/gdb.stabs/aout.sed
> delete mode 100644 gdb/testsuite/gdb.stabs/ecoff.sed
> delete mode 100644 gdb/testsuite/gdb.stabs/exclfwd.exp
> delete mode 100644 gdb/testsuite/gdb.stabs/exclfwd.h
> delete mode 100644 gdb/testsuite/gdb.stabs/exclfwd1.c
> delete mode 100644 gdb/testsuite/gdb.stabs/exclfwd2.c
> delete mode 100644 gdb/testsuite/gdb.stabs/gdb11479.c
> delete mode 100644 gdb/testsuite/gdb.stabs/gdb11479.exp
> delete mode 100644 gdb/testsuite/gdb.stabs/hppa.sed
> delete mode 100644 gdb/testsuite/gdb.stabs/weird.def
> delete mode 100644 gdb/testsuite/gdb.stabs/weird.exp
> delete mode 100644 gdb/testsuite/gdb.stabs/xcoff.sed
>
>
> base-commit: b9e48061e06ec0c181757c9e80cc4dc72d614f4f

Looks like gcc (13.3.0 at least) is a bit grumpy with this and there are
a few -Werror=array-bounds= warnings stopping the build, apparently from
changes to gdb/xcoffread.c.