Re: [PATCH][gdb] Only force INTERP_CONSOLE ui_out for breakpoint commands in MI mode

Pedro Alves
2019-10-03T14:02:58Z

On 10/3/19 2:51 PM, Tom de Vries wrote:
> On 03-10-19 14:10, Pedro Alves wrote:

>>> --- a/gdb/cli/cli-script.c
>>> +++ b/gdb/cli/cli-script.c
>>> @@ -697,6 +697,9 @@ execute_control_command_1 (struct command_line *cmd, int from_tty)
>>> enum command_control_type
>>> execute_control_command (struct command_line *cmd, int from_tty)
>>> {
>>> + if (!current_interp_named_p (INTERP_MI))
>>> + return execute_control_command_1 (cmd, from_tty);
>>
>> Wouldn't we need to handle INTERP_MI1/INTERP_MI2/INTERP_MI3 as well?
>>
>> Would
>>
>> if (current_uiout->is_mi_like_p ())
>>
>> instead work?
>
> Yep, that works as well. Patch updated accordingly and re-tested.
>
> OK for trunk?

Seems good to me, but I think we should hear from Andrew as well.

Thanks,
Pedro Alves