From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22955 invoked by alias); 11 Jan 2002 13:58:18 -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 22781 invoked from network); 11 Jan 2002 13:58:13 -0000 Received: from unknown (HELO mirapoint.inter.net.il) (192.114.186.20) by sources.redhat.com with SMTP; 11 Jan 2002 13:58:13 -0000 Received: from zaretsky ([192.116.55.139]) by mirapoint.inter.net.il (Mirapoint) with ESMTP id BDG91607; Fri, 11 Jan 2002 15:58:07 +0200 (IST) Date: Fri, 11 Jan 2002 05:58:00 -0000 From: "Eli Zaretskii" To: muller@cerbere.u-strasbg.fr Message-Id: <4331-Fri11Jan2002155528+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: gdb-patches@sources.redhat.com, djbarrow@de.ibm.com In-reply-to: <4.2.0.58.20020111135305.0135ea48@ics.u-strasbg.fr> (message from Pierre Muller on Fri, 11 Jan 2002 13:56:42 +0100) Subject: Re: [RFA/RFC 2] Remove hardware break and watchpoints at program exit. Reply-to: Eli Zaretskii References: <4.2.0.58.20020111125745.0135ea48@ics.u-strasbg.fr> <4.2.0.58.20020111125745.0135ea48@ics.u-strasbg.fr> <4.2.0.58.20020111135305.0135ea48@ics.u-strasbg.fr> X-SW-Source: 2002-01/txt/msg00287.txt.bz2 > Date: Fri, 11 Jan 2002 13:56:42 +0100 > From: Pierre Muller > > > > * breakpoint.c (REMOVE_HARDWARE_BREAKPOINT_AT_EXIT): > > > Define to 0 if not defined. > > > (REMOVE_HARDWARE_WATCHPOINT_AT_EXIT): > > > Define to 0 if not defined. > > > >Why do we need these macros at all? Why not remove the breakpoints > >and watchpoints unconditionally? Does anyone see any problem? > > Because some target might need to access the > inferior registers to remove the watchpoint, and this > isn't possible if the program has really already completed. ??? If a target accesses watchpoints of a dead and mourned debuggee, it must have a bug, no? > > > --- go32-nat.c 2001/12/06 08:15:37 1.26 > > > +++ go32-nat.c 2002/01/11 11:34:08 > > > @@ -670,7 +670,7 @@ go32_mourn_inferior (void) > > > be nice if GDB itself would take care to remove all breakpoints > > > at all times, but it doesn't, probably under an assumption that > > > the OS cleans up when the debuggee exits. */ > > > - i386_cleanup_dregs (); > > > + // i386_cleanup_dregs (); > > > >Please don't make such changes. If you want to remove some code, just > >remove it, don't comment it away: it looks ad-hoc and not clean. > > I did that more or less to make you react, > but I can't just remove the line as the comment before > concerns the call to i386_cleanup_dregs() > > Should I remove the comment also? Yes, of course: if code goes away, its comment should go away as well.