+2010-03-03 Dainis Jonitis <jonitis@gmail.com>
+
+ PR gdb/11345:
+ * printcmd.c (printf_command): Print end of format string using
+ printf_filtered.
+
2010-03-02 Tom Tromey <tromey@redhat.com>
* mi/mi-cmd-break.c (mi_read_next_line): Add missing 'void'.
/* Skip to the next substring. */
current_substring += strlen (current_substring) + 1;
}
- /* Print the portion of the format string after the last argument. */
- puts_filtered (last_arg);
+ /* Print the portion of the format string after the last argument.
+ Note that this will not include any ordinary %-specs, but it
+ might include "%%". That is why we use printf_filtered and not
+ puts_filtered here. */
+ printf_filtered (last_arg);
}
do_cleanups (old_cleanups);
}
+2010-03-03 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/11345:
+ * gdb.base/printcmds.exp (test_printf): Add test.
+
2010-03-02 H.J. Lu <hongjiu.lu@intel.com>
* gdb.arch/amd64-byte.exp: New.
# Regression test for C lexer bug.
gdb_test "printf \"%c\\n\", \"x\"\[1,0\]" "x"
+
+ # Regression test for "%% at end of format string.
+ # See http://sourceware.org/bugzilla/show_bug.cgi?id=11345
+ gdb_test "printf \"%%%d%%\\n\", 5" "%5%"
}
#Test printing DFP values with printf