aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-06-25 08:01:15 -0600
committerTom Tromey <tromey@adacore.com>2021-06-25 08:07:21 -0600
commit8a3df5acae7ad08f691b449c7e6f8e38fb1b8cb1 (patch)
treec249b9197a9b8c7dfd719e3328bf91a5390c813f /gdb/ada-lang.h
parent134df964367c19afa2eef81a0841fe1c181a9edc (diff)
downloadgdb-8a3df5acae7ad08f691b449c7e6f8e38fb1b8cb1.zip
gdb-8a3df5acae7ad08f691b449c7e6f8e38fb1b8cb1.tar.gz
gdb-8a3df5acae7ad08f691b449c7e6f8e38fb1b8cb1.tar.bz2
Add non-wrapping mode to ada_decode
When ada_decode encounters a name that it cannot decode, it simply wraps it in <...>, which is used elsewhere in the Ada code to indicate that a verbatim match should be done. A subequent patch needed the ability to suppress this wrapping, so this patch adds a new mode to ada_decode. 2021-06-25 Tom Tromey <tromey@adacore.com> * ada-lang.c (ada_decode): Add wrap parameter. * ada-lang.h (ada_decode): Add wrap parameter.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 156c9b0..a89ed29 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -216,7 +216,12 @@ extern struct type *ada_get_decoded_type (struct type *type);
extern const char *ada_decode_symbol (const struct general_symbol_info *);
-extern std::string ada_decode (const char*);
+/* Decode the GNAT-encoded name NAME, returning the decoded name. If
+ 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. */
+extern std::string ada_decode (const char *name, bool wrap = true);
extern std::vector<struct block_symbol> ada_lookup_symbol_list
(const char *, const struct block *, domain_enum);