From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36722 invoked by alias); 9 Jan 2019 03:34:35 -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 36554 invoked by uid 89); 9 Jan 2019 03:34:32 -0000 Authentication-Results: sourceware.org; auth=none 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,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Jan 2019 03:34:31 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id D9E912690 for ; Tue, 8 Jan 2019 21:34:29 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id h4dRgwmzDdnCeh4dRg2i2u; Tue, 08 Jan 2019 21:34:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3edP6dbszE3gyCEbGRRYuqSR/S0PcX6jU5fHBL/P/1o=; b=DN8mZG6kLsGJC7bdDWSuc/2wCG 4PRTn64R6QkryFkWalxMHjluIxwER7GCcj0oaNc1qx0T6uaQ2mJHCFjQQnY9P0CDiR0OWEd+hTSil joWe+YZByx4XjWdIYNKprMv9j; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:47026 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gh4dR-000HG2-LX; Tue, 08 Jan 2019 21:34:29 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 04/12] Remove cleanup_delete_std_terminate_breakpoint Date: Wed, 09 Jan 2019 03:34:00 -0000 Message-Id: <20190109033426.16062-5-tom@tromey.com> In-Reply-To: <20190109033426.16062-1-tom@tromey.com> References: <20190109033426.16062-1-tom@tromey.com> X-SW-Source: 2019-01/txt/msg00161.txt.bz2 This removes cleanup_delete_std_terminate_breakpoint, replacing it with a use of cleanup_function. gdb/ChangeLog 2019-01-08 Tom Tromey * infcall.c (cleanup_delete_std_terminate_breakpoint): Remove. (call_function_by_hand_dummy): Use cleanup_function. --- gdb/ChangeLog | 5 +++++ gdb/infcall.c | 13 ++----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/gdb/infcall.c b/gdb/infcall.c index 14b0cbc716..cd780929fc 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -40,6 +40,7 @@ #include "interps.h" #include "thread-fsm.h" #include +#include "common/cleanup-function.h" /* If we can't find a function's name from its address, we print this instead. */ @@ -675,13 +676,6 @@ run_inferior_call (struct call_thread_fsm *sm, return caught_error; } -/* A cleanup function that calls delete_std_terminate_breakpoint. */ -static void -cleanup_delete_std_terminate_breakpoint (void *ignore) -{ - delete_std_terminate_breakpoint (); -} - /* See infcall.h. */ struct value * @@ -727,7 +721,6 @@ call_function_by_hand_dummy (struct value *function, struct frame_id dummy_id; struct frame_info *frame; struct gdbarch *gdbarch; - struct cleanup *terminate_bp_cleanup; ptid_t call_thread_ptid; struct gdb_exception e; char name_buf[RAW_FUNCTION_ADDRESS_SIZE]; @@ -1122,8 +1115,7 @@ call_function_by_hand_dummy (struct value *function, dummy_dtor, dummy_dtor_data); /* Register a clean-up for unwind_on_terminating_exception_breakpoint. */ - terminate_bp_cleanup = make_cleanup (cleanup_delete_std_terminate_breakpoint, - NULL); + cleanup_function terminate_bp_cleanup (delete_std_terminate_breakpoint); /* - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - If you're looking to implement asynchronous dummy-frames, then @@ -1184,7 +1176,6 @@ call_function_by_hand_dummy (struct value *function, maybe_remove_breakpoints (); - do_cleanups (terminate_bp_cleanup); gdb_assert (retval != NULL); return retval; } -- 2.17.2