-# Copyright 2012-2014 Free Software Foundation, Inc.
+# Copyright 2012-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
standard_testfile .c
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
return -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"