aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-09-19 17:46:38 -0600
committerTom Tromey <tom@tromey.com>2024-01-28 10:58:17 -0700
commit9edce54e75b119e40d18a4564cd65cd747802c9c (patch)
tree3612e2992073a54ccab1f3e11f271ba4e0f57dec /gdb/gdbtypes.c
parent033bc67bdb0c74d1c63a1998a7e9679a408ba6e4 (diff)
downloadgdb-9edce54e75b119e40d18a4564cd65cd747802c9c.zip
gdb-9edce54e75b119e40d18a4564cd65cd747802c9c.tar.gz
gdb-9edce54e75b119e40d18a4564cd65cd747802c9c.tar.bz2
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
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 970a9e4..a48c4c8 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. */