diff options
author | fche <fche> | 2005-12-12 17:39:53 +0000 |
---|---|---|
committer | fche <fche> | 2005-12-12 17:39:53 +0000 |
commit | a9c62ac9b339211d80b013eac75ba47f8a39d478 (patch) | |
tree | 235ad14256204134f14b55080f8c2b40a2186ea7 /translate.cxx | |
parent | 9cb3a339871fa02385f16d896471ac8b7941e580 (diff) | |
download | systemtap-steved-a9c62ac9b339211d80b013eac75ba47f8a39d478.tar.gz systemtap-steved-a9c62ac9b339211d80b013eac75ba47f8a39d478.tar.xz systemtap-steved-a9c62ac9b339211d80b013eac75ba47f8a39d478.zip |
2005-12-12 Frank Ch. Eigler <fche@redhat.com>
Fix parse tree pretty-printer.
* staptree.h (print_format): Add raw_components field.
* parse.cxx (parse_symbol): Set it.
* staptree.cxx (lex_cast_qstring): Copy it here too.
(binary_expression::print): Add a space around operator, due to
lexical ambiguity (expr % paren-expr) vs %( preprocessor op.
(array_in:: foreach_loop:: arrayindex::print): Print base as indexable.
(print_format::string_to_components): Use parse_error, not semantic.
(print_format::print): Properly quote formatting string. Print
histogram argument.
* translate.cxx (visit_print_format): Properly quote formatting string.
(varlock): Reword lock timeout error message.
* testsuite/buildok/printf.stp: Add some quoting troublemakers.
* testsuite/parseok/unparser.stp: New file.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx index f2a848f3..fa95966c 100644 --- a/translate.cxx +++ b/translate.cxx @@ -449,7 +449,7 @@ struct varlock << "(trylock_count++ < MAXTRYLOCK)" << ") ; /* spin */"; c.o->newline() << "if (unlikely (trylock_count >= MAXTRYLOCK)) {"; - c.o->newline(1) << "c->last_error = \"deadlock over variable " + c.o->newline(1) << "c->last_error = \"locking timeout over variable " << v << "\";"; c.o->newline() << "goto " << post_unlock_label << ";"; c.o->newline(-1) << "}"; @@ -3218,7 +3218,7 @@ c_unparser::visit_print_format (print_format* e) else o->newline() << "snprintf (" << res.qname() << ", MAXSTRINGLEN, "; - o->line() << "\"" << print_format::components_to_string(components) << "\""; + o->line() << lex_cast_qstring(print_format::components_to_string(components)); for (unsigned i = 0; i < tmp.size(); ++i) { |