gdb: make program_space::free_all_objfiles use this

Use `this` instead of `current_program_space`.  Presumably, the method
wants to check the solibs of "this" program space, not the current
global program space (although they are likely always the same at the
moment).

Change-Id: Iaf0534f36bfd47c04c53ed0657da332bdb8fb906
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 16:13:20 -04:00
committed by Simon Marchi
parent b8c9d0de90
commit 4113c737bd

View File

@@ -128,7 +128,7 @@ void
program_space::free_all_objfiles ()
{
/* Any objfile reference would become stale. */
for (const solib &so : current_program_space->solibs ())
for (const solib &so : this->solibs ())
gdb_assert (so.objfile == NULL);
while (!objfiles_list.empty ())