aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2014-07-15 13:04:31 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2014-07-16 12:43:11 -0400
commit4d974e8854dbc506f154efca8879da3f310bb2b9 (patch)
tree182d8ea559bf0e8ba30265e16d1e34af479c1f42 /gdb
parent252db1b5de059d292f54216e4541e3ee8370d624 (diff)
downloadgdb-4d974e8854dbc506f154efca8879da3f310bb2b9.zip
gdb-4d974e8854dbc506f154efca8879da3f310bb2b9.tar.gz
gdb-4d974e8854dbc506f154efca8879da3f310bb2b9.tar.bz2
Add test for string evaluation with "debug expression" on
As Joel pointed out in... https://sourceware.org/ml/gdb-patches/2014-07/msg00391.html ...it would be nice to add a test for that. Tested on Linux x86_64 (Ubuntu 14.10). gdb/testsuite/ChangeLog 2014-07-15 Simon Marchi <simon.marchi@ericsson.com> * gdb.base/debug-expr.exp: Test string evaluation with "debug expression" on.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/debug-expr.exp5
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 151edf7..3f3ba60 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.base/debug-expr.exp: Test string evaluation with
+ "debug expression" on.
+
2014-07-15 Pedro Alves <palves@redhat.com>
* gdb.base/reread.exp: Use clean_restart.
diff --git a/gdb/testsuite/gdb.base/debug-expr.exp b/gdb/testsuite/gdb.base/debug-expr.exp
index d7c82b0..5576091 100644
--- a/gdb/testsuite/gdb.base/debug-expr.exp
+++ b/gdb/testsuite/gdb.base/debug-expr.exp
@@ -50,3 +50,8 @@ gdb_test_no_output "set debug expression 1"
# This caused gdb to segfault.
test_debug_expr "print /x {char\[4\]} array" \
"\[$\]$decimal = \\{0x0, 0x1, 0x2, 0x3\\}"
+
+# This caused gdb to output garbage and possibly segfault
+gdb_test "print \"hello\"" \
+ ".*OP_STRING\[^\r\n\]*Language-specific string type: 0.*\[\r\n\]\\$$decimal = \"hello\"\[\r\n\].*" \
+ "String evaluation with debug expr"