Skip to content
Snippets Groups Projects
Commit 4d974e88 authored by Simon Marchi's avatar Simon Marchi
Browse files

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.
parent 252db1b5
No related branches found
No related tags found
No related merge requests found
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> 2014-07-15 Pedro Alves <palves@redhat.com>
* gdb.base/reread.exp: Use clean_restart. * gdb.base/reread.exp: Use clean_restart.
......
...@@ -50,3 +50,8 @@ gdb_test_no_output "set debug expression 1" ...@@ -50,3 +50,8 @@ gdb_test_no_output "set debug expression 1"
# This caused gdb to segfault. # This caused gdb to segfault.
test_debug_expr "print /x {char\[4\]} array" \ test_debug_expr "print /x {char\[4\]} array" \
"\[$\]$decimal = \\{0x0, 0x1, 0x2, 0x3\\}" "\[$\]$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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment