From 6fdf95ae532c61263e19e2036cfe3057bb928385 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 5 Feb 2024 16:13:58 -0500 Subject: 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 --- gdb/symfile-mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/symfile-mem.c') 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 -- cgit v1.1