2007-06-13 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / c-valprint.c
index 655786f81bcc8f63028832158a5d11eee799f60e..ad5e4d16edac22a5ac577d2ddcb3d94c0baa281b 100644 (file)
@@ -1,7 +1,7 @@
 /* Support for printing C values for GDB, the GNU debugger.
 
-   Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2003, 2005, 2006
+   Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+   1998, 1999, 2000, 2001, 2003, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -96,7 +96,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
            }
          /* For an array of chars, print with string syntax.  */
          if (eltlen == 1 &&
-             ((TYPE_CODE (elttype) == TYPE_CODE_INT)
+             ((TYPE_CODE (elttype) == TYPE_CODE_INT && TYPE_NOSIGN (elttype))
               || ((current_language->la_language == language_m2)
                   && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
              && (format == 0 || format == 's'))
@@ -556,6 +556,9 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
        }
     }
 
+  if (!value_initialized (val))
+    fprintf_filtered (stream, " [uninitialized] ");
+
   if (objectprint && (TYPE_CODE (type) == TYPE_CODE_CLASS))
     {
       /* Attempt to determine real type of object */
This page took 0.025138 seconds and 4 git commands to generate.