public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Deprecate MI version 1
Date: Wed, 21 Sep 2022 13:07:45 -0400	[thread overview]
Message-ID: <2d5c442d-5a2b-4340-1151-e01c1051d895@simark.ca> (raw)
In-Reply-To: <20220921164737.3258130-1-tom@tromey.com>



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 <simon.marchi@polymtl.ca>
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


  reply	other threads:[~2022-09-21 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 16:47 Tom Tromey
2022-09-21 17:07 ` Simon Marchi [this message]
2022-09-21 18:38   ` Tom Tromey
2022-09-22 16:11     ` Simon Marchi
2022-09-22 17:00   ` Luis Machado
2022-09-22 18:04     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d5c442d-5a2b-4340-1151-e01c1051d895@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).