[PATCH][gdb] Only force INTERP_CONSOLE ui_out for breakpoint commands in MI mode
Tom de Vries
tdevries@suse.de
Thu Oct 3 10:01:00 GMT 2019
[ was: Re: [PATCH][gdb] Make INTERP_TUI's default ui_out the
INTERP_CONSOLE ui_out ]
On 01-10-19 14:59, Tom de Vries wrote:
> On 25-09-19 10:36, Andrew Burgess wrote:
>> * Tom de Vries <tdevries@suse.de> [2019-09-25 01:20:22 +0200]:
>>
>>> On 24-09-19 19:31, Andrew Burgess wrote:
>>>> With this patch applied I see the fixed behaviour you describe at the
>>>> CLI, however, if I do:
>>>>
>>>> (gdb) define mybt
>>>> bt
>>>> end
>>>> (gdb) start
>>>> (gdb) set logging redirect on
>>>> (gdb) tui enable
>>>> (gdb) set logging on
>>>> (gdb) mybt
>>>>
>>>> The I see output appear on both the console and in the log file.
>>>
>>> I can't reproduce this. Are you sure you removed the gdb.txt file before
>>> starting gdb?
>>
>> You're absolutely right, nothing goes to the log for `mybt`, this was
>> a silly mistake on my side. Apologies. However...
>>
>> With tui enabled and logging on and redirect on, the 'bt' __does__
>> write to the log, while 'mybt' writes to the screen. This is the same
>> bug you're fixing for non-tui mode, correct?
>
> From user perspective, yes.
>
>> Any solution should
>> ideally address both cases, or at least be accompanied with an
>> explanation for why these problems are distinct and should be solved
>> separately.
>>
>
> Ideally yes, agreed.
>
> This tentative patch fixes both cases, by limiting the fix of commit
> 3a87ae656c28 "Use console uiout when executing breakpoint commands" to
> the case for which the corresponding problem was reported: INTERP_MI. [
> Adding CC simark ]
>
> At this point I don't understand yet why special-casing INTERP_MI would
> be the correct thing to do here.
I've investigated a bit further the problem that commit 3a87ae656c28
fixes, and constructed a hopefully convincing rationale.
OK for trunk?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-Only-force-INTERP_CONSOLE-ui_out-for-breakpoint-commands-in-MI-mode.patch
Type: text/x-patch
Size: 5455 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20191003/f827352d/attachment.bin>
More information about the Gdb-patches
mailing list