linux-mips
[Top] [All Lists]

Application stack trace facility

To: linux-mips@oss.sgi.com
Subject: Application stack trace facility
From: Krishna Kondaka <krishna@Sanera.net>
Date: Tue, 19 Mar 2002 12:13:54 -0800 (PST)
Reply-to: Krishna Kondaka <krishna@Sanera.net>
Sender: owner-linux-mips@oss.sgi.com
Hi,
        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.
        
        For ex., 
        If main() calls a() which calls b() which in turn calls c() and if
        c() is defined as
        
        c()
        {
                ....
                if (condition)
                        dump_stack_trac();
                ....
        }
        
        the dump_stack_trace() should print if the "condition" is true -
        
        c(...)
        b(...)
        a(...)
        main(..)
        
        Is there such "dump_stack_trace" library function/system call available?
        I know that if I make the program dump core in the dump_stack_trace 
        function then I can get the stack trace from the core dump but I would
        like to know if I can do this without forcing the core dump.

TIA
Krishna Kondaka
Sanera Systems


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