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
On 05/28/2010 06:33 PM, Frank Ch. Eigler wrote:
>> [...] 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?
It quickly blows up in size when you traverse pointers though, and we're
limited to MAXSTRINGLEN. I have no generic way to know that ->tok is
the only pointer you care about, so all the other pointers in the
structure get expanded too.
Would it be ok if I just make the suggested change now, and then later
we can consider introducing the arrow notation to expand further?
Josh