Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: muller@cerbere.u-strasbg.fr
Cc: gdb-patches@sources.redhat.com, djbarrow@de.ibm.com
Subject: Re: [RFA/RFC 2] Remove hardware break and watchpoints at program exit.
Date: Fri, 11 Jan 2002 05:58:00 -0000	[thread overview]
Message-ID: <4331-Fri11Jan2002155528+0200-eliz@is.elta.co.il> (raw)
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)

> Date: Fri, 11 Jan 2002 13:56:42 +0100
> From: Pierre Muller <muller@cerbere.u-strasbg.fr>
> 
> > >          * 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.


  reply	other threads:[~2002-01-11 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-11  4:01 Pierre Muller
2002-01-11  4:38 ` Eli Zaretskii
2002-01-11  4:57   ` Pierre Muller
2002-01-11  5:58     ` Eli Zaretskii [this message]
2002-01-11  5:39   ` Pierre Muller
2002-01-11  6:06     ` Eli Zaretskii
2002-01-11  8:15       ` Pierre Muller
2002-01-11  9:20       ` [RFA/RFC 3] " Pierre Muller
2002-01-12  5:20         ` Mark Kettenis
2002-01-12 13:16           ` muller
2002-01-13  0:31           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4331-Fri11Jan2002155528+0200-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=djbarrow@de.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=muller@cerbere.u-strasbg.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox