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 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)
 		{