This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: RFC on bug #3672: pretty printing compound types
Josh Stone <jistone@redhat.com> writes:
> [...]
> struct fs_struct:
> "{.users=%i, .lock={.raw_lock={.lock=%u}}, .umask=%i, .in_exec=%i,
> .root={.mnt=%p, .dentry=%p}, .pwd={.mnt=%p, .dentry=%p}}"
I like the automatic selection of %i/%u/%p. We should do the same
thing for $$parms and siblings.
> [...] The other idea that I'm favoring is to stop following
> pointers, and just make "$" print the structure without any
> substructures and "$$" print with all substructures. [...]
In that case, we'd have no primitive for following generic pointers,
right? So one would have to hand-write scripts like these in order to
draw to pointed-to structures.
# probe process("stap").function("*::visit_target_symbol")
# printf("%s %s\n", $e$, probefunc())
or
# printf("%s %s\n", $e->tok$, probefunc())
That seems unfortunate. Maybe use your arrow notation to indicate
pointer-dereferenced pretty-printing?
$e->->$ for two levels of pointer dereferncing?
- FChE