From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13704 invoked by alias); 4 Jun 2010 20:34:55 -0000 Received: (qmail 13695 invoked by uid 22791); 4 Jun 2010 20:34:54 -0000 X-SWARE-Spam-Status: No, hits=-6.5 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, 04 Jun 2010 20:34:49 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o54KYmHY005401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jun 2010 16:34:48 -0400 Received: from qcore.mollernet.net (vpn-242-159.phx2.redhat.com [10.3.242.159]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o54KGblZ027130; Fri, 4 Jun 2010 16:16:37 -0400 Message-ID: <4C095F25.3090001@redhat.com> Date: Fri, 04 Jun 2010 20:34:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Jan Kratochvil CC: "gdb-patches@sourceware.org" Subject: Re: [patch] pr11371 conditional watchpoints with a function in the condition. References: <4C0936B5.9080002@redhat.com> <20100604201410.GA4130@host0.dyn.jankratochvil.net> In-Reply-To: <20100604201410.GA4130@host0.dyn.jankratochvil.net> Content-Type: multipart/mixed; boundary="------------060601040307080101090705" 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: 2010-06/txt/msg00133.txt.bz2 This is a multi-part message in MIME format. --------------060601040307080101090705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 944 Sorry about that... cm On 06/04/10 16:14, Jan Kratochvil wrote: > On Fri, 04 Jun 2010 19:24:05 +0200, Chris Moller wrote: > >> + if (b->type != bp_watchpoint&& b->type != bp_hardware_watchpoint&& >> + b->enable_state != bp_call_disabled) >> > > `&&' should be on the second line. > http://www.gnu.org/prep/standards/standards.html#Formatting > When you split an expression into multiple lines, split it before an > operator, not after one. > > > >> +Running ../../../src/gdb/testsuite/gdb.base/pr11371.exp ... >> +PASS: gdb.base/pr11371.exp: watch aa if cond(aa) >> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint >> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint >> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint >> > > Apparently you have written a new testcase but forgot to attach it. > I have not tried to do real a review without the testcase. > > > Thanks, > Jan > --------------060601040307080101090705 Content-Type: text/plain; name="pr11371.exp" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11371.exp" Content-length: 1454 # Copyright 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Tests watchpoints that watch expressions that don't involve memory. # set testfile "pr11371" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested pr11371.exp return -1 } gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} if ![runto_main] then { fail "Can't run to main" return 0 } gdb_test "watch aa if cond(aa)" gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y" gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y" gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y" --------------060601040307080101090705 Content-Type: text/x-csrc; name="pr11371.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11371.c" Content-length: 852 /* This test is part of GDB, the GNU debugger. Copyright 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ int aa = 4; int cond(int a) { return a == 6; } main() { aa = 5; aa = 6; aa = 7; return 0; } --------------060601040307080101090705--