From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95870 invoked by alias); 3 Nov 2017 01:56:31 -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 95846 invoked by uid 89); 3 Nov 2017 01:56:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1574 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 01:56:30 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id vA31uNVQ030113 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 2 Nov 2017 21:56:28 -0400 Received: by simark.ca (Postfix, from userid 112) id 97F361E533; Thu, 2 Nov 2017 21:56:23 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 64BC81E4C4; Thu, 2 Nov 2017 21:56:12 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 03 Nov 2017 01:56:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA 12/13] Introduce gdb_breakpoint_up In-Reply-To: <20171102223612.3642-13-tom@tromey.com> References: <20171102223612.3642-1-tom@tromey.com> <20171102223612.3642-13-tom@tromey.com> Message-ID: <2c6dfb89a82f516d3a2619c47b4acd34@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.2 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 3 Nov 2017 01:56:23 +0000 X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00062.txt.bz2 On 2017-11-02 18:36, Tom Tromey wrote: > This introduces gdb_breakpoint_up, a unique_ptr typedef that owns a > breakpoint. It then changes set_momentary_breakpoint to return a > gdb_breakpoint_up and fixes up the fallout. This then allows the > removal of make_cleanup_delete_breakpoint. > > Once breakpoints are fully C++-ified, this typedef can be removed in > favor of a plain std::unique_ptr. > > gdb/ChangeLog > 2017-11-02 Tom Tromey > > * breakpoint.c (set_momentary_breakpoint): Return > gdb_breakpoint_up. > (until_break_command): Update. > (new_until_break_fsm): Change argument types to > gdb_breakpoint_up. > (set_momentary_breakpoint_at_pc): Return gdb_breakpoint_up. > (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint): > Remove. > * infcmd.c (finish_forward): Update. > * breakpoint.h (set_momentary_breakpoint) > (set_momentary_breakpoint_at_pc): Return gdb_breakpoint_up. > (make_cleanup_delete_breakpoint): Remove. > (struct gdb_breakpoint_deleter): New. > (gdb_breakpoint_up): New typedef. > * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update. > (insert_exception_resume_breakpoint): Update. > (insert_exception_resume_from_probe): Update. > (insert_longjmp_resume_breakpoint): Update. > * arm-linux-tdep.c (arm_linux_copy_svc): Update. > * elfread.c (elf_gnu_ifunc_resolver_stop): Update. > * infcall.c (call_function_by_hand_dummy): Update Just a tiny nit, why not name the type "breakpoint_up"? So far the convention has been ${type_name}_up. Otherwise, LGTM. Simon