From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96779 invoked by alias); 14 Feb 2016 18:37:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 96733 invoked by uid 89); 14 Feb 2016 18:37:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:switch_, bl, Hx-languages-length:2486, 201,7 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 14 Feb 2016 18:37:53 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8DD86C05E140 for ; Sun, 14 Feb 2016 18:37:52 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1EIboCm009649 for ; Sun, 14 Feb 2016 13:37:52 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 1/4] Simplify remove_breakpoint interface Date: Sun, 14 Feb 2016 18:37:00 -0000 Message-Id: <1455475070-17797-2-git-send-email-palves@redhat.com> In-Reply-To: <1455475070-17797-1-git-send-email-palves@redhat.com> References: <1455475070-17797-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-02/txt/msg00451.txt.bz2 All callers pass mark_uninserted, so there's no need for the 'is' parameter. gdb/ChangeLog: 2016-02-14 Pedro Alves * breakpoint.c (remove_breakpoint): Remove 'is' parameter and always pass mark_uninserted to remove_breakpoint_1. (insert_breakpoint_locations, remove_breakpoints) (remove_breakpoints_pid, update_global_location_list): Update callers. --- gdb/breakpoint.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f99a7ab..05da8ed 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -201,7 +201,7 @@ typedef enum } insertion_state_t; -static int remove_breakpoint (struct bp_location *, insertion_state_t); +static int remove_breakpoint (struct bp_location *); static int remove_breakpoint_1 (struct bp_location *, insertion_state_t); static enum print_stop_action print_bp_stop_message (bpstat bs); @@ -3182,7 +3182,7 @@ insert_breakpoint_locations (void) { for (loc = bpt->loc; loc; loc = loc->next) if (loc->inserted) - remove_breakpoint (loc, mark_uninserted); + remove_breakpoint (loc); hw_breakpoint_error = 1; fprintf_unfiltered (tmp_error_stream, @@ -3222,7 +3222,7 @@ remove_breakpoints (void) ALL_BP_LOCATIONS (bl, blp_tmp) { if (bl->inserted && !is_tracepoint (bl->owner)) - val |= remove_breakpoint (bl, mark_uninserted); + val |= remove_breakpoint (bl); } return val; } @@ -3267,7 +3267,7 @@ remove_breakpoints_pid (int pid) if (bl->inserted && !bl->target_info.persist) { - val = remove_breakpoint (bl, mark_uninserted); + val = remove_breakpoint (bl); if (val != 0) return val; } @@ -4081,7 +4081,7 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is) } static int -remove_breakpoint (struct bp_location *bl, insertion_state_t is) +remove_breakpoint (struct bp_location *bl) { int ret; struct cleanup *old_chain; @@ -4097,7 +4097,7 @@ remove_breakpoint (struct bp_location *bl, insertion_state_t is) switch_to_program_space_and_thread (bl->pspace); - ret = remove_breakpoint_1 (bl, is); + ret = remove_breakpoint_1 (bl, mark_uninserted); do_cleanups (old_chain); return ret; @@ -12572,7 +12572,7 @@ update_global_location_list (enum ugll_insert_mode insert_mode) if (!keep_in_target) { - if (remove_breakpoint (old_loc, mark_uninserted)) + if (remove_breakpoint (old_loc)) { /* This is just about all we can do. We could keep this location on the global list, and try to -- 1.9.3