Remove redundant test in BFD_ASSERT
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 8624e25b69deeaf9b8ccdb9cac1e9de7b9071b68..959d2e08db4c28dddf752947269b67cad3210159 100644 (file)
@@ -35,6 +35,8 @@
 #include "target.h"
 #include "cp-abi.h"
 #include "valprint.h"
+#include "cp-support.h"
+#include "language.h"
 
 int vtblprint;                 /* Controls printing of vtbl's */
 int objectprint;               /* Controls looking up an object's derived type
@@ -116,7 +118,7 @@ cp_print_class_method (const bfd_byte *valaddr,
              fputs_filtered ("?? <not supported with HP aCC>", stream);
              return;
            }
-         error ("invalid pointer to member function");
+         error (_("invalid pointer to member function"));
        }
       len = TYPE_NFN_FIELDS (domain);
       for (i = 0; i < len; i++)
@@ -318,11 +320,11 @@ cp_print_value_fields (struct type *type, struct type *real_type,
              if (TYPE_FIELD_STATIC (type, i))
                fputs_filtered ("static ", stream);
              fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
-                                      language_cplus,
+                                      current_language->la_language,
                                       DMGL_PARAMS | DMGL_ANSI);
              fputs_filtered ("\" \"", stream);
              fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
-                                      language_cplus,
+                                      current_language->la_language,
                                       DMGL_PARAMS | DMGL_ANSI);
              fputs_filtered ("\") \"", stream);
            }
@@ -333,7 +335,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
              if (TYPE_FIELD_STATIC (type, i))
                fputs_filtered ("static ", stream);
              fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
-                                      language_cplus,
+                                      current_language->la_language,
                                       DMGL_PARAMS | DMGL_ANSI);
              annotate_field_name_end ();
              /* do not print leading '=' in case of anonymous unions */
@@ -543,8 +545,8 @@ cp_print_value (struct type *type, struct type *real_type,
          find_rt_vbase_offset (type, TYPE_BASECLASS (type, i),
                                valaddr, offset, &boffset, &skip);
          if (skip >= 0)
-           error ("Virtual base class offset not found from vtable while"
-                  " printing");
+           error (_("Virtual base class offset not found from vtable while"
+                  " printing"));
          base_valaddr = valaddr;
        }
       else
@@ -665,12 +667,12 @@ cp_print_static_field (struct type *type,
 
       CHECK_TYPEDEF (type);
       cp_print_value_fields (type, type, value_contents_all (val),
-                            VALUE_EMBEDDED_OFFSET (val), VALUE_ADDRESS (val),
+                            value_embedded_offset (val), VALUE_ADDRESS (val),
                             stream, format, recurse, pretty, NULL, 1);
       return;
     }
   val_print (type, value_contents_all (val), 
-            VALUE_EMBEDDED_OFFSET (val), VALUE_ADDRESS (val),
+            value_embedded_offset (val), VALUE_ADDRESS (val),
             stream, format, 0, recurse, pretty);
 }
 
@@ -784,9 +786,11 @@ cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
          if (value_lazy (vf))
            (void) value_fetch_lazy (vf);
          /* adjust by offset */
-         vf->aligner.contents[0] += 4 * (HP_ACC_VFUNC_START + vx);
+         /* NOTE: cagney/2005-01-02: THIS IS BOGUS.  */
+         value_contents_writeable (vf)[0] += 4 * (HP_ACC_VFUNC_START + vx);
          vf = value_ind (vf);  /* get the entry */
-         vf->type = value_type (v);    /* make it a pointer */
+         /* make it a pointer */
+         deprecated_set_value_type (vf, value_type (v));
 
          /* print out the entry */
          val_print (value_type (vf), value_contents (vf), 0, 0,
This page took 0.024724 seconds and 4 git commands to generate.