aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-04-28 01:03:24 +0000
committerTom Tromey <tromey@redhat.com>2009-04-28 01:03:24 +0000
commit379a77b5484ba0d8f29983175acb2b968f56785a (patch)
treedfae15384cc4323f6d31d1f683ba5d53cd7a9930 /gdb/testsuite
parent0c19b345c9a8842f3d62da61880ed5bc15d2d2f9 (diff)
downloadgdb-379a77b5484ba0d8f29983175acb2b968f56785a.zip
gdb-379a77b5484ba0d8f29983175acb2b968f56785a.tar.gz
gdb-379a77b5484ba0d8f29983175acb2b968f56785a.tar.bz2
gdb
* c-exp.y (yylex): Handle '[' and ']' like '(' and ')'. gdb/testsuite * gdb.base/printcmds.exp (test_printf): Test comma operator in [].
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp3
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index fa6cd7d..61aee21 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-27 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/printcmds.exp (test_printf): Test comma operator in [].
+
2009-04-27 Doug Evans <dje@google.com>
* gdb.threads/watchthreads.c (main): Initialize args before starting
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index b6f8a1f..65ab3a4 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -666,6 +666,9 @@ proc test_printf {} {
gdb_test "printf \"x=%d,y=%f,z=%d\\n\", 5, 6.0, 7" "x=5,y=6\.0+,z=7"
gdb_test "printf \"%x %f, %c %x, %x, %f\\n\", 0xbad, -99.541, 'z',\
0xfeedface, 0xdeadbeef, 5.0" "bad -99.54\[0-9\]+, z feedface, deadbeef, 5.0+"
+
+ # Regression test for C lexer bug.
+ gdb_test "printf \"%c\\n\", \"x\"\[1,0\]" "x"
}
#Test printing DFP values with printf