* symfile.c (add_psymbol_to_bcache): Return a const pointer. Use
[deliverable/binutils-gdb.git] / gdb / f-valprint.c
index f3d006777de7343708709d7f1adf7e641d81a70a..2c482fa83a24d628e14a5eecc15d6f27d299653e 100644 (file)
@@ -1,7 +1,7 @@
 /* Support for printing Fortran values for GDB, the GNU debugger.
 
    Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2003, 2005, 2006,
-   2007 Free Software Foundation, Inc.
+   2007, 2008 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
@@ -308,7 +308,8 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
                     valaddr + i * F77_DIM_OFFSET (ndimensions),
                     0,
                     address + i * F77_DIM_OFFSET (ndimensions),
-                    stream, format, deref_ref, recurse, pretty);
+                    stream, format, deref_ref, recurse, pretty,
+                    current_language);
 
          if (i != (F77_DIM_SIZE (nss) - 1))
            fprintf_filtered (stream, ", ");
@@ -407,7 +408,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
            }
 
          if (addressprint && format != 's')
-           deprecated_print_address_numeric (addr, 1, stream);
+           fputs_filtered (paddress (addr), stream);
 
          /* For a pointer to char or unsigned char, also print the string
             pointed to, unless pointer is null.  */
@@ -431,7 +432,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
          CORE_ADDR addr
            = extract_typed_address (valaddr + embedded_offset, type);
          fprintf_filtered (stream, "@");
-         deprecated_print_address_numeric (addr, 1, stream);
+         fputs_filtered (paddress (addr), stream);
          if (deref_ref)
            fputs_filtered (": ", stream);
        }
@@ -446,7 +447,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
               unpack_pointer (lookup_pointer_type (builtin_type_void),
                               valaddr + embedded_offset));
              common_val_print (deref_val, stream, format, deref_ref, recurse,
-                               pretty);
+                               pretty, current_language);
            }
          else
            fputs_filtered ("???", stream);
@@ -589,9 +590,10 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       break;
 
     case TYPE_CODE_STRUCT:
+    case TYPE_CODE_UNION:
       /* Starting from the Fortran 90 standard, Fortran supports derived
          types.  */
-      fprintf_filtered (stream, "{ ");
+      fprintf_filtered (stream, "( ");
       for (index = 0; index < TYPE_NFIELDS (type); index++)
         {
           int offset = TYPE_FIELD_BITPOS (type, index) / 8;
@@ -601,7 +603,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
           if (index != TYPE_NFIELDS (type) - 1)
             fputs_filtered (", ", stream);
         }
-      fprintf_filtered (stream, "}");
+      fprintf_filtered (stream, " )");
       break;     
 
     default:
This page took 0.026149 seconds and 4 git commands to generate.