diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-01 18:56:33 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-01 18:56:33 +0000 |
commit | c84539ee9c132c69c51883fa5ab2ba6ab6003aef (patch) | |
tree | 27f1a6b37b90846af2b684672c38d73279448873 /gdb | |
parent | e3d6ec4a0d275ca63d52247b7efc16ccc392c9aa (diff) | |
download | gdb-c84539ee9c132c69c51883fa5ab2ba6ab6003aef.zip gdb-c84539ee9c132c69c51883fa5ab2ba6ab6003aef.tar.gz gdb-c84539ee9c132c69c51883fa5ab2ba6ab6003aef.tar.bz2 |
* valprint.c (val_print_string): If errcode is set, always print
an error, regardless of force_ellipsis. In the non-EIO case,
just print the error message rather than calling error(). Don't
access *(bufptr-1) if bufptr points to the start of the buffer.
When looking for '\0', don't increment bufptr and addr if bufptr
started out already at limit. If an error happens on fetching the
first character, don't print the string.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/valprint.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index 7db3e3d..ed3cc64 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -728,10 +728,6 @@ val_print_string (addr, len, stream) struct cleanup *old_chain = NULL; /* Top of the old cleanup chain. */ char peekchar; /* Place into which we can read one char. */ - /* If errcode is non-zero, this is the address which failed to read - successfully. */ - CORE_ADDR err_addr; - /* First we need to figure out the limit on the number of characters we are going to attempt to fetch and print. This is actually pretty simple. If LEN is nonzero, then the limit is the minimum of LEN and print_max. If @@ -777,7 +773,6 @@ val_print_string (addr, len, stream) /* Read as much as we can. */ nfetch = target_read_memory_partial (addr, bufptr, nfetch, &errcode); - err_addr = addr + nfetch; if (len != 0) { addr += nfetch; |