]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/cp-valprint.c
Turn allocate_value into a static "constructor"
[thirdparty/binutils-gdb.git] / gdb / cp-valprint.c
index 33ff17b8d2b7c30bc6684b76208dd6795fc9f2ee..268a414a37bd2c9e8ff7632a674a462120481e78 100644 (file)
@@ -282,7 +282,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
                  opts->deref_ref = false;
 
                  v = value_field_bitfield (type, i, valaddr,
-                                           value_embedded_offset (val), val);
+                                           val->embedded_offset (), val);
 
                  common_val_print (v, stream, recurse + 1,
                                    opts, current_language);
@@ -321,7 +321,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
                    {
                      CORE_ADDR addr;
 
-                     i_offset += value_embedded_offset (val);
+                     i_offset += val->embedded_offset ();
                      addr = extract_typed_address (valaddr + i_offset, i_type);
                      print_function_pointer_address (opts,
                                                      type->arch (),
@@ -390,7 +390,7 @@ cp_print_value (struct value *val, struct ui_file *stream,
                struct type **dont_print_vb)
 {
   struct type *type = check_typedef (val->type ());
-  CORE_ADDR address = value_address (val);
+  CORE_ADDR address = val->address ();
   struct type **last_dont_print
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
   struct obstack tmp_obstack = dont_print_vb_obstack;
@@ -432,7 +432,7 @@ cp_print_value (struct value *val, struct ui_file *stream,
       try
        {
          boffset = baseclass_offset (type, i, valaddr,
-                                     value_embedded_offset (val),
+                                     val->embedded_offset (),
                                      address, val);
        }
       catch (const gdb_exception_error &ex)
@@ -560,7 +560,7 @@ cp_print_static_field (struct type *type,
   if (real_type->code () == TYPE_CODE_STRUCT)
     {
       CORE_ADDR *first_dont_print;
-      CORE_ADDR addr = value_address (val);
+      CORE_ADDR addr = val->address ();
       int i;
 
       first_dont_print
@@ -761,9 +761,9 @@ test_print_fields (gdbarch *arch)
       FIELD_BITSIZE (*f) = 1;
     }
 
-  value *val = allocate_value (the_struct);
+  value *val = value::allocate (the_struct);
   gdb_byte *contents = value_contents_writeable (val).data ();
-  store_unsigned_integer (contents, value_enclosing_type (val)->length (),
+  store_unsigned_integer (contents, val->enclosing_type ()->length (),
                          gdbarch_byte_order (arch), 0xe9);
 
   string_file out;