From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12346 invoked by alias); 9 Sep 2011 15:09:51 -0000 Received: (qmail 12177 invoked by uid 22791); 9 Sep 2011 15:09:50 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_SUB_IMPROVE X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Sep 2011 15:09:36 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R22hz-0004zF-Fz from pedro_alves@mentor.com ; Fri, 09 Sep 2011 08:09:35 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Sep 2011 17:09:33 +0200 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] Improve performance with lots of shared libraries Date: Fri, 09 Sep 2011 15:11:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: Jan Kratochvil , Daniel Jacobowitz References: <20110909123156.GA1503@redhat.com> <20110909143521.GA12299@host1.jankratochvil.net> In-Reply-To: <20110909143521.GA12299@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201109091609.31737.pedro@codesourcery.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-09/txt/msg00163.txt.bz2 On Friday 09 September 2011 15:35:21, Jan Kratochvil wrote: > On Fri, 09 Sep 2011 16:25:30 +0200, Daniel Jacobowitz wrote: > > On Fri, Sep 9, 2011 at 8:31 AM, Gary Benson wrote: > > > * when there are no pending breakpoints, > > > > If you "break foo", it might put that breakpoint in more than one > > shared library. If you load a new library with an implementation of > > foo, we should stop on that one too. How can we make that work > > without processing the library events? > > This feature was planned being aware of this problem. > > It does not work currently, GDB just puts the breakpoint on a random first > place found. ... and I don't think that's entirely true. Yes, GDB will stop trying to resolve the spec to a symbol, but at every event gdb will still re-set the breakpoint locations. If the new library has the _same_ file:lineno compiled in (e.g., we put a breakpoint on a c++ template in a header, or an inline function that is also used by new library), then we should be getting new locations in the new shared library, today. -- Pedro Alves