Make the current_program_space reference bubble up one level.
Change-Id: Idc8ed78d23bf3bb2969f6963d8cc049f26901c29
Approved-By: Andrew Burgess <aburgess@redhat.com>
return remove_breakpoint_1 (bl, REMOVE_BREAKPOINT);
}
-/* Clear the "inserted" flag in all breakpoints. */
+/* See breakpoint.h. */
void
-mark_breakpoints_out (void)
+mark_breakpoints_out (program_space *pspace)
{
for (bp_location *bl : all_bp_locations ())
- if (bl->pspace == current_program_space)
+ if (bl->pspace == pspace)
bl->inserted = 0;
}
if (gdbarch_has_global_breakpoints (current_inferior ()->arch ()))
return;
- mark_breakpoints_out ();
+ mark_breakpoints_out (pspace);
for (breakpoint &b : all_breakpoints_safe ())
{
extern void breakpoint_set_task (struct breakpoint *b, int task);
-/* Clear the "inserted" flag in all breakpoints. */
-extern void mark_breakpoints_out (void);
+/* Clear the "inserted" flag in all breakpoints locations in PSPACE. */
+
+extern void mark_breakpoints_out (program_space *pspace);
extern struct breakpoint *create_jit_event_breakpoint (struct gdbarch *,
CORE_ADDR);
value that was overwritten with a TRAP instruction). Since
we now have a new a.out, those shadow contents aren't valid. */
- mark_breakpoints_out ();
+ mark_breakpoints_out (current_program_space);
/* The target reports the exec event to the main thread, even if
some other thread does the exec, and even if the main thread was
/* Mark breakpoints uninserted in case something tries to delete a
breakpoint while we delete the inferior's threads (which would
fail, since the inferior is long gone). */
- mark_breakpoints_out ();
+ mark_breakpoints_out (inf->pspace);
if (inf->pid != 0)
exit_inferior (inf);