aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-08-28 15:40:31 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-09-23 13:36:34 -0500
commitf945dedfd3512bfbca0f1405c8ea85684980e69a (patch)
tree706c59bb9ef87edd16339939c6b547c72494bfcd /gdb/ada-exp.y
parent4a41f3face78a551ea5c85db24125989754f2ee8 (diff)
downloadgdb-f945dedfd3512bfbca0f1405c8ea85684980e69a.zip
gdb-f945dedfd3512bfbca0f1405c8ea85684980e69a.tar.gz
gdb-f945dedfd3512bfbca0f1405c8ea85684980e69a.tar.bz2
Make ada_decode not use a static buffer
This makes it safer to use in general, and also allows using it on a background thread in the future. Inspired by tromey's patch at: https://github.com/tromey/gdb/commit/1226cbdfa436297a5dec054d94592c45891afa93 (however, implemented in a different way) gdb/ChangeLog: 2019-09-23 Christian Biesinger <cbiesinger@google.com> * ada-exp.y (write_object_remaining): Update. * ada-lang.c (ada_decode): Return a std::string instead of a char* and eliminate the static buffer. (ada_decode_symbol): Update. (ada_la_decode): Update. (ada_sniff_from_mangled_name): Update. (is_valid_name_for_wild_match): Update. (ada_lookup_name_info::matches): Update and simplify. (name_matches_regex): Update. (ada_add_global_exceptions): Update. * ada-lang.h (ada_decode): Update signature. * ada-varobj.c (ada_varobj_describe_simple_array_child): Update. * dwarf-index-write.c (debug_names::insert): Update.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index c8a7b9c..160e64b 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -816,7 +816,7 @@ write_object_renaming (struct parser_state *par_state,
renamed_entity_len);
ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
if (sym_info.symbol == NULL)
- error (_("Could not find renamed variable: %s"), ada_decode (name));
+ error (_("Could not find renamed variable: %s"), ada_decode (name).c_str ());
else if (SYMBOL_CLASS (sym_info.symbol) == LOC_TYPEDEF)
/* We have a renaming of an old-style renaming symbol. Don't
trust the block information. */