From 8a3df5acae7ad08f691b449c7e6f8e38fb1b8cb1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 Jun 2021 08:01:15 -0600 Subject: 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 * ada-lang.c (ada_decode): Add wrap parameter. * ada-lang.h (ada_decode): Add wrap parameter. --- gdb/ada-lang.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gdb/ada-lang.h') 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 ada_lookup_symbol_list (const char *, const struct block *, domain_enum); -- cgit v1.1