1 Reply Latest reply: Dec 28, 2009 12:02 AM by 807559 RSS

    dtrace user level tracing problem

    807559
      Hi,

      I am trying to trace user level functions using dtrace , Here is my dtrace script


      #!/usr/sbin/dtrace -s

      pid$1:calls:$2:entry
      {
      self->trace = 1;
      }

      pid$1:calls:$2:return
      /self->trace/
      {
      self->trace = 0;
      }

      pid$1:calls::entry,
      pid$1:calls::return
      /self->trace/
      {
      }

      When I run the following command

      dtrace -F -s tracecalls.d 4968 f1

      It does not find the function f1
      Has anyone tried to use dtrace to debug user level functions on Intel x86 solaris version.

      Thanks in advance.

      Srikant
        • 1. Re: dtrace user level tracing problem
          807559
          Hello Srikant,

          You should the mangled name of your function "f1" in the binary. The same name should be given as input to your dtrace program.

          Like for example :

          nm a.out | grep f1
          [137] | 82512| 20|FUNC |GLOB |0 |9 |_Z2f1v
          use : dtrace -F -s tracecalls.d 4968 _Z2f1v

          -Ajoy