* gdb.texinfo (Help): Fix formatting of examples.
[deliverable/binutils-gdb.git] / gdb / ada-valprint.c
index 7321275be04abcddd319e7a3c749c84269556cba..429349a5146f9773a46838c32e050ae3df503ffe 100644 (file)
@@ -1,7 +1,7 @@
 /* Support for printing Ada values for GDB, the GNU debugger.
 
-   Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001,
-   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001, 2002,
+   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -266,7 +266,7 @@ ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
   if (isascii (c) && isprint (c))
     {
       if (c == quoter && c == '"')
-       fprintf_filtered (stream, "[\"%c\"]", quoter);
+       fprintf_filtered (stream, "\"\"");
       else
        fprintf_filtered (stream, "%c", c);
     }
@@ -420,7 +420,8 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
     case TYPE_CODE_SET:
     case TYPE_CODE_STRING:
     case TYPE_CODE_ERROR:
-    case TYPE_CODE_MEMBER:
+    case TYPE_CODE_MEMBERPTR:
+    case TYPE_CODE_METHODPTR:
     case TYPE_CODE_METHOD:
     case TYPE_CODE_REF:
       warning (_("internal error: unhandled type in ada_print_scalar"));
@@ -774,6 +775,13 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
        }
       break;
 
+    case TYPE_CODE_FLAGS:
+      if (format)
+         print_scalar_formatted (valaddr, type, format, 0, stream);
+      else
+       val_print_type_code_flags (type, valaddr, stream);
+      break;
+
     case TYPE_CODE_FLT:
       if (format)
        return c_val_print (type, valaddr0, embedded_offset, address, stream,
This page took 0.023382 seconds and 4 git commands to generate.