From: Simon Marchi Date: Fri, 6 Dec 2024 17:50:51 +0000 (-0500) Subject: gdb: make objfile::make actually use its pspace parameter X-Git-Tag: gdb-16-branchpoint~170 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=137f38de260fc414f42034f0e1c1bf6a1dae4199;p=thirdparty%2Fbinutils-gdb.git gdb: make objfile::make actually use its pspace parameter Fix an oversight in commit 8991986e2413 ("gdb: pass program space to objfile::make"). Change-Id: I263eec6e94dde0a9763f831d2d87b4d300b6a36a --- diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 207a0cb22eb..76d17f548a5 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -389,16 +389,14 @@ objfile * objfile::make (gdb_bfd_ref_ptr bfd_, program_space *pspace, const char *name_, objfile_flags flags_, objfile *parent) { - objfile *result - = new objfile (std::move (bfd_), current_program_space, name_, flags_); + objfile *result = new objfile (std::move (bfd_), pspace, name_, flags_); if (parent != nullptr) add_separate_debug_objfile (result, parent); - current_program_space->add_objfile (std::unique_ptr (result), - parent); + pspace->add_objfile (std::unique_ptr (result), parent); /* Rebuild section map next time we need it. */ - get_objfile_pspace_data (current_program_space)->new_objfiles_available = 1; + get_objfile_pspace_data (pspace)->new_objfiles_available = 1; return result; }