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

Pedro Alves
2014-09-08T13:19:37Z

On 08/05/2014 02:55 PM, Adrian Sendroiu wrote:

> There's also the 1/2 patch from the series that needs to be applied
> before this.
>
> https://sourceware.org/ml/gdb-patches/2014-07/msg00574.html

Ah. Silly me, completely missed that. The test indeed passes cleanly
for me with that applied.

> + 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"

This is OK with a change along those lines.

Thanks!

Pedro Alves