From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6278 invoked by alias); 6 Jun 2002 15:51:52 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6263 invoked from network); 6 Jun 2002 15:51:50 -0000 Received: from unknown (HELO Developer.ChaoticDreams.ORG) (66.127.87.238) by sources.redhat.com with SMTP; 6 Jun 2002 15:51:50 -0000 Received: from lain.internal.chaoticdreams.org (lain.internal.chaoticdreams.org [192.168.0.237]) by Developer.ChaoticDreams.ORG (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 2F5EF38008 for ; Thu, 6 Jun 2002 08:50:58 -0700 (PDT) Received: (from lethal@localhost) by lain.internal.chaoticdreams.org (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id g56FpnB06819 for gdb@sources.redhat.com; Thu, 6 Jun 2002 08:51:49 -0700 Date: Thu, 06 Jun 2002 08:51:00 -0000 From: Paul Mundt To: gdb@sources.redhat.com Subject: Software watchpoint breakage on SuperH Message-ID: <20020606085149.A6117@ChaoticDreams.ORG> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline User-Agent: Mutt/1.3.16i Organization: Chaotic Dreams Development Team X-SW-Source: 2002-06/txt/msg00056.txt.bz2 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2919 There seems to be a bit of weirdness happening with software watchpoints on SuperH. Namely, the watchpoint gets deleted on any kind of function call --= in this case, printf(). I've run this test on both x86 and sh (both on a Solut= ion Engine 7709 and a Solution Engine 7750 .. SH-3/4 respectively), and the x86 seems to perform the way it should. Both of these tests were run with ELF lazy binding disabled via LD_BIND_NOW=3Dtrue. When running on x86, I see the following: (gdb) set can-use-hw-watchpoints 0 (gdb) l 1 int main() 2 { 3 int i; 4=09 5 for (i =3D 0; i < 10; i++) 6 ; 7=09 8 printf("%d\n", i); 9=09 10 return 0; (gdb) b 5 Breakpoint 1 at 0x8048466: file watchtest.c, line 5. (gdb) b 8 Breakpoint 2 at 0x8048480: file watchtest.c, line 8. (gdb) r Starting program: /home/paulm/./watchtest=20 Breakpoint 1, main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) watch i > 5 Watchpoint 3: i > 5 (gdb) c Continuing. Watchpoint 3: i > 5 Old value =3D 1 New value =3D 0 0x0804846e in main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) c Continuing. Watchpoint 3: i > 5 Old value =3D 0 New value =3D 1 0x0804847d in main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) c Continuing. Breakpoint 2, main () at watchtest.c:8 8 printf("%d\n", i); (gdb) c Continuing. 10 Watchpoint 3 deleted because the program has left the block in which its expression is valid. 0x08048499 in main () at watchtest.c:11 11 } (gdb) c Continuing. Program exited normally. (gdb)=20 which all looks fine. But when running on SuperH, I get the following: (gdb) b 5 Breakpoint 1 at 0x4004a8: file watchtest.c, line 5. (gdb) b 8 Breakpoint 2 at 0x4004e0: file watchtest.c, line 8. (gdb) r Starting program: /tmp/./watchtest Breakpoint 1, main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) watch i > 5 Watchpoint 3: i > 5 (gdb) c Continuing. Watchpoint 3: i > 5 Old value =3D 1 New value =3D 0 0x004004ac in main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) c Continuing. Watchpoint 3: i > 5 Old value =3D 0 New value =3D 1 0x004004c6 in main () at watchtest.c:5 5 for (i =3D 0; i < 10; i++) (gdb) c Continuing. Breakpoint 2, main () at watchtest.c:8 8 printf("%d\n", i); (gdb) c Continuing. Watchpoint 3 deleted because the program has left the block in which its expression is valid. printf (format=3D0x4005dc "%d\n") at printf.c:33 33 printf.c: No such file or directory. in printf.c (gdb) c Continuing. 10 Program exited normally. (gdb)=20 Everything looks fine up until the point it tries to do the printf(). Is there something that needs to be implemented per target to support softw= are watchpoints properly? If not, does anyone have any suggestions as to what could be going wrong in the above, and better yet, suggestions for possible fixes? Regards, --=20 Paul Mundt --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 240 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjz/hRQACgkQYLvqhoOEA4HsqQCeLEy38RiFII3Jgp8SazCMtzf9 He4Anj3nFU56lMnlhd+Kvy47dpt00J1S =ydx4 -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--