summaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index d3fce8d05e3..c974657dbcd 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1549,10 +1549,14 @@ write_var_or_type (struct parser_state *par_state,
int terminator = encoded_name[tail_index];
encoded_name[tail_index] = '\0';
- std::vector<struct block_symbol> syms
- = ada_lookup_symbol_list (encoded_name, block, VAR_DOMAIN);
+ /* In order to avoid double-encoding, we want to only pass
+ the decoded form to lookup functions. */
+ std::string decoded_name = ada_decode (encoded_name);
encoded_name[tail_index] = terminator;
+ std::vector<struct block_symbol> syms
+ = ada_lookup_symbol_list (decoded_name.c_str (), block, VAR_DOMAIN);
+
type_sym = select_possible_type_sym (syms);
if (type_sym != NULL)
@@ -1626,7 +1630,7 @@ write_var_or_type (struct parser_state *par_state,
else if (syms.empty ())
{
struct bound_minimal_symbol msym
- = ada_lookup_simple_minsym (encoded_name);
+ = ada_lookup_simple_minsym (decoded_name.c_str ());
if (msym.minsym != NULL)
{
par_state->push_new<ada_var_msym_value_operation> (msym);