From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id 4E7C53858D1E for ; Wed, 8 May 2024 00:53:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E7C53858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4E7C53858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715129583; cv=none; b=YqkmIEiqa3sdzK0uENC1rHiZEVwFekqDLus61ZMrsNkDn7lCRk+3pIb7APLRQvfhySUkjuQyJQMQqlHPqtHmhn+SDACUlPCKoZ8Ne0NZRZSQNMgVf9nFRlnOUaVegOAdUggWYZcoTMLJUitu3qKqj1zc5wkKwGC7DGsHxyHHI7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715129583; c=relaxed/simple; bh=g6lmGVbutARPZAh3Au7lrkbn3CpSjRGRJ6424K4KpSY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xo36rXzDV6Gok1VXr3W1uu8DhKnO/LG+9m9NIQk34eXyCYv6K/+IxXZI+xX/QgUWaHC2zh0OnqGO4ScWcIEIXEwQqIClgMuvD/xHcWgMbedvFMg84oh1SJtripeXNZpwdVVEgsjkUgF4yHuV3lnV5bADlYvDT8YZLRzFJSyXPhI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5007a.ext.cloudfilter.net ([10.0.29.141]) by cmsmtp with ESMTPS id 4DR1s3SMtxs4F4VYJsTHyP; Wed, 08 May 2024 00:52:59 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 4VYJs1hrKWqfj4VYJs0t6m; Wed, 08 May 2024 00:52:59 +0000 X-Authority-Analysis: v=2.4 cv=GsNE+F1C c=1 sm=1 tr=0 ts=663acceb a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=TpHVaj0NuXgA:10 a=Qbun_eYptAEA:10 a=KG64VRHyukFtxoyxqykA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=90H96Go8gYbbHcOchEjqwOTYQGdlwrPotzQZzkFkH1E=; b=Gi0Ap6t8XQjBZ/Yong8Y6+ZF6s luhPTvtbpORGf2LmYuI/wFKRSuajkYbZq74v7hWP2S048HJuOiFOdhWc7DUUIY7z/hkCwLxN+ci5/ ffeoOGSmDe4HHCI7Qns+gkS7h; Received: from 97-122-86-252.hlrn.qwest.net ([97.122.86.252]:50774 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1s4VYI-000RtD-2w; Tue, 07 May 2024 18:52:58 -0600 From: Tom Tromey To: Robert Rossi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: Optionally print source code to gdb console window In-Reply-To: (Robert Rossi's message of "Tue, 7 May 2024 17:33:58 -0400") References: <87ikzpa7k6.fsf@tromey.com> X-Attribution: Tom Date: Tue, 07 May 2024 18:52:57 -0600 Message-ID: <87y18lunti.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.86.252 X-Source-L: No X-Exim-ID: 1s4VYI-000RtD-2w X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-252.hlrn.qwest.net (prentzel) [97.122.86.252]:50774 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfLGLQ7gkigIPNjirUnWHsOwNhEH5uIkGPaD+BHqD4b/HxBENtzCJJ1yaAtqc60FzTEX2xumbcIe3NLbsjTgU3toHRfov16dvxoOyYrsJUQxowT1bbMA/ 9kjYe4fdpJSKNmMCdjALl8kyEfmXGV0GxJ09AtOYQ1C+/1XnSPuJeNqdBnaiSZ0jwsN+WNljGcAn0Se09dz6Cv/7EolnAqn9bbs= X-Spam-Status: No, score=-3014.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > The first is that the output looks like this in the suggested case, > (gdb) n > 43 in test_main.cpp Yeah, that's no good. > My personal opinion is that gdb shouldn't print code to the console in mi mode > or in new-ui mode. However, there were some people from eclipse a few years > ago that said they disagreed and that gdb should behave identical in new-ui > mode and not in new-ui mode, so i've attempted to make an option. Ok. > Can you give me some pointers on how the implementation should change? The new flag shouldn't be in value_print_options. That struct is only for things affecting value-printing. Perhaps 'set source open' could be extended to have a new value. Or perhaps some other 'set source' sub-option could be made. I'm afraid that normally we bikeshed option names a bit. > I should also ask, is an option even necessary? > I think if we remove the source printing from the console when in new-ui mode > or in mi-mode it would make the most sense. After all, there is a front end displaying > this information, no? I personally don't have much stake in it, but it seems to me that if the Eclipse folks and/or the new-ui implementers already discussed it, then an option is necessary. Tom