public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] Deprecate MI version 1
@ 2022-10-21 16:19 Tom Tromey
  2022-10-21 17:15 ` Eli Zaretskii
  2022-11-05 23:14 ` Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Tromey @ 2022-10-21 16:19 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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.

This version of the patch incorporates Simon's warning change, and
Luis' recommendation to mention the gdb versions here.
---
 gdb/NEWS      |  2 ++
 gdb/interps.c | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/gdb/NEWS b/gdb/NEWS
index 8b519a648f7..0642d7637b8 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.
diff --git a/gdb/interps.c b/gdb/interps.c
index a8bd67258e4..56d47906770 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -170,11 +170,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.  */
@@ -184,6 +189,11 @@ interp_set (struct interp *interp, bool top_level)
   clear_interpreter_hooks ();
 
   interp->resume ();
+
+  if (warn_about_mi1)
+    warning (_("MI version 1 is deprecated in GDB 13 and "
+	       "will be removed in GDB 14.  Please upgrade "
+	       "to a newer version of MI."));
 }
 
 /* Look up the interpreter for NAME.  If no such interpreter exists,
-- 
2.34.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Deprecate MI version 1
  2022-10-21 16:19 [PATCH v2] Deprecate MI version 1 Tom Tromey
@ 2022-10-21 17:15 ` Eli Zaretskii
  2022-11-05 23:14 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2022-10-21 17:15 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

> From: Tom Tromey <tom@tromey.com>
> Date: Fri, 21 Oct 2022 10:19:18 -0600
> Cc: Tom Tromey <tom@tromey.com>
> 
> 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.
> 
> This version of the patch incorporates Simon's warning change, and
> Luis' recommendation to mention the gdb versions here.
> ---
>  gdb/NEWS      |  2 ++
>  gdb/interps.c | 10 ++++++++++
>  2 files changed, 12 insertions(+)

OK for the NEWS part.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Deprecate MI version 1
  2022-10-21 16:19 [PATCH v2] Deprecate MI version 1 Tom Tromey
  2022-10-21 17:15 ` Eli Zaretskii
@ 2022-11-05 23:14 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2022-11-05 23:14 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> MI version 1 is long since obsolete.  Rather than remove it
Tom> immediately (though I did send a patch for that), instead let's
Tom> deprecate it in GDB 13 and then remove it for GDB 14.

Tom> This version of the patch incorporates Simon's warning change, and
Tom> Luis' recommendation to mention the gdb versions here.

I'm checking this in.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-05 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 16:19 [PATCH v2] Deprecate MI version 1 Tom Tromey
2022-10-21 17:15 ` Eli Zaretskii
2022-11-05 23:14 ` Tom Tromey

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).