From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23995 invoked by alias); 23 Apr 2010 13:27:32 -0000 Received: (qmail 23984 invoked by uid 22791); 23 Apr 2010 13:27:30 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Apr 2010 13:27:23 +0000 Received: (qmail 8870 invoked from network); 23 Apr 2010 13:27:21 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Apr 2010 13:27:21 -0000 From: Pedro Alves To: pieter.maljaars@altenpts.nl Subject: Re: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro Date: Fri, 23 Apr 2010 13:27:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: "Joel Brobecker" , "Pierre Muller" , Peter.Schauer@regent.e-technik.tu-muenchen.de, gdb@sourceware.org, "'Joseph S. Myers'" References: <20100423074150.24ae59af@mail.altenpts.nl> In-Reply-To: <20100423074150.24ae59af@mail.altenpts.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004231427.19661.pedro@codesourcery.com> 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: 2010-04/txt/msg00100.txt.bz2 On Friday 23 April 2010 08:41:50, Pieter Maljaars wrote: > I have tested this with Solaris 2.10 and GDB-7.1. I have removed > the CANNOT_STEP_HW_WATCHPOINT define. Here this bug does not occur. > > (gdb) start > Temporary breakpoint 1 at 0x8050681: file watchp.c, line 13. > Starting program: [...]/watchp > > Temporary breakpoint 1, main () at watchp.c:13 > 13 myrec.x = 5; > (gdb) print myrec.x > $1 = 0 > (gdb) watch myrec.x > Hardware watchpoint 2: myrec.x > (gdb) s > Hardware watchpoint 2: myrec.x > > Old value = 0 > New value = 5 > main () at watchp.c:14 > 14 myrec.y = 3.4; > > > Here it works as expected. GDB stops also at the other watchpoint. > So with "step" and "continue" both watchpoints are triggered, like > it behaves on x86-linux. (I assume this was x86 or x86-64 solaris, not sparc.) If you _don't_ remove the CANNOT_STEP_HW_WATCHPOINT, then I suppose you'll see watchpoints being missed when you step (since the workaround works by removing watchpoints when single-stepping) on Solaris 10 as well. -- Pedro Alves