* valprint.c (val_print): Remove inaccurate comment about what
authorJim Kingdon <jkingdon@engr.sgi.com>
Sat, 26 Mar 1994 01:23:06 +0000 (01:23 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Sat, 26 Mar 1994 01:23:06 +0000 (01:23 +0000)
types can be stub types.

gdb/valprint.c

index 1d1fbc0864d2f974dda0fef723e32ab19775c5cc..999c9dd124ad03e24c2926551f5d5ba5ee4e41a2 100644 (file)
@@ -136,8 +136,7 @@ val_print (type, valaddr, address, stream, format, deref_ref, recurse, pretty)
 
   /* Ensure that the type is complete and not just a stub.  If the type is
      only a stub and we can't find and substitute its complete type, then
-     print appropriate string and return.  Typical types that my be stubs
-     are structs, unions, and C++ methods. */
+     print appropriate string and return.  */
 
   check_stub_type (type);
   if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
@@ -798,7 +797,12 @@ val_print_string (addr, len, stream)
            ++addr;
            ++bufptr;
            if (bufptr[-1] == '\0')
-             break;
+             {
+               /* We don't care about any error which happened after
+                  the NULL terminator.  */
+               errcode = 0;
+               break;
+             }
          }
       }
   } while (errcode == 0                                        /* no error */