From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 3FA59385DC06 for ; Tue, 14 Apr 2020 12:17:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3FA59385DC06 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x432.google.com with SMTP id h26so2652819wrb.7 for ; Tue, 14 Apr 2020 05:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LlUqZlokbInMwoOwm7/RQhTbD3JpmwN4vInrWB255rU=; b=QDuxe1QpPmge0Vsix18jNaqIy6ELSD+GYsYH72L/sV9j031VQkFiOjPxPgkMK/QYT1 hW2s7mQWlm5u2mOGOes6z9MZDDuf1Gd576pBzGaEJpjfqY3cCQSCSACl822JyJ4A5U0Z T6KtpWbH/74rV9P6u/qFf8gJHRLePtjfaTTVR3K52Qzf5Y+ToFWJ+fohAevfh2C+LNWF 3IUFoYUk1zViolRbfm2qTy9BBm9eR6NNWO8jhzVpQAO6gsDpStyDfQp/Ol8DRlmCJceS 4jAIMMgAzBaCVGzeZtnfXcpNdYUfDBQRV6RWXstDprKtjTMvY4JTrwNX7iw/v/1UEEUI sC7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LlUqZlokbInMwoOwm7/RQhTbD3JpmwN4vInrWB255rU=; b=kkmvWlWHRWmp6QUrtKNPFIUz7wm0bcabhgczk9qRxXrGKsHnsS13IwmyJDTfR6Qcqd i+oYT+mLC51syOM46mq09WnRZeTyzmbN69xGVJYX+IcyHMomIZyLDeXvsMYtHoYulGtx 9cwGoup/uls06N8UDm/ohwBfD40DIC2fp2MgPF0ppvrRrTNJXJiJoQjm8Y0nRrkw1Etp KniU//yevcO7FM3yIeV2Sw81ZQzNCGeyYlj+HJLPQwY80xsVTxg62pSY+0TNsG9BuBaV aS0xkfDEJrZeL8KQgHc3c10/iPG8xpjDaC7UqtzoVbKMhPJIzfX/TTzZmcTX4EVc21Ng QU7Q== X-Gm-Message-State: AGi0PubzGNyRYia7VZ4c1SxglgAlOLL4DFFaLMIAVtLoDWW28VLDMG0E rpGvh1LGcBbNi/gpWPW74KpwHQEV0oA= X-Google-Smtp-Source: APiQypJlPXpo+PxLC2na6eyCpbulMhFNLizjdhFn6bhMOY5uZpXPQbjQU/ChYqBFu0saBdQTeYs+Iw== X-Received: by 2002:a5d:4d50:: with SMTP id a16mr25823765wru.219.1586866626948; Tue, 14 Apr 2020 05:17:06 -0700 (PDT) Received: from localhost (host81-151-181-184.range81-151.btcentralplus.com. [81.151.181.184]) by smtp.gmail.com with ESMTPSA id w17sm10455188wru.20.2020.04.14.05.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 05:17:06 -0700 (PDT) Date: Tue, 14 Apr 2020 13:17:05 +0100 From: Andrew Burgess To: Bob Rossi Cc: gdb@sourceware.org Subject: Re: source annotation now prints source line Message-ID: <20200414121705.GD2366@embecosm.com> References: <20200404235424.GB5321@xubuntu.brasko.net> <20200414112304.GB22764@xubuntu.brasko.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414112304.GB22764@xubuntu.brasko.net> X-Operating-System: Linux/5.5.13-200.fc31.x86_64 (x86_64) X-Uptime: 13:05:24 up 6 days, 3:20, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2020 12:17:10 -0000 * Bob Rossi [2020-04-14 07:23:04 -0400]: > On Sat, Apr 04, 2020 at 07:54:24PM -0400, Bob Rossi wrote: > > When the source annotation is sent to the front end, the source line > > is now also sent to the front end console. I believe this commit > > introduced it, > > https://github.com/bminor/binutils-gdb/commit/ec8e2b6d3051f0b4b2a8eee9917898e95046c62f > > > > Now CGDB displays, > > (gdb) n > > 43 int i = 3; > > (gdb) > > > > Instead of, > > (gdb) n > > (gdb) > > > > CGDB is a front end, and so it has a source view to display the code to > > the user. Why did GDB decide to also print the line of code to the front > > end's console window as well? This is confusing. > > The concept behind this commit seems incorrect. > > The motivation for the patch isn't clearly explained in > the commit message. I believe I've given a reasonable explanation > on why this patch makes no sense for front ends. > > Should I submit a patch reverting it? The patch in context is discussed here: https://sourceware.org/pipermail/gdb-patches/2019-June/158310.html https://sourceware.org/pipermail/gdb-patches/2019-June/158350.html https://sourceware.org/pipermail/gdb-patches/2019-June/158351.html https://sourceware.org/pipermail/gdb-patches/2019-June/158352.html https://sourceware.org/pipermail/gdb-patches/2019-June/158353.html I'm not sure you've convinced me yet that the idea behind the patch is incorrect. Annotations should be a (deprecated) way for F/Es to parse GDB's output, but they shouldn't impact _what_ GDB prints. In this particular case, printing the source line actually updates some internal state, which impacts how later commands operate. What this means is that the users session will behave differently if they have annotations on than when annotations are off. I guess, what I don't understand is that if a F/E wants to hide a particular piece of the output, why can't it just strip that from the output stream? The F/E must already be removing the annotation markers, so all the output must be going through the F/E anyway. Further, removing this particular piece of output makes sense for this F/E, but is it always going to be true for all F/Es? I haven't gone back and looked at the old behaviour, maybe I'll have more thoughts once I've looked at that again. Thanks, Andrew