From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1352 invoked by alias); 4 Jul 2011 14:10:03 -0000 Received: (qmail 1329 invoked by uid 22791); 4 Jul 2011 14:10:03 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_40,SARE_SUB_IMPROVE,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jul 2011 14:09:47 +0000 Date: Mon, 04 Jul 2011 14:21:00 -0000 From: Gary Benson To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Improve performance with lots of shared libraries Message-ID: <20110704140944.GC2783@redhat.com> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20110701165109.GA3399@redhat.com> <20110701173233.GH2407@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110701173233.GH2407@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00097.txt.bz2 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/