[1/1] gdb: Deprecate stabs debug info

Message ID 20250113181359.1286957-1-guinevere@redhat.com
State New
Headers
Series [1/1] gdb: Deprecate stabs debug info |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Guinevere Larsen Jan. 13, 2025, 6:13 p.m. UTC
  GCC has deprecated stabs generation in GCC 12 and entirely removed it in
GCC 13, which was released in April 2023. At the time it was proposed
that GDB deprecate stabs as well, but the decision was to support it a
bit longer. With this patch, it'll be deprecated on GDB 17, and removed
on GDB 18, which following the current cadence, will be released early
2026, meaning we will have supported stabs for nearly 3 years longer
than GCC, which I think is reasonable.

As pointed out in the previous discussion on this topic[1], there are
several existing issues on the code, and none of the current maintainers
knows how to fix it.  Unless someone steps up to fix this before the
removal on GDB 18, I don't see why we should keep this old code that
breaks all conventions of modern debuginfo readers and doesn't even
work, instead of being able to further advance adjacent code.

[1] https://inbox.sourceware.org/gdb-patches/20230119174156.654402-1-tom@tromey.com/
---
 gdb/NEWS | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Eli Zaretskii Jan. 13, 2025, 6:30 p.m. UTC | #1
> From: Guinevere Larsen <guinevere@redhat.com>
> Cc: Guinevere Larsen <guinevere@redhat.com>
> Date: Mon, 13 Jan 2025 15:13:59 -0300
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index f454846646e..685ecefbe1c 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -44,6 +44,9 @@ maintenance check symtabs
>    ** New constant PARAM_COLOR represents color type of a value
>       of a <gdb:parameter> object.  Parameter's value is <gdb::color> instance.
>  
> +* Support for stabs debugging format is deprecates, and will be
> +  removed in GDB 18.                    ^^^^^^^^^^

Typo.

Thanks.
  
Guinevere Larsen Jan. 13, 2025, 7:01 p.m. UTC | #2
On 1/13/25 3:30 PM, Eli Zaretskii wrote:
>> From: Guinevere Larsen <guinevere@redhat.com>
>> Cc: Guinevere Larsen <guinevere@redhat.com>
>> Date: Mon, 13 Jan 2025 15:13:59 -0300
>>
>> diff --git a/gdb/NEWS b/gdb/NEWS
>> index f454846646e..685ecefbe1c 100644
>> --- a/gdb/NEWS
>> +++ b/gdb/NEWS
>> @@ -44,6 +44,9 @@ maintenance check symtabs
>>     ** New constant PARAM_COLOR represents color type of a value
>>        of a <gdb:parameter> object.  Parameter's value is <gdb::color> instance.
>>   
>> +* Support for stabs debugging format is deprecates, and will be
>> +  removed in GDB 18.                    ^^^^^^^^^^
> Typo.
>
> Thanks.
>
oops. Fixed!
  
Tom Tromey Jan. 14, 2025, 4:47 p.m. UTC | #3
>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:

Guinevere> As pointed out in the previous discussion on this topic[1], there are
Guinevere> several existing issues on the code, and none of the current maintainers
Guinevere> knows how to fix it.  Unless someone steps up to fix this before the
Guinevere> removal on GDB 18, I don't see why we should keep this old code that
Guinevere> breaks all conventions of modern debuginfo readers and doesn't even
Guinevere> work, instead of being able to further advance adjacent code.

I completely agree.
I'm in favor of this patch but I think you should wait a little while in
case there are any objections.

Approved-By: Tom Tromey <tom@tromey.com>

Also please add this trailer:

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31210

thanks,
Tom
  
Andrew Burgess Jan. 14, 2025, 5:58 p.m. UTC | #4
Guinevere Larsen <guinevere@redhat.com> writes:

> GCC has deprecated stabs generation in GCC 12 and entirely removed it in
> GCC 13, which was released in April 2023. At the time it was proposed
> that GDB deprecate stabs as well, but the decision was to support it a
> bit longer. With this patch, it'll be deprecated on GDB 17, and removed
> on GDB 18, which following the current cadence, will be released early
> 2026, meaning we will have supported stabs for nearly 3 years longer
> than GCC, which I think is reasonable.
>
> As pointed out in the previous discussion on this topic[1], there are
> several existing issues on the code, and none of the current maintainers
> knows how to fix it.  Unless someone steps up to fix this before the
> removal on GDB 18, I don't see why we should keep this old code that
> breaks all conventions of modern debuginfo readers and doesn't even
> work, instead of being able to further advance adjacent code.

I'm in favour of this.  Like Tom said, lets give folk a chance to object
before merging this, but hopefully this should allow removal of some old
code.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


>
> [1] https://inbox.sourceware.org/gdb-patches/20230119174156.654402-1-tom@tromey.com/
> ---
>  gdb/NEWS | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index f454846646e..685ecefbe1c 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -44,6 +44,9 @@ maintenance check symtabs
>    ** New constant PARAM_COLOR represents color type of a value
>       of a <gdb:parameter> object.  Parameter's value is <gdb::color> instance.
>  
> +* Support for stabs debugging format is deprecates, and will be
> +  removed in GDB 18.
> +
>  *** Changes in GDB 16
>  
>  * Support for Nios II targets has been removed as this architecture
> -- 
> 2.47.1
  
Tom de Vries Jan. 20, 2025, 5:22 a.m. UTC | #5
On 1/13/25 19:13, Guinevere Larsen wrote:
> GCC has deprecated stabs generation in GCC 12 and entirely removed it in
> GCC 13, which was released in April 2023. At the time it was proposed
> that GDB deprecate stabs as well, but the decision was to support it a
> bit longer. With this patch, it'll be deprecated on GDB 17, and removed
> on GDB 18, which following the current cadence, will be released early
> 2026, meaning we will have supported stabs for nearly 3 years longer
> than GCC, which I think is reasonable.
> 
> As pointed out in the previous discussion on this topic[1], there are
> several existing issues on the code, and none of the current maintainers
> knows how to fix it.  Unless someone steps up to fix this before the
> removal on GDB 18, I don't see why we should keep this old code that
> breaks all conventions of modern debuginfo readers and doesn't even
> work, instead of being able to further advance adjacent code.
> 

Hi Gwen,

please add the bug tag for PR31210 - "[gdb, symtab] Deprecate stabs":

   Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31210

Thanks,
- Tom


> [1] https://inbox.sourceware.org/gdb-patches/20230119174156.654402-1-tom@tromey.com/
> ---
>   gdb/NEWS | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index f454846646e..685ecefbe1c 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -44,6 +44,9 @@ maintenance check symtabs
>     ** New constant PARAM_COLOR represents color type of a value
>        of a <gdb:parameter> object.  Parameter's value is <gdb::color> instance.
>   
> +* Support for stabs debugging format is deprecates, and will be
> +  removed in GDB 18.
> +
>   *** Changes in GDB 16
>   
>   * Support for Nios II targets has been removed as this architecture
  
Guinevere Larsen Jan. 27, 2025, 12:08 p.m. UTC | #6
Ping.

I'm planning on pushing this next monday, so if anyone has negative 
feedback on this, speak now or forever hold your peace.
  

Patch

diff --git a/gdb/NEWS b/gdb/NEWS
index f454846646e..685ecefbe1c 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -44,6 +44,9 @@  maintenance check symtabs
   ** New constant PARAM_COLOR represents color type of a value
      of a <gdb:parameter> object.  Parameter's value is <gdb::color> instance.
 
+* Support for stabs debugging format is deprecates, and will be
+  removed in GDB 18.
+
 *** Changes in GDB 16
 
 * Support for Nios II targets has been removed as this architecture