From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10840 invoked by alias); 13 Jul 2005 13:39:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10646 invoked by uid 22791); 13 Jul 2005 13:39:20 -0000 Received: from biscayne-one-station.mit.edu (HELO biscayne-one-station.mit.edu) (18.7.7.80) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 13 Jul 2005 13:39:20 +0000 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id j6DDdEa7002558; Wed, 13 Jul 2005 09:39:14 -0400 (EDT) Received: from scrubbing-bubbles.mit.edu (SCRUBBING-BUBBLES.MIT.EDU [18.7.16.68]) (authenticated bits=56) (User authenticated as nathanw@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.1/8.12.4) with ESMTP id j6DDd6wd011176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Jul 2005 09:39:06 -0400 (EDT) Received: (from nathanw@localhost) by scrubbing-bubbles.mit.edu (8.12.9) id j6DDd6CY013941; Wed, 13 Jul 2005 09:39:06 -0400 (EDT) To: Konstantin Karganov Cc: Daniel Jacobowitz , gdb@sources.redhat.com Subject: Re: GDB is stepping past main() References: From: "Nathan J. Williams" Date: Wed, 13 Jul 2005 13:39:00 -0000 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.599 X-Spam-Flag: NO X-SW-Source: 2005-07/txt/msg00148.txt.bz2 Konstantin Karganov writes: > > Because the user (in your example) has asked it to step out of main. > I asked to step and started waiting for the program termination message. > And get that stopped somewhere "don't know where"... > > > If you want to handle this in a debugger, try detecting when you're in > > main, step, are no longer in main, and main is no longer in the > > backtrace. > Don't you think all this detecting is a debugger's task??? > > Or else it turns out that the "step" in gdb is broken and has no > defined semantics and needs to be carefully controlled from outside > (whether it made the stepping or not and where it happened to stop)! "step" is a command that's closely linked to the notion of a source code line. When you're outside of the region where you have source (such as the startup code around main()), you're in less-defined territory. You might find the "stepi" command better suits your needs, though I'm not at all sure from your messages what, exactly, you think is supposed to happen. - Nathan