Re: [PATCH RFC 1/2] Remove "readnow" support

Kevin Buettner
2026-02-12T16:44:55Z

On Thu, 12 Feb 2026 13:29:52 +0000
Andrew Burgess <aburgess@redhat.com> wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Tom Tromey <tom@tromey.com>
> >> Date: Wed, 11 Feb 2026 11:49:09 -0700
> >> Cc: Tom Tromey <tom@tromey.com>
> >>
> >> I think the "readnow" feature should be removed.
> >>
> >> "readnow" exists basically to work around potential bugs in any
> >> "partial" reader. This used to work ok because gdb would scan all the
> >> expanded symtabs in addition to using the "quick" functions. This
> >> changed with the "search via psyms" series.
> >>
> >> So now, "readnow" is basically its own separate implementation. As
> >> such, I don't think it carries its weight. It is very slow and uses a
> >> lot of memory, and can have its own bugs requiring extra work on our
> >> part.
> >
> > Is there any other way for the user to force GDB to read all of the
> > symbols from all of the object files? If not, perhaps this
> > functionality still has its value? Maybe we should make it a "maint"
> > command instead?
>
> I second this. We do run into bugs with the indexes from time to time,
> and it's good to have some way to tell GDB to go read the full debug
> information so we can narrow the bug down. Plus it offers a work around
> in these cases.
>
> Is 'maint expand-symtabs' the equivalent? When someone uses -readnow
> should we maybe guide them towards the new way of doing things, even all
> we do is point towards a particular entry in the manual maybe?

+1