This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about line number probing


Just a quick question about line number probing.  What if I had a function
that roughly looked like this:

foo(arg) {
  arg2 = translate(arg);
  if(arg2 == 1) /* one */
  else if(arg2 == 2) /* two */
}

Obviously I could get at 'arg'.  But what if I wanted to get at 'arg2'?  I
can slip into a line number, after arg2 is calculated by the translate()
function.  But can I do something with 'arg2' in a SystemTap script?  Can
I do something like:

probe("foo.c:1234") {
  printf("arg2 = %d\n", arg2);
}

Or does SystemTap have no knowledge of what (where?) arg2 is?

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]