From: Tom Tromey Date: Sun, 17 Aug 2025 17:38:15 +0000 (-0600) Subject: Use type-specific lookups in cp-support.c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39ba411286f0560d4f37cf35c78813bb4f43c291;p=thirdparty%2Fbinutils-gdb.git Use type-specific lookups in cp-support.c cp-support.c has code to substitute types for typedef names when canonicalizing a C++ name. I believe this code can use type-specific search domains; and doing this greatly speeds up some cases. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33081 --- diff --git a/gdb/cp-support.c b/gdb/cp-support.c index be66be95d61..7ed15eef173 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -150,7 +150,8 @@ inspect_type (struct demangle_parse_info *info, try { - sym = lookup_symbol (name, 0, SEARCH_VFT, 0).symbol; + sym = lookup_symbol (name, 0, (SEARCH_TYPE_DOMAIN + | SEARCH_STRUCT_DOMAIN), 0).symbol; } catch (const gdb_exception &except) { @@ -504,7 +505,8 @@ replace_typedefs (struct demangle_parse_info *info, try { sym = lookup_symbol (local_name.get (), 0, - SEARCH_VFT, 0).symbol; + (SEARCH_TYPE_DOMAIN + | SEARCH_STRUCT_DOMAIN), 0).symbol; } catch (const gdb_exception &except) {