[RFC] Don't show "display"s twice in MI

André Pönitz apoenitz@t-online.de
Wed Mar 13 18:41:00 GMT 2019


On Wed, Mar 13, 2019 at 09:17:48AM -0600, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> >> Probably we shouldn't print the displays in that case, just to keep
> >> things simple, respecting should_print_stop_to_console, but not 100%
> >> sure.
> 
> Pedro> So your patch makes GDB not do the displays in the
> Pedro> -exec-step/-exec-next case, which is the solution I was
> Pedro> leaning to above too, even though I'm not 100% sure about it.
> 
> I'm not 100% sure either.
> 
> We could have a more complicated patch that arranges for do_displays to
> be called just once, no matter what decision is made.  Maybe this would
> be better?
> 
> I originally thought it was somewhat odd to deal with displays in an MI
> stepping situation -- MI clients presumably would use varobj. 

That's possibly a bit too general: As counterexample, I'd call Qt Creator
an "MI client" but it doesn't use varobj.

On the other hand, I would not use "display" in that setup either (there's a
separate window to evaluate expression that gets updated after each stop)
so any number of copies of the value in the output is fine in that
situation.

> But, really the scenario is that the MI client provides a console, the
> user types "display ...", and then debugs some more.  I suppose the way
> that the "next" is done wouldn't matter to the user?

Probably not, indeed.

Andre'



More information about the Gdb-patches mailing list