This is the mail archive of the systemtap@sourceware.org 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]

[Bug translator/5219] printd and printdln broken


------- 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.


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