From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6955 invoked by alias); 22 Apr 2010 15:47:48 -0000 Received: (qmail 6937 invoked by uid 22791); 22 Apr 2010 15:47:44 -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.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Apr 2010 15:47:38 +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 o3MFjkm0031650 ; Thu, 22 Apr 2010 17:45:47 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o3MFjkjG091559 ; Thu, 22 Apr 2010 17:45:46 +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 o3MFjjml054432 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 22 Apr 2010 17:45:45 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" , Cc: , "'Pieter Maljaars'" , "'Joseph S. Myers'" , "'Pedro Alves'" References: <001501cad820$36771f50$a3655df0$@muller@ics-cnrs.unistra.fr> <20100422135635.GE13204@adacore.com> In-Reply-To: <20100422135635.GE13204@adacore.com> Subject: RE: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro Date: Thu, 22 Apr 2010 15:47:00 -0000 Message-ID: <003101cae232$e2564ff0$a702efd0$@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/msg00081.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: Thursday, April 22, 2010 3:57 PM > =C0=A0: Pierre Muller > Cc=A0: gdb@sourceware.org; 'Pieter Maljaars'; 'Joseph S. Myers'; 'Pedro > Alves' > Objet=A0: Re: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro >=20 > > The macro CANNOT_STEP_HW_WATCHPOINTS > [...] > > If this bug has been solve before 2.9 version of Solaris, > > would it be reasonable to just drop that code out? >=20 > I think we should still support version 2.8 if we can. I have no objections =20 > I'd be happy to do any testing with some of our machines running > Solaris, > but I need a reproducer that I can run by hand. I am still under > strict > orders to *NOT* run the dejagnu testsuite on our solaris machines, as > it > causes them to crash pretty badly :-(. The main problem is that the comment inside infrun.c is not that clear... The patch was discussed in 2000: http://sourceware.org/ml/gdb-patches/2000-q1/msg00664.html submitted by Peter Schauer. But I don't know if this person still is reachable. I suspect that the problem appears if 1) you are stepping 2) you have a watchpoint on some memory location 3) you modify some other location within the same=20 protected page. The kernel stops because of the page protection, sees that the accessed address is not the one you asked to=20 watch, thus restarts the debuggee, forgetting that stepping was required. This is at least how I understood it. The problem is that I have no access to a machine for which we can be sure that this bug=20 still exists ... With this source struct rec { int x; double y; int z; }; static struct rec myrec; int main () { myrec.x =3D 5; myrec.y =3D 3.4; myrec.z =3D 56; myrec.x =3D 78; return myrec.x; } setting a watchpoint on myrec.x and stepping should expose the bug if you remove the CANNOT_STEP_HW_WATCHPOINT from nm-i386sol2.h Pierre