aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 1f26394..adacf1d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1146,12 +1146,14 @@ ada_fold_name (gdb::string_view name, bool throw_on_error = false)
return fold_storage.c_str ();
}
-/* The "encoded" form of DECODED, according to GNAT conventions. */
+/* The "encoded" form of DECODED, according to GNAT conventions. If
+ FOLD is true (the default), case-fold any ordinary symbol. Symbols
+ with <...> quoting are not folded in any case. */
std::string
-ada_encode (const char *decoded)
+ada_encode (const char *decoded, bool fold)
{
- if (decoded[0] != '<')
+ if (fold && decoded[0] != '<')
decoded = ada_fold_name (decoded);
return ada_encode_1 (decoded, true);
}