diff options
author | Tom Tromey <tom@tromey.com> | 2023-09-19 17:39:31 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-28 10:58:17 -0700 |
commit | 033bc67bdb0c74d1c63a1998a7e9679a408ba6e4 (patch) | |
tree | a31e7fc8375d5075a99b363c01657fd33c5a7d88 | |
parent | e11de080a35f08c016e90d11f18918ec78fd1efc (diff) | |
download | gdb-033bc67bdb0c74d1c63a1998a7e9679a408ba6e4.zip gdb-033bc67bdb0c74d1c63a1998a7e9679a408ba6e4.tar.gz gdb-033bc67bdb0c74d1c63a1998a7e9679a408ba6e4.tar.bz2 |
Only search types in cp_lookup_rtti_type
This changes cp_lookup_rtti_type to only search for types -- not
functions or variables. Due to the symbol-matching hack, this could
just use SEARCH_TYPE_DOMAIN, but I think it's better to be clear; also
I hold on to some hope that perhaps the hack can someday be removed.
-rw-r--r-- | gdb/cp-support.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 9a59d76..6b7c2f5 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1498,9 +1498,9 @@ cp_lookup_rtti_type (const char *name, const struct block *block) struct symbol * rtti_sym; struct type * rtti_type; - /* Use VAR_DOMAIN here as NAME may be a typedef. PR 18141, 18417. - Classes "live" in both STRUCT_DOMAIN and VAR_DOMAIN. */ - rtti_sym = lookup_symbol (name, block, SEARCH_VFT, NULL).symbol; + rtti_sym = lookup_symbol (name, block, + SEARCH_TYPE_DOMAIN | SEARCH_STRUCT_DOMAIN, + nullptr).symbol; if (rtti_sym == NULL) { |