From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32379 invoked by alias); 23 Apr 2010 16:17:07 -0000 Received: (qmail 32353 invoked by uid 22791); 23 Apr 2010 16:17:05 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Apr 2010 16:16:58 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o3NGFD1Q090276 ; Fri, 23 Apr 2010 18:15:13 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms3.u-strasbg.fr [IPv6:2001:660:2402:d::12]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o3NGFCoX083355 ; Fri, 23 Apr 2010 18:15:12 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o3NGF9Z0082108 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Fri, 23 Apr 2010 18:15:10 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" , "'Pedro Alves'" Cc: , , , "'Joseph S. Myers'" References: <20100423074150.24ae59af@mail.altenpts.nl> <201004231427.19661.pedro@codesourcery.com> <20100423140802.GN13204@adacore.com> In-Reply-To: <20100423140802.GN13204@adacore.com> Subject: RE: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro Date: Fri, 23 Apr 2010 16:17:00 -0000 Message-ID: <002f01cae300$2a2678f0$7e736ad0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00110.txt.bz2 > -----Message d'origine----- > De=A0: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la > part de Joel Brobecker > Envoy=E9=A0: Friday, April 23, 2010 4:08 PM > =C0=A0: Pedro Alves > Cc=A0: pieter.maljaars@altenpts.nl; Pierre Muller; > Peter.Schauer@regent.e-technik.tu-muenchen.de; gdb@sourceware.org; > 'Joseph S. Myers' > Objet=A0: Re: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro >=20 > > (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. >=20 > Just for the record, I just finished testing on x86-solaris 10, > and same results as on 8... We are getting troubles, but I think that I understood what is going on: the problem is that it all depends on how you start your program: If you use 'break main' followed by 'run', you will have a breakpoint that is at the exact instruction that should trigger the watchpoint hit. But currently GDB disables all breakpoints (including watchpoints) to step over the breakpoint on main without hitting again the 'int 3' instruction. If you use the 'start' command, a temporary breakpoint at the same location is created, but the breakpoint is removed by GDB. Thus the 'next' does not need to disable the breakpoints. In that configuration you do get a failure with current GDB due to CANNOT_STEP_OVER_HW_WATCHPOINTS macro that gets resolved by removing that macro. I will send a RFA for this test to gdb-patches. Pierre