Stack traces for stripped programs should get easier to read on Solaris.  Solaris Nevada added a new strip-proof symbol table that inherits part of the symbols that normally get stripped out by the strip command. Basically static functions. Static functions have always been the number one cause of unreadable stack traces in stripped programs, but not the Solaris utilities (dtrace, mdb, pstack, etc) and also dbx (in Sun Studio 12 FCS) will be able to make use of these new symbols. The new Solaris feature is described here.

Before:

<span> % cc t.c && strip a.out && ./a.out ; dbx -c 'where;quit' - core<br /> "t.c", line 2: warning: implicit function declaration: abort<br /> Abort (core dumped)<br /> Corefile specified executable: "/home/quenelle/a.out"<br /> Reading a.out<br /> core file header read successfully<br /> Reading ld.so.1<br /> Reading libc.so.1<br /> program terminated by signal ABRT (Abort)<br /> 0xbff80717: __lwp_kill+0x0007:  jae      __lwp_kill+0x15        [ 0xbff80725, .+0xe ]<br /> =>[1] __lwp_kill(0x1, 0x6), at 0xbff80717<br /> [2] _thr_kill(0x1, 0x6), at 0xbff7ded4<br /> [3] raise(0x6), at 0xbff2ced3<br /> [4] abort(0x8047408, 0x80506db, 0x8047514, 0x8047428, 0x805062d, 0x1), at 0xbff10969<br /> <strong>[5] 0x80506c8(0x8047514, 0x8047428, 0x805062d, 0x1, 0x8047434, 0x804743c), at 0x80506c8</strong><br /> [6] main(0x1, 0x8047434, 0x804743c, 0x80505cf), at 0x80506db<br /> </span>

After:

<span><br /> % cc t.c && strip a.out && ./a.out ; dbx -c 'where;quit' - core<br /> "t.c", line 2: warning: implicit function declaration: abort<br /> Abort (core dumped)<br /> Corefile specified executable: "/home/quenelle/./a.out"<br /> Reading a.out<br /> core file header read successfully<br /> Reading ld.so.1<br /> Reading libc.so.1<br /> program terminated by signal ABRT (Abort)<br /> 0xff344a24: __lwp_kill+0x0008:  bcc,a,pt  %icc,__lwp_kill+0x18  ! 0xff344a34<br /> =>[1] __lwp_kill(0x0, 0xffffffff, 0x0, 0x0, 0xfffffffc, 0x0), at 0xff344a24<br /> [2] raise(0x6, 0x0, 0x5, 0x6, 0xffffffff, 0x6), at 0xff2f7504<br /> [3] abort(0xff386a80, 0x1, 0x6, 0xff3836c0, 0xacf34, 0x0), at 0xff2d3824<br /> <strong>[4] baz(0x0, 0x1000, 0xff385ac0, 0xff3a2000, 0x0, 0x4), at 0x10e6c</strong><br /> [5] main(0x1, 0xffbff3e4, 0xffbff3ec, 0x21000, 0xac71c, 0xff3a0140), at 0x10e9c<br /> </span>