aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-11-10 11:58:47 -0700
committerTom Tromey <tromey@adacore.com>2023-12-06 10:14:24 -0700
commit957ce53750b7c92640d9e7c7b6169366ef1788b0 (patch)
treeb9984e992fa9afcf8bf296db1f3286bf5e195367 /gdb/ada-lang.h
parent47cd8fcf54b0ea6b5c4e576e194022500211f06e (diff)
downloadbinutils-957ce53750b7c92640d9e7c7b6169366ef1788b0.zip
binutils-957ce53750b7c92640d9e7c7b6169366ef1788b0.tar.gz
binutils-957ce53750b7c92640d9e7c7b6169366ef1788b0.tar.bz2
Always use expand_symtabs_matching in ada-lang.c
The previous patch fixed the immediate performance problem with Ada name matching, by having a subset of matches call expand_symtabs_matching rather than expand_matching_symbols. However, it seemed to me that expand_matching_symbols should not be needed at all. To achieve this, this patch changes ada_lookup_name_info::split_name to use the decoded name, rather than the encoded name. In order to make this work correctly, a new decoded form is used: one that does not decode operators (this is already done) and also does not decode wide characters. The latter change is done so that changes to the Ada source charset don't affect the DWARF index. With this in place, we can change ada-lang.c to always use expand_symtabs_matching rather than expand_matching_symbols.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 9eb9326..14a0be4 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -216,10 +216,18 @@ extern const char *ada_decode_symbol (const struct general_symbol_info *);
the name does not appear to be GNAT-encoded, then the result
depends on WRAP. If WRAP is true (the default), then the result is
simply wrapped in <...>. If WRAP is false, then the empty string
- will be returned. Also, when OPERATORS is false, operator names
- will not be decoded. */
+ will be returned.
+
+ When OPERATORS is false, operator names will not be decoded. By
+ default, they are decoded, e.g., 'Oadd' will be transformed to
+ '"+"'.
+
+ When WIDE is false, wide characters will be left as-is. By
+ default, they converted from their hex encoding to the host
+ charset. */
extern std::string ada_decode (const char *name, bool wrap = true,
- bool operators = true);
+ bool operators = true,
+ bool wide = true);
extern std::vector<struct block_symbol> ada_lookup_symbol_list
(const char *, const struct block *, domain_enum);