Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Guinevere Larsen <guinevere@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 0/8] Remove stabs support from GDB
Date: Thu, 23 Oct 2025 14:11:04 -0400	[thread overview]
Message-ID: <7a66a649-7bfa-4c9c-9289-7e513dc19077@simark.ca> (raw)
In-Reply-To: <20251020152853.28195-1-guinevere@redhat.com>

On 10/20/25 11:28 AM, 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.

Hello,

I got another build failure that is likely related to this series.  It's
a -Werror=nonnull error, when building with UBSan, but I think it's not
a false positive.

      CXX    xcoffread.o
    /home/smarchi/src/binutils-gdb/gdb/xcoffread.c: In function ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’:
    /home/smarchi/src/binutils-gdb/gdb/xcoffread.c:573:44: error: ‘this’ pointer is null [-Werror=nonnull]
      573 |       addr += objfile->text_section_offset ();
          |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
    In file included from /home/smarchi/src/binutils-gdb/gdb/xcoffread.c:43:
    /home/smarchi/src/binutils-gdb/gdb/objfiles.h:512:13: note: in a call to non-static member function ‘CORE_ADDR objfile::text_section_offset() const’
      512 |   CORE_ADDR text_section_offset () const
          |             ^~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/xcoffread.c:579:63: error: ‘this’ pointer is null [-Werror=nonnull]
      579 |                                - objfile->text_section_offset ());
          |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
    /home/smarchi/src/binutils-gdb/gdb/objfiles.h:512:13: note: in a call to non-static member function ‘CORE_ADDR objfile::text_section_offset() const’
      512 |   CORE_ADDR text_section_offset () const
          |             ^~~~~~~~~~~~~~~~~~~

The full configure line is:

    $ ~/src/binutils-gdb/configure --prefix=/build --disable-binutils --disable-ld --disable-gold --disable-gas --disable-sim --disable-gprof --disable-gprofng --with-system-readline --with-system-zlib --enable-targets=all --with-expat=yes --with-python=python3 --with-guile --enable-libctf --enable-build-warnings --enable-gdb-building-warnings --enable-unit-tests --enable-ubsan 'CC=ccache gcc' 'CFLAGS=-O2 -g -fsanitize=address    ' 'LDFLAGS= -fsanitize=address' 'CXX=ccache g++' 'CXXFLAGS=-O2 -g -fsanitize=address -D_GLIBCXX_DEBUG=1 -Wno-error=array-bounds    '

GCC version 15.2.1.

I think it's correctly complaining, because this_symtab_objfile is never
ever set anymore.  And neither is this_symtab_psymtab.  I realized this
when trying to refactor the code to remove these globals, trying to pass
them as parameters instead.

Simon

      parent reply	other threads:[~2025-10-23 18:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 15:28 Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 1/8] gdb: move some stabs functions to gdb/buildsym-legacy.h Guinevere Larsen
2025-10-20 16:25   ` Tom Tromey
2025-10-20 15:28 ` [PATCH v2 2/8] gdb/mdebug: Remove stabs support from mips inferiors Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 3/8] gdb: Remove stabs support from ELF files Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 4/8] gdb: Remove stabs support from dbx Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 5/8] gdb: Remove stabs support for COFF files Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 6/8] gdb: Remove stabs support from XCOFF inferiors Guinevere Larsen
2025-11-07 10:46   ` Andrew Burgess
2025-11-07 12:09     ` Guinevere Larsen
2025-11-07 14:46       ` Tom Tromey
2025-10-20 15:28 ` [PATCH v2 7/8] gdb: Fully remove stabs code from GDB Guinevere Larsen
2025-10-20 16:39   ` Eli Zaretskii
2025-10-20 19:12     ` Guinevere Larsen
2025-10-20 15:28 ` [PATCH v2 8/8] gdb: remove support for dbx " Guinevere Larsen
2025-10-21 19:14 ` [PATCH v2 0/8] Remove stabs support " Tom Tromey
2025-10-21 19:42   ` Guinevere Larsen
2025-10-22  9:48 ` Luis
2025-10-22 13:08   ` Tom Tromey
2025-10-22 13:19     ` Guinevere Larsen
2025-10-22 19:19       ` Luis
2025-10-23  0:58         ` Luis
2025-10-23  2:03           ` Andrew Pinski
2025-10-23 18:11 ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a66a649-7bfa-4c9c-9289-7e513dc19077@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=guinevere@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox