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]

Re: how to print element in struct prams??


ch huang <justlooks@gmail.com> writes:

> if i put a probe on function do_command(thd), the argument thd is a
> structor ,and i want check a element named command in the structor,how
> to do?


> probe process.function("do_command") {
> printf("%s",$$prams->command)
> }

Drop the double-$ at the beginning.  That's for meta-variables like
$$vars, $$parms, $$locals.  If you want a pretty-printed form of just
one field of just one variable, try

  println($thd->command$)

- FChE


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