From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22996 invoked by alias); 28 Dec 2010 05:21:14 -0000 Received: (qmail 22987 invoked by uid 22791); 28 Dec 2010 05:21:13 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Dec 2010 05:21:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E7FBC2BABDD; Tue, 28 Dec 2010 00:21:05 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bw8s4M5f39jc; Tue, 28 Dec 2010 00:21:05 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7ED192BABB0; Tue, 28 Dec 2010 00:21:05 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id C632B1457BB; Tue, 28 Dec 2010 06:20:55 +0100 (CET) Date: Tue, 28 Dec 2010 05:21:00 -0000 From: Joel Brobecker To: Edjunior Barbosa Machado Cc: gdb@sourceware.org Subject: Re: next/step after main() function's return Message-ID: <20101228052055.GY2618@adacore.com> References: <4D19144E.1030504@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D19144E.1030504@linux.vnet.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-12/txt/msg00080.txt.bz2 > when issuing a next or step after main() function's return statement, > gdb drops to __libc_start_main() from libc on x86 (or > generic_start_main() on ppc and so on, depending on the arch if I'm > not mistaken). Is it considered a bug or it's just the expected > behavior? I'd say that this is expected behavior. `main' is called by __libc_start_main, so "next"-ing out of main will land in that function. -- Joel