walkcontext() & printstack() are the Solaris equivalents.   The stack
backtrace code in Xorg uses it (or fork/exec pstack) on Solaris in the
same place backtrace() is used in capturing backtraces on server crashes:

http://cvs.freedesktop.org/xorg/xserver/xorg/hw/xfree86/common/xf86Events.c?view=markup

(Originally the code just used walkcontext - the fork/exec pstack was added
 to get the names of symbols not found in the linker symbol table - there was
 a discussion on the [EMAIL PROTECTED] forum a couple of months
 ago on why this was necessary.)


        -Alan Coopersmith-           [EMAIL PROTECTED]
         Sun Microsystems, Inc. - X Window System Engineering

Matty wrote:

Howdy,

I recently came across backtrace() and backtrace_symbols() in the glibc documentation:

http://www.gnu.org/software/libc/manual/html_node/Backtraces.html

and wondered if there were equivalent functions available in the Solaris libc? I have been poking through developer.sun.com and the opensolaris.org code repository, but haven't had much luck finding anything that looks like a backtrace() function. These functions are kinda nifty, and could be useful for some applications /environments.

Thanks for any insight,
- Ryan
--
UNIX Administrator
http://daemons.net/~matty
_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to