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: [RFA] Improve performance with lots of shared libraries


Joel Brobecker wrote:
> Gary Benson wrote:
> > +/* Argument for at_solib_event_breakpoint_helper.  */
> > +
> > +struct solib_event_breakpoint_helper_arg
> > +{
> > +  CORE_ADDR prev_pc;
> > +  int shlib_bp_count;
> > +  int other_bp_count;
> 
> I think the meaning of each field should be documented. A good
> example you could look at, for instance, is the declaration of
> type struct frame_id in frame.h.
> 
> > +/* Helper for at_solib_event_breakpoint.  */
> 
> I think it's important to also say WHAT the function does.
> 'Helper' doesn't help in that respect (no pun intended).
> 
> > +static int
> > +at_solib_event_breakpoint (struct execution_control_state *ecs)
> > +{
> > +  struct solib_event_breakpoint_helper_arg arg;
> > +  arg.prev_pc = ecs->event_thread->prev_pc;
> > +  arg.shlib_bp_count = arg.other_bp_count = 0;
> 
> Empty line between variable declarations and code...
> (sorry, one of the innumerable coding style rules in the GDB project).

Thanks Joel, I have updated my tree with the extra documentation and
the extra line.

Cheers,
Gary

-- 
http://gbenson.net/


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