From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 384933858CDB for ; Wed, 21 Sep 2022 17:07:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 384933858CDB Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AD25E1E0D3; Wed, 21 Sep 2022 13:07:45 -0400 (EDT) Message-ID: <2d5c442d-5a2b-4340-1151-e01c1051d895@simark.ca> Date: Wed, 21 Sep 2022 13:07:45 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] Deprecate MI version 1 Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220921164737.3258130-1-tom@tromey.com> From: Simon Marchi In-Reply-To: <20220921164737.3258130-1-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2022 17:07:47 -0000 On 2022-09-21 12:47, Tom Tromey wrote: > MI version 1 is long since obsolete. Rather than remove it > immediately (though I did send a patch for that), instead let's > deprecate it in GDB 13 and then remove it for GDB 14. > --- > gdb/NEWS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gdb/NEWS b/gdb/NEWS > index 555ef2ddf77..e834e97dacc 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -3,6 +3,8 @@ > > *** Changes since GDB 12 > > +* MI version 1 is deprecated, and will be removed in GDB 14. > + > * GDB now supports dumping memory tag data for AArch64 MTE. It also supports > reading memory tag data for AArch64 MTE from core files generated by > the gcore command or the Linux kernel. LGTM. Do you think it would be worth printing a warning when initializing an mi1 interp, something like this? There might be some people using / maintaing some frontend somewhere that are more likely to see this than the NEWS file. >From f2d148e8787d1c4b4c1c4218646a87157f5fac82 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 21 Sep 2022 13:06:47 -0400 Subject: [PATCH] warn Change-Id: Ia38707b24ce0d0ab519b189464ded828f5669c27 --- gdb/interps.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gdb/interps.c b/gdb/interps.c index 3a9c590b8c87..c26bc0f0f6fd 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -171,11 +171,16 @@ interp_set (struct interp *interp, bool top_level) if (interpreter_p != interp->name ()) interpreter_p = interp->name (); + bool warn_about_mi1 = false; + /* Run the init proc. */ if (!interp->inited) { interp->init (top_level); interp->inited = true; + + if (streq (interp->name (), "mi1")) + warn_about_mi1 = true; } /* Do this only after the interpreter is initialized. */ @@ -185,6 +190,10 @@ interp_set (struct interp *interp, bool top_level) clear_interpreter_hooks (); interp->resume (); + + if (warn_about_mi1) + warning (_("MI version 1 is deprecated and will be removed in a future " + "version, please upgrade to a newer MI version.")); } /* Look up the interpreter for NAME. If no such interpreter exists, base-commit: fbe8f9569eb56a007cace0be366dd137e2821e2a -- 2.37.3