aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-09-21 10:46:51 -0600
committerTom Tromey <tom@tromey.com>2022-11-05 12:13:06 -0600
commit560f8d05a1d6b09305bac8e992c1a95367e9778e (patch)
tree8ec55eae978e97d7e90dd547f390db5c2ee69067
parent5a9886170b3bc9027ec72ab425fb0e3d4a1aa330 (diff)
downloadgdb-560f8d05a1d6b09305bac8e992c1a95367e9778e.zip
gdb-560f8d05a1d6b09305bac8e992c1a95367e9778e.tar.gz
gdb-560f8d05a1d6b09305bac8e992c1a95367e9778e.tar.bz2
Deprecate MI version 1
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.
-rw-r--r--gdb/NEWS2
-rw-r--r--gdb/interps.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 8b519a6..0642d76 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 a8bd672..56d4790 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,