* [PATCH] Add test for string evaluation with "debug expression" on
@ 2014-07-15 17:26 Simon Marchi
2014-07-16 13:34 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2014-07-15 17:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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.
---
gdb/testsuite/gdb.base/debug-expr.exp | 5 +++++
1 file changed, 5 insertions(+)
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"
--
2.0.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add test for string evaluation with "debug expression" on
2014-07-15 17:26 [PATCH] Add test for string evaluation with "debug expression" on Simon Marchi
@ 2014-07-16 13:34 ` Joel Brobecker
2014-07-16 17:52 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2014-07-16 13:34 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
> 2014-07-15 Simon Marchi <simon.marchi@ericsson.com>
>
> * gdb.base/debug-expr.exp: Test string evaluation with
> "debug expression" on.
Thanks for doing that. It looks good to me, so please go ahead and push!
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add test for string evaluation with "debug expression" on
2014-07-16 13:34 ` Joel Brobecker
@ 2014-07-16 17:52 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2014-07-16 17:52 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On 14-07-16 09:32 AM, Joel Brobecker wrote:
>> 2014-07-15 Simon Marchi <simon.marchi@ericsson.com>
>>
>> * gdb.base/debug-expr.exp: Test string evaluation with
>> "debug expression" on.
>
> Thanks for doing that. It looks good to me, so please go ahead and push!
>
Thanks, pushed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-16 17:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 17:26 [PATCH] Add test for string evaluation with "debug expression" on Simon Marchi
2014-07-16 13:34 ` Joel Brobecker
2014-07-16 17:52 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox