]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: more current_program_space->core_bfd() removal
authorAndrew Burgess <aburgess@redhat.com>
Thu, 21 Aug 2025 12:13:59 +0000 (13:13 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 26 Aug 2025 20:48:34 +0000 (21:48 +0100)
commit43ed67a290e7679af86395d7b430a71f9e4449ee
treef44df8204da8cda967a4715cc27155c90291445b
parent2bd87cef85034dbf39a2817fba4f03828c0ca782
gdb: more current_program_space->core_bfd() removal

This commit changes the signature of the gdbarch_core_info_proc method
so that it takes a 'struct bfd *' as an extra argument.  This argument
is used to pass through the core file bfd pointer.

Now, in corelow.c, when calling gdbarch_core_info_proc, we can pass
through current_program_space->core_bfd() as the argument.  Within the
implementations, (Linux and FreeBSD) we can use this argument rather
than having to access the core file through current_program_space.

This reduces the use of global state, which I think is a good thing.

There should be no user visible changes after this commit.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/corelow.c
gdb/fbsd-tdep.c
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/linux-tdep.c