This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [mi] watchpoint-scope exec async command
On Thu, Mar 31, 2005 at 06:45:06AM +0200, Eli Zaretskii wrote:
> > Date: Wed, 30 Mar 2005 21:33:07 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: GDB <gdb@sources.redhat.com>
> >
> > No, we're crashing earlier than that. This was in one of Bob's earlier
> > messages; we crash here:
> >
> > 1021 if (bpt->owner->related_breakpoint)
> > 1022 bpt->owner->related_breakpoint->disposition = disp_del_at_next_stop;
> > 1023 bpt->owner->disposition = disp_del_at_next_stop;
>
> Right.
>
> > > If we don't arrange a scope breakpoint for a hardware watchpoint, we
> > > won't hit the problem Bob reported.
> >
> > I think this would be pretty tricky. We would have to recognize that
> > if the next thing to trigger is the watchpoint, it doesn't "count".
>
> Sorry, I'm not following. What I meant was this: when we _create_ the
> watchpoint, if it's a hardware-assisted watchpoint, we should simply
> not arrange a scope breakpoint for it. How is that tricky, and why
> would we need to know that the next thing to trigger is the
> watchpoint?
Creating it is easy. Handling it when it goes out of scope, however,
is harder - if the next thing to trigger a stop is the watchpoint, and
we discover there that it has gone out of scope. I don't know, this
may just work. But it feels more complicated to me, for whatever
that's worth. I like the idea of keeping the multiple watchpoint types
as similar as possible.
> > Even better would be deleting the software watchpoint at the same
> > time
>
> How is this different from what I said? I said:
>
> > The second alternative is to treat scope breakpoints specially in
> > breakpoint_auto_delete: when we see a scope breakpoint that is marked
> > for deletion, we will have to find its watchpoint, and if that
> > watchpoint is a hardware watchpoint, we will have to delete that
> > watchpoint as well.
You said "if that watchpoint is a hardware watchpoint". I'm just
suggesting treating software watchpoints the same way.
--
Daniel Jacobowitz
CodeSourcery, LLC