* ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
[deliverable/binutils-gdb.git] / gdb / c-valprint.c
index cd4c85a5fb3587864bea4af9c7ef498f11eadd83..30a1be74076e8f6c003f26de325e43a1184c301f 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, 2007
+   1998, 1999, 2000, 2001, 2003, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -47,7 +47,7 @@ print_function_pointer_address (CORE_ADDR address, struct ui_file *stream)
   if (addressprint && func_addr != address)
     {
       fputs_filtered ("@", stream);
-      deprecated_print_address_numeric (address, 1, stream);
+      fputs_filtered (paddress (address), stream);
       fputs_filtered (": ", stream);
     }
   print_address_demangle (func_addr, stream, demangle);
@@ -228,9 +228,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
            }
 
          if (addressprint)
-           {
-             deprecated_print_address_numeric (addr, 1, stream);
-           }
+           fputs_filtered (paddress (addr), stream);
 
          /* For a pointer to a textual type, also print the string
             pointed to, unless pointer is null.  */
@@ -263,8 +261,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
                  int is_this_fld;
 
                  if (msymbol != NULL)
-                   wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
-                                         VAR_DOMAIN, &is_this_fld, NULL);
+                   wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), block,
+                                         VAR_DOMAIN, &is_this_fld);
 
                  if (wsym)
                    {
@@ -276,7 +274,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
                    }
                  vt_val = value_at (wtype, vt_address);
                  common_val_print (vt_val, stream, format,
-                                   deref_ref, recurse + 1, pretty);
+                                   deref_ref, recurse + 1, pretty,
+                                   current_language);
                  if (pretty)
                    {
                      fprintf_filtered (stream, "\n");
@@ -299,7 +298,7 @@ c_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);
        }
@@ -314,7 +313,7 @@ c_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);
+                               recurse, pretty, current_language);
            }
          else
            fputs_filtered ("???", stream);
@@ -474,6 +473,13 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
        }
       break;
 
+    case TYPE_CODE_DECFLOAT:
+      if (format)
+       print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
+      else
+       print_decimal_floating (valaddr + embedded_offset, type, stream);
+      break;
+
     case TYPE_CODE_VOID:
       fprintf_filtered (stream, "void");
       break;
@@ -613,7 +619,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
          /* Print out object: enclosing type is same as real_type if full */
          return val_print (value_enclosing_type (val),
                            value_contents_all (val), 0,
-                           VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
+                           VALUE_ADDRESS (val), stream, format, 1, 0,
+                           pretty, current_language);
           /* Note: When we look up RTTI entries, we don't get any information on
              const or volatile attributes */
        }
@@ -624,7 +631,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
                            TYPE_NAME (value_enclosing_type (val)));
          return val_print (value_enclosing_type (val),
                            value_contents_all (val), 0,
-                           VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
+                           VALUE_ADDRESS (val), stream, format, 1, 0,
+                           pretty, current_language);
        }
       /* Otherwise, we end up at the return outside this "if" */
     }
@@ -632,5 +640,5 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
   return val_print (type, value_contents_all (val),
                    value_embedded_offset (val),
                    VALUE_ADDRESS (val) + value_offset (val),
-                   stream, format, 1, 0, pretty);
+                   stream, format, 1, 0, pretty, current_language);
 }
This page took 0.025734 seconds and 4 git commands to generate.