aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-12-06 12:50:51 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-12-06 12:52:23 -0500
commit137f38de260fc414f42034f0e1c1bf6a1dae4199 (patch)
tree87412746cbecbcc67da38fe04025d6fd355c47c5
parentc8889b9131755888f979f8ee7f238e2acbd54e5b (diff)
downloadbinutils-137f38de260fc414f42034f0e1c1bf6a1dae4199.zip
binutils-137f38de260fc414f42034f0e1c1bf6a1dae4199.tar.gz
binutils-137f38de260fc414f42034f0e1c1bf6a1dae4199.tar.bz2
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
-rw-r--r--gdb/objfiles.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 207a0cb..76d17f5 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<objfile> (result),
- parent);
+ pspace->add_objfile (std::unique_ptr<objfile> (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;
}