This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/5219] printd and printdln broken
- From: "joshua dot i dot stone at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 25 Oct 2007 19:39:55 -0000
- Subject: [Bug translator/5219] printd and printdln broken
- References: <20071025184143.5219.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From joshua dot i dot stone at intel dot com 2007-10-25 19:39 -------
(In reply to comment #0)
> printd[ln] cannot take a string variable as the first argument.
> probe begin {
> b = ","
> printd(b,"foo","bar")
> println("")
> exit()
> }
Currently a call like printd(",", "foo", 42, "bar") gets synthesized into
_stp_printf("%s,%d,%s", "foo", 42, "bar"). Using non-literal delimiters, would
have to be instead:
_stp_printf("%s%s%d%s%s", "foo", delim, 42, delim, "bar")
Perhaps we could still optimize the literal case though.
Do you really see a need to have non-literal delimiters?
> Also printd[ln] cannot handle case where there is only one values to print:
This is consistent with the documentation, which specifies "two or more values."
> probe begin {
> printd(",","foo")
> println("")
> exit()
> }
Why should we support this? If you only have one value, just use print[ln].
Using printd with one value would mean that you're specifying a delimiter that
will just be ignored.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5219
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.