Bart Smaalders wrote:
> 
> Some time ago (Solaris 9 development) I put walkcontext()
> and printstack() into Solaris.  Linux introduced backtrace()
> at some point; there are now programs that will use either
> one (dovecot, for example), but there are others that confine
> themselves to backtrace() only.
> 
> It's fairly simple to support for backtrace, backtrace_symbols,
> and backtrace_symbols_fd for Solaris using the existing
> walkcontext and support code for printstack().  Is this worth
> doing?

Xorg uses backtrace() on Linux to print a stack trace to Xorg.0.log
when crashing - I originally added code to use walkcontext() to do
the same, but ended up replacing it with pipe/fork/exec of pstack,
since that was the only way to see function names of private symbols.
I seem to remember seeing a recent fasttrack from the linker aliens to
fix this - it would be good if any new backtrace() function could take
advantage of it.

The previous discussion is archived at:
http://www.opensolaris.org/jive/thread.jspa?threadID=2887&tstart=75

(and now that I see that thread again, I see that fork/exec pstack
  was actually your suggestion).

-- 
     -Alan Coopersmith-           alan.coopersmith at sun.com
      Sun Microsystems, Inc. - X Window System Engineering

Reply via email to