From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25556 invoked by alias); 26 Dec 2006 18:35:15 -0000 Received: (qmail 25548 invoked by uid 22791); 26 Dec 2006 18:35:15 -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, 26 Dec 2006 18:35:10 +0000 Received: (qmail 13997 invoked from network); 26 Dec 2006 18:35:08 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Dec 2006 18:35:08 -0000 To: Christian Parpart Cc: gdb@sources.redhat.com Subject: Re: step into next source line (that belongs to me) References: <200612261319.02937.trapni@gentoo.org> <20061226151958.GA16027@nevyn.them.org> From: Jim Blandy Date: Tue, 26 Dec 2006 18:35:00 -0000 In-Reply-To: <20061226151958.GA16027@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 26 Dec 2006 10:19:59 -0500") 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: 2006-12/txt/msg00207.txt.bz2 Daniel Jacobowitz writes: > On Tue, Dec 26, 2006 at 01:19:00PM +0100, Christian Parpart wrote: >> Is there a way to do such things using gdb? > > Not yet, no. But it could probably be added using your definition of > interesting files. >From time to time people complain here about GDB stepping into system library functions, and it's often because they've installed debugging info for those libraries and found GDB doesn't silently 'next' over them even when given the 'step' command, as it used to. So GDB's fallback behavior for dealing with undebuggable functions ends up inadvertently providing a feature people want. Perhaps each objfile (executable or shared object) could have a "step status", specifying how step should behave with respect to inter-object calls into that objfile. All objfiles would start out in the "ask" state, where step would ask the user whether they're going to be interested in that objfile. The answer would put the objfile in the "step-past" or "step-into" status. If control ever stopped in an objfile (breakpoint hit; segfault), GDB could automatically mark it "step-into"; obviously, it's interesting now. The status would need to be saved somehow so that settings for shared libraries wouldn't get lost each time the objfile was re-loaded. There could be commands to mark object files manually. They could use globbing characters.