]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: pass core file to gdbarch_core_xfer_siginfo
authorAndrew Burgess <aburgess@redhat.com>
Wed, 27 Aug 2025 10:49:24 +0000 (11:49 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 4 Sep 2025 15:43:19 +0000 (16:43 +0100)
commita45b16f16e8eb4b24d55b1d83a24524cd4b042f1
tree7d5c0b908aa518518d9ed56961e942a538e2c3b0
parenta839a42bcd865707b25a3b787858d019a41b8b8e
gdb: pass core file to gdbarch_core_xfer_siginfo

Another patch that aims to remove 'current_program_space->core_bfd ()'
from GDB.  This time I'm passing the core file BFD as an argument to
the gdbarch method gdbarch_core_xfer_siginfo.

In corelow.c the core file is being passed, this does introduce a new
instance of 'current_program_space->core_bfd ()', but this is OK.  My
long term plan is to move the core bfd into core_target, in which case
the call to gdbarch_core_xfer_siginfo will have access to the core bfd
as a member variable.

For now though, this patch moves the accesses via global state up the
call stack, and consolidates the two calls from fbsd-tdep.c and
linux-tdep.c into the one call in corelow.c.

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