aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-06-15 06:28:09 -0600
committerTom Tromey <tromey@adacore.com>2020-06-15 06:28:09 -0600
commit670e35fad9c17e8e166c5a6260201eebcc2ba9e6 (patch)
treecb1bc7136ff9bea87b01fe85aa20238f5296cddc /gdb/valprint.c
parentf5272a3bb3928e8e45a122c19aa72a00a23a9d4d (diff)
downloadbinutils-670e35fad9c17e8e166c5a6260201eebcc2ba9e6.zip
binutils-670e35fad9c17e8e166c5a6260201eebcc2ba9e6.tar.gz
binutils-670e35fad9c17e8e166c5a6260201eebcc2ba9e6.tar.bz2
Rewrite target_read_string
This rewrites target_read_string in terms of read_string. gdb/ChangeLog 2020-06-15 Tom Tromey <tromey@adacore.com> * valprint.c (read_string): Update comment. * target.c (MIN): Remove. (target_read_string): Rewrite.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index d549089..f254980 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2027,13 +2027,7 @@ partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr,
Unless an exception is thrown, BUFFER will always be allocated, even on
failure. In this case, some characters might have been read before the
- failure happened. Check BYTES_READ to recognize this situation.
-
- Note: There was a FIXME asking to make this code use target_read_string,
- but this function is more general (can read past null characters, up to
- given LEN). Besides, it is used much more often than target_read_string
- so it is more tested. Perhaps callers of target_read_string should use
- this function instead? */
+ failure happened. Check BYTES_READ to recognize this situation. */
int
read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit,