From patchwork Sat Jan 12 11:50:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 31039 Received: (qmail 124044 invoked by alias); 12 Jan 2019 11:50:50 -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 123833 invoked by uid 89); 12 Jan 2019 11:50:49 -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_PASS autolearn=ham version=3.3.2 spammy=canonical X-HELO: mail-wr1-f41.google.com Received: from mail-wr1-f41.google.com (HELO mail-wr1-f41.google.com) (209.85.221.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 11:50:48 +0000 Received: by mail-wr1-f41.google.com with SMTP id t27so17898302wra.6 for ; Sat, 12 Jan 2019 03:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=qf0BHMrw4AC5rwGrXfA7nXSIULMsb2FBkELhxbBu3bU=; b=L0A1v79uJomRjuUiGOy7IIgJl8/VDKpBQ/r68qpzNndpQrup3cTuf5s4gPWiVz4hKB 6ywQrxB56ZUri1Hk858FoxPPPtrTiqbtdgdkalzUYHBkKa0r8h5REvl6wTJdiUN9NRNU xzCEZdcsAhrhFZDc8iPKtpLIdMKX2YSka4MA1N/ts2L8BMP0Xm23NBv1m2/hgB4nK2TP tzu0/DgQnv+UqRx1sVAs/TQB2uNWU4GpcHSZRyE1rxwtEfhOArk25iSV8fAqMr8ETfO8 25jEaEUmCKR9vUjRRV7RaiTnHZPYerrmqqSeogasAwRjI/NcnMMSobzM3vbv1bAGKDQe psrg== Return-Path: Received: from localhost (host86-172-198-47.range86-172.btcentralplus.com. [86.172.198.47]) by smtp.gmail.com with ESMTPSA id g188sm22300516wmf.32.2019.01.12.03.50.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 03:50:44 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Tom Tromey , Andrew Burgess Subject: [PATCH 2/4] gdb: Remove remaining cleanup from breakpoint.c Date: Sat, 12 Jan 2019 11:50:35 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: <20190109033426.16062-1-tom@tromey.com> X-IsSubscribed: yes The remaining null cleanup in breakpoint.c does not seem to protect anything, so remove it. gdb/ChangeLog: 2019-01-11 Tom Tromey * breakpoint.c (create_breakpoint): Remove cleanup. --- gdb/ChangeLog | 4 ++++ gdb/breakpoint.c | 11 ----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3e9da1f99fa..1461695df1b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9230,7 +9230,6 @@ create_breakpoint (struct gdbarch *gdbarch, unsigned flags) { struct linespec_result canonical; - struct cleanup *bkpt_chain = NULL; int pending = 0; int task = 0; int prev_bkpt_count = breakpoint_count; @@ -9280,12 +9279,6 @@ create_breakpoint (struct gdbarch *gdbarch, if (!pending && canonical.lsals.empty ()) return 0; - /* ----------------------------- SNIP ----------------------------- - Anything added to the cleanup chain beyond this point is assumed - to be part of a breakpoint. If the breakpoint create succeeds - then the memory is not reclaimed. */ - bkpt_chain = make_cleanup (null_cleanup, 0); - /* Resolve all line numbers to PC's and verify that the addresses are ok for the target. */ if (!pending) @@ -9384,10 +9377,6 @@ create_breakpoint (struct gdbarch *gdbarch, prev_breakpoint_count = prev_bkpt_count; } - /* That's it. Discard the cleanups for data inserted into the - breakpoint. */ - discard_cleanups (bkpt_chain); - /* error call may happen here - have BKPT_CHAIN already discarded. */ update_global_location_list (UGLL_MAY_INSERT);