diff options
author | Tom Tromey <tromey@adacore.com> | 2020-06-15 06:28:09 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-06-15 06:28:09 -0600 |
commit | f5272a3bb3928e8e45a122c19aa72a00a23a9d4d (patch) | |
tree | 99e7e7b4f363afdc8929b9557860af4bfed3f23a /gdb/ada-valprint.c | |
parent | ff08abb8a2cdb449314b68ebc6ba8edf475fb415 (diff) | |
download | gdb-f5272a3bb3928e8e45a122c19aa72a00a23a9d4d.zip gdb-f5272a3bb3928e8e45a122c19aa72a00a23a9d4d.tar.gz gdb-f5272a3bb3928e8e45a122c19aa72a00a23a9d4d.tar.bz2 |
Remove read_memory_string
read_memory_string is redundant and only called in a couple of spots.
This patch removes it in favor of target_read_string.
gdb/ChangeLog
2020-06-15 Tom Tromey <tromey@adacore.com>
* corefile.c (read_memory_string): Remove.
* ada-valprint.c (ada_value_print_ptr): Update.
* ada-lang.h (ada_tag_name): Change return type.
* ada-lang.c (type_from_tag): Update.
(ada_tag_name_from_tsd): Change return type. Use
target_read_string.
(ada_tag_name): Likewise.
* gdbcore.h (read_memory_string): Don't declare.
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r-- | gdb/ada-valprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index a36e7ca..61893d5 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -754,10 +754,10 @@ ada_value_print_ptr (struct value *val, struct type *type = ada_check_typedef (value_type (val)); if (ada_is_tag_type (type)) { - const char *name = ada_tag_name (val); + gdb::unique_xmalloc_ptr<char> name = ada_tag_name (val); if (name != NULL) - fprintf_filtered (stream, " (%s)", name); + fprintf_filtered (stream, " (%s)", name.get ()); } } |