This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [4/9] associate bpstat with location
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 8 Sep 2007 15:24:48 +0400
> Cc: gdb-patches@sources.redhat.com
>
> > A minor stylistic point: could we please avoid the annoying
> > "Likewise"s? The canonical way of writing a ChangeLog entry for
> > several functions with an identical change is this:
> >
> > (bpstat_find_breakpoint, bpstat_find_step_resume_breakpoint)
> > (bpstat_num, print_it_typical): Look at bpstat's location's
> > owner, not at bpstat->breakpoint_at.
> >
> > I'm quite sure the GNU coding standards describe this. (Yes, I know
> > that our ChangeLog's abuse "Likewise" too much.)
>
> I don't have an opinion here; I don't think this has any practical
> difference to future readers of ChangeLog.
It matters when you grep ChangeLog's for changes in a particular
function, for example.
> The reason why the assumption is valid is because the only way to have
> several bpstats refer to one breakpoint is when breakpoint has two
> locations, and both locations have the same address. That makes no sense --
> there's no per-location data that can make those locations different
> in behaviour, and so having two locations with same address would
> be a bug.
If this can happen only as a result of a bug, perhaps a gdb_assert is
in order.
> > > case bp_access_watchpoint:
> > > if (bs->old_val != NULL)
> > > {
> > > - annotate_watchpoint (bs->breakpoint_at->number);
> > > + annotate_watchpoint (b->number);
> >
> > Watchpoints also? Did you make corresponding changes in the code that
> > sets watchpoints?
>
> No. This patch is not supposed to have any change in behaviour whatsoever,
> it merely moves a data member.
Does that mean that the display of watchpoints for "info watch" will
be now different from "info break"?