From 39ba411286f0560d4f37cf35c78813bb4f43c291 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 17 Aug 2025 11:38:15 -0600 Subject: 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 --- gdb/cp-support.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/cp-support.c b/gdb/cp-support.c index be66be9..7ed15ee 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) { -- cgit v1.1