From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5527 invoked by alias); 17 Apr 2008 20:57:31 -0000 Received: (qmail 5517 invoked by uid 22791); 17 Apr 2008 20:57:30 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Apr 2008 20:57:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 35B072AA68E; Thu, 17 Apr 2008 16:57:11 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QPHdCLjIyjRi; Thu, 17 Apr 2008 16:57:11 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BA1FE2AA696; Thu, 17 Apr 2008 16:57:10 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B7C94E7ACD; Thu, 17 Apr 2008 13:57:08 -0700 (PDT) Date: Thu, 17 Apr 2008 21:09:00 -0000 From: Joel Brobecker To: Marc Khouzam Cc: gdb-patches@sourceware.org Subject: Re: [Patch] Watchpoint condition fix Message-ID: <20080417205708.GA12735@adacore.com> References: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BCD0@ecamlmw720.eamcs.ericsson.se> <20080416213350.GC3626@adacore.com> <6D19CA8D71C89C43A057926FE0D4ADAA04E1BCE9@ecamlmw720.eamcs.ericsson.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BCE9@ecamlmw720.eamcs.ericsson.se> User-Agent: Mutt/1.4.2.2i 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: 2008-04/txt/msg00362.txt.bz2 > > As a result, the temporary variable "s" shouldn't be necessary > > either. > > I'm not sure about this one. s is pointing to b->cond_string > and not b->loc->cond. Is it really unecessary? You are right to keep it, but not for the reason you explained. I forgot that parse_exp_1 advances the string pointer that it is given. So if we didn't keep the temporary variable, we would screw b->cond_string (oops!). > 2008-04-17 Marc Khouzam > > * breakpoint.c (update_watchpoint): Always reparse > condition. This is OK after having fixed a tiny little detail: > - if (reparse && b->cond_string != NULL) > + /* We just regenerated the list of breakpoint locations. > + * The new location does not have its condition field set to anything > + * and therefore, we must always reparse the cond_string, independently > + * of the value of the reparse flag. Reformat the comment to avoid the '*' at the beginning of each line and put the final '*/' at the end of the last line, not on a new line: /* We just regenerated the list of breakpoint locations. The new location does not have its condition field set to anything and therefore, we must always reparse the cond_string, independently of the value of the reparse flag. */ Thank you, -- Joel