From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16060 invoked by alias); 24 Feb 2012 12:38:49 -0000 Received: (qmail 16051 invoked by uid 22791); 24 Feb 2012 12:38:48 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Feb 2012 12:38:35 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1OCcVlP005440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Feb 2012 07:38:31 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1OCcTf9029032; Fri, 24 Feb 2012 07:38:30 -0500 Message-ID: <4F4784C5.7020402@redhat.com> Date: Fri, 24 Feb 2012 12:52:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: "Gustavo, Luis" CC: Stan Shebs , gdb-patches@sourceware.org Subject: Re: [rfc target-side break conditions 5/5 v2] GDBServer-side changes References: <4F230A29.3060404@mentor.com> <4F31A249.9000800@earthlink.net> <4F3301C1.9070400@mentor.com> <4F33BCE9.8080900@redhat.com> <4F450705.2010407@mentor.com> <4F466A38.8080109@redhat.com> <4F477FC3.6060605@mentor.com> In-Reply-To: <4F477FC3.6060605@mentor.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00545.txt.bz2 On 02/24/2012 12:17 PM, Luis Gustavo wrote: > + If we failed to evaluate the expression, TRUE is returned. This > + forces GDB to reevaluate the conditions. */ > + for (cl = bp->cond_list; > + cl && !value && !err; cl = cl->next) > + { > + /* Evaluate the condition. */ > + err = gdb_eval_agent_expr (regcache, NULL, cl->cond, &value); > + } > + > + return (value != 0); > +} Shouldn't there be a if (err) return 1; somewhere? IOW, what is guaranteeing that value is != 0 when gdb_eval_agent_expr returns error? Otherwise looks good. -- Pedro Alves