summaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-13 06:42:19 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 12:12:34 -0600
commitb17c7ab3808f5b781537514b28695dafaa29cb28 (patch)
tree4d542aeb0071db24f24d08333ab99198ad4b0cf6 /gdb/target.c
parent9da74023eb9378315d6b7e1bae02f52cfecc8bd1 (diff)
Move target_read_string to target/target.c
This moves the two overloads of target_read_string to a new file, target/target.c, and updates both gdb and gdbserver to build this.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 5a416d5ee3..7d291fd4d0 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1394,25 +1394,6 @@ target_xfer_status_to_string (enum target_xfer_status status)
};
-/* See target.h. */
-
-gdb::unique_xmalloc_ptr<char>
-target_read_string (CORE_ADDR memaddr, int len, int *bytes_read)
-{
- gdb::unique_xmalloc_ptr<gdb_byte> buffer;
-
- int ignore;
- if (bytes_read == nullptr)
- bytes_read = &ignore;
-
- /* Note that the endian-ness does not matter here. */
- int errcode = target_read_string (memaddr, -1, 1, len, &buffer, bytes_read);
- if (errcode != 0)
- return {};
-
- return gdb::unique_xmalloc_ptr<char> ((char *) buffer.release ());
-}
-
const target_section_table *
target_get_section_table (struct target_ops *target)
{