linux-mips
[Top] [All Lists]

Re: Application stack trace facility

To: Krishna Kondaka <krishna@Sanera.net>
Subject: Re: Application stack trace facility
From: Johannes Stezenbach <js@convergence.de>
Date: Wed, 20 Mar 2002 14:01:20 +0100
Cc: linux-mips@oss.sgi.com
In-reply-to: <200203192013.g2JKDsD02409@icarus.sanera.net>
Mail-followup-to: Johannes Stezenbach <js@convergence.de>, Krishna Kondaka <krishna@Sanera.net>, linux-mips@oss.sgi.com
References: <200203192013.g2JKDsD02409@icarus.sanera.net>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.3.27i
On Tue, Mar 19, 2002 at 12:13:54PM -0800, Krishna Kondaka wrote:
>       I would like to know if there is a system call/library function 
>       available in linux which prints the current stack trace of the 
>       application.

The Glib has a function g_on_error_stack_trace() which does this
in a slightly hackish way by attaching gdb to the crashed program
(to be called from a SIGSEGV handler).
Look at gbacktrace.c there:
http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=glib/glib&module=.

HTH,
Johannes


<Prev in Thread] Current Thread [Next in Thread>