Re: [PATCH v2 2/2] mi-out: Implement mi redirection using a stack.

Sergio Durigan Junior
2014-09-08T18:59:46Z

On Monday, September 08 2014, Pedro Alves wrote:

>> + mi_expect_stop "breakpoint-hit" "do_nothing" ".*" ".*" ".*" {".*" ".*"} "Continue to breakpoint"
>> +
>> + # This will crash gdb if redirection is not done properly.
>> + mi_gdb_test "help" ".*" "nested redirect"
>
> I think it'd be good to replace this ".*" with a stricter match, just
> in case something goes wrong with undoing the redirection, but nothing
> crashes. Something like (untested):
>
> mi_gdb_test "help" "List of classes of commands.*\\^done.*" "nested redirect"

I've been seeing some cases like this in the list (i.e., writing tests
using ".*" a lot). Maybe this is a good thing to mention in our wiki...

--
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible