aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-13 06:25:07 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 12:12:34 -0600
commit3b1bdd53b5a9f0798a9315fa9309d2979045aeaf (patch)
tree10402986d9c10151e109f8df304b0cded1903ed2 /gdb/valprint.c
parent94ea6ddb944d985890632708865ffef4436f98c3 (diff)
downloadgdb-3b1bdd53b5a9f0798a9315fa9309d2979045aeaf.zip
gdb-3b1bdd53b5a9f0798a9315fa9309d2979045aeaf.tar.gz
gdb-3b1bdd53b5a9f0798a9315fa9309d2979045aeaf.tar.bz2
Rename read_string
This renames read_string to be an overload of target_read_string. This makes it more consistent for the eventual merger with gdbserver.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 65b85cf..a4c0f7b 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2050,9 +2050,11 @@ partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr,
failure happened. Check BYTES_READ to recognize this situation. */
int
-read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit,
- enum bfd_endian byte_order, gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
- int *bytes_read)
+target_read_string (CORE_ADDR addr, int len, int width,
+ unsigned int fetchlimit,
+ enum bfd_endian byte_order,
+ gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
+ int *bytes_read)
{
int errcode; /* Errno returned from bad reads. */
unsigned int nfetch; /* Chars to fetch / chars fetched. */
@@ -2731,8 +2733,8 @@ val_print_string (struct type *elttype, const char *encoding,
fetchlimit = (len == -1 ? options->print_max : std::min ((unsigned) len,
options->print_max));
- err = read_string (addr, len, width, fetchlimit, byte_order,
- &buffer, &bytes_read);
+ err = target_read_string (addr, len, width, fetchlimit, byte_order,
+ &buffer, &bytes_read);
addr += bytes_read;