]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: make `program_space::free_all_objfiles` use `this`
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 May 2024 20:13:20 +0000 (16:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Jul 2024 18:34:12 +0000 (14:34 -0400)
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>
gdb/progspace.c

index 224b61e0d7f8833c608d655237bcf56d79b267a9..28198c1e8a43c5927802fe72f61ae2e666e742d3 100644 (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 ())