summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorhunt <hunt>2007-11-12 21:55:53 +0000
committerhunt <hunt>2007-11-12 21:55:53 +0000
commit32784362de8e2cfc686ce98557dd261003aff2ff (patch)
tree8505a8c67279564e9682d23e1f8d106e48e4c21c /parse.cxx
parent53c62e2914260e8f31b0de5b9a376babc4c9d9a0 (diff)
downloadsystemtap-steved-32784362de8e2cfc686ce98557dd261003aff2ff.tar.gz
systemtap-steved-32784362de8e2cfc686ce98557dd261003aff2ff.tar.xz
systemtap-steved-32784362de8e2cfc686ce98557dd261003aff2ff.zip
2007-11-12 Martin Hunt <hunt@redhat.com>
* translate.cxx (visit_print_format): Strings without a format or formatted with "%s" or "%s\n" should be printed with calls to _stp_print(). Call _stp_print_char() if printing a char. * staptree.cxx (parse_print): Check for "print_char". * staptree.h (struct print_format): Add print_char. (parse_print): Update prototype. * parse.cxx (parse_symbol): Set print_char bool in print_format.
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.cxx b/parse.cxx
index 0b465aa8..173639b3 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -2234,7 +2234,7 @@ parser::parse_symbol ()
// now scrutinize this identifier for the various magic forms of identifier
// (printf, @stat_op, and $var...)
- bool pf_stream, pf_format, pf_delim, pf_newline;
+ bool pf_stream, pf_format, pf_delim, pf_newline, pf_char;
if (name.size() > 0 && name[0] == '@')
{
@@ -2259,7 +2259,7 @@ parser::parse_symbol ()
}
else if (print_format::parse_print(name,
- pf_stream, pf_format, pf_delim, pf_newline))
+ pf_stream, pf_format, pf_delim, pf_newline, pf_char))
{
print_format *fmt = new print_format;
fmt->tok = t;
@@ -2267,6 +2267,7 @@ parser::parse_symbol ()
fmt->print_with_format = pf_format;
fmt->print_with_delim = pf_delim;
fmt->print_with_newline = pf_newline;
+ fmt->print_char = pf_char;
expect_op("(");
if ((name == "print" || name == "println") &&