Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove some "stabsread" references
Date: Thu, 23 Jul 2026 12:31:51 -0300	[thread overview]
Message-ID: <ead33b4a-6556-4694-8b24-7e90149b431a@redhat.com> (raw)
In-Reply-To: <20260716201710.986896-1-tromey@adacore.com>

On 7/16/26 5:17 PM, Tom Tromey wrote:
> I noticed a stray reference to "stabsread".  This patch removes these.
>
> I also removed a bit of Ada code that, I believe, was only relevant to
> the stabs reader.

This seems pretty obvious. Especially since the comment in symtab.h (at 
least to me), implies that m_size is only used for stabsread, so it 
feels more accurate now.

Reviewed-By: Guinevere Larsen <guinevere@redhat.com>

> ---
>   gdb/ada-lang.c | 5 -----
>   gdb/gdbtypes.h | 4 ++--
>   gdb/symtab.h   | 4 +---
>   3 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
> index 85b08af8c06..b6de3b9e0fb 100644
> --- a/gdb/ada-lang.c
> +++ b/gdb/ada-lang.c
> @@ -3328,11 +3328,6 @@ ada_index_type (struct type *type, int n, const char *name)
>   	  type = type->target_type ();
>   	}
>         result_type = ada_check_typedef (type)->index_type ()->target_type ();
> -      /* FIXME: The stabs type r(0,0);bound;bound in an array type
> -	 has a target type of TYPE_CODE_UNDEF.  We compensate here, but
> -	 perhaps stabsread.c would make more sense.  */
> -      if (result_type && result_type->code () == TYPE_CODE_UNDEF)
> -	result_type = NULL;
>       }
>     else
>       {
> diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
> index 572bf6d3d6f..f2132e63e8c 100644
> --- a/gdb/gdbtypes.h
> +++ b/gdb/gdbtypes.h
> @@ -1611,8 +1611,8 @@ struct fn_fieldlist
>   {
>   
>     /* The overloaded name.
> -     This is generally allocated in the objfile's obstack.
> -     However stabsread.c sometimes uses malloc.  */
> +     This is generally allocated in the objfile's obstack, but it
> +     could also be statically allocated.  */
>   
>     const char *name;
>   
> diff --git a/gdb/symtab.h b/gdb/symtab.h
> index 7b96b8c989c..6443216fd7f 100644
> --- a/gdb/symtab.h
> +++ b/gdb/symtab.h
> @@ -803,9 +803,7 @@ struct minimal_symbol : public general_symbol_info
>       m_target_flag_2 = target_flag_2;
>     }
>   
> -  /* Size of this symbol.  stabs_end_psymtab in stabsread.c uses this
> -     information to calculate the end of the partial symtab based on the
> -     address of the last symbol plus the size of the last symbol.  */
> +  /* Size of this symbol.  */
>   
>     unsigned long m_size;
>   
>
> base-commit: a9b7bbb1729d5ac6d3623bfe56a54d8b9936f160


-- 
Cheers,
Guinevere Larsen
it/its
she/her (deprecated)


  reply	other threads:[~2026-07-23 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 20:17 Tom Tromey
2026-07-23 15:31 ` Guinevere Larsen [this message]
2026-07-23 16:01   ` Tom Tromey

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=ead33b4a-6556-4694-8b24-7e90149b431a@redhat.com \
    --to=guinevere@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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