From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2600 invoked by alias); 25 Feb 2012 19:59:17 -0000 Received: (qmail 2592 invoked by uid 22791); 25 Feb 2012 19:59:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Feb 2012 19:58:56 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S1Nlf-0005MQ-9c from Luis_Gustavo@mentor.com ; Sat, 25 Feb 2012 11:58:55 -0800 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 25 Feb 2012 11:58:51 -0800 Received: from [0.0.0.0] ([172.16.63.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 25 Feb 2012 11:58:54 -0800 Message-ID: <4F493D7D.1030907@mentor.com> Date: Sat, 25 Feb 2012 20:08:00 -0000 From: Luis Gustavo Reply-To: "Gustavo, Luis" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.27) Gecko/20120216 Lightning/1.0b2 Thunderbird/3.1.19 MIME-Version: 1.0 To: Jan Kratochvil CC: gdb-patches@sourceware.org Subject: Re: General regressions in gdbserver mode [Re: [rfc target-side break conditions 0/5 v2] General info] References: <4F2309F1.1020703@mentor.com> <4F47ABCF.9020305@mentor.com> <20120225142037.GA26330@host2.jankratochvil.net> <4F4900CB.8010606@mentor.com> <20120225170610.GA31657@host2.jankratochvil.net> <4F49277A.70400@mentor.com> <20120225194022.GA16174@host2.jankratochvil.net> In-Reply-To: <20120225194022.GA16174@host2.jankratochvil.net> Content-Type: multipart/mixed; boundary="------------020504060700060600020006" X-IsSubscribed: yes 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 X-SW-Source: 2012-02/txt/msg00618.txt.bz2 This is a multi-part message in MIME format. --------------020504060700060600020006 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1024 Hi Jan, On 02/25/2012 05:40 PM, Jan Kratochvil wrote: > On Sat, 25 Feb 2012 19:24:58 +0100, Luis Gustavo wrote: >> Could please try the following on your side? > > Yes, it works for me. > > Please check it in, it fixes the regression. > > >> --- a/gdb/gdbserver/mem-break.c >> +++ b/gdb/gdbserver/mem-break.c >> @@ -726,20 +726,19 @@ void >> clear_gdb_breakpoint_conditions (CORE_ADDR addr) >> { >> struct breakpoint *bp = find_gdb_breakpoint_at (addr); >> - struct point_cond_list *cond, **cond_p; >> + struct point_cond_list *cond, *cond_next; >> >> if (bp == NULL || bp->cond_list == NULL) >> return; >> >> cond = bp->cond_list; >> - cond_p =&bp->cond_list->next; >> >> while (cond != NULL) >> { > > cond_next could be decllared inside in this block. > Fixed. >> + cond_next = cond->next; > > Isn't missing here also? > free (cond->cond->bytes); > > It is, thanks. GDBserver does not know free_agent_expr currently, maybe in the future. I've checked the following in. Luis --------------020504060700060600020006 Content-Type: text/x-patch; name="mem_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mem_fix.diff" Content-length: 933 2012-02-25 Luis Machado * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation of conditions. diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index c9a6035..6b6b25c 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -726,20 +726,22 @@ void clear_gdb_breakpoint_conditions (CORE_ADDR addr) { struct breakpoint *bp = find_gdb_breakpoint_at (addr); - struct point_cond_list *cond, **cond_p; + struct point_cond_list *cond; if (bp == NULL || bp->cond_list == NULL) return; cond = bp->cond_list; - cond_p = &bp->cond_list->next; while (cond != NULL) { + struct point_cond_list *cond_next; + + cond_next = cond->next; + free (cond->cond->bytes); free (cond->cond); free (cond); - cond = *cond_p; - cond_p = &cond->next; + cond = cond_next; } bp->cond_list = NULL; --------------020504060700060600020006--