gdb: remove solib::pspace field

This backlink is not necessary, we always know the program space from
the context.  Pass it down the solib_unloaded observer.

Change-Id: I45a503472dc791f517558b8141901472634e0556
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi
2023-09-27 16:39:36 -04:00
parent dc63d5682e
commit bd93891c9a
5 changed files with 11 additions and 15 deletions

View File

@@ -8018,7 +8018,7 @@ disable_breakpoints_in_shlibs (void)
disabled ones can just stay disabled. */
static void
disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
disable_breakpoints_in_unloaded_shlib (program_space *pspace, so_list *solib)
{
bool disabled_shlib_breaks = false;
@@ -8027,7 +8027,7 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
/* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL. */
struct breakpoint *b = loc->owner;
if (solib->pspace == loc->pspace
if (pspace == loc->pspace
&& !loc->shlib_disabled
&& (((b->type == bp_breakpoint
|| b->type == bp_jit_event