diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-13 06:25:07 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-14 12:12:34 -0600 |
commit | 3b1bdd53b5a9f0798a9315fa9309d2979045aeaf (patch) | |
tree | 10402986d9c10151e109f8df304b0cded1903ed2 /gdb/valprint.c | |
parent | 94ea6ddb944d985890632708865ffef4436f98c3 (diff) | |
download | binutils-3b1bdd53b5a9f0798a9315fa9309d2979045aeaf.zip binutils-3b1bdd53b5a9f0798a9315fa9309d2979045aeaf.tar.gz binutils-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.c | 12 |
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; |