public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Deprecate MI version 1
@ 2022-09-21 16:47 Tom Tromey
  2022-09-21 17:07 ` Simon Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2022-09-21 16:47 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.
---
 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.
-- 
2.34.3


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

* Re: [PATCH] Deprecate MI version 1
  2022-09-21 16:47 [PATCH] Deprecate MI version 1 Tom Tromey
@ 2022-09-21 17:07 ` Simon Marchi
  2022-09-21 18:38   ` Tom Tromey
  2022-09-22 17:00   ` Luis Machado
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Marchi @ 2022-09-21 17:07 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches



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


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

* Re: [PATCH] Deprecate MI version 1
  2022-09-21 17:07 ` Simon Marchi
@ 2022-09-21 18:38   ` Tom Tromey
  2022-09-22 16:11     ` Simon Marchi
  2022-09-22 17:00   ` Luis Machado
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2022-09-21 18:38 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches; +Cc: Tom Tromey, Simon Marchi

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> LGTM.  Do you think it would be worth printing a warning when
Simon> initializing an mi1 interp, something like this?  There might be some
Simon> people using / maintaing some frontend somewhere that are more likely to
Simon> see this than the NEWS file.

It would be fine by me.

Tom

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

* Re: [PATCH] Deprecate MI version 1
  2022-09-21 18:38   ` Tom Tromey
@ 2022-09-22 16:11     ` Simon Marchi
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi @ 2022-09-22 16:11 UTC (permalink / raw)
  To: Tom Tromey, Simon Marchi via Gdb-patches



On 2022-09-21 14:38, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> LGTM.  Do you think it would be worth printing a warning when
> Simon> initializing an mi1 interp, something like this?  There might be some
> Simon> people using / maintaing some frontend somewhere that are more likely to
> Simon> see this than the NEWS file.
> 
> It would be fine by me.
> 
> Tom

Feel free to integrate it in your patch if you'd like.

Simon

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

* Re: [PATCH] Deprecate MI version 1
  2022-09-21 17:07 ` Simon Marchi
  2022-09-21 18:38   ` Tom Tromey
@ 2022-09-22 17:00   ` Luis Machado
  2022-09-22 18:04     ` Simon Marchi
  1 sibling, 1 reply; 6+ messages in thread
From: Luis Machado @ 2022-09-22 17:00 UTC (permalink / raw)
  To: Simon Marchi, Tom Tromey, gdb-patches

On 9/21/22 18:07, Simon Marchi via Gdb-patches wrote:
> 
> 
> 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."));
>   }

We should probably be more explicit about deprecating it for GDB 13 and then removing
it in GDB 14. What do you think?

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

* Re: [PATCH] Deprecate MI version 1
  2022-09-22 17:00   ` Luis Machado
@ 2022-09-22 18:04     ` Simon Marchi
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi @ 2022-09-22 18:04 UTC (permalink / raw)
  To: Luis Machado, Tom Tromey, gdb-patches


> We should probably be more explicit about deprecating it for GDB 13 and then removing
> it in GDB 14. What do you think?

Yeah, good idea.

Simon

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

end of thread, other threads:[~2022-09-22 18:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 16:47 [PATCH] Deprecate MI version 1 Tom Tromey
2022-09-21 17:07 ` Simon Marchi
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

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