mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
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:
@@ -300,9 +300,7 @@ struct program_space
|
||||
|
||||
/* Return the exec BFD for this program space. */
|
||||
bfd *exec_bfd () const
|
||||
{
|
||||
return ebfd.get ();
|
||||
}
|
||||
{ return ebfd.get (); }
|
||||
|
||||
/* Set the exec BFD for this program space to ABFD. */
|
||||
void set_exec_bfd (gdb_bfd_ref_ptr &&abfd)
|
||||
@@ -310,6 +308,9 @@ struct program_space
|
||||
ebfd = std::move (abfd);
|
||||
}
|
||||
|
||||
bfd *core_bfd () const
|
||||
{ return cbfd.get (); }
|
||||
|
||||
/* Reset saved solib data at the start of an solib event. This lets
|
||||
us properly collect the data when calling solib_add, so it can then
|
||||
later be printed. */
|
||||
|
||||
Reference in New Issue
Block a user