From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15494 invoked by alias); 13 Jul 2005 13:05:54 -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 15425 invoked by uid 22791); 13 Jul 2005 13:05:44 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 13 Jul 2005 13:05:44 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1Dsgvm-0000X0-Df; Wed, 13 Jul 2005 09:05:42 -0400 Date: Wed, 13 Jul 2005 13:05:00 -0000 From: Daniel Jacobowitz To: Konstantin Karganov Cc: gdb@sources.redhat.com Subject: Re: GDB is stepping past main() Message-ID: <20050713130541.GA1992@nevyn.them.org> Mail-Followup-To: Konstantin Karganov , gdb@sources.redhat.com References: <42D62354.5090607@sakuraindustries.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00146.txt.bz2 On Wed, Jul 13, 2005 at 04:38:54PM +0400, Konstantin Karganov wrote: > Hello, all. > > Why doesn't gdb stop at the main() end and continues to step further? > Ok, it's not a big problem for human, but what should the frontend > debugger do with unknown functions w/o source file positions? Because the user (in your example) has asked it to step out of main. You might want to examine global state now that the program is mostly finished. Or you might want to debug glibc. 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. -- Daniel Jacobowitz CodeSourcery, LLC