From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12019 invoked by alias); 1 Jul 2011 17:32:53 -0000 Received: (qmail 12011 invoked by uid 22791); 1 Jul 2011 17:32:52 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_SUB_IMPROVE X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jul 2011 17:32:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C58642BB1D0 for ; Fri, 1 Jul 2011 13:32:35 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CX-rPd1DUrrc for ; Fri, 1 Jul 2011 13:32:35 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9872F2BB174 for ; Fri, 1 Jul 2011 13:32:35 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id CAD0C145615; Fri, 1 Jul 2011 10:32:33 -0700 (PDT) Date: Fri, 01 Jul 2011 17:32:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA] Improve performance with lots of shared libraries Message-ID: <20110701173233.GH2407@adacore.com> References: <20110701165109.GA3399@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110701165109.GA3399@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00031.txt.bz2 > 2011-07-01 Gary Benson > > * infrun.c (solib_event_breakpoint_helper_arg): New structure. > (at_solib_event_breakpoint_helper): New function. > (at_solib_event_breakpoint): Likewise. > (handle_inferior_event): Avoid calling find_pc_partial_function > and skip_inline_frames when stopping at the solib event breakpoint. I just have a few general comments, that are minor, and yet important (IMO). > +/* 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). -- Joel