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 /staptree.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 'staptree.cxx')
-rw-r--r-- | staptree.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/staptree.cxx b/staptree.cxx index ccfc8a8d..d71472a6 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -340,12 +340,18 @@ void functioncall::print (ostream& o) const bool print_format::parse_print(const std::string &name, - bool &stream, bool &format, bool &delim, bool &newline) + bool &stream, bool &format, bool &delim, bool &newline, bool &_char) { const char *n = name.c_str(); stream = true; - format = delim = newline = false; + format = delim = newline = _char = false; + + if (strcmp(n, "print_char") == 0) + { + _char = true; + return true; + } if (*n == 's') { @@ -2292,6 +2298,7 @@ deep_copy_visitor::visit_print_format (print_format* e) n->print_with_format = e->print_with_format; n->print_with_delim = e->print_with_delim; n->print_with_newline = e->print_with_newline; + n->print_char = e->print_char; n->raw_components = e->raw_components; n->components = e->components; n->delimiter = e->delimiter; |