summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-11-08 18:31:01 +0000
committerfche <fche>2006-11-08 18:31:01 +0000
commitc4bb5be2defde1d2f99ede96b6de48684f8934e6 (patch)
treecc158a39bb21309202f9f71be5c35c9b0cd68253 /staptree.cxx
parent72dbc9153036800cefdb5f2970666acc82cdb732 (diff)
downloadsystemtap-steved-c4bb5be2defde1d2f99ede96b6de48684f8934e6.tar.gz
systemtap-steved-c4bb5be2defde1d2f99ede96b6de48684f8934e6.tar.xz
systemtap-steved-c4bb5be2defde1d2f99ede96b6de48684f8934e6.zip
2006-11-08 Frank Ch. Eigler <fche@elastic.org>
* staptree.cxx (print_format::components_to_string): Quote ". (c_unparser::visit_print_format): Don't use lex_cast_qstring as it overdoes \ quoting. Resemble ::visit_literal_string instead.
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 1656f64a..f3352f24 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -341,8 +341,11 @@ print_format::components_to_string(vector<format_component> const & components)
for (string::const_iterator j = i->literal_string.begin();
j != i->literal_string.end(); ++j)
{
+ // See also: c_unparser::visit_literal_string and lex_cast_qstring
if (*j == '%')
oss << '%';
+ else if(*j == '"')
+ oss << '\\';
oss << *j;
}
}