From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15086 invoked by alias); 9 Apr 2008 20:29:37 -0000 Received: (qmail 15070 invoked by uid 22791); 9 Apr 2008 20:29:35 -0000 X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Apr 2008 20:29:10 +0000 Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id m39KT8Zw010480 for ; Wed, 9 Apr 2008 15:29:08 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Wed, 9 Apr 2008 15:29:08 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Watchpoint conditions broken? Date: Thu, 10 Apr 2008 03:07:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA0429104B@ecamlmw720.eamcs.ericsson.se> From: "Marc Khouzam" To: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00078.txt.bz2 Hi, when trying out a new version of GDB, we run a set of DSF JUnit tests to ma= ke sure DSF interfaces with the new GDB properly. Those tests are pretty detailed = in their attempt to exercise gdb functionality. When running those tests with gdb 6.8, I found a failure with watchpoint co= nditions which use to work in gdb 6.7 I tried to investigate, but I couldn't figure out where the watchpoint cond= ition was actually checked after the watchpoint was hit... Or are hardware watch= points not supposed to be triggered at all, if the condition is not satisfied? Below is a very small tests that shows the problem. This is not normal, right? Thanks > gdb a.out Wed Apr 9 16:20:30 EDT 2008 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) l 1 1 int j; 2 3 int foo(int i) 4 { 5 j=3Di; 6 if (j=3D=3D1)=20 7 j=3D2; 8 else 9 j=3D3; 10 return j; (gdb)=20 11 } 12 13 int main() { 14 foo(1); 15 foo(2); 16 } (gdb) b main Breakpoint 1 at 0x8048447: file watch.cc, line 14. (gdb) r Starting program: /local/home/lmckhou/testing/a.out=20 Breakpoint 1, main () at watch.cc:14 14 foo(1); (gdb) watch j if j=3D=3D3 Hardware watchpoint 2: j (gdb) c Continuing. Hardware watchpoint 2: j Old value =3D 0 New value =3D 1 <<<<<<<<<<<<<<< why did it stop here? foo (i=3D1) at watch.cc:6 6 if (j=3D=3D1)=20 (gdb) c Continuing. Hardware watchpoint 2: j Old value =3D 1 New value =3D 2 0x08048423 in foo (i=3D1) at watch.cc:7 7 j=3D2; (gdb) p j $1 =3D 2 (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x08048447 in main at watch.cc:14 breakpoint already hit 1 time 2 hw watchpoint keep y j stop only if j=3D=3D3 breakpoint already hit 2 times =3D=3D=20 Marc Khouzam