2003-07-18 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gnu-v2-abi.c
index fb31c44529f8580c69eba9061a913315d625e3aa..da04c7416c06d4164235566fa048db3089ad6e72 100644 (file)
@@ -1,6 +1,8 @@
 /* Abstraction of GNU v2 abi.
+
+   Copyright 2001, 2003 Free Software Foundation, Inc.
+
    Contributed by Daniel Berlin <dberlin@redhat.com>
-   Copyright 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -182,7 +184,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
 }
 
 
-struct type *
+static struct type *
 gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
 {
   struct type *known_type;
@@ -248,7 +250,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
   /* Try to find a symbol that is the vtable */
   minsym=lookup_minimal_symbol_by_pc(vtbl);
   if (minsym==NULL
-      || (demangled_name=SYMBOL_NAME(minsym))==NULL
+      || (demangled_name=DEPRECATED_SYMBOL_NAME (minsym))==NULL
       || !is_vtable_name (demangled_name))
     return NULL;
 
@@ -329,8 +331,8 @@ vb_match (struct type *type, int index, struct type *basetype)
 
   if (TYPE_NAME (basetype) != NULL
       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
-      && STREQ (TYPE_NAME (basetype),
-               TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
+      && strcmp (TYPE_NAME (basetype),
+                TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))) == 0)
     return 1;
   return 0;
 }
@@ -399,10 +401,12 @@ init_gnuv2_ops (void)
   gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
 }
 
+extern initialize_file_ftype _initialize_gnu_v2_abi; /* -Wmissing-prototypes */
+
 void
 _initialize_gnu_v2_abi (void)
 {
   init_gnuv2_ops ();
-  register_cp_abi (gnu_v2_abi_ops);
-  switch_to_cp_abi ("gnu-v2");
+  register_cp_abi (&gnu_v2_abi_ops);
+  set_cp_abi_as_auto_default (gnu_v2_abi_ops.shortname);
 }
This page took 0.036331 seconds and 4 git commands to generate.