This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: NULL pointer dereference when probing Java methods
Frank Ch. Eigler wrote:
> > I'm using java().class().method() syntax for retrieving "Hello" in this
> > example. If future releases return something like "java.lang.String",
> > [...]
> > You are going to add follow-up patches for b82a3aa8376d92bb
> > to allow retrieving "Hello" in this example, aren't you?
>
> Yes; we're also considering switching java argument passing generally to
> use .toString()-based stringification, so strings should print as
> themselves and other objects will map to whatever their implementation
> dictates. If we represent numbers etc., all as strings, then at the
> systemtap side we can have the $arg* parameters be all strings, so that
> manual user_string($argN) calls wouldn't be be necessary. What do you
> think?
I'm OK with that direction. Please be sure to include a way to tell whether
arguments are already stringified. (Maybe stap version variable is enough?)
%( ... %?
printf("%s %s\n", $arg1, $arg2);
%:
printf("%d %s\n", $arg1, user_string($arg2));
%)