This is the mail archive of the
mailing list for the GDB project.
Re: next/step after main() function's return
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 28 Dec 2010 09:20:55 +0400
- Subject: Re: next/step after main() function's return
- References: <4D19144E.email@example.com>
> 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
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.