[GAS, Arm] CLI with architecture sensitive extensions
[deliverable/binutils-gdb.git] / gdb / valprint.c
index d1d3232e10d7d7d1eb668c6ea2be0bb485b3f799..10020901c2df781033c31d6ee27dbaedae6514d1 100644 (file)
@@ -1,6 +1,6 @@
 /* Print values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2018 Free Software Foundation, Inc.
+   Copyright (C) 1986-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -986,7 +986,6 @@ generic_val_print (struct type *type,
       error (_("Unhandled type code %d in symbol table."),
             TYPE_CODE (type));
     }
-  gdb_flush (stream);
 }
 
 /* Print using the given LANGUAGE the data of type TYPE located at
@@ -1032,7 +1031,6 @@ val_print (struct type *type, LONGEST embedded_offset,
   if (TYPE_STUB (real_type))
     {
       fprintf_filtered (stream, _("<incomplete type>"));
-      gdb_flush (stream);
       return;
     }
 
@@ -1604,6 +1602,7 @@ maybe_negate_by_bytes (const gdb_byte *bytes, unsigned len,
                       gdb::byte_vector *out_vec)
 {
   gdb_byte sign_byte;
+  gdb_assert (len > 0);
   if (byte_order == BFD_ENDIAN_BIG)
     sign_byte = bytes[0];
   else
@@ -2360,13 +2359,13 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream,
 {
   enum bfd_endian byte_order
     = gdbarch_byte_order (get_type_arch (type));
-  gdb_byte *buf;
+  gdb_byte *c_buf;
   int need_escape = 0;
 
-  buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
-  pack_long (buf, type, c);
+  c_buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
+  pack_long (c_buf, type, c);
 
-  wchar_iterator iter (buf, TYPE_LENGTH (type), encoding, TYPE_LENGTH (type));
+  wchar_iterator iter (c_buf, TYPE_LENGTH (type), encoding, TYPE_LENGTH (type));
 
   /* This holds the printable form of the wchar_t data.  */
   auto_obstack wchar_buf;
@@ -2512,7 +2511,7 @@ count_next_character (wchar_iterator *iter,
 
 /* Print the characters in CHARS to the OBSTACK.  QUOTE_CHAR is the quote
    character to use with string output.  WIDTH is the size of the output
-   character type.  BYTE_ORDER is the the target byte order.  OPTIONS
+   character type.  BYTE_ORDER is the target byte order.  OPTIONS
    is the user's print options.  */
 
 static void
@@ -2859,8 +2858,6 @@ val_print_string (struct type *elttype, const char *encoding,
       fprintf_filtered (stream, ">");
     }
 
-  gdb_flush (stream);
-
   return (bytes_read / width);
 }
 \f
This page took 0.02522 seconds and 4 git commands to generate.