]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: use current_program_space->core_bfd() a little less
authorAndrew Burgess <aburgess@redhat.com>
Thu, 21 Aug 2025 11:58:30 +0000 (12:58 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 26 Aug 2025 20:48:34 +0000 (21:48 +0100)
commit2bd87cef85034dbf39a2817fba4f03828c0ca782
tree4275d2a6611dfcbbcf8552916f58cc74c93b0dd4
parente3a6f62033cd3a1acdafc34d8bf7e22e532dff9b
gdb: use current_program_space->core_bfd() a little less

The function linux_read_core_file_mappings is passed an argument CBFD,
which is the BFD for the core file.  In
core_target::build_file_mappings, where the function is called, we
pass current_program_space->core_bfd() as the argument.

However, in linux_read_core_file_mappings, in some places we use the
CBFD argument, and in other places we directly use
current_program_space->core_bfd().  This is confusing, and
unnecessary.  Lets not do that.

Standardise on just using CBFD.  This removes some references to
global state in favour of passing the global state in as an argument,
I think this is a good thing.

There should be no user visible changes after this commit.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/linux-tdep.c