From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16879 invoked by alias); 6 Feb 2002 18:58:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16810 invoked from network); 6 Feb 2002 18:58:42 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 6 Feb 2002 18:58:42 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 721285E9DE; Wed, 6 Feb 2002 14:00:16 -0500 (EST) To: Klee Dienes Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Cached function lookup References: <8A9ABA76-1A1B-11D6-BA6D-0030653FA4C6@apple.com> From: Jim Blandy Date: Wed, 06 Feb 2002 10:58:00 -0000 In-Reply-To: <8A9ABA76-1A1B-11D6-BA6D-0030653FA4C6@apple.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00174.txt.bz2 Klee Dienes writes: > (This is basically the same patch I sent last week, just updated > to the latest source base.) > > This patch allows functions in the target used by GDB ("malloc", > "scm_lookup_cstr", and later a ton of Objective-C functions) to have > their values cached and re-used unless the symbol table has changed > in-between calls. This is a performance win overall, and a particular > win when dispatching Objective-C method calls and looking up > Objective-C type information from the runtime. > > 2002-02-04 Klee Dienes > > * breakpoint.c (breakpoint_re_set, breakpoint_re_set_all, > breakpoint_update): Instead of re-parsing all deferred > breakpoints > every time breakpoint_re_set is called, increment a generation > number. When breakpoints need to be up-to-date, call > breakpoint_update. This prevents unnecessary re-parsing of > breakpoint information (and massive future-break spam) when > multiple shared libraries are loaded at the same time. Let me see if I understand the situation: The inferior hits a shlib event breakpoint, indicating that it's loaded or unloaded some stuff. GDB scans the dynamic linker's table, and discovers that several new shared libraries have been loaded. As the code currently stands, GDB will recompute its breakpoints' addresses after each solib's symbols are read. Your change makes GDB delay this until it's about to insert the breakpoints. Is that correct?