diff options
author | Andrew Burgess <aburgess@broadcom.com> | 2013-08-13 16:05:23 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@broadcom.com> | 2013-08-13 16:05:23 +0000 |
commit | 5c30d39a69a4da5d011db4d52c15042561d53ce0 (patch) | |
tree | 63ff0114293b6e4f63159949effead1378668d0e /gdb/common/format.c | |
parent | 17e1c970ef41149e5eb6b5f908301e6a86a7f528 (diff) | |
download | gdb-5c30d39a69a4da5d011db4d52c15042561d53ce0.zip gdb-5c30d39a69a4da5d011db4d52c15042561d53ce0.tar.gz gdb-5c30d39a69a4da5d011db4d52c15042561d53ce0.tar.bz2 |
Handle '#' flag for printf of pointer types.
http://sourceware.org/ml/gdb-patches/2013-08/msg00340.html
gdb/ChangeLog
* common/format.c (parse_format_string): Don't allow '#' flag for
pointer arguments in format string.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_printf): Add test for printf of
pointer with various flags.
Diffstat (limited to 'gdb/common/format.c')
-rw-r--r-- | gdb/common/format.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/common/format.c b/gdb/common/format.c index 1bdd253..985e0e4 100644 --- a/gdb/common/format.c +++ b/gdb/common/format.c @@ -263,7 +263,9 @@ parse_format_string (const char **arg) this_argclass = ptr_arg; if (lcount || seen_h || seen_big_l) bad = 1; - if (seen_prec || seen_zero || seen_space || seen_plus) + if (seen_prec) + bad = 1; + if (seen_hash || seen_zero || seen_space || seen_plus) bad = 1; break; |