0

when im trying to do trace getenv function i got:

-bash-4.0#/usr/sbin/dtrace -n 'pid$target:libc:getenv:entry' -p 2017
dtrace: invalid probe specifier pid$target:libc:getenv:entry: probe description 
pid2017:libc:getenv:entry does not match any probes

-bash-4.0# /usr/sbin/dtrace -n 'pid$target:libc::entry' -p 2017
dtrace: invalid probe specifier pid$target:libc::entry: probe description pid2017:libc::entry does not match any probes

ldd from myapp:

libz.so.1 =>     /lib/libz.so.1
libm.so.2 =>     /lib/libm.so.2
libdl.so.1 =>    /lib/libdl.so.1
libpthread.so.1 =>   /lib/libpthread.so.1
libbz2.so.1 =>   /usr/lib/libbz2.so.1
libsocket.so.1 =>    /lib/libsocket.so.1
libnsl.so.1 =>   /lib/libnsl.so.1
libsendfile.so.1 =>  /lib/libsendfile.so.1
libxml2.so.2 =>  /lib/libxml2.so.2
libc.so.1 =>     /lib/libc.so.1
libmp.so.2 =>    /lib/libmp.so.2
libmd.so.1 =>    /lib/libmd.so.1
libscf.so.1 =>   /lib/libscf.so.1
libuutil.so.1 =>     /lib/libuutil.so.1
libgen.so.1 =>   /lib/libgen.so.1
libsmbios.so.1 =>    /usr/lib/libsmbios.so.1

Why is that happening ? Is there any solution which can make libc functions able to trace via dtrace ?

Best regards

JosiP
  • 2,619
  • 5
  • 29
  • 33
  • Which version of Solaris is this exactly ? For me (S10 Update 6/8/10), the command `dtrace -n 'pid$target:libc:getenv:entry { ustack(); }' ...` works - no matter whether I specify nothing, `libc`, `libc.so` or `libc.so.1` (it fails if I give a nonexistant lib name). Also, how have you compiled your app ? – FrankH. Jul 12 '12 at 11:08
  • `-bash-4.0# cat /etc/release OpenSolaris Development snv_134 X86 Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 01 March 2010` `-bash-4.0# uname -a SunOS appdev.srv 5.11 snv_134 i86pc i386 i86pc` – JosiP Jul 13 '12 at 09:34

0 Answers0