]> sourceware.org Git - systemtap.git/commit
PR13272: Fix quoted strings in the printf shortcut path
authorJosh Stone <jistone@redhat.com>
Fri, 7 Oct 2011 16:48:43 +0000 (09:48 -0700)
committerJosh Stone <jistone@redhat.com>
Fri, 7 Oct 2011 16:48:43 +0000 (09:48 -0700)
commit1386d8fc1a768df68e830e4af8482cdf060612a1
treee0acb242df06ca14b2459a05cb44290e3740a137
parent898000ace6a5a03ffb7a129b8291cf7f58c4fb26
PR13272: Fix quoted strings in the printf shortcut path

For printf strings with no arguments, we usually skip all the printf
path altogether and just use _stp_print.  However, the compiled-printf
changes affected the level of string escaping, which broke for a case
like printf("\"quote\\this\"\n").  We must make sure that this shortcut
path uses an output-quoted string literal.

* translate.cxx (c_unparser::visit_print_format): Generate an output-
  quoted format_string too, for use by the _stp_print shortcut.
  (preprocess_print_format): The "%s\n" case shouldn't alter components.
* testsuite/buildok/printf.stp: Add "%s" and "%s\n" shortcut tests too.
testsuite/buildok/printf.stp
translate.cxx
This page took 0.02929 seconds and 5 git commands to generate.