public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* how to print element in struct prams??
@ 2012-03-09  2:28 ch huang
  2012-03-09  2:39 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: ch huang @ 2012-03-09  2:28 UTC (permalink / raw)
  To: systemtap

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?

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to print element in struct prams??
  2012-03-09  2:28 how to print element in struct prams?? ch huang
@ 2012-03-09  2:39 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2012-03-09  2:39 UTC (permalink / raw)
  To: ch huang; +Cc: systemtap

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-09  2:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09  2:28 how to print element in struct prams?? ch huang
2012-03-09  2:39 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).