This is the mail archive of the systemtap@sources.redhat.com 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: Questions and comments about the Architecture paper


John Levon <levon@movementarian.org> writes:

> I assume that to access function arguments, you can just use the name of
> the argument in the source, since systemtap operates based on the dwarf2
> debug info?

That's right, for a formal argument named foo, use "$foo".

>  How do I refer to an anonymous return value?

"$retvalue".

> Why isn't switch() supported?

It's in neither awk nor dtrace.  We could add it later.

> Since I don't have struct.field or structp->field, how do I traverse a
> structure? [...]

Parts of language.tex need updating, but we are planning to support
limited pointer/struct traversal based on $-variables that have the
necessary typing information available:

        foo.c: struct k { int a; } l;
  foopoke.stp: probe ... { $l.a }

This should work analogously for pointer-typed values in target space
and for arrays.  We haven't yet figured out a nice syntax for
iterating through structures like linked lists etc., in a way that
avoids storing typed-pointer values in basic untyped script-language
temporaries.


- FChE


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