diff options
author | hunt <hunt> | 2007-11-12 21:55:53 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-11-12 21:55:53 +0000 |
commit | 32784362de8e2cfc686ce98557dd261003aff2ff (patch) | |
tree | 8505a8c67279564e9682d23e1f8d106e48e4c21c /parse.cxx | |
parent | 53c62e2914260e8f31b0de5b9a376babc4c9d9a0 (diff) | |
download | systemtap-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.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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") && |