+2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
+
+ * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
+
2017-10-13 Yao Qi <yao.qi@linaro.org>
* features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
print_dynamic_range_bound (struct type *type, const char *name, int name_len,
const char *suffix, struct ui_file *stream)
{
- static char *name_buf = NULL;
- static size_t name_buf_len = 0;
LONGEST B;
+ std::string name_buf (name, name_len);
+ name_buf += suffix;
- GROW_VECT (name_buf, name_buf_len, name_len + strlen (suffix) + 1);
- strncpy (name_buf, name, name_len);
- strcpy (name_buf + name_len, suffix);
-
- if (get_int_var_value (name_buf, B))
+ if (get_int_var_value (name_buf.c_str (), B))
ada_print_scalar (type, B, stream);
else
fprintf_filtered (stream, "?");