mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
Use exact match in get_var_value
get_var_value is only used when an exact match is needed. This changes this function to ensure this sort of matching is done. gdb/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * ada-lang.c (get_var_value): Only consider exact matches.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2020-12-14 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
* ada-lang.c (get_var_value): Only consider exact matches.
|
||||||
|
|
||||||
2020-12-14 Tom Tromey <tromey@adacore.com>
|
2020-12-14 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* dwarf2/read.c (rewrite_array_type): New function.
|
* dwarf2/read.c (rewrite_array_type): New function.
|
||||||
|
@ -11351,14 +11351,16 @@ scan_discrim_bound (const char *str, int k, struct value *dval, LONGEST * px,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Value of variable named NAME in the current environment. If
|
/* Value of variable named NAME. Only exact matches are considered.
|
||||||
no such variable found, then if ERR_MSG is null, returns 0, and
|
If no such variable found, then if ERR_MSG is null, returns 0, and
|
||||||
otherwise causes an error with message ERR_MSG. */
|
otherwise causes an error with message ERR_MSG. */
|
||||||
|
|
||||||
static struct value *
|
static struct value *
|
||||||
get_var_value (const char *name, const char *err_msg)
|
get_var_value (const char *name, const char *err_msg)
|
||||||
{
|
{
|
||||||
lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
|
std::string quoted_name = add_angle_brackets (name);
|
||||||
|
|
||||||
|
lookup_name_info lookup_name (quoted_name, symbol_name_match_type::FULL);
|
||||||
|
|
||||||
std::vector<struct block_symbol> syms;
|
std::vector<struct block_symbol> syms;
|
||||||
int nsyms = ada_lookup_symbol_list_worker (lookup_name,
|
int nsyms = ada_lookup_symbol_list_worker (lookup_name,
|
||||||
|
Reference in New Issue
Block a user