From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11582 invoked by alias); 28 May 2014 22:43:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 11570 invoked by uid 89); 28 May 2014 22:43:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: relay3-d.mail.gandi.net Received: from relay3-d.mail.gandi.net (HELO relay3-d.mail.gandi.net) (217.70.183.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 28 May 2014 22:43:07 +0000 Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id C79DBA80AF for ; Thu, 29 May 2014 00:43:04 +0200 (CEST) Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id jzxK5iv69A2j for ; Thu, 29 May 2014 00:43:02 +0200 (CEST) Received: from macpro2.woplandia (cpc6-enfi20-2-0-cust38.20-2.cable.virginm.net [92.237.164.39]) (Authenticated sender: a.cavallo@cavallinux.eu) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D95FDA80AD for ; Thu, 29 May 2014 00:43:02 +0200 (CEST) Message-ID: <53866675.5060605@cavallinux.eu> Date: Thu, 29 May 2014 02:48:00 -0000 From: Antonio Cavallo User-Agent: Postbox 3.0.10 (Macintosh/20140526) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: gdb symbol lookup very slow References: <53859746.7030601@cavallinux.eu> <5385A4A7.2010909@broadcom.com> In-Reply-To: <5385A4A7.2010909@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00079.txt.bz2 Hi, thank you for the reply. Andrew Burgess wrote: > On 28/05/2014 8:59 AM, Antonio Cavallo wrote: >> I'm having hard time debugging a (very large) C++ library under gdb (gdb >> 7.7.1, gcc 4.8, binutils 2.22). > > Details of your target architecture / operating system /etc would be > helpful. the target is x86_64, it's centos (red hat 6.5) system; > > I suspect you've not mentioned something important :) In "normal" > circumstances, once a breakpoint has been placed, and the program being > debugged has been resumed, then there should be no time spent inside gdb. The break point is "pending" because the library to be debugged is not loaded at the main debuggee startup. > Are you by chance using conditional breakpoints? Or stepping, or using > some other commands? After the gdb starts (gdb --args ) I simply set the breakpoint (pending) and run the application: at that point after 2mins it reaches the breakpoint. As test I've run the gdb --args without the breakpoint and the app completes in under few seconds. So the performance hit might be due to the breakpoint (and the libraries loaded). > The best thing would be to post a small example session, an annotate > which commands you feel are taking longer than expected. Also, you > mention that you profiled gdb, assuming that it's not too large, making > the profile data available might allow some more insight. I'll grab all the info I can get out of it. In the meanwhile is there anything I can try to check what might cause that? > Thanks for reporting this issue, and taking the time to investigate it. > > Andrew > Thanks Antonio