]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: remove core file name from 'maint info program-spaces'
authorAndrew Burgess <aburgess@redhat.com>
Wed, 10 Sep 2025 09:32:48 +0000 (10:32 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 2 Oct 2025 18:25:43 +0000 (19:25 +0100)
commitace1656dad5a9dea2163bf28917c1f74cd655c74
treeb51df7c2bba528cda43e3ce4ec6c9a83175ca9c1
parent2caf7b168912aaff869d4b13f6130baeaa45cb76
gdb: remove core file name from 'maint info program-spaces'

I'm currently working towards a goal of moving the core file BFD out
of program_space and into core_target.  I believe this is a good
change to make as the core_target already holds a lot of state that is
parsed from the core file BFD, so storing the parsed, structured,
information in a different location to the original core file BFD
doesn't make sense to me.

In preparation for this change, the 'maint info program-spaces'
command needs updating.  Currently this command lists the name of the
core file BFD that is loaded into each program space.

Once the core file moves into core_target then the core file really
becomes a property of the inferior.

We could try to retain the existing output by looking up which
inferior is active in a given program space, and find the core file
that way, however, I don't like this plan because GDB does support
shared program spaces, in theory, a target could exist where every
inferior shares a single program space.  Even on more common POSIX
targets, after a vfork the parent and child share a program space.

Now the vfork case clearly doesn't impact the core file case, and I
don't know if GDB _actually_ supports any shared program space targets
any more.... but still, I don't think we should try to retain the
existing behaviour.

So, this commit removes the core file name from the 'maint info
program-spaces' output.  The next commit will add the core file name
back in a new home.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/progspace.c