From patchwork Wed Oct 11 13:50:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23478 Received: (qmail 91353 invoked by alias); 11 Oct 2017 13:50:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 90817 invoked by uid 89); 11 Oct 2017 13:50:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=*bl X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Oct 2017 13:50:23 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D309C3D96F for ; Wed, 11 Oct 2017 13:50:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D309C3D96F Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B4496C219 for ; Wed, 11 Oct 2017 13:50:20 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Garbage collect reattach_breakpoints Date: Wed, 11 Oct 2017 14:50:19 +0100 Message-Id: <1507729819-28787-1-git-send-email-palves@redhat.com> Not used anywhere. gdb/ChangeLog: 2017-10-11 Pedro Alves * breakpoint.c (reattach_breakpoints): Delete. * breakpoint.h (reattach_breakpoints): Delete. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 36 ------------------------------------ gdb/breakpoint.h | 7 ------- 3 files changed, 5 insertions(+), 43 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66ef8d6..9641596 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 9997d3f..13f0ba0 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 143eae3..2b80ed9 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.