Linux: Access memory even if threads are running
[deliverable/binutils-gdb.git] / gdb / gnu-v2-abi.c
index 9f7dd0ac12f076e7afe592ece43a8e068da778fe..466ae6c080279869c45ee19ac16bc9e2c39f2dbf 100644 (file)
@@ -1,6 +1,6 @@
 /* Abstraction of GNU v2 abi.
 
-   Copyright (C) 2001-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin <dberlin@redhat.com>
 
@@ -29,7 +29,7 @@
 #include "cp-support.h"
 #include <ctype.h>
 
-struct cp_abi_ops gnu_v2_abi_ops;
+static cp_abi_ops gnu_v2_abi_ops;
 
 static int vb_match (struct type *, int, struct type *);
 
@@ -136,13 +136,13 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
       && TYPE_TARGET_TYPE (value_type (vtbl))->code () == TYPE_CODE_ARRAY)
     {
       /* Handle the case where the vtbl field points to an
-         array of structures.  */
+        array of structures.  */
       vtbl = value_ind (vtbl);
 
       /* Index into the virtual function table.  This is hard-coded because
-         looking up a field is not cheap, and it may be important to save
-         time, e.g. if the user has set a conditional breakpoint calling
-         a virtual function.  */
+        looking up a field is not cheap, and it may be important to save
+        time, e.g. if the user has set a conditional breakpoint calling
+        a virtual function.  */
       entry = value_subscript (vtbl, vi);
     }
   else
@@ -230,7 +230,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
     {
       v = value_cast (btype, v);
       if (using_enc)
-        *using_enc=1;
+       *using_enc=1;
     }
   /* We can't use value_ind here, because it would want to use RTTI, and
      we'd waste a bunch of time figuring out we already know the type.
@@ -262,26 +262,26 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
   if (TYPE_N_BASECLASSES(rtti_type) > 1 &&  full && (*full) != 1)
     {
       if (top)
-        *top = TYPE_BASECLASS_BITPOS (rtti_type,
+       *top = TYPE_BASECLASS_BITPOS (rtti_type,
                                      TYPE_VPTR_FIELDNO(rtti_type)) / 8;
       if (top && ((*top) >0))
-        {
-          if (TYPE_LENGTH(rtti_type) > TYPE_LENGTH(known_type))
-            {
-              if (full)
-                *full=0;
-            }
-          else
-            {
-              if (full)
-                *full=1;
-            }
-        }
+       {
+         if (TYPE_LENGTH(rtti_type) > TYPE_LENGTH(known_type))
+           {
+             if (full)
+               *full=0;
+           }
+         else
+           {
+             if (full)
+               *full=1;
+           }
+       }
     }
   else
     {
       if (full)
-        *full=1;
+       *full=1;
     }
 
   return rtti_type;
@@ -352,7 +352,7 @@ gnuv2_baseclass_offset (struct type *type, int index,
       int n_baseclasses = TYPE_N_BASECLASSES (type);
 
       /* First look for the virtual baseclass pointer
-         in the fields.  */
+        in the fields.  */
       for (i = n_baseclasses; i < len; i++)
        {
          if (vb_match (type, i, basetype))
This page took 0.025606 seconds and 4 git commands to generate.