2004-11-08 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / hpacc-abi.c
index f9ec31745f34662f40c60fd1354ae8026295837a..0fb3adccb1297657bd325d7e094d1afb5f307ff8 100644 (file)
@@ -80,16 +80,16 @@ hpacc_is_vtable_name (const char *name)
    J is an index into F which provides the desired virtual function.
 
    TYPE is the type in which F is located.  */
-static value_ptr
-hpacc_virtual_fn_field (value_ptr * arg1p, struct fn_field * f, int j,
+static struct value *
+hpacc_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
                        struct type * type, int offset)
 {
-  value_ptr arg1 = *arg1p;
+  struct value *arg1 = *arg1p;
   struct type *type1 = check_typedef (VALUE_TYPE (arg1));
 
   /* Deal with HP/Taligent runtime model for virtual functions */
-  value_ptr vp;
-  value_ptr argp;              /* arg1 cast to base */
+  struct value *vp;
+  struct value *argp;          /* arg1 cast to base */
   CORE_ADDR coreptr;           /* pointer to target address */
   int class_index;             /* which class segment pointer to use */
   struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);      /* method type */
@@ -175,12 +175,12 @@ hpacc_virtual_fn_field (value_ptr * arg1p, struct fn_field * f, int j,
 
 
 static struct type *
-hpacc_value_rtti_type (value_ptr v, int *full, int *top, int *using_enc)
+hpacc_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
 {
   struct type *known_type;
   struct type *rtti_type;
   CORE_ADDR coreptr;
-  value_ptr vp;
+  struct value *vp;
   int using_enclosing = 0;
   long top_offset = 0;
   char rtti_type_name[256];
@@ -287,6 +287,8 @@ hpacc_value_rtti_type (value_ptr v, int *full, int *top, int *using_enc)
   return rtti_type;
 }
 
+extern int gnuv2_baseclass_offset (struct type *type, int index,
+                                  char *valaddr, CORE_ADDR address);
 
 static void
 init_hpacc_ops (void)
@@ -300,8 +302,14 @@ init_hpacc_ops (void)
   hpacc_abi_ops.is_operator_name = hpacc_is_operator_name;
   hpacc_abi_ops.virtual_fn_field = hpacc_virtual_fn_field;
   hpacc_abi_ops.rtti_type = hpacc_value_rtti_type;
+  /* It seems that this function is specific to GNU G++ < 3.0.
+     However, it is called for data members even in the HP
+     case (although not for member functions).
+     FIXME: Is that correct?  */
+  hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
 }
 
+extern initialize_file_ftype _initialize_hpacc_abi; /* -Wmissing-prototypes */
 
 void
 _initialize_hpacc_abi (void)
@@ -317,5 +325,5 @@ _initialize_hpacc_abi (void)
   regcomp (&operator_pattern,
           "^This will never match anything, please fill it in$", REG_NOSUB);
 
-  register_cp_abi (hpacc_abi_ops);
+  register_cp_abi (&hpacc_abi_ops);
 }
This page took 0.037225 seconds and 4 git commands to generate.