From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11856 invoked by alias); 5 Dec 2001 11:55:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11752 invoked from network); 5 Dec 2001 11:55:27 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 5 Dec 2001 11:55:27 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id MAA28127; Wed, 5 Dec 2001 12:55:19 +0100 Message-Id: <4.2.0.58.20011205123616.00a477a8@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Wed, 05 Dec 2001 03:55:00 -0000 To: Eli Zaretskii From: Pierre Muller Subject: Re: [RFC] Possible bug with i386 watchpoints on several targets. Cc: gdb-patches@sources.redhat.com In-Reply-To: References: <4.2.0.58.20011205102820.02033338@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2001-12/txt/msg00132.txt.bz2 At 12:22 05/12/2001 , vous avez écrit: >On Wed, 5 Dec 2001, Pierre Muller wrote: > > > Eli, you didn't answer if you agree that > > the call to i386_cleanup_dregs is required for all targets using > > standard i386 hardware watchpoints. > >I don't know; theoretically, GDB should remove all the watchpoints from >the debuggee on the way to exit. If all watchpoints are removed, the >dr_* variables are cleaned up automatically. But that is not the case for now... I agree that this also should solve the problem, but I don't know exactly how to do this, and if there are reasons NOT to do so. I think that for instance removing a normal breakpoint will fail after program termination, if the breakpoint is set by changing the .text section, as the address will most probably not be accessible anymore. Processors different from ix86 might also need access to the memory location to remove a watchpoint successfully. We could use function remove_hw_watchpoints, but hardware breakpoints should probably also be removed, no ? I don't know exactly at which location this call should be made... >But an explicit call to i386_cleanup_dregs when the debuggee dies cannot >possibly do any harm, so there should be no reason not to do that, if it >is sometimes needed. If your patch also does explicitly remove all hardware watchpoints, the it will indeed become unneeded (probably also for go32-nat target). Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99