This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Unwinding stack past main() when it has another name
- From: Daniel Jacobowitz <drow at false dot org>
- To: Hamish Rodda <rodda at kde dot org>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 15 Jun 2005 10:16:24 -0400
- Subject: Re: Unwinding stack past main() when it has another name
- References: <200506152247.07232.rodda@kde.org>
On Wed, Jun 15, 2005 at 10:46:37PM +1000, Hamish Rodda wrote:
> Hi,
>
> I'm just curious if there's a better solution for a problem I've come up
> against recently. I have been using gdb 6.3 and finding that all of my kde
> program backtraces contain hundreds of irrelevant and corrupt-looking frames.
> Upgrading to cvs fixed most of the problem (the corrupt looking frames), but
> some frames still remain before the main function, which in kde programs is
> called kdemain().
>
> Is there something the kde sources can do to have gdb recognise kdemain() as
> the replacement main() function, and thus prevent gdb from unwinding past it?
Is there really no main() on the backtrace? There's no easy way in C
to mark another function as main or as not-backtraceable.
--
Daniel Jacobowitz
CodeSourcery, LLC