diff options
author | Dmitry Neverov <dmitry.neverov@jetbrains.com> | 2024-05-06 17:09:19 +0200 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-05-17 08:02:30 -0600 |
commit | 1cd542c8e9a40a4deff1709bf6e9344c5e79f7d6 (patch) | |
tree | 479169c728153bc8a0209f0e348d59eaf1b61f70 /gdb/dwarf2 | |
parent | 5d0e1642037299741331fa6e76f68c0b1180b9e5 (diff) | |
download | gdb-1cd542c8e9a40a4deff1709bf6e9344c5e79f7d6.zip gdb-1cd542c8e9a40a4deff1709bf6e9344c5e79f7d6.tar.gz gdb-1cd542c8e9a40a4deff1709bf6e9344c5e79f7d6.tar.bz2 |
gdb/symtab: compute match_type outside the loop
It will be used for all segments in a qualified name,
not only the last one.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index a49ade9..f2842f0 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -16637,6 +16637,9 @@ cooked_index_functions::expand_symtabs_matching language_ada }; + symbol_name_match_type match_type + = lookup_name_without_params.match_type (); + for (enum language lang : unique_styles) { std::vector<std::string_view> name_vec @@ -16693,8 +16696,6 @@ cooked_index_functions::expand_symtabs_matching "x::a::b". */ if (symbol_matcher == nullptr) { - symbol_name_match_type match_type - = lookup_name_without_params.match_type (); if ((match_type == symbol_name_match_type::FULL || (lang != language_ada && match_type == symbol_name_match_type::EXPRESSION))) |