Chris Quenelle is a tools developer at Oracle Corp. He's worked on performance and debugging tools at Sun and Oracle for over 15 years. He reads comic books and science fiction,and has more tivos than he can keep track of.

 

May 2012
SMTWTFS
«Apr  
 12345
6789101112
13141516171819
20212223242526
2728293031 

dbx .ldynsym support –stack traces for stripped programs

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:

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

After:


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

http://quenelle.org/unix/wp-content/plugins/sociofluid/images/digg_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/reddit_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/dzone_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/stumbleupon_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/delicious_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/furl_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/technorati_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/facebook_24.pnghttp://quenelle.org/unix/wp-content/plugins/sociofluid/images/twitter_24.png

Leave a Reply

  

  

  

You can use these HTML tags

<a href=""title=""><abbr title=""><acronym title=""><b><blockquote cite=""><cite><code><del datetime=""><em><i><q cite=""><strike><strong>