From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94216 invoked by alias); 3 Nov 2017 17:20:12 -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 94207 invoked by uid 89); 3 Nov 2017 17:20:11 -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:973 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 17:20:10 +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 vA3HK36c013189 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 3 Nov 2017 13:20:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 501381E526; Fri, 3 Nov 2017 13:20:03 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 0F7FA1E51C; Fri, 3 Nov 2017 13:19:53 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 03 Nov 2017 17:20:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA 06/13] Replace start_rbreak_breakpoints and end_rbreak_breakpoints In-Reply-To: <87efpfuwnx.fsf@tromey.com> References: <20171102223612.3642-1-tom@tromey.com> <20171102223612.3642-7-tom@tromey.com> <368bfe6be1612beb89c174c35e0cc73a@polymtl.ca> <87efpfuwnx.fsf@tromey.com> Message-ID: 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 17:20:03 +0000 X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00085.txt.bz2 On 2017-11-03 12:58, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> Your patch LGTM. But how is the "string" string freed in > Simon> rbreak_command? > > It is leaked, which apparently is a regression introduced by an earlier > patch of mine. Sorry about that! I've updated the patch as appended > to > fix this problem. > > Tom > > commit 391e4d7aa45fc4947632aa06a7aa462eeef3377c > Author: Tom Tromey > Date: Wed Nov 1 09:00:09 2017 -0600 > > Replace start_rbreak_breakpoints and end_rbreak_breakpoints > > This replaces start_rbreak_breakpoints and end_rbreak_breakpoints > with > a new scoped class. This allows the removal of a cleanup. > > This also fixes an earlier memory leak regression, by changing > "string" to be a std::string. LGTM, though I would suggest using string_print, I think it would be more readable. Simon