diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-02-05 16:13:58 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-02-06 10:57:55 -0500 |
commit | 6fdf95ae532c61263e19e2036cfe3057bb928385 (patch) | |
tree | 9b043bfe97a012c33e3a9e0661e6c184ffedccf8 /gdb/symfile-mem.c | |
parent | 0afc614c9938fbf5eda10a26c77d574c3c2f945a (diff) | |
download | gdb-6fdf95ae532c61263e19e2036cfe3057bb928385.zip gdb-6fdf95ae532c61263e19e2036cfe3057bb928385.tar.gz gdb-6fdf95ae532c61263e19e2036cfe3057bb928385.tar.bz2 |
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>
Diffstat (limited to 'gdb/symfile-mem.c')
-rw-r--r-- | gdb/symfile-mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index d2c64a2..12a5f7d 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -166,9 +166,9 @@ add_vsyscall_page (inferior *inf) { struct bfd *bfd; - if (core_bfd != NULL) - bfd = core_bfd; - else if (current_program_space->exec_bfd () != NULL) + if (current_program_space->core_bfd () != nullptr) + bfd = current_program_space->core_bfd (); + else if (current_program_space->exec_bfd () != nullptr) bfd = current_program_space->exec_bfd (); else /* FIXME: cagney/2004-05-06: Should not require an existing |