From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5555 invoked by alias); 13 Mar 2019 18:41:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5545 invoked by uid 89); 13 Mar 2019 18:41:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=creator, displays, H*r:sk:mailout, H*RU:sk:mailout X-HELO: mailout01.t-online.de Received: from mailout01.t-online.de (HELO mailout01.t-online.de) (194.25.134.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Mar 2019 18:41:23 +0000 Received: from fwd17.aul.t-online.de (fwd17.aul.t-online.de [172.20.27.64]) by mailout01.t-online.de (Postfix) with SMTP id 5A12943164E5; Wed, 13 Mar 2019 19:41:20 +0100 (CET) Received: from localhost (SgfoRGZUohAvthh8QDh+xbjUB3J8BoNp1L3HD17rQDm8HV8VgL9YVDY6EAbxASFZ5D@[95.91.240.84]) by fwd17.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1h48oZ-0SkR160; Wed, 13 Mar 2019 19:41:19 +0100 Date: Wed, 13 Mar 2019 18:41:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Tom Tromey Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [RFC] Don't show "display"s twice in MI Message-ID: <20190313184355.GB2317@klara.mpi.htwm.de> References: <20190312190320.19645-1-tromey@adacore.com> <0a23b883-9c80-a9e2-1e3e-3aa8c0b0ce13@redhat.com> <87y35ix0pv.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y35ix0pv.fsf@tromey.com> X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00278.txt.bz2 On Wed, Mar 13, 2019 at 09:17:48AM -0600, Tom Tromey wrote: > >>>>> "Pedro" == Pedro Alves 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'