Make the current_program_space reference bubble up one level.
Change-Id: Ide917aa306bff1872d961244901d79f65d2da62e
Approved-By: Andrew Burgess <aburgess@redhat.com>
return b;
}
-/* Disable any breakpoints that are on code in shared libraries. Only
- apply to enabled breakpoints, disabled ones can just stay disabled. */
+/* See breakpoint.h. */
void
-disable_breakpoints_in_shlibs (void)
+disable_breakpoints_in_shlibs (program_space *pspace)
{
for (bp_location *loc : all_bp_locations ())
{
|| (b->type == bp_jit_event)
|| (b->type == bp_hardware_breakpoint)
|| (is_tracepoint (b)))
- && loc->pspace == current_program_space
+ && loc->pspace == pspace
&& !loc->shlib_disabled
&& solib_name_from_address (loc->pspace, loc->address)
)
delete at next stop disposition. */
extern void remove_solib_event_breakpoints_at_next_stop (void);
-extern void disable_breakpoints_in_shlibs (void);
+/* Disable any breakpoints that are on code in shared libraries in PSPACE.
+ Only apply to enabled breakpoints, disabled ones can just stay disabled. */
+
+extern void disable_breakpoints_in_shlibs (program_space *pspace);
/* This function returns true if B is a catchpoint. */
{
const solib_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
- disable_breakpoints_in_shlibs ();
+ disable_breakpoints_in_shlibs (current_program_space);
current_program_space->so_list.clear_and_dispose ([] (solib *so) {
notify_solib_unloaded (current_program_space, *so);
inf = current_inferior ();
if (!inf->target_is_pushed (this))
inf->push_target (this);
- disable_breakpoints_in_shlibs ();
+ disable_breakpoints_in_shlibs (current_program_space);
windows_clear_solib ();
clear_proceed_status (0);
init_wait_for_inferior ();