diff options
author | Pedro Alves <palves@redhat.com> | 2017-07-19 00:39:26 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-07-19 00:47:08 +0100 |
commit | 6d783f5d7d980989b16a480fb7e103ee50fdcd15 (patch) | |
tree | 49f50b537a6b2f4ae14900fd6ccee92d8d76c3e9 | |
parent | 6d3bce85c371fbfb23b799d69376aa5fa74dfac2 (diff) | |
download | binutils-gdb-users/palves/cp-linespec-for-keiths.tar.gz |
lookup_encodedusers/palves/cp-linespec-for-keiths
-rw-r--r-- | gdb/ada-lang.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index db3e344d681..2b42f3695f0 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5891,11 +5891,20 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block, { struct block_symbol *candidates; int n_candidates; + std::string verbatim; + + /* Since we already have an encoded name, force a verbatim match, to + avoid a double encoding. */ + verbatim.reserve (1 + strlen (name) + 1); + verbatim += "<"; + verbatim += name; + verbatim += ">"; gdb_assert (info != NULL); memset (info, 0, sizeof (struct block_symbol)); - n_candidates = ada_lookup_symbol_list (name, block, domain, &candidates); + n_candidates = ada_lookup_symbol_list (verbatim.c_str (), + block, domain, &candidates); if (n_candidates == 0) return; |