]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gnu-v2-abi.c
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / gnu-v2-abi.c
index 20b697550f9b5cae32990cc3533804a6f82d5644..def29118245cf94e593f7eb92c43d57cf6aa87bc 100644 (file)
@@ -1,16 +1,14 @@
 /* Abstraction of GNU v2 abi.
 
-   Copyright 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin <dberlin@redhat.com>
 
    This file is part of GDB.
 
-   This program is free software; you can redistribute it and/or
-   modify
-   it under the terms of the GNU General Public License as published
-   by
-   the Free Software Foundation; either version 2 of the License, or
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -19,9 +17,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "gdb_string.h"
@@ -162,11 +158,11 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
   if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
     {
       /* Move the `this' pointer according to the virtual function table. */
-      arg1->offset += value_as_long (value_field (entry, 0));
+      set_value_offset (arg1, value_offset (arg1) + value_as_long (value_field (entry, 0)));
 
-      if (!VALUE_LAZY (arg1))
+      if (!value_lazy (arg1))
        {
-         VALUE_LAZY (arg1) = 1;
+         set_value_lazy (arg1, 1);
          value_fetch_lazy (arg1);
        }
 
@@ -175,9 +171,9 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
   else if (TYPE_CODE (entry_type) == TYPE_CODE_PTR)
     vfn = entry;
   else
-    error ("I'm confused:  virtual function table has bad type");
+    error (_("I'm confused:  virtual function table has bad type"));
   /* Reinstantiate the function pointer with the correct type.  */
-  vfn->type = lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j));
+  deprecated_set_value_type (vfn, lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j)));
 
   *arg1p = arg1;
   return vfn;
@@ -346,8 +342,8 @@ vb_match (struct type *type, int index, struct type *basetype)
    -1 is returned on error. */
 
 int
-gnuv2_baseclass_offset (struct type *type, int index, char *valaddr,
-                 CORE_ADDR address)
+gnuv2_baseclass_offset (struct type *type, int index,
+                       const bfd_byte *valaddr, CORE_ADDR address)
 {
   struct type *basetype = TYPE_BASECLASS (type, index);