* alpha-tdep.c (alpha_register_convert_to_virtual): Tidy use of
[deliverable/binutils-gdb.git] / gdb / gnu-v3-abi.c
index a9ab4941cfdd59bf42c70484ebb845547b0e7e79..da2a2d60450f9765672d8ee25ff487420bcdada5 100644 (file)
@@ -25,6 +25,7 @@
 #include "cp-abi.h"
 #include "demangle.h"
 #include "gdb_assert.h"
+#include "gdb_string.h"
 
 static struct cp_abi_ops gnu_v3_abi_ops;
 
@@ -173,7 +174,7 @@ build_gdb_vtable_type (struct gdbarch *arch)
    gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
    (i.e., where objects' virtual table pointers point).  */
 static int
-vtable_address_point_offset ()
+vtable_address_point_offset (void)
 {
   struct type *vtable_type = gdbarch_data (current_gdbarch,
                                           vtable_type_gdbarch_data);
@@ -254,7 +255,7 @@ gnuv3_rtti_type (struct value *value,
   class_name = vtable_symbol_name + 11;
 
   /* Try to look up the class name as a type name.  */
-  class_symbol = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0, 0);
+  class_symbol = lookup_symbol (class_name, 0, STRUCT_DOMAIN, 0, 0);
   if (! class_symbol)
     {
       warning ("can't find class named `%s', as given by C++ RTTI", class_name);
@@ -323,6 +324,9 @@ gnuv3_virtual_fn_field (struct value **value_p,
      type now.  */
   if (TYPE_VPTR_FIELDNO (vfn_base) < 0)
     fill_in_vptr_fieldno (vfn_base);
+  if (TYPE_VPTR_FIELDNO (vfn_base) < 0)
+    error ("Could not find virtual table pointer for class \"%s\".",
+          TYPE_TAG_NAME (vfn_base) ? TYPE_TAG_NAME (vfn_base) : "<unknown>");
 
   /* Now that we know which base class is defining our virtual
      function, cast our value to that baseclass.  This takes care of
@@ -449,5 +453,5 @@ _initialize_gnu_v3_abi (void)
 {
   init_gnuv3_ops ();
 
-  register_cp_abi (gnu_v3_abi_ops);
+  register_cp_abi (&gnu_v3_abi_ops);
 }
This page took 0.02648 seconds and 4 git commands to generate.