From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8014 invoked by alias); 3 Jan 2007 19:52:04 -0000 Received: (qmail 8005 invoked by uid 22791); 3 Jan 2007 19:52:03 -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; Wed, 03 Jan 2007 19:51:58 +0000 Received: (qmail 19551 invoked from network); 3 Jan 2007 19:51:57 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Jan 2007 19:51:57 -0000 To: "dodji Seketeli" Cc: gdb@sourceware.org Subject: Re: gdb very slow during 'step into' References: From: Jim Blandy Date: Wed, 03 Jan 2007 19:52:00 -0000 In-Reply-To: (dodji Seketeli's message of "Wed, 3 Jan 2007 10:14:22 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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/msg00036.txt.bz2 --=-=-= Content-length: 662 "dodji Seketeli" writes: >> 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? > > Wow, yes. It does eliminate the problem. Thank you !. I'm glad that helped! But setting LD_BIND_NOW is just a workaround; GDB ought to work properly without that. Could you apply the following patch to GDB and see if it makes the problem go away, even with LD_BIND_NOW left unset? (Tested without regressions on Fedora Core 6 IA-32. I haven't been able to reproduce the problem myself, so I'm just guessing that this is the patch.) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=jimb.glibc-update-fixup-name.patch Content-Description: look up _dl_fixup to step over dynamic linker resolver Content-length: 975 gdb/ChangeLog: 2007-01-03 Jim Blandy * glibc-tdep.c (glibc_skip_solib_resolver): Look for '_dl_fixup', then plain 'fixup'. Index: gdb/glibc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/glibc-tdep.c,v retrieving revision 1.3 diff -u -r1.3 glibc-tdep.c --- gdb/glibc-tdep.c 17 Dec 2005 22:34:00 -0000 1.3 +++ gdb/glibc-tdep.c 3 Jan 2007 19:49:17 -0000 @@ -90,8 +90,14 @@ if (resolver) { + /* This is the name used in the dynamic linker at the beginning + of 2007. */ struct minimal_symbol *fixup - = lookup_minimal_symbol ("fixup", NULL, objfile); + = lookup_minimal_symbol ("_dl_fixup", NULL, objfile); + + /* This is the name used in older versions. */ + if (! fixup) + fixup = lookup_minimal_symbol ("fixup", NULL, objfile); if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc) return frame_pc_unwind (get_current_frame ()); --=-=-=--