From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31235 invoked by alias); 2 Jan 2007 19:29:58 -0000 Received: (qmail 31224 invoked by uid 22791); 2 Jan 2007 19:29:57 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 Jan 2007 19:29:51 +0000 Received: (qmail 31490 invoked from network); 2 Jan 2007 19:29:50 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Jan 2007 19:29:50 -0000 To: "dodji Seketeli" Cc: gdb@sourceware.org Subject: Re: gdb very slow during 'step into' References: From: Jim Blandy Date: Tue, 02 Jan 2007 19:29:00 -0000 In-Reply-To: (dodji Seketeli's message of "Tue, 2 Jan 2007 16:23:52 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2007-01/txt/msg00020.txt.bz2 "dodji Seketeli" writes: > Hello gdb hackers and users, > > First of all, I would like to wish a happy new year to you and your families. > I hope this year will be full of achievements (again) for gdb people. > > Now the real meat of my post :-) > > I have noticed that gdb was very slow (taking 100% of CPU during > several tens of seconds) when I step into some functions (with the > step command, on the cli interface). > > I am not sure, but I think it happens when I step into functions that > are defined in certain shared libraries. Once in the function, > subsequent steping into functions of the same library are okay. Once > out of the library, stepping into a function of that library can be > slow again. If you set the environment variable LD_BIND_NOW to a non-empty value before running your program (use GDB's 'set env' command), does that eliminate the slow steps?