From: Pedro Alves Date: Wed, 11 Oct 2017 13:45:17 +0000 (+0100) Subject: Garbage collect reattach_breakpoints X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=458ca1d02e47db0af0e22d524df0e4b88fc54b6e;p=binutils-gdb.git Garbage collect reattach_breakpoints Not used anywhere. gdb/ChangeLog: 2017-10-11 Pedro Alves * breakpoint.c (reattach_breakpoints): Delete. * breakpoint.h (reattach_breakpoints): Delete. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66ef8d6a03b..96415965662 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-10-11 Pedro Alves + + * breakpoint.c (reattach_breakpoints): Delete. + * breakpoint.h (reattach_breakpoints): Delete. + 2017-10-11 Simon Marchi * symfile.c (registered_sym_fns): Make struct, not typedef. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9997d3fc823..13f0ba0ec0b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3152,42 +3152,6 @@ remove_breakpoints_pid (int pid) return 0; } -int -reattach_breakpoints (int pid) -{ - struct bp_location *bl, **blp_tmp; - int val; - int dummy1 = 0, dummy2 = 0, dummy3 = 0; - struct inferior *inf; - struct thread_info *tp; - - tp = any_live_thread_of_process (pid); - if (tp == NULL) - return 1; - - inf = find_inferior_pid (pid); - - scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid); - inferior_ptid = tp->ptid; - - string_file tmp_error_stream; - - ALL_BP_LOCATIONS (bl, blp_tmp) - { - if (bl->pspace != inf->pspace) - continue; - - if (bl->inserted) - { - bl->inserted = 0; - val = insert_bp_location (bl, &tmp_error_stream, &dummy1, &dummy2, &dummy3); - if (val != 0) - return val; - } - } - return 0; -} - static int internal_breakpoint_number = -1; /* Set the breakpoint number of B, depending on the value of INTERNAL. diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 143eae3642b..2b80ed9f46a 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1356,13 +1356,6 @@ extern int remove_breakpoints (void); extern int remove_breakpoints_pid (int pid); -/* This function can be used to physically insert eventpoints from the - specified traced inferior process, without modifying the breakpoint - package's state. This can be useful for those targets which - support following the processes of a fork() or vfork() system call, - when both of the resulting two processes are to be followed. */ -extern int reattach_breakpoints (int); - /* This function can be used to update the breakpoint package's state after an exec() system call has been executed.