public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Only search types in lookup_typename
@ 2024-01-28 23:45 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-01-28 23:45 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9edce54e75b119e40d18a4564cd65cd747802c9c

commit 9edce54e75b119e40d18a4564cd65cd747802c9c
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Sep 19 17:46:38 2023 -0600

    Only search types in lookup_typename
    
    This changes lookup_typename to only look for types.  The check for
    LOC_TYPEDEF can now also be removed, because only types will appear in
    TYPE_DOMAIN.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24870

Diff:
---
 gdb/gdbtypes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 970a9e4a4a5..a48c4c8abf2 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1655,9 +1655,9 @@ lookup_typename (const struct language_defn *language,
 {
   struct symbol *sym;
 
-  sym = lookup_symbol_in_language (name, block, SEARCH_VFT,
+  sym = lookup_symbol_in_language (name, block, SEARCH_TYPE_DOMAIN,
 				   language->la_language, NULL).symbol;
-  if (sym != NULL && sym->aclass () == LOC_TYPEDEF)
+  if (sym != nullptr)
     {
       struct type *type = sym->type ();
       /* Ensure the length of TYPE is valid.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-28 23:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 23:45 [binutils-gdb] Only search types in lookup_typename 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).