gdb: pass program space to objfile::make

Make the current program space reference bubble up one level.

Change-Id: Iee8b11c853c76e539c991c4785737c69e6a1925c
Approved-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
This commit is contained in:
Simon Marchi
2024-05-16 17:30:22 -04:00
committed by Simon Marchi
parent da877546db
commit 8991986e24
4 changed files with 10 additions and 8 deletions

View File

@@ -660,8 +660,8 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
paddress (priv_data->gdbarch,
priv_data->entry.symfile_addr));
objfile *objfile = objfile::make (nullptr, objfile_name.c_str (),
OBJF_NOT_FILENAME);
objfile *objfile = objfile::make (nullptr, current_program_space,
objfile_name.c_str (), OBJF_NOT_FILENAME);
objfile->per_bfd->gdbarch = priv_data->gdbarch;
for (gdb_symtab &symtab : obj->symtabs)