gdb: remove core_bfd macro

The core_bfd macro hides a use of current_program_space.  Remove it, so
that we have the opportunity to get the program space from the context,
if possible.  I guess that the macro was introduced at some point to
replace a global variable of the same name without changing all the
uses.

Change-Id: I971a65b29b5e5a5941f3cb7ea234547daa787268
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi
2024-02-05 16:13:58 -05:00
parent 0afc614c99
commit 6fdf95ae53
18 changed files with 213 additions and 181 deletions

View File

@@ -590,7 +590,7 @@ gdbarch_update_p (struct gdbarch_info info)
if (info.abfd == NULL)
info.abfd = current_program_space->exec_bfd ();
if (info.abfd == NULL)
info.abfd = core_bfd;
info.abfd = current_program_space->core_bfd ();
/* Check for the current target description. */
if (info.target_desc == NULL)