This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops


> > -static void
> > -insert_catch_fork (struct breakpoint *b)
> > +static int
> > +insert_catch_fork (struct bp_location *b)
> 
> Such variables (across the whole patch) should be really renamed when
> changing its type.

How about doing such a rename as a patch on its own?  I've spent
a fair amount of time thinking about this patch, and I'd rather not
have to review it again if the changes are only going to be minor
and not affect behavior.

I don't have any issue with blocking checkin of this patch until patches
implementing your suggestions are approved, if that helps.  I just
would rather avoid having to re-review the same patch again. Knowing
how git works, this shouldn't be very hard to do.

(notice: IIRC, when I first looked at patch #2, one of my reactions
is that I wanted to see the patch split-up in several smaller pieces;
I will explain that when I get to that patch)

> Also were these functions intended per-breakpoint or per-bp_location?
> It looks to me currently they are used only for single-location
> breakpoint so no one knows.  (I guess they were meant for breakpoint.)

I think that eventually, we want them to be per bp-location.  It does
not matter right now, as you say, since they are only used for single-
location breakpoints.

That's a good point, though. Perhaps a documentation update can help
make that clearer. OK with a separate patch?

> > -  void (*insert) (struct breakpoint *);
> > +  /* Insert the breakpoint or watchpoint or activate the catchpoint.
> > +     Return 0 for success, 1 if the breakpoint, watchpoint or catchpoint
> > +     type is not supported, -1 for failure.  */
> > +  int (*insert) (struct bp_location *);
[...]
> At least rename it to insert_bploc (or insert_location etc.).  This
> will need to be cleaned up with the regular breakpoints/watchpoints
> conversion to breakpoint_ops.

I don't feel that strongly about it. I don't feel that renaming
"insert" that takes a bp_loc into "insert_bploc" is going to help
much. But I'm OK.  I am suggesting that we push that as a followup
patch, if that's OK with you, just to ease review of that change
alone.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]