This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Revised^5 C++ abstraction patch



Everything that needs to be abstracted basically is (there are a few
things in c*print.c that really should be abstracted, but it's not
critical to correct operation at all).

RTTI in the new abi works okay.

Printing subobjects of multiple virtual bases is broken right now in
the new-abi.
I'm working on it.

However, if you print the members one at a time, it works okay.

(IE if you print *pAe in virtfunc.cc, it'll get the wrong values for
things. If you print pAe->w, pAe->vb, etc, it'll have the right
values).

Virtual function calling is temporarily disabled in the new abi until
i fix the baseclass_offset problem (which is also the cause of the
subobject printing problems), at which time it'll work perfectly
fine, with minimal changes (It works for all the cases baseclass_offset works for, and only
fails when baseclass_offset gives the wrong value).

If you attempt to call a virtual function, in the new abi, it'll print "Cannot
evaluate function - may be inlined", rather than crash.

A lot of this patch has already been reviewed once (anything in the
second changelog entry is already reviewed).

Andrew, I demacroized cp-abi.h, turned them into functions, and added
them into cp-abi.c.  We give an error if a required ABI function is
not implemented.

Jim, I haven't remerged your demangling changes, but the regular
expression currently used for constructor/destructor prefix in the
new-abi will now only match constructors/destructors (IE it's no
better/worse than what the demangler is doing).

The next patch will be the internals documentation for the C++ ABI
abstraction stuff.

The only non-abstraction related change here is the stabsread.c
change, pretend it's not there, i'm submitting it seperately, and
don't want to hand edit the diff.


2001-03-20  Daniel Berlin  <dberlin@redhat.com>

	* Makefile.in: Add cp-abi.h dependency to every file that includes it.

	* c-valprint.c: Add cp-abi.h to list of includes.
	(c_val_print): Get rid of hardcoded macro usage of VTBL_FNADDR_OFFSET.

	* cp-valprint.c: Ditto.
	(cp_print_value): Use abstracted baseclass_offset, rather than
	hardcoded cases.

	* eval.c: Ditto.

	* minsyms.c: Ditto.
	(install_minimal_symbols): Test for a v3 ABI mangled name, switch to
	v3 ABI if we find one.

	* typeprint.c: Ditto.

	* valops.c: Ditto.
	(search_struct_field): Don't use register for arg1, we need it's
	address.
	Use new baseclass_offset.
	(find_rt_vbase_offset): Moved into hpacc-abi.c
	(search_struct_method): Use abstracted baseclass_offset, instead of
	hardcoded cases.
	(find_method_list): Also use abstracted baseclass_offset.
	(value_rtti_type): Abstracted away.

	* value.h: Remove value_rtti_type, value_virtual_fn_field,
	find_rt_vbase_offset, baseclass_offset.

	* values.c: Remove vb_match prototype.
	(value_virtual_fn_field): Abstracted away.
	(vb_match): Moved into gnu-v2-abi.c.
	(baseclass_offset): Abstracted away.

	* p-valprint.c: Ditto.
	(pascal_val_print): Get rid of hardcoded macro usage of
	VTBL_FNADDR_OFFSET.
	(pascal_object_print_value): Use new abstracted baseclass_offset.

	* stabsread.c: (read_cpp_abbrev): Fix name of vptr so it's consistent with DWARF2 debug
	info.

	* hpacc-abi.c: New file, HP aCC implementation of C++ ABI abstraction.

	* gnu-v3-abi.c: Added rest of abstraction functions, disabled virtual
	function calling temporarily.

	* gnu-v2-abi.c: Added rest of abstraction functions.

        * cp-abi.c: New file. Contains what used to be macros in
        cp-abi.h, as well as the code to register/switch between the C++ abi
        at runtime.

        * cp-abi.h: Remove macros, turn into functions.  Add
        virtual_fn_field, rtti_type, baseclass_offset to abstracted
        functions.

2001-02-20  Daniel Berlin  <dberlin@redhat.com>

	* Makefile.in (SFILES): Add gnu-v2-abi.c, gnu-v3-abi.c
	(COMMON_OBJS): Add gnu-v2-abi.o, gnu-v3-abi.o
	(gnu-v3-abi.o): Add.
	(gnu-v2-abi.o): Add.
	(symtab.o): Add cp-abi.h.
	(linespec.o): Add cp-abi.h.
	(dbxread.o): Add cp-abi.h.
	(c-typeprint.o): Add cp-abi.h.

	* cp-abi.h: New file. C++ abi abstraction

	* gnu-v2-abi.c: New file. C++ abi abstraction implementation for
	v2 abi.

	* gnu-v3-abi.c New file. C++ abi abstraction implementation for v3
	abi.

	* valops.c (value_rtti_type): VTBL_PREFIX_P -> vtbl_prefix_p.
	Add cp-abi.h to the include list.
	
	* symtab.c (gdb_mangle_name): DESTRUCTOR_PREFIX_P ->
	destructor_prefix_p.
	Replace hardcoded g++ v2 constructor name test with
	constructor_prefix_p. 
	Add cp-abi.h to the include list.
	
	* linespec.c (find_methods): Change SYMBOL_TYPE (sym_class) to
	CHECK_TYPEDEF (t), remove FIXME.
	Change method name comparison from STREQ to strcmp_iw.
	DESTRUCTOR_PREFIX_P -> destructor_prefix_p, fix test so it works
	(it was broken before, it was doing the reverse of what it
	should).
	Add cp-abi.h to include list.
	
	* dbxread.c (record_minimal_symbol): VTBL_PREFIX_P ->
	vtbl_prefix_p.
	Add cp-abi.h to include list.
	
	* c-typeprint.c (c_type_print_base): Remove hardcoded g++ v2
	destructor/constructor name test, replace with
	destructor_prefix_p, constructor_prefix_p. 
	Change STREQN (method_name, "~", 1) to method_name[0] == '~'.
	Add cp-abi.h to include list

	* jv-typeprint.c (java_type_print_base): Remove hardcoded g++ v2
	destructor/constructor name test, replace with
	destructor_prefix_p, constructor_prefix_p.
	
	* symtab.h: Remove VTBL_PREFIX_P macro.
	Remove DESTRUCTOR_PREFIX_P macro.


Index: c-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-typeprint.c,v
retrieving revision 1.4
diff -c -3 -p -w -B -b -r1.4 c-typeprint.c
*** c-typeprint.c	2000/12/15 01:01:46	1.4
--- c-typeprint.c	2001/03/20 16:30:44
***************
*** 38,43 ****
--- 38,44 ----
  #include "gdb_string.h"
  #include <errno.h>
  #include <ctype.h>
+ #include "cp-abi.h"
  
  /* Flag indicating target was compiled by HP compiler */
  extern int hp_som_som_object_present;
*************** c_type_print_base (struct type *type, st
*** 902,913 ****
  		{
  		  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
  		  int is_full_physname_constructor =
! 		  ((physname[0] == '_' && physname[1] == '_'
! 		    && strchr ("0123456789Qt", physname[2]))
! 		   || STREQN (physname, "__ct__", 6)
! 		   || DESTRUCTOR_PREFIX_P (physname)
! 		   || STREQN (physname, "__dt__", 6));
  
  		  QUIT;
  		  if (TYPE_FN_FIELD_PROTECTED (f, j))
  		    {
--- 903,913 ----
  		{
  		  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
  		  int is_full_physname_constructor =
! 		   constructor_prefix_p (physname) 
! 		   || destructor_prefix_p (physname)
! 		   || method_name[0] == '~';
  		   
+ 
  		  QUIT;
  		  if (TYPE_FN_FIELD_PROTECTED (f, j))
  		    {
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.6
diff -c -3 -p -w -B -b -r1.6 c-valprint.c
*** c-valprint.c	2000/11/20 20:33:53	1.6
--- c-valprint.c	2001/03/20 16:30:44
***************
*** 28,33 ****
--- 28,34 ----
  #include "valprint.h"
  #include "language.h"
  #include "c-lang.h"
+ #include "cp-abi.h"
  
  
  /* Print function pointer with inferior address ADDRESS onto stdio
*************** c_val_print (struct type *type, char *va
*** 303,316 ****
  	}
        /* Fall through.  */
      case TYPE_CODE_STRUCT:
        if (vtblprint && cp_is_vtbl_ptr_type (type))
  	{
  	  /* Print the unmangled name if desired.  */
  	  /* Print vtable entry - we only get here if NOT using
  	     -fvtable_thunks.  (Otherwise, look under TYPE_CODE_PTR.) */
  	  int offset = (embedded_offset +
! 			TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8);
! 	  struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET);
  	  CORE_ADDR addr
  	    = extract_typed_address (valaddr + offset, field_type);
  
--- 304,318 ----
  	}
        /* Fall through.  */
      case TYPE_CODE_STRUCT:
+       /*FIXME: Abstract this away */
        if (vtblprint && cp_is_vtbl_ptr_type (type))
  	{
  	  /* Print the unmangled name if desired.  */
  	  /* Print vtable entry - we only get here if NOT using
  	     -fvtable_thunks.  (Otherwise, look under TYPE_CODE_PTR.) */
  	  int offset = (embedded_offset +
! 			TYPE_FIELD_BITPOS (type, 2) / 8);
! 	  struct type *field_type = TYPE_FIELD_TYPE (type, 2);
  	  CORE_ADDR addr
  	    = extract_typed_address (valaddr + offset, field_type);
  
Index: cp-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-valprint.c,v
retrieving revision 1.6
diff -c -3 -p -w -B -b -r1.6 cp-valprint.c
*** cp-valprint.c	2000/12/15 01:01:46	1.6
--- cp-valprint.c	2001/03/20 16:30:44
***************
*** 32,37 ****
--- 32,38 ----
  #include "gdb_string.h"
  #include "c-lang.h"
  #include "target.h"
+ #include "cp-abi.h"
  
  /* Indication of presence of HP-compiled object files */
  extern int hp_som_som_object_present;	/* defined in symtab.c */
*************** cp_print_value (struct type *type, struc
*** 524,541 ****
  	  obstack_ptr_grow (&dont_print_vb_obstack, baseclass);
  	}
  
!       if (TYPE_HAS_VTABLE (type) && BASETYPE_VIA_VIRTUAL (type, i))
! 	{
! 	  /* Assume HP/Taligent runtime convention */
! 	  find_rt_vbase_offset (type, TYPE_BASECLASS (type, i),
! 				valaddr, offset, &boffset, &skip);
! 	  if (skip >= 0)
! 	    error ("Virtual base class offset not found from vtable while printing");
! 	  base_valaddr = valaddr;
! 	}
!       else
! 	{
! 	  boffset = baseclass_offset (type, i, valaddr + offset, address + offset);
  	  skip = ((boffset == -1) || (boffset + offset) < 0) ? 1 : -1;
  
  	  if (BASETYPE_VIA_VIRTUAL (type, i))
--- 525,531 ----
  	  obstack_ptr_grow (&dont_print_vb_obstack, baseclass);
  	}
        
!       boffset = baseclass_offset (type, i, NULL, valaddr + offset, address + offset, offset);
        skip = ((boffset == -1) || (boffset + offset) < 0) ? 1 : -1;
        
        if (BASETYPE_VIA_VIRTUAL (type, i))
*************** cp_print_value (struct type *type, struc
*** 556,562 ****
  	    }
  	  else
  	    base_valaddr = valaddr;
- 	}
  
        /* now do the printing */
        if (pretty)
--- 546,551 ----
*************** cp_print_value (struct type *type, struc
*** 574,583 ****
--- 563,574 ----
        if (skip >= 1)
  	fprintf_filtered (stream, "<invalid address>");
        else
+       {
  	cp_print_value_fields (baseclass, real_type, base_valaddr, offset + boffset, address,
  			       stream, format, recurse, pretty,
  		     (struct type **) obstack_base (&dont_print_vb_obstack),
  			       0);
+       }
        fputs_filtered (", ", stream);
  
      flush_it:
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.12
diff -c -3 -p -w -B -b -r1.12 dbxread.c
*** dbxread.c	2001/01/19 14:53:44	1.12
--- dbxread.c	2001/03/20 16:30:45
***************
*** 58,63 ****
--- 58,64 ----
  #include "demangle.h"
  #include "language.h"		/* Needed inside partial-stab.h */
  #include "complaints.h"
+ #include "cp-abi.h"
  
  #include "aout/aout64.h"
  #include "aout/stab_gnu.h"	/* We always use GNU stabs, not native, now */
*************** record_minimal_symbol (char *name, CORE_
*** 514,520 ****
  	char *tempstring = name;
  	if (tempstring[0] == bfd_get_symbol_leading_char (objfile->obfd))
  	  ++tempstring;
! 	if (VTBL_PREFIX_P ((tempstring)))
  	  ms_type = mst_data;
        }
        section = SECT_OFF_DATA (objfile);
--- 515,521 ----
  	char *tempstring = name;
  	if (tempstring[0] == bfd_get_symbol_leading_char (objfile->obfd))
  	  ++tempstring;
! 	if (vtbl_prefix_p (tempstring))
  	  ms_type = mst_data;
        }
        section = SECT_OFF_DATA (objfile);
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.9
diff -c -3 -p -w -B -b -r1.9 eval.c
*** eval.c	2000/10/30 15:32:51	1.9
--- eval.c	2001/03/20 16:30:45
***************
*** 30,35 ****
--- 30,36 ----
  #include "demangle.h"
  #include "language.h"		/* For CAST_IS_CONVERSION */
  #include "f-lang.h"		/* for array bound stuff */
+ #include "cp-abi.h"
  
  /* Defined in symtab.c */
  extern int hp_som_som_object_present;
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.16
diff -c -3 -p -w -B -b -r1.16 gdbtypes.c
*** gdbtypes.c	2000/12/15 01:01:47	1.16
--- gdbtypes.c	2001/03/20 16:30:45
***************
*** 34,39 ****
--- 34,40 ----
  #include "complaints.h"
  #include "gdbcmd.h"
  #include "wrapper.h"
+ #include "cp-abi.h"
  
  /* These variables point to the objects
     representing the predefined C data types.  */
*************** get_destructor_fn_field (struct type *t,
*** 1026,1032 ****
  
        for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
  	{
! 	  if (DESTRUCTOR_PREFIX_P (TYPE_FN_FIELD_PHYSNAME (f, j)))
  	    {
  	      *method_indexp = i;
  	      *field_indexp = j;
--- 1026,1032 ----
  
        for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
  	{
! 	  if (destructor_prefix_p (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)
  	    {
  	      *method_indexp = i;
  	      *field_indexp = j;
*************** virtual_base_index (struct type *base, s
*** 1903,1914 ****
      return -1;
  
    i = 0;
!   vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[0];
    while (vbase)
      {
        if (vbase == base)
  	break;
!       vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[++i];
      }
  
    return vbase ? i : -1;
--- 1903,1914 ----
      return -1;
  
    i = 0;
!   vbase = virtual_base_list (dclass)[0];
    while (vbase)
      {
        if (vbase == base)
  	break;
!       vbase = virtual_base_list (dclass)[++i];
      }
  
    return vbase ? i : -1;
*************** virtual_base_index_skip_primaries (struc
*** 1937,1950 ****
  
    j = -1;
    i = 0;
!   vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[0];
    while (vbase)
      {
        if (!primary || (virtual_base_index_skip_primaries (vbase, primary) < 0))
  	j++;
        if (vbase == base)
  	break;
!       vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[++i];
      }
  
    return vbase ? j : -1;
--- 1937,1950 ----
  
    j = -1;
    i = 0;
!   vbase = virtual_base_list (dclass)[0];
    while (vbase)
      {
        if (!primary || (virtual_base_index_skip_primaries (vbase, primary) < 0))
  	j++;
        if (vbase == base)
  	break;
!       vbase = virtual_base_list (dclass)[++i];
      }
  
    return vbase ? j : -1;
Index: jv-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-typeprint.c,v
retrieving revision 1.3
diff -c -3 -p -w -B -b -r1.3 jv-typeprint.c
*** jv-typeprint.c	2000/12/15 01:01:47	1.3
--- jv-typeprint.c	2001/03/20 16:30:45
***************
*** 28,34 ****
  #include "gdb_string.h"
  #include "typeprint.h"
  #include "c-lang.h"
! 
  /* Local functions */
  
  static void java_type_print_base (struct type * type,
--- 28,34 ----
  #include "gdb_string.h"
  #include "typeprint.h"
  #include "c-lang.h"
! #include "cp-abi.h"
  /* Local functions */
  
  static void java_type_print_base (struct type * type,
*************** java_type_print_base (struct type *type,
*** 224,235 ****
  
  		  physname = TYPE_FN_FIELD_PHYSNAME (f, j);
  
! 		  is_full_physname_constructor =
! 		    ((physname[0] == '_' && physname[1] == '_'
! 		      && strchr ("0123456789Qt", physname[2]))
! 		     || STREQN (physname, "__ct__", 6)
! 		     || DESTRUCTOR_PREFIX_P (physname)
! 		     || STREQN (physname, "__dt__", 6));
  
  		  QUIT;
  
--- 224,230 ----
  
  		  physname = TYPE_FN_FIELD_PHYSNAME (f, j);
  
! 		  is_full_physname_constructor = constructor_prefix_p (physname) != 0 || destructor_prefix_p (physname) != 0;
  
  		  QUIT;
  
Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.4
diff -c -3 -p -w -B -b -r1.4 linespec.c
*** linespec.c	2000/12/15 01:01:48	1.4
--- linespec.c	2001/03/20 16:30:45
***************
*** 28,33 ****
--- 28,34 ----
  #include "demangle.h"
  #include "value.h"
  #include "completer.h"
+ #include "cp-abi.h"
  
  /* Prototype for one function in parser-defs.h,
     instead of including that entire file. */
*************** find_methods (struct type *t, char *name
*** 143,149 ****
  		method_name = dem_opname;
  	    }
  
! 	  if (STREQ (name, method_name))
  	    /* Find all the overloaded methods with that name.  */
  	    for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
  		 field_counter >= 0;
--- 142,148 ----
  		method_name = dem_opname;
  	    }
  
! 	  if (strcmp_iw (name, method_name) == 0)
  	    /* Find all the overloaded methods with that name.  */
  	    for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
  		 field_counter >= 0;
*************** find_methods (struct type *t, char *name
*** 169,175 ****
  		  phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
  
  		/* Destructor is handled by caller, dont add it to the list */
! 		if (DESTRUCTOR_PREFIX_P (phys_name))
  		  continue;
  
  		sym_arr[i1] = lookup_symbol (phys_name,
--- 168,174 ----
  		  phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
  		
  		/* Destructor is handled by caller, dont add it to the list */
! 		if (destructor_prefix_p (phys_name) != 0)
  		  continue;
  
  		sym_arr[i1] = lookup_symbol (phys_name,
*************** decode_line_1 (char **argptr, int funfir
*** 832,838 ****
  		    {
  		      char *tmp;
  
! 		      if (OPNAME_PREFIX_P (copy))
  			{
  			  tmp = (char *) alloca (strlen (copy + 3) + 9);
  			  strcpy (tmp, "operator ");
--- 831,837 ----
  		    {
  		      char *tmp;
  
! 		      if (operator_prefix_p (copy))
  			{
  			  tmp = (char *) alloca (strlen (copy + 3) + 9);
  			  strcpy (tmp, "operator ");
Index: minsyms.c
===================================================================
RCS file: /cvs/src/src/gdb/minsyms.c,v
retrieving revision 1.13
diff -c -3 -p -w -B -b -r1.13 minsyms.c
*** minsyms.c	2001/02/11 06:11:38	1.13
--- minsyms.c	2001/03/20 16:30:46
***************
*** 47,53 ****
  #include "objfiles.h"
  #include "demangle.h"
  #include "gdb-stabs.h"
! 
  /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE.
     At the end, copy them all into one newly allocated location on an objfile's
     symbol obstack.  */
--- 47,53 ----
  #include "objfiles.h"
  #include "demangle.h"
  #include "gdb-stabs.h"
! #include "cp-abi.h"
  /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE.
     At the end, copy them all into one newly allocated location on an objfile's
     symbol obstack.  */
*************** install_minimal_symbols (struct objfile 
*** 960,966 ****
--- 960,970 ----
           ones and attempting to cache their C++ demangled names. */
  
        for (; mcount-- > 0; msymbols++)
+ 	{
+ 	  if (strncmp(SYMBOL_NAME(msymbols), "_Z", 2) == 0)
+ 	    switch_to_cp_abi("gnu-v3");
  	  SYMBOL_INIT_DEMANGLED_NAME (msymbols, &objfile->symbol_obstack);
+ 	}
  
        /* Now build the hash tables; we can't do this incrementally
           at an earlier point since we weren't finished with the obstack
Index: p-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-valprint.c,v
retrieving revision 1.3
diff -c -3 -p -w -B -b -r1.3 p-valprint.c
*** p-valprint.c	2000/12/15 01:01:48	1.3
--- p-valprint.c	2001/03/20 16:30:46
***************
*** 35,40 ****
--- 35,41 ----
  #include "target.h"
  #include "annotate.h"
  #include "p-lang.h"
+ #include "cp-abi.h"
  
  
  
*************** pascal_val_print (struct type *type, cha
*** 308,315 ****
  	  /* Print vtable entry - we only get here if NOT using
  	     -fvtable_thunks.  (Otherwise, look under TYPE_CODE_PTR.) */
  	  print_address_demangle (extract_address (
! 						    valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
! 		  TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
  				  stream, demangle);
  	}
        else
--- 309,316 ----
  	  /* Print vtable entry - we only get here if NOT using
  	     -fvtable_thunks.  (Otherwise, look under TYPE_CODE_PTR.) */
  	  print_address_demangle (extract_address (
! 						    valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, 2) / 8,
! 		  TYPE_LENGTH (TYPE_FIELD_TYPE (type, 2))),
  				  stream, demangle);
  	}
        else
*************** pascal_object_print_value (struct type *
*** 946,952 ****
  	  obstack_ptr_grow (&dont_print_vb_obstack, baseclass);
  	}
  
!       boffset = baseclass_offset (type, i, valaddr, address);
  
        if (pretty)
  	{
--- 947,953 ----
  	  obstack_ptr_grow (&dont_print_vb_obstack, baseclass);
  	}
  
!       boffset = baseclass_offset (type, i, NULL, valaddr, address, 0);
  
        if (pretty)
  	{
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.10
diff -c -3 -p -w -B -b -r1.10 stabsread.c
*** stabsread.c	2000/12/15 01:01:49	1.10
--- stabsread.c	2001/03/20 16:30:46
*************** read_cpp_abbrev (struct field_info *fip,
*** 3260,3267 ****
        switch (cpp_abbrev)
  	{
  	case 'f':		/* $vf -- a virtual function table pointer */
  	  fip->list->field.name =
! 	    obconcat (&objfile->type_obstack, vptr_name, "", "");
  	  break;
  
  	case 'b':		/* $vb -- a virtual bsomethingorother */
--- 3260,3272 ----
        switch (cpp_abbrev)
  	{
  	case 'f':		/* $vf -- a virtual function table pointer */
+ 	  name = type_name_no_tag (context);
+ 	  if (name == NULL)
+ 	  {
+ 		  name = "";
+ 	  }
  	  fip->list->field.name =
! 	    obconcat (&objfile->type_obstack, vptr_name, name, "");
  	  break;
  
  	case 'b':		/* $vb -- a virtual bsomethingorother */
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.28
diff -c -3 -p -w -B -b -r1.28 symtab.c
*** symtab.c	2001/01/30 02:49:36	1.28
--- symtab.c	2001/03/20 16:30:46
***************
*** 44,50 ****
  #include "gdb_string.h"
  #include "gdb_stat.h"
  #include <ctype.h>
! 
  /* Prototype for one function in parser-defs.h,
     instead of including that entire file. */
  
--- 44,50 ----
  #include "gdb_string.h"
  #include "gdb_stat.h"
  #include <ctype.h>
! #include "cp-abi.h"
  /* Prototype for one function in parser-defs.h,
     instead of including that entire file. */
  
*************** gdb_mangle_name (struct type *type, int 
*** 287,306 ****
    int is_full_physname_constructor;
  
    int is_constructor;
!   int is_destructor = DESTRUCTOR_PREFIX_P (physname);
    /* Need a new type prefix.  */
    char *const_prefix = method->is_const ? "C" : "";
    char *volatile_prefix = method->is_volatile ? "V" : "";
    char buf[20];
    int len = (newname == NULL ? 0 : strlen (newname));
  
!   if (OPNAME_PREFIX_P (field_name))
      return xstrdup (physname);
  
!   is_full_physname_constructor =
!     ((physname[0] == '_' && physname[1] == '_' &&
!       (isdigit (physname[2]) || physname[2] == 'Q' || physname[2] == 't'))
!      || (strncmp (physname, "__ct", 4) == 0));
  
    is_constructor =
      is_full_physname_constructor || (newname && STREQ (field_name, newname));
--- 287,303 ----
    int is_full_physname_constructor;
  
    int is_constructor;
!   int is_destructor = destructor_prefix_p (physname);
    /* Need a new type prefix.  */
    char *const_prefix = method->is_const ? "C" : "";
    char *volatile_prefix = method->is_volatile ? "V" : "";
    char buf[20];
    int len = (newname == NULL ? 0 : strlen (newname));
  
!   if (operator_prefix_p (field_name))
      return xstrdup (physname);
  
!   is_full_physname_constructor = constructor_prefix_p (physname);
  
    is_constructor =
      is_full_physname_constructor || (newname && STREQ (field_name, newname));
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.18
diff -c -3 -p -w -B -b -r1.18 symtab.h
*** symtab.h	2001/02/08 06:03:54	1.18
--- symtab.h	2001/03/20 16:30:47
*************** struct partial_symtab
*** 1032,1074 ****
      ((pst) -> symtab != NULL ? (pst) -> symtab : psymtab_to_symtab (pst))
  
  
- /* The virtual function table is now an array of structures which have the
-    form { int16 offset, delta; void *pfn; }. 
  
-    In normal virtual function tables, OFFSET is unused.
-    DELTA is the amount which is added to the apparent object's base
-    address in order to point to the actual object to which the
-    virtual function should be applied.
-    PFN is a pointer to the virtual function.
  
-    Note that this macro is g++ specific (FIXME). */
- 
- #define VTBL_FNADDR_OFFSET 2
- 
- /* Macro that yields non-zero value iff NAME is the prefix for C++ operator
-    names.  If you leave out the parenthesis here you will lose!  */
- #define OPNAME_PREFIX_P(NAME) \
-   (!strncmp (NAME, "operator", 8))
- 
- /* Macro that yields non-zero value iff NAME is the prefix for C++ vtbl
-    names.  Note that this macro is g++ specific (FIXME).
-    '_vt$' is the old cfront-style vtables; '_VT$' is the new
-    style, using thunks (where '$' is really CPLUS_MARKER). */
- 
- #define VTBL_PREFIX_P(NAME) \
-   (((NAME)[0] == '_' \
-    && (((NAME)[1] == 'V' && (NAME)[2] == 'T') \
-        || ((NAME)[1] == 'v' && (NAME)[2] == 't')) \
-    && is_cplus_marker ((NAME)[3])) || ((NAME)[0]=='_' && (NAME)[1]=='_' \
-    && (NAME)[2]=='v' && (NAME)[3]=='t' && (NAME)[4]=='_'))
- 
- /* Macro that yields non-zero value iff NAME is the prefix for C++ destructor
-    names.  Note that this macro is g++ specific (FIXME).  */
- 
- #define DESTRUCTOR_PREFIX_P(NAME) \
-   ((NAME)[0] == '_' && is_cplus_marker ((NAME)[1]) && (NAME)[2] == '_')
- 
- 
  /* External variables and functions for the objects described above. */
  
  /* This symtab variable specifies the current file for printing source lines */
--- 1032,1039 ----
Index: typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/typeprint.c,v
retrieving revision 1.6
diff -c -3 -p -w -B -b -r1.6 typeprint.c
*** typeprint.c	2000/09/04 08:29:25	1.6
--- typeprint.c	2001/03/20 16:30:47
***************
*** 31,37 ****
  #include "target.h"
  #include "language.h"
  #include "demangle.h"
! 
  #include "gdb_string.h"
  #include <errno.h>
  
--- 31,37 ----
  #include "target.h"
  #include "language.h"
  #include "demangle.h"
! #include "cp-abi.h"
  #include "gdb_string.h"
  #include <errno.h>
  
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.31
diff -c -3 -p -w -B -b -r1.31 valops.c
*** valops.c	2001/02/06 20:05:41	1.31
--- valops.c	2001/03/20 16:30:52
***************
*** 30,35 ****
--- 30,36 ----
  #include "demangle.h"
  #include "language.h"
  #include "gdbcmd.h"
+ #include "cp-abi.h"
  
  #include <errno.h>
  #include "gdb_string.h"
*************** typecmp (int staticp, struct type *t1[],
*** 2019,2025 ****
     look for a baseclass named NAME.  */
  
  static value_ptr
! search_struct_field (char *name, register value_ptr arg1, int offset,
  		     register struct type *type, int looking_for_baseclass)
  {
    int i;
--- 2020,2026 ----
     look for a baseclass named NAME.  */
  
  static value_ptr
! search_struct_field (char *name, value_ptr arg1, int offset,
  		     register struct type *type, int looking_for_baseclass)
  {
    int i;
*************** search_struct_field (char *name, registe
*** 2100,2108 ****
  	  value_ptr v2 = allocate_value (basetype);
  
  	  boffset = baseclass_offset (type, i,
! 				      VALUE_CONTENTS (arg1) + offset,
  				      VALUE_ADDRESS (arg1)
! 				      + VALUE_OFFSET (arg1) + offset);
  	  if (boffset == -1)
  	    error ("virtual baseclass botch");
  
--- 2101,2109 ----
  	  value_ptr v2 = allocate_value (basetype);
  	  
  	  boffset = baseclass_offset (type, i,
! 				      &arg1, VALUE_CONTENTS (arg1) + offset,
  				      VALUE_ADDRESS (arg1)
! 				      + VALUE_OFFSET (arg1) + offset, offset);
  	  if (boffset == -1)
  	    error ("virtual baseclass botch");
  
*************** search_struct_field (char *name, registe
*** 2153,2246 ****
  }
  
  
- /* Return the offset (in bytes) of the virtual base of type BASETYPE
-  * in an object pointed to by VALADDR (on the host), assumed to be of
-  * type TYPE.  OFFSET is number of bytes beyond start of ARG to start
-  * looking (in case VALADDR is the contents of an enclosing object).
-  *
-  * This routine recurses on the primary base of the derived class because
-  * the virtual base entries of the primary base appear before the other
-  * virtual base entries.
-  *
-  * If the virtual base is not found, a negative integer is returned.
-  * The magnitude of the negative integer is the number of entries in
-  * the virtual table to skip over (entries corresponding to various
-  * ancestral classes in the chain of primary bases).
-  *
-  * Important: This assumes the HP / Taligent C++ runtime
-  * conventions. Use baseclass_offset() instead to deal with g++
-  * conventions.  */
- 
- void
- find_rt_vbase_offset (struct type *type, struct type *basetype, char *valaddr,
- 		      int offset, int *boffset_p, int *skip_p)
- {
-   int boffset;			/* offset of virtual base */
-   int index;			/* displacement to use in virtual table */
-   int skip;
- 
-   value_ptr vp;
-   CORE_ADDR vtbl;		/* the virtual table pointer */
-   struct type *pbc;		/* the primary base class */
- 
-   /* Look for the virtual base recursively in the primary base, first.
-    * This is because the derived class object and its primary base
-    * subobject share the primary virtual table.  */
- 
-   boffset = 0;
-   pbc = TYPE_PRIMARY_BASE (type);
-   if (pbc)
-     {
-       find_rt_vbase_offset (pbc, basetype, valaddr, offset, &boffset, &skip);
-       if (skip < 0)
- 	{
- 	  *boffset_p = boffset;
- 	  *skip_p = -1;
- 	  return;
- 	}
-     }
-   else
-     skip = 0;
- 
- 
-   /* Find the index of the virtual base according to HP/Taligent
-      runtime spec. (Depth-first, left-to-right.)  */
-   index = virtual_base_index_skip_primaries (basetype, type);
- 
-   if (index < 0)
-     {
-       *skip_p = skip + virtual_base_list_length_skip_primaries (type);
-       *boffset_p = 0;
-       return;
-     }
- 
-   /* pai: FIXME -- 32x64 possible problem */
-   /* First word (4 bytes) in object layout is the vtable pointer */
-   vtbl = *(CORE_ADDR *) (valaddr + offset);
- 
-   /* Before the constructor is invoked, things are usually zero'd out. */
-   if (vtbl == 0)
-     error ("Couldn't find virtual table -- object may not be constructed yet.");
- 
- 
-   /* Find virtual base's offset -- jump over entries for primary base
-    * ancestors, then use the index computed above.  But also adjust by
-    * HP_ACC_VBASE_START for the vtable slots before the start of the
-    * virtual base entries.  Offset is negative -- virtual base entries
-    * appear _before_ the address point of the virtual table. */
- 
-   /* pai: FIXME -- 32x64 problem, if word = 8 bytes, change multiplier
-      & use long type */
- 
-   /* epstein : FIXME -- added param for overlay section. May not be correct */
-   vp = value_at (builtin_type_int, vtbl + 4 * (-skip - index - HP_ACC_VBASE_START), NULL);
-   boffset = value_as_long (vp);
-   *skip_p = -1;
-   *boffset_p = boffset;
-   return;
- }
- 
- 
  /* Helper function used by value_struct_elt to recurse through baseclasses.
     Look for a field NAME in ARG1. Adjust the address of ARG1 by OFFSET bytes,
     and search in it assuming it has (class) type TYPE.
--- 2154,2159 ----
*************** search_struct_method (char *name, regist
*** 2305,2324 ****
  
        if (BASETYPE_VIA_VIRTUAL (type, i))
  	{
- 	  if (TYPE_HAS_VTABLE (type))
- 	    {
- 	      /* HP aCC compiled type, search for virtual base offset
- 	         according to HP/Taligent runtime spec.  */
- 	      int skip;
- 	      find_rt_vbase_offset (type, TYPE_BASECLASS (type, i),
- 				    VALUE_CONTENTS_ALL (*arg1p),
- 				    offset + VALUE_EMBEDDED_OFFSET (*arg1p),
- 				    &base_offset, &skip);
- 	      if (skip >= 0)
- 		error ("Virtual base class offset not found in vtable");
- 	    }
- 	  else
- 	    {
  	      struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
  	      char *base_valaddr;
  
--- 2218,2223 ----
*************** search_struct_method (char *name, regist
*** 2339,2351 ****
  		base_valaddr = VALUE_CONTENTS (*arg1p) + offset;
  
  	      base_offset =
! 		baseclass_offset (type, i, base_valaddr,
  				  VALUE_ADDRESS (*arg1p)
! 				  + VALUE_OFFSET (*arg1p) + offset);
  	      if (base_offset == -1)
  		error ("virtual baseclass botch");
  	    }
- 	}
        else
  	{
  	  base_offset = TYPE_BASECLASS_BITPOS (type, i) / 8;
--- 2238,2249 ----
  	    base_valaddr = VALUE_CONTENTS (*arg1p) + offset;
  	  
  	  base_offset =
! 	    baseclass_offset (type, i, arg1p,  base_valaddr,
  			      VALUE_ADDRESS (*arg1p)
! 			      + VALUE_OFFSET (*arg1p) + offset, offset);
  	  if (base_offset == -1)
  	    error ("virtual baseclass botch");
  	}
        else
  	{
  	  base_offset = TYPE_BASECLASS_BITPOS (type, i) / 8;
*************** find_method_list (value_ptr *argp, char 
*** 2533,2562 ****
        int base_offset;
        if (BASETYPE_VIA_VIRTUAL (type, i))
  	{
- 	  if (TYPE_HAS_VTABLE (type))
- 	    {
- 	      /* HP aCC compiled type, search for virtual base offset
- 	       * according to HP/Taligent runtime spec.  */
- 	      int skip;
- 	      find_rt_vbase_offset (type, TYPE_BASECLASS (type, i),
- 				    VALUE_CONTENTS_ALL (*argp),
- 				    offset + VALUE_EMBEDDED_OFFSET (*argp),
- 				    &base_offset, &skip);
- 	      if (skip >= 0)
- 		error ("Virtual base class offset not found in vtable");
- 	    }
- 	  else
- 	    {
- 	      /* probably g++ runtime model */
  	      base_offset = VALUE_OFFSET (*argp) + offset;
  	      base_offset =
! 		baseclass_offset (type, i,
  				  VALUE_CONTENTS (*argp) + base_offset,
! 				  VALUE_ADDRESS (*argp) + base_offset);
  	      if (base_offset == -1)
  		error ("virtual baseclass botch");
  	    }
- 	}
        else
  	/* non-virtual base, simply use bit position from debug info */
  	{
--- 2431,2444 ----
        int base_offset;
        if (BASETYPE_VIA_VIRTUAL (type, i))
  	{
  	  base_offset = VALUE_OFFSET (*argp) + offset;
  	  base_offset =
! 	    baseclass_offset (type, i, argp, 
  			      VALUE_CONTENTS (*argp) + base_offset,
! 			      VALUE_ADDRESS (*argp) + base_offset, offset);
  	  if (base_offset == -1)
  	    error ("virtual baseclass botch");
  	}
        else
  	/* non-virtual base, simply use bit position from debug info */
  	{
*************** value_struct_elt_for_reference (struct t
*** 3117,3341 ****
  }
  
  
- /* Find the real run-time type of a value using RTTI.
-  * V is a pointer to the value.
-  * A pointer to the struct type entry of the run-time type
-  * is returneed.
-  * FULL is a flag that is set only if the value V includes
-  * the entire contents of an object of the RTTI type.
-  * TOP is the offset to the top of the enclosing object of
-  * the real run-time type.  This offset may be for the embedded
-  * object, or for the enclosing object of V.
-  * USING_ENC is the flag that distinguishes the two cases.
-  * If it is 1, then the offset is for the enclosing object,
-  * otherwise for the embedded object.
-  *
-  */
- 
- struct type *
- value_rtti_type (value_ptr v, int *full, int *top, int *using_enc)
- {
-   struct type *known_type;
-   struct type *rtti_type;
-   CORE_ADDR coreptr;
-   value_ptr vp;
-   int using_enclosing = 0;
-   long top_offset = 0;
-   char rtti_type_name[256];
- 
-   if (full)
-     *full = 0;
-   if (top)
-     *top = -1;
-   if (using_enc)
-     *using_enc = 0;
- 
-   /* Get declared type */
-   known_type = VALUE_TYPE (v);
-   CHECK_TYPEDEF (known_type);
-   /* RTTI works only or class objects */
-   if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
-     return NULL;
-   if (TYPE_HAS_VTABLE(known_type))
-     {
-       /* If neither the declared type nor the enclosing type of the
-        * value structure has a HP ANSI C++ style virtual table,
-        * we can't do anything. */
-       if (!TYPE_HAS_VTABLE (known_type))
- 	{
- 	  known_type = VALUE_ENCLOSING_TYPE (v);
- 	  CHECK_TYPEDEF (known_type);
- 	  if ((TYPE_CODE (known_type) != TYPE_CODE_CLASS) ||
- 	      !TYPE_HAS_VTABLE (known_type))
- 	    return NULL;		/* No RTTI, or not HP-compiled types */
- 	  CHECK_TYPEDEF (known_type);
- 	  using_enclosing = 1;
- 	}
- 
-       if (using_enclosing && using_enc)
- 	*using_enc = 1;
- 
-       /* First get the virtual table address */
-       coreptr = *(CORE_ADDR *) ((VALUE_CONTENTS_ALL (v))
- 				+ VALUE_OFFSET (v)
- 				+ (using_enclosing ? 0 : VALUE_EMBEDDED_OFFSET (v)));
-       if (coreptr == 0)
- 	return NULL;		/* return silently -- maybe called on gdb-generated value */
- 
-       /* Fetch the top offset of the object */
-       /* FIXME possible 32x64 problem with pointer size & arithmetic */
-       vp = value_at (builtin_type_int,
- 		     coreptr + 4 * HP_ACC_TOP_OFFSET_OFFSET,
- 		     VALUE_BFD_SECTION (v));
-       top_offset = value_as_long (vp);
-       if (top)
- 	*top = top_offset;
- 
-       /* Fetch the typeinfo pointer */
-       /* FIXME possible 32x64 problem with pointer size & arithmetic */
-       vp = value_at (builtin_type_int, coreptr + 4 * HP_ACC_TYPEINFO_OFFSET, VALUE_BFD_SECTION (v));
-       /* Indirect through the typeinfo pointer and retrieve the pointer
-        * to the string name */
-       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
-       if (!coreptr)
- 	error ("Retrieved null typeinfo pointer in trying to determine run-time type");
-       vp = value_at (builtin_type_int, coreptr + 4, VALUE_BFD_SECTION (v));		/* 4 -> offset of name field */
-       /* FIXME possible 32x64 problem */
- 
-       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
- 
-       read_memory_string (coreptr, rtti_type_name, 256);
- 
-       if (strlen (rtti_type_name) == 0)
- 	error ("Retrieved null type name from typeinfo");
- 
-       /* search for type */
-       rtti_type = lookup_typename (rtti_type_name, (struct block *) 0, 1);
- 
-       if (!rtti_type)
- 	error ("Could not find run-time type: invalid type name %s in typeinfo??", rtti_type_name);
-       CHECK_TYPEDEF (rtti_type);
- #if 0
-       printf ("RTTI type name %s, tag %s, full? %d\n", TYPE_NAME (rtti_type), TYPE_TAG_NAME (rtti_type), full ? *full : -1);
- #endif
-       /* Check whether we have the entire object */
-       if (full			/* Non-null pointer passed */
- 	  &&
- 	  /* Either we checked on the whole object in hand and found the
- 	     top offset to be zero */
- 	  (((top_offset == 0) &&
- 	    using_enclosing &&
- 	    TYPE_LENGTH (known_type) == TYPE_LENGTH (rtti_type))
- 	   ||
- 	   /* Or we checked on the embedded object and top offset was the
- 	      same as the embedded offset */
- 	   ((top_offset == VALUE_EMBEDDED_OFFSET (v)) &&
- 	    !using_enclosing &&
- 	    TYPE_LENGTH (VALUE_ENCLOSING_TYPE (v)) == TYPE_LENGTH (rtti_type))))
- 
- 	*full = 1;
-     }
-   else
-     /*
-       Right now this is G++ RTTI. Plan on this changing in the
-       future as i get around to setting the vtables properly for G++
-       compiled stuff. Also, i'll be using the type info functions,
-       which are always right. Deal with it until then.
-     */
-     {
-       CORE_ADDR vtbl;
-       struct minimal_symbol *minsym;
-       struct symbol *sym;
-       char *demangled_name;
-       struct type *btype;
-       /* If the type has no vptr fieldno, try to get it filled in */
-       if (TYPE_VPTR_FIELDNO(known_type) < 0)
- 	fill_in_vptr_fieldno(known_type);
- 
-       /* If we still can't find one, give up */
-       if (TYPE_VPTR_FIELDNO(known_type) < 0)
- 	return NULL;
- 
-       /* Make sure our basetype and known type match, otherwise, cast
- 	 so we can get at the vtable properly.
-       */
-       btype = TYPE_VPTR_BASETYPE (known_type);
-       CHECK_TYPEDEF (btype);
-       if (btype != known_type )
- 	{
- 	  v = value_cast (btype, v);
- 	  if (using_enc)
- 	    *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.
-         Besides, we don't care about the type, just the actual pointer
-       */
-       if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0)
- 	return NULL;
- 
-       /*
- 	 If we are enclosed by something that isn't us, adjust the
- 	 address properly and set using_enclosing.
-       */
-       if (VALUE_ENCLOSING_TYPE(v) != VALUE_TYPE(v))
- 	{
- 	  value_ptr tempval;
- 	  tempval=value_field(v,TYPE_VPTR_FIELDNO(known_type));
- 	  VALUE_ADDRESS(tempval)+=(TYPE_BASECLASS_BITPOS(known_type,TYPE_VPTR_FIELDNO(known_type))/8);
- 	  vtbl=value_as_pointer(tempval);
- 	  using_enclosing=1;
- 	}
-       else
- 	{
- 	  vtbl=value_as_pointer(value_field(v,TYPE_VPTR_FIELDNO(known_type)));
- 	  using_enclosing=0;
- 	}
- 
-       /* 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 || !VTBL_PREFIX_P(demangled_name))
- 	return NULL;
- 
-       /* If we just skip the prefix, we get screwed by namespaces */
-       demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI);
-       *(strchr(demangled_name,' '))=0;
- 
-       /* Lookup the type for the name */
-       rtti_type=lookup_typename(demangled_name, (struct block *)0,1);
- 
-       if (rtti_type==NULL)
- 	return NULL;
- 
-       if (TYPE_N_BASECLASSES(rtti_type) > 1 &&  full && (*full) != 1)
- 	{
- 	  if (top)
- 	    *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;
- 		}
- 	    }
- 	}
-       else
- 	{
- 	  if (full)
- 	    *full=1;
- 	}
-       if (using_enc)
- 	*using_enc=using_enclosing;
-     }
-   return rtti_type;
- }
  
  /* Given a pointer value V, find the real (RTTI) type
     of the object it points to.
--- 2999,3004 ----
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.14
diff -c -3 -p -w -B -b -r1.14 value.h
*** value.h	2001/02/02 20:01:16	1.14
--- value.h	2001/03/20 16:30:53
*************** extern value_ptr value_field (value_ptr 
*** 366,372 ****
  extern value_ptr value_primitive_field (value_ptr arg1, int offset,
  					int fieldno, struct type *arg_type);
  
- extern struct type *value_rtti_type (value_ptr, int *, int *, int *);
  
  extern struct type *value_rtti_target_type (value_ptr, int *, int *, int *);
  
--- 366,371 ----
*************** extern value_ptr value_x_unop (value_ptr
*** 446,454 ****
  extern value_ptr value_fn_field (value_ptr * arg1p, struct fn_field *f,
  				 int j, struct type *type, int offset);
  
- extern value_ptr value_virtual_fn_field (value_ptr * arg1p,
- 					 struct fn_field *f, int j,
- 					 struct type *type, int offset);
  
  extern int binop_user_defined_p (enum exp_opcode op,
  				 value_ptr arg1, value_ptr arg2);
--- 445,450 ----
*************** extern void clear_internalvars (void);
*** 556,562 ****
  
  extern value_ptr value_copy (value_ptr);
  
- extern int baseclass_offset (struct type *, int, char *, CORE_ADDR);
  
  /* From valops.c */
  
--- 552,557 ----
*************** extern int standard_coerce_float_to_doub
*** 572,579 ****
  
  extern value_ptr value_literal_complex (value_ptr, value_ptr, struct type *);
  
- extern void find_rt_vbase_offset (struct type *, struct type *, char *, int,
- 				  int *, int *);
  
  extern value_ptr find_function_in_inferior (char *);
  
--- 567,572 ----
Index: values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.12
diff -c -3 -p -w -B -b -r1.12 values.c
*** values.c	2000/12/15 01:01:50	1.12
--- values.c	2001/03/20 16:30:53
*************** static void show_values (char *, int);
*** 45,51 ****
  
  static void show_convenience (char *, int);
  
- static int vb_match (struct type *, int, struct type *);
  
  /* The value-history records all the values printed
     by print commands during this session.  Each chunk
--- 45,50 ----
*************** value_fn_field (value_ptr *arg1p, struct
*** 890,1086 ****
    return v;
  }
  
- /* Return a virtual function as a value.
-    ARG1 is the object which provides the virtual function
-    table pointer.  *ARG1P is side-effected in calling this function.
-    F is the list of member functions which contains the desired virtual
-    function.
-    J is an index into F which provides the desired virtual function.
- 
-    TYPE is the type in which F is located.  */
- value_ptr
- value_virtual_fn_field (value_ptr *arg1p, struct fn_field *f, int j,
- 			struct type *type, int offset)
- {
-   value_ptr arg1 = *arg1p;
-   struct type *type1 = check_typedef (VALUE_TYPE (arg1));
- 
-   if (TYPE_HAS_VTABLE (type))
-     {
-       /* Deal with HP/Taligent runtime model for virtual functions */
-       value_ptr vp;
-       value_ptr 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 */
- 
-       argp = value_cast (type, *arg1p);
- 
-       if (VALUE_ADDRESS (argp) == 0)
- 	error ("Address of object is null; object may not have been created.");
- 
-       /* pai: FIXME -- 32x64 possible problem? */
-       /* First word (4 bytes) in object layout is the vtable pointer */
-       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (argp));		/* pai: (temp)  */
-       /* + offset + VALUE_EMBEDDED_OFFSET (argp)); */
- 
-       if (!coreptr)
- 	error ("Virtual table pointer is null for object; object may not have been created.");
- 
-       /* pai/1997-05-09
-        * FIXME: The code here currently handles only
-        * the non-RRBC case of the Taligent/HP runtime spec; when RRBC
-        * is introduced, the condition for the "if" below will have to
-        * be changed to be a test for the RRBC case.  */
- 
-       if (1)
- 	{
- 	  /* Non-RRBC case; the virtual function pointers are stored at fixed
- 	   * offsets in the virtual table. */
- 
- 	  /* Retrieve the offset in the virtual table from the debug
- 	   * info.  The offset of the vfunc's entry is in words from
- 	   * the beginning of the vtable; but first we have to adjust
- 	   * by HP_ACC_VFUNC_START to account for other entries */
- 
- 	  /* pai: FIXME: 32x64 problem here, a word may be 8 bytes in
- 	   * which case the multiplier should be 8 and values should be long */
- 	  vp = value_at (builtin_type_int,
- 			 coreptr + 4 * (TYPE_FN_FIELD_VOFFSET (f, j) + HP_ACC_VFUNC_START), NULL);
- 
- 	  coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
- 	  /* coreptr now contains the address of the virtual function */
- 	  /* (Actually, it contains the pointer to the plabel for the function. */
- 	}
-       else
- 	{
- 	  /* RRBC case; the virtual function pointers are found by double
- 	   * indirection through the class segment tables. */
- 
- 	  /* Choose class segment depending on type we were passed */
- 	  class_index = class_index_in_primary_list (type);
- 
- 	  /* Find class segment pointer.  These are in the vtable slots after
- 	   * some other entries, so adjust by HP_ACC_VFUNC_START for that. */
- 	  /* pai: FIXME 32x64 problem here, if words are 8 bytes long
- 	   * the multiplier below has to be 8 and value should be long. */
- 	  vp = value_at (builtin_type_int,
- 		    coreptr + 4 * (HP_ACC_VFUNC_START + class_index), NULL);
- 	  /* Indirect once more, offset by function index */
- 	  /* pai: FIXME 32x64 problem here, again multiplier could be 8 and value long */
- 	  coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp) + 4 * TYPE_FN_FIELD_VOFFSET (f, j));
- 	  vp = value_at (builtin_type_int, coreptr, NULL);
- 	  coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
- 
- 	  /* coreptr now contains the address of the virtual function */
- 	  /* (Actually, it contains the pointer to the plabel for the function.) */
- 
- 	}
- 
-       if (!coreptr)
- 	error ("Address of virtual function is null; error in virtual table?");
- 
-       /* Wrap this addr in a value and return pointer */
-       vp = allocate_value (ftype);
-       VALUE_TYPE (vp) = ftype;
-       VALUE_ADDRESS (vp) = coreptr;
- 
-       /* pai: (temp) do we need the value_ind stuff in value_fn_field? */
-       return vp;
-     }
-   else
-     {				/* Not using HP/Taligent runtime conventions; so try to
- 				 * use g++ conventions for virtual table */
- 
-       struct type *entry_type;
-       /* First, get the virtual function table pointer.  That comes
-          with a strange type, so cast it to type `pointer to long' (which
-          should serve just fine as a function type).  Then, index into
-          the table, and convert final value to appropriate function type.  */
-       value_ptr entry, vfn, vtbl;
-       value_ptr vi = value_from_longest (builtin_type_int,
- 				    (LONGEST) TYPE_FN_FIELD_VOFFSET (f, j));
-       struct type *fcontext = TYPE_FN_FIELD_FCONTEXT (f, j);
-       struct type *context;
-       if (fcontext == NULL)
- 	/* We don't have an fcontext (e.g. the program was compiled with
- 	   g++ version 1).  Try to get the vtbl from the TYPE_VPTR_BASETYPE.
- 	   This won't work right for multiple inheritance, but at least we
- 	   should do as well as GDB 3.x did.  */
- 	fcontext = TYPE_VPTR_BASETYPE (type);
-       context = lookup_pointer_type (fcontext);
-       /* Now context is a pointer to the basetype containing the vtbl.  */
-       if (TYPE_TARGET_TYPE (context) != type1)
- 	{
- 	  value_ptr tmp = value_cast (context, value_addr (arg1));
- 	  VALUE_POINTED_TO_OFFSET (tmp) = 0;
- 	  arg1 = value_ind (tmp);
- 	  type1 = check_typedef (VALUE_TYPE (arg1));
- 	}
- 
-       context = type1;
-       /* Now context is the basetype containing the vtbl.  */
- 
-       /* This type may have been defined before its virtual function table
-          was.  If so, fill in the virtual function table entry for the
-          type now.  */
-       if (TYPE_VPTR_FIELDNO (context) < 0)
- 	fill_in_vptr_fieldno (context);
- 
-       /* The virtual function table is now an array of structures
-          which have the form { int16 offset, delta; void *pfn; }.  */
-       vtbl = value_primitive_field (arg1, 0, TYPE_VPTR_FIELDNO (context),
- 				    TYPE_VPTR_BASETYPE (context));
- 
-       /* With older versions of g++, the vtbl field pointed to an array
-          of structures.  Nowadays it points directly to the structure. */
-       if (TYPE_CODE (VALUE_TYPE (vtbl)) == TYPE_CODE_PTR
-       && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (vtbl))) == TYPE_CODE_ARRAY)
- 	{
- 	  /* Handle the case where the vtbl field points to an
- 	     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.  */
- 	  entry = value_subscript (vtbl, vi);
- 	}
-       else
- 	{
- 	  /* Handle the case where the vtbl field points directly to a structure. */
- 	  vtbl = value_add (vtbl, vi);
- 	  entry = value_ind (vtbl);
- 	}
- 
-       entry_type = check_typedef (VALUE_TYPE (entry));
- 
-       if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
- 	{
- 	  /* Move the `this' pointer according to the virtual function table. */
- 	  VALUE_OFFSET (arg1) += value_as_long (value_field (entry, 0));
- 
- 	  if (!VALUE_LAZY (arg1))
- 	    {
- 	      VALUE_LAZY (arg1) = 1;
- 	      value_fetch_lazy (arg1);
- 	    }
- 
- 	  vfn = value_field (entry, 2);
- 	}
-       else if (TYPE_CODE (entry_type) == TYPE_CODE_PTR)
- 	vfn = entry;
-       else
- 	error ("I'm confused:  virtual function table has bad type");
-       /* Reinstantiate the function pointer with the correct type.  */
-       VALUE_TYPE (vfn) = lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j));
- 
-       *arg1p = arg1;
-       return vfn;
-     }
- }
- 
  /* ARG is a pointer to an object we know to be at least
     a DTYPE.  BTYPE is the most derived basetype that has
     already been searched (and need not be searched again).
--- 889,894 ----
*************** value_headof (value_ptr in_arg, struct t
*** 1124,1130 ****
  
    vtbl = value_ind (value_field (value_ind (arg), TYPE_VPTR_FIELDNO (btype)));
    /* Turn vtable into typeinfo function */
!   VALUE_OFFSET(vtbl)+=4;
  
    msymbol = lookup_minimal_symbol_by_pc ( value_as_pointer(value_ind(vtbl)) );
    if (msymbol == NULL
--- 932,938 ----
  
    vtbl = value_ind (value_field (value_ind (arg), TYPE_VPTR_FIELDNO (btype)));
    /* Turn vtable into typeinfo function */
!   VALUE_OFFSET(vtbl)-=4;
  
    msymbol = lookup_minimal_symbol_by_pc ( value_as_pointer(value_ind(vtbl)) );
    if (msymbol == NULL
*************** value_from_vtable_info (value_ptr arg, s
*** 1168,1267 ****
    return value_headof (arg, 0, type);
  }
  
- /* Return true if the INDEXth field of TYPE is a virtual baseclass
-    pointer which is for the base class whose type is BASECLASS.  */
- 
- static int
- vb_match (struct type *type, int index, struct type *basetype)
- {
-   struct type *fieldtype;
-   char *name = TYPE_FIELD_NAME (type, index);
-   char *field_class_name = NULL;
- 
-   if (*name != '_')
-     return 0;
-   /* gcc 2.4 uses _vb$.  */
-   if (name[1] == 'v' && name[2] == 'b' && is_cplus_marker (name[3]))
-     field_class_name = name + 4;
-   /* gcc 2.5 will use __vb_.  */
-   if (name[1] == '_' && name[2] == 'v' && name[3] == 'b' && name[4] == '_')
-     field_class_name = name + 5;
- 
-   if (field_class_name == NULL)
-     /* This field is not a virtual base class pointer.  */
-     return 0;
- 
-   /* It's a virtual baseclass pointer, now we just need to find out whether
-      it is for this baseclass.  */
-   fieldtype = TYPE_FIELD_TYPE (type, index);
-   if (fieldtype == NULL
-       || TYPE_CODE (fieldtype) != TYPE_CODE_PTR)
-     /* "Can't happen".  */
-     return 0;
- 
-   /* What we check for is that either the types are equal (needed for
-      nameless types) or have the same name.  This is ugly, and a more
-      elegant solution should be devised (which would probably just push
-      the ugliness into symbol reading unless we change the stabs format).  */
-   if (TYPE_TARGET_TYPE (fieldtype) == basetype)
-     return 1;
- 
-   if (TYPE_NAME (basetype) != NULL
-       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
-       && STREQ (TYPE_NAME (basetype),
- 		TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
-     return 1;
-   return 0;
- }
- 
- /* Compute the offset of the baseclass which is
-    the INDEXth baseclass of class TYPE,
-    for value at VALADDR (in host) at ADDRESS (in target).
-    The result is the offset of the baseclass value relative
-    to (the address of)(ARG) + OFFSET.
- 
-    -1 is returned on error. */
- 
- int
- baseclass_offset (struct type *type, int index, char *valaddr,
- 		  CORE_ADDR address)
- {
-   struct type *basetype = TYPE_BASECLASS (type, index);
- 
-   if (BASETYPE_VIA_VIRTUAL (type, index))
-     {
-       /* Must hunt for the pointer to this virtual baseclass.  */
-       register int i, len = TYPE_NFIELDS (type);
-       register int n_baseclasses = TYPE_N_BASECLASSES (type);
- 
-       /* First look for the virtual baseclass pointer
-          in the fields.  */
-       for (i = n_baseclasses; i < len; i++)
- 	{
- 	  if (vb_match (type, i, basetype))
- 	    {
- 	      CORE_ADDR addr
- 	      = unpack_pointer (TYPE_FIELD_TYPE (type, i),
- 				valaddr + (TYPE_FIELD_BITPOS (type, i) / 8));
- 
- 	      return addr - (LONGEST) address;
- 	    }
- 	}
-       /* Not in the fields, so try looking through the baseclasses.  */
-       for (i = index + 1; i < n_baseclasses; i++)
- 	{
- 	  int boffset =
- 	  baseclass_offset (type, i, valaddr, address);
- 	  if (boffset)
- 	    return boffset;
- 	}
-       /* Not found.  */
-       return -1;
-     }
- 
-   /* Baseclass is easily computed.  */
-   return TYPE_BASECLASS_BITPOS (type, index) / 8;
- }
  
  /* Unpack a field FIELDNO of the specified TYPE, from the anonymous object at
     VALADDR.
--- 976,981 ----
Index: hpacc-abi.c
===================================================================
RCS file: hpacc-abi.c
diff -N hpacc-abi.c
*** /dev/null	Tue May  5 13:32:27 1998
--- hpacc-abi.c	Tue Mar 20 08:44:56 2001
***************
*** 0 ****
--- 1,422 ----
+ /* Abstraction of HP aCC ABI.
+    Contributed by Daniel Berlin <dberlin@redhat.com>
+    Most of the real code is from HP, i've just fiddled it to fit in the abstraction framework.
+ 
+    Copyright 2001 Free Software Foundation, Inc.
+ 
+    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
+    (at your option) any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    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.  */
+ 
+ #include "defs.h"
+ #include "cp-abi.h"
+ #include "gdb_regex.h"
+ #include "gdb_string.h"
+ #include "gdbtypes.h"
+ #include "value.h"
+ #include "gdbcore.h"
+ struct cp_abi_ops hpacc_abi_ops;
+ 
+ /* It appears the prefix stuff is never used when we try the hpACC ABI. As such, 
+  * I have no clue what the real answers are. Shouldn't have any more effect than
+  * it does now.
+  */
+ static regex_t constructor_pattern;
+ static regex_t destructor_pattern;
+ static regex_t operator_pattern;
+ 
+ int
+ hpacc_destructor_prefix_p (const char *name)
+ {
+   return regexec (&destructor_pattern, name, 0, 0, 0) == 0;
+ }
+ 
+ int
+ hpacc_constructor_prefix_p (const char *name)
+ {
+   return regexec (&constructor_pattern, name, 0, 0, 0) == 0;
+ }
+ 
+ int
+ hpacc_operator_prefix_p (const char *name)
+ {
+   return regexec (&operator_pattern, name, 0, 0, 0) == 0;
+ }
+ 
+ int
+ hpacc_vtable_prefix_p (const char *name)
+ {
+   return strcmp (name,
+ 		 "This will never match anything, please fill it in") == 0;
+ }
+ 
+ /* Return a virtual function as a value.
+    ARG1 is the object which provides the virtual function
+    table pointer.  *ARG1P is side-effected in calling this function.
+    F is the list of member functions which contains the desired virtual
+    function.
+    J is an index into F which provides the desired virtual function.
+ 
+    TYPE is the type in which F is located.  */
+ value_ptr
+ hpacc_virtual_fn_field (value_ptr * arg1p, struct fn_field * f, int j,
+ 			struct type * type, int offset)
+ {
+   value_ptr 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 */
+   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 */
+ 
+   argp = value_cast (type, *arg1p);
+ 
+   if (VALUE_ADDRESS (argp) == 0)
+     error ("Address of object is null; object may not have been created.");
+ 
+   /* pai: FIXME -- 32x64 possible problem? */
+   /* First word (4 bytes) in object layout is the vtable pointer */
+   coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (argp));	/* pai: (temp)  */
+   /* + offset + VALUE_EMBEDDED_OFFSET (argp)); */
+ 
+   if (!coreptr)
+     error
+       ("Virtual table pointer is null for object; object may not have been created.");
+ 
+   /* pai/1997-05-09
+    * FIXME: The code here currently handles only
+    * the non-RRBC case of the Taligent/HP runtime spec; when RRBC
+    * is introduced, the condition for the "if" below will have to
+    * be changed to be a test for the RRBC case.  */
+ 
+   if (1)
+     {
+       /* Non-RRBC case; the virtual function pointers are stored at fixed
+        * offsets in the virtual table. */
+ 
+       /* Retrieve the offset in the virtual table from the debug
+        * info.  The offset of the vfunc's entry is in words from
+        * the beginning of the vtable; but first we have to adjust
+        * by HP_ACC_VFUNC_START to account for other entries */
+ 
+       /* pai: FIXME: 32x64 problem here, a word may be 8 bytes in
+        * which case the multiplier should be 8 and values should be long */
+       vp = value_at (builtin_type_int,
+ 		     coreptr + 4 * (TYPE_FN_FIELD_VOFFSET (f, j) +
+ 				    HP_ACC_VFUNC_START), NULL);
+ 
+       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
+       /* coreptr now contains the address of the virtual function */
+       /* (Actually, it contains the pointer to the plabel for the function. */
+     }
+   else
+     {
+       /* RRBC case; the virtual function pointers are found by double
+        * indirection through the class segment tables. */
+ 
+       /* Choose class segment depending on type we were passed */
+       class_index = class_index_in_primary_list (type);
+ 
+       /* Find class segment pointer.  These are in the vtable slots after
+        * some other entries, so adjust by HP_ACC_VFUNC_START for that. */
+       /* pai: FIXME 32x64 problem here, if words are 8 bytes long
+        * the multiplier below has to be 8 and value should be long. */
+       vp = value_at (builtin_type_int,
+ 		     coreptr + 4 * (HP_ACC_VFUNC_START + class_index), NULL);
+       /* Indirect once more, offset by function index */
+       /* pai: FIXME 32x64 problem here, again multiplier could be 8 and value long */
+       coreptr =
+ 	*(CORE_ADDR *) (VALUE_CONTENTS (vp) +
+ 			4 * TYPE_FN_FIELD_VOFFSET (f, j));
+       vp = value_at (builtin_type_int, coreptr, NULL);
+       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
+ 
+       /* coreptr now contains the address of the virtual function */
+       /* (Actually, it contains the pointer to the plabel for the function.) */
+ 
+     }
+ 
+   if (!coreptr)
+     error ("Address of virtual function is null; error in virtual table?");
+ 
+   /* Wrap this addr in a value and return pointer */
+   vp = allocate_value (ftype);
+   VALUE_TYPE (vp) = ftype;
+   VALUE_ADDRESS (vp) = coreptr;
+ 
+   /* pai: (temp) do we need the value_ind stuff in value_fn_field? */
+   return vp;
+ }
+ 
+ static void find_rt_vbase_offset (struct type *, struct type *, char *, int,
+ 				  int *, int *);
+ /* Return the offset (in bytes) of the virtual base of type BASETYPE
+  * in an object pointed to by VALADDR (on the host), assumed to be of
+  * type TYPE.  OFFSET is number of bytes beyond start of ARG to start
+  * looking (in case VALADDR is the contents of an enclosing object).
+  *
+  * This routine recurses on the primary base of the derived class because
+  * the virtual base entries of the primary base appear before the other
+  * virtual base entries.
+  *
+  * If the virtual base is not found, a negative integer is returned.
+  * The magnitude of the negative integer is the number of entries in
+  * the virtual table to skip over (entries corresponding to various
+  * ancestral classes in the chain of primary bases).
+  *
+  */
+ 
+ int
+ hpacc_baseclass_offset (struct type *type, int index, value_ptr * arg1p,
+ 			char *valaddr, CORE_ADDR address, int offset)
+ {
+   int skip;
+   int boffset;
+   if (arg1p != NULL)
+     find_rt_vbase_offset (type, TYPE_BASECLASS (type, index),
+ 			  VALUE_CONTENTS_ALL (*arg1p),
+ 			  offset + VALUE_EMBEDDED_OFFSET (*arg1p), &boffset,
+ 			  &skip);
+   else
+     find_rt_vbase_offset (type, TYPE_BASECLASS (type, index),
+ 			  valaddr - offset, offset, &boffset, &skip);
+ 
+   if (skip >= 0)
+     error ("Virtual base class offset not found in vtable");
+   return boffset;
+ }
+ 
+ static void
+ find_rt_vbase_offset (struct type *type, struct type *basetype, char *valaddr,
+ 		      int offset, int *boffset_p, int *skip_p)
+ {
+   int boffset;			/* offset of virtual base */
+   int index;			/* displacement to use in virtual table */
+   int skip;
+ 
+   value_ptr vp;
+   CORE_ADDR vtbl;		/* the virtual table pointer */
+   struct type *pbc;		/* the primary base class */
+ 
+   /* Look for the virtual base recursively in the primary base, first.
+    * This is because the derived class object and its primary base
+    * subobject share the primary virtual table.  */
+ 
+   boffset = 0;
+   pbc = TYPE_PRIMARY_BASE (type);
+   if (pbc)
+     {
+       find_rt_vbase_offset (pbc, basetype, valaddr, offset, &boffset, &skip);
+       if (skip < 0)
+ 	{
+ 	  *boffset_p = boffset;
+ 	  *skip_p = -1;
+ 	  return;
+ 	}
+     }
+   else
+     skip = 0;
+ 
+ 
+   /* Find the index of the virtual base according to HP/Taligent
+      runtime spec. (Depth-first, left-to-right.)  */
+   index = virtual_base_index_skip_primaries (basetype, type);
+ 
+   if (index < 0)
+     {
+       *skip_p = skip + virtual_base_list_length_skip_primaries (type);
+       *boffset_p = 0;
+       return;
+     }
+ 
+   /* pai: FIXME -- 32x64 possible problem */
+   /* First word (4 bytes) in object layout is the vtable pointer */
+   vtbl = *(CORE_ADDR *) (valaddr + offset);
+ 
+   /* Before the constructor is invoked, things are usually zero'd out. */
+   if (vtbl == 0)
+     error
+       ("Couldn't find virtual table -- object may not be constructed yet.");
+ 
+ 
+   /* Find virtual base's offset -- jump over entries for primary base
+    * ancestors, then use the index computed above.  But also adjust by
+    * HP_ACC_VBASE_START for the vtable slots before the start of the
+    * virtual base entries.  Offset is negative -- virtual base entries
+    * appear _before_ the address point of the virtual table. */
+ 
+   /* pai: FIXME -- 32x64 problem, if word = 8 bytes, change multiplier
+      & use long type */
+ 
+   /* epstein : FIXME -- added param for overlay section. May not be correct */
+   vp =
+     value_at (builtin_type_int,
+ 	      vtbl + 4 * (-skip - index - HP_ACC_VBASE_START), NULL);
+   boffset = value_as_long (vp);
+   *skip_p = -1;
+   *boffset_p = boffset;
+   return;
+ }
+ 
+ struct type *
+ hpacc_rtti_type (value_ptr v, int *full, int *top, int *using_enc)
+ {
+   struct type *known_type;
+   struct type *rtti_type;
+   CORE_ADDR coreptr;
+   value_ptr vp;
+   int using_enclosing = 0;
+   long top_offset = 0;
+   char rtti_type_name[256];
+ 
+   if (full)
+     *full = 0;
+   if (top)
+     *top = -1;
+   if (using_enc)
+     *using_enc = 0;
+ 
+   /* Get declared type */
+   known_type = VALUE_TYPE (v);
+   CHECK_TYPEDEF (known_type);
+   /* RTTI works only or class objects */
+   if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
+     return NULL;
+   if (TYPE_HAS_VTABLE (known_type))
+     {
+       /* If neither the declared type nor the enclosing type of the
+        * value structure has a HP ANSI C++ style virtual table,
+        * we can't do anything. */
+       if (!TYPE_HAS_VTABLE (known_type))
+ 	{
+ 	  known_type = VALUE_ENCLOSING_TYPE (v);
+ 	  CHECK_TYPEDEF (known_type);
+ 	  if ((TYPE_CODE (known_type) != TYPE_CODE_CLASS) ||
+ 	      !TYPE_HAS_VTABLE (known_type))
+ 	    return NULL;	/* No RTTI, or not HP-compiled types */
+ 	  CHECK_TYPEDEF (known_type);
+ 	  using_enclosing = 1;
+ 	}
+ 
+       if (using_enclosing && using_enc)
+ 	*using_enc = 1;
+ 
+       /* First get the virtual table address */
+       coreptr = *(CORE_ADDR *) ((VALUE_CONTENTS_ALL (v))
+ 				+ VALUE_OFFSET (v)
+ 				+
+ 				(using_enclosing ? 0 :
+ 				 VALUE_EMBEDDED_OFFSET (v)));
+       if (coreptr == 0)
+ 	return NULL;		/* return silently -- maybe called on gdb-generated value */
+ 
+       /* Fetch the top offset of the object */
+       /* FIXME possible 32x64 problem with pointer size & arithmetic */
+       vp = value_at (builtin_type_int,
+ 		     coreptr + 4 * HP_ACC_TOP_OFFSET_OFFSET,
+ 		     VALUE_BFD_SECTION (v));
+       top_offset = value_as_long (vp);
+       if (top)
+ 	*top = top_offset;
+ 
+       /* Fetch the typeinfo pointer */
+       /* FIXME possible 32x64 problem with pointer size & arithmetic */
+       vp =
+ 	value_at (builtin_type_int, coreptr + 4 * HP_ACC_TYPEINFO_OFFSET,
+ 		  VALUE_BFD_SECTION (v));
+       /* Indirect through the typeinfo pointer and retrieve the pointer
+        * to the string name */
+       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
+       if (!coreptr)
+ 	error
+ 	  ("Retrieved null typeinfo pointer in trying to determine run-time type");
+       vp = value_at (builtin_type_int, coreptr + 4, VALUE_BFD_SECTION (v));	/* 4 -> offset of name field */
+       /* FIXME possible 32x64 problem */
+ 
+       coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp));
+ 
+       read_memory_string (coreptr, rtti_type_name, 256);
+ 
+       if (strlen (rtti_type_name) == 0)
+ 	error ("Retrieved null type name from typeinfo");
+ 
+       /* search for type */
+       rtti_type = lookup_typename (rtti_type_name, (struct block *) 0, 1);
+ 
+       if (!rtti_type)
+ 	error
+ 	  ("Could not find run-time type: invalid type name %s in typeinfo??",
+ 	   rtti_type_name);
+       CHECK_TYPEDEF (rtti_type);
+ #if 0
+       printf ("RTTI type name %s, tag %s, full? %d\n", TYPE_NAME (rtti_type),
+ 	      TYPE_TAG_NAME (rtti_type), full ? *full : -1);
+ #endif
+       /* Check whether we have the entire object */
+       if (full			/* Non-null pointer passed */
+ 	  &&
+ 	  /* Either we checked on the whole object in hand and found the
+ 	     top offset to be zero */
+ 	  (((top_offset == 0) &&
+ 	    using_enclosing &&
+ 	    TYPE_LENGTH (known_type) == TYPE_LENGTH (rtti_type)) ||
+ 	   /* Or we checked on the embedded object and top offset was the
+ 	      same as the embedded offset */
+ 	   ((top_offset == VALUE_EMBEDDED_OFFSET (v)) &&
+ 	    !using_enclosing &&
+ 	    TYPE_LENGTH (VALUE_ENCLOSING_TYPE (v)) ==
+ 	    TYPE_LENGTH (rtti_type))))
+ 
+ 	*full = 1;
+     }
+   return rtti_type;
+ }
+ 
+ void
+ init_hpacc_ops (void)
+ {
+   hpacc_abi_ops.cpo_shortname = "hpaCC";
+   hpacc_abi_ops.cpo_longname = "HP aCC ABI";
+   hpacc_abi_ops.cpo_doc = "HP aCC ABI";
+   hpacc_abi_ops.cpo_destructor_prefix_p = hpacc_destructor_prefix_p;
+   hpacc_abi_ops.cpo_constructor_prefix_p = hpacc_constructor_prefix_p;
+   hpacc_abi_ops.cpo_vtable_prefix_p = hpacc_vtable_prefix_p;
+   hpacc_abi_ops.cpo_operator_prefix_p = hpacc_operator_prefix_p;
+   hpacc_abi_ops.cpo_baseclass_offset = hpacc_baseclass_offset;
+   hpacc_abi_ops.cpo_virtual_fn_field = hpacc_virtual_fn_field;
+ }
+ 
+ void
+ _initialize_hpacc_abi (void)
+ {
+   init_hpacc_ops ();
+ 
+   regcomp (&constructor_pattern,
+ 	   "^This will never match anything, please fill it in$", REG_NOSUB);
+ 
+   regcomp (&destructor_pattern,
+ 	   "^This will never match anything, please fill it in$", REG_NOSUB);
+ 
+   regcomp (&operator_pattern,
+ 	   "^This will never match anything, please fill it in$", REG_NOSUB);
+ 
+   register_cp_abi (hpacc_abi_ops);
+ }
Index: gnu-v2-abi.c
===================================================================
RCS file: gnu-v2-abi.c
diff -N gnu-v2-abi.c
*** /dev/null	Tue May  5 13:32:27 1998
--- gnu-v2-abi.c	Tue Mar 20 08:44:56 2001
***************
*** 0 ****
--- 1,288 ----
+ /* Abstraction of GNU v2 abi.
+    Contributed by Daniel Berlin <dberlin@redhat.com>
+    Copyright 2001 Free Software Foundation, Inc.
+ 
+    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
+    (at your option) any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    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.  */
+ 
+ #include "defs.h"
+ #include "cp-abi.h"
+ #include "gdb_regex.h"
+ #include "gdb_string.h"
+ #include "symtab.h"
+ #include "gdbtypes.h"
+ #include "value.h"
+ #include <ctype.h>
+ 
+ struct cp_abi_ops gnu_v2_abi_ops;
+ 
+ static int vb_match (struct type *, int, struct type *);
+ 
+ int
+ gnuv2_destructor_prefix_p (const char *name)
+ {
+   return ((name[0] == '_' && is_cplus_marker (name[1]) && name[2] == '_')
+ 	  || strncmp (name, "__dt__", 6) == 0);
+ }
+ 
+ int
+ gnuv2_constructor_prefix_p (const char *name)
+ {
+   return ((name[0] == '_' && name[1] == '_'
+ 	   && (isdigit (name[2]) || strchr ("Qt", name[2])))
+ 	  || strncmp (name, "__ct__", 6) == 0);
+ }
+ 
+ int
+ gnuv2_vtable_prefix_p (const char *name)
+ {
+   return (((name)[0] == '_'
+ 	   && (((name)[1] == 'V' && (name)[2] == 'T')
+ 	       || ((name)[1] == 'v' && (name)[2] == 't'))
+ 	   && is_cplus_marker ((name)[3])) ||
+ 	  ((name)[0] == '_' && (name)[1] == '_'
+ 	   && (name)[2] == 'v' && (name)[3] == 't' && (name)[4] == '_'));
+ }
+ 
+ int
+ gnuv2_operator_prefix_p (const char *name)
+ {
+   return strncmp (name, "operator", 8) == 0;
+ }
+ 
+ /* Return true if the INDEXth field of TYPE is a virtual baseclass
+    pointer which is for the base class whose type is BASECLASS.  */
+ 
+ static int
+ vb_match (struct type *type, int index, struct type *basetype)
+ {
+   struct type *fieldtype;
+   char *name = TYPE_FIELD_NAME (type, index);
+   char *field_class_name = NULL;
+ 
+   if (*name != '_')
+     return 0;
+   /* gcc 2.4 uses _vb$.  */
+   if (name[1] == 'v' && name[2] == 'b' && is_cplus_marker (name[3]))
+     field_class_name = name + 4;
+   /* gcc 2.5 will use __vb_.  */
+   if (name[1] == '_' && name[2] == 'v' && name[3] == 'b' && name[4] == '_')
+     field_class_name = name + 5;
+ 
+   if (field_class_name == NULL)
+     /* This field is not a virtual base class pointer.  */
+     return 0;
+ 
+   /* It's a virtual baseclass pointer, now we just need to find out whether
+      it is for this baseclass.  */
+   fieldtype = TYPE_FIELD_TYPE (type, index);
+   if (fieldtype == NULL || TYPE_CODE (fieldtype) != TYPE_CODE_PTR)
+     /* "Can't happen".  */
+     return 0;
+ 
+   /* What we check for is that either the types are equal (needed for
+      nameless types) or have the same name.  This is ugly, and a more
+      elegant solution should be devised (which would probably just push
+      the ugliness into symbol reading unless we change the stabs format).  */
+   if (TYPE_TARGET_TYPE (fieldtype) == basetype)
+     return 1;
+ 
+   if (TYPE_NAME (basetype) != NULL
+       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
+       && STREQ (TYPE_NAME (basetype),
+ 		TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
+     return 1;
+   return 0;
+ }
+ 
+ /* Compute the offset of the baseclass which is
+    the INDEXth baseclass of class TYPE,
+    for value at VALADDR (in host) at ADDRESS (in target).
+    The result is the offset of the baseclass value relative
+    to (the address of)(ARG) + OFFSET.
+ 
+    -1 is returned on error. */
+ 
+ int
+ gnuv2_baseclass_offset (struct type *type, int index, value_ptr * arg1p,
+ 			char *valaddr, CORE_ADDR address, int offset)
+ {
+   struct type *basetype = TYPE_BASECLASS (type, index);
+ 
+   if (BASETYPE_VIA_VIRTUAL (type, index))
+     {
+       /* Must hunt for the pointer to this virtual baseclass.  */
+       register int i, len = TYPE_NFIELDS (type);
+       register int n_baseclasses = TYPE_N_BASECLASSES (type);
+ 
+       /* First look for the virtual baseclass pointer
+          in the fields.  */
+       for (i = n_baseclasses; i < len; i++)
+ 	{
+ 	  if (vb_match (type, i, basetype))
+ 	    {
+ 	      CORE_ADDR addr = unpack_pointer (TYPE_FIELD_TYPE (type, i),
+ 					       valaddr +
+ 					       (TYPE_FIELD_BITPOS (type, i) /
+ 						8));
+ 
+ 	      return addr - (LONGEST) address;
+ 	    }
+ 	}
+       /* Not in the fields, so try looking through the baseclasses.  */
+       for (i = index + 1; i < n_baseclasses; i++)
+ 	{
+ 	  int boffset =
+ 	    gnuv2_baseclass_offset (type, i, arg1p, valaddr, address, offset);
+ 	  if (boffset)
+ 	    return boffset;
+ 	}
+       /* Not found.  */
+       return -1;
+     }
+ 
+   /* Baseclass is easily computed.  */
+   return TYPE_BASECLASS_BITPOS (type, index) / 8;
+ }
+ 
+ /* Return a virtual function as a value.
+    ARG1 is the object which provides the virtual function
+    table pointer.  *ARG1P is side-effected in calling this function.
+    F is the list of member functions which contains the desired virtual
+    function.
+    J is an index into F which provides the desired virtual function.
+ 
+    TYPE is the type in which F is located.  */
+ value_ptr
+ gnuv2_virtual_fn_field (value_ptr * arg1p, struct fn_field * f, int j,
+ 			struct type * type, int offset)
+ {
+   value_ptr arg1 = *arg1p;
+   struct type *type1 = check_typedef (VALUE_TYPE (arg1));
+ 
+ 
+   struct type *entry_type;
+   /* First, get the virtual function table pointer.  That comes
+      with a strange type, so cast it to type `pointer to long' (which
+      should serve just fine as a function type).  Then, index into
+      the table, and convert final value to appropriate function type.  */
+   value_ptr entry, vfn, vtbl;
+   value_ptr vi = value_from_longest (builtin_type_int,
+ 				     (LONGEST) TYPE_FN_FIELD_VOFFSET (f, j));
+   struct type *fcontext = TYPE_FN_FIELD_FCONTEXT (f, j);
+   struct type *context;
+   if (fcontext == NULL)
+     /* We don't have an fcontext (e.g. the program was compiled with
+        g++ version 1).  Try to get the vtbl from the TYPE_VPTR_BASETYPE.
+        This won't work right for multiple inheritance, but at least we
+        should do as well as GDB 3.x did.  */
+     fcontext = TYPE_VPTR_BASETYPE (type);
+   context = lookup_pointer_type (fcontext);
+   /* Now context is a pointer to the basetype containing the vtbl.  */
+   if (TYPE_TARGET_TYPE (context) != type1)
+     {
+       value_ptr tmp = value_cast (context, value_addr (arg1));
+       VALUE_POINTED_TO_OFFSET (tmp) = 0;
+       arg1 = value_ind (tmp);
+       type1 = check_typedef (VALUE_TYPE (arg1));
+     }
+ 
+   context = type1;
+   /* Now context is the basetype containing the vtbl.  */
+ 
+   /* This type may have been defined before its virtual function table
+      was.  If so, fill in the virtual function table entry for the
+      type now.  */
+   if (TYPE_VPTR_FIELDNO (context) < 0)
+     fill_in_vptr_fieldno (context);
+ 
+   /* The virtual function table is now an array of structures
+      which have the form { int16 offset, delta; void *pfn; }.  */
+   vtbl = value_primitive_field (arg1, 0, TYPE_VPTR_FIELDNO (context),
+ 				TYPE_VPTR_BASETYPE (context));
+ 
+   /* With older versions of g++, the vtbl field pointed to an array
+      of structures.  Nowadays it points directly to the structure. */
+   if (TYPE_CODE (VALUE_TYPE (vtbl)) == TYPE_CODE_PTR
+       && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (vtbl))) == TYPE_CODE_ARRAY)
+     {
+       /* Handle the case where the vtbl field points to an
+          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.  */
+       entry = value_subscript (vtbl, vi);
+     }
+   else
+     {
+       /* Handle the case where the vtbl field points directly to a structure. */
+       vtbl = value_add (vtbl, vi);
+       entry = value_ind (vtbl);
+     }
+ 
+   entry_type = check_typedef (VALUE_TYPE (entry));
+ 
+   if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
+     {
+       /* Move the `this' pointer according to the virtual function table. */
+       VALUE_OFFSET (arg1) += value_as_long (value_field (entry, 0));
+ 
+       if (!VALUE_LAZY (arg1))
+ 	{
+ 	  VALUE_LAZY (arg1) = 1;
+ 	  value_fetch_lazy (arg1);
+ 	}
+ 
+       vfn = value_field (entry, 2);
+     }
+   else if (TYPE_CODE (entry_type) == TYPE_CODE_PTR)
+     vfn = entry;
+   else
+     error ("I'm confused:  virtual function table has bad type");
+   /* Reinstantiate the function pointer with the correct type.  */
+   VALUE_TYPE (vfn) = lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j));
+ 
+   *arg1p = arg1;
+   return vfn;
+ }
+ 
+ void
+ init_gnuv2_ops (void)
+ {
+   gnu_v2_abi_ops.cpo_shortname = "gnu-v2";
+   gnu_v2_abi_ops.cpo_longname = "GNU G++ Version 2 ABI";
+   gnu_v2_abi_ops.cpo_doc = "G++ Version 2 ABI";
+   gnu_v2_abi_ops.cpo_destructor_prefix_p = gnuv2_destructor_prefix_p;
+   gnu_v2_abi_ops.cpo_constructor_prefix_p = gnuv2_constructor_prefix_p;
+   gnu_v2_abi_ops.cpo_vtable_prefix_p = gnuv2_vtable_prefix_p;
+   gnu_v2_abi_ops.cpo_operator_prefix_p = gnuv2_operator_prefix_p;
+   gnu_v2_abi_ops.cpo_baseclass_offset = gnuv2_baseclass_offset;
+   gnu_v2_abi_ops.cpo_virtual_fn_field = gnuv2_virtual_fn_field;
+ }
+ 
+ void
+ _initialize_gnu_v2_abi (void)
+ {
+   init_gnuv2_ops ();
+   register_cp_abi (gnu_v2_abi_ops);
+   switch_to_cp_abi ("gnu-v2");
+ }
Index: gnu-v3-abi.c
===================================================================
RCS file: gnu-v3-abi.c
diff -N gnu-v3-abi.c
*** /dev/null	Tue May  5 13:32:27 1998
--- gnu-v3-abi.c	Tue Mar 20 08:44:57 2001
***************
*** 0 ****
--- 1,290 ----
+ /* Abstraction of GNU v3 abi.
+    Contributed by Daniel Berlin <dberlin@redhat.com>
+    Copyright 2001 Free Software Foundation, Inc.
+ 
+    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
+    (at your option) any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    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.  */
+ 
+ #include "defs.h"
+ #include "cp-abi.h"
+ #include "gdb_regex.h"
+ #include "gdb_string.h"
+ struct cp_abi_ops gnu_v3_abi_ops;
+ static regex_t constructor_pattern;
+ static regex_t destructor_pattern;
+ 
+ int
+ gnuv3_destructor_prefix_p (const char *name)
+ {
+   return regexec (&destructor_pattern, name, 0, 0, 0) == 0;
+ }
+ 
+ int
+ gnuv3_constructor_prefix_p (const char *name)
+ {
+   return regexec (&constructor_pattern, name, 0, 0, 0) == 0;
+ }
+ 
+ int
+ gnuv3_vtable_prefix_p (const char *name)
+ {
+   return strncmp (name, "_ZTV", 4) == 0;
+ }
+ 
+ int
+ gnuv3_operator_prefix_p (const char *name)
+ {
+   return strncmp (name, "operator", 8) == 0;
+ }
+ 
+ /* Since this appears to work okay, we might as well share it */
+ /* Return true if the INDEXth field of TYPE is a virtual baseclass
+    pointer which is for the base class whose type is BASECLASS.  */
+ 
+ static int
+ vb_match (struct type *type, int index, struct type *basetype)
+ {
+   struct type *fieldtype;
+   char *name = TYPE_FIELD_NAME (type, index);
+   char *field_class_name = NULL;
+ 
+   if (*name != '_')
+     return 0;
+   if (strncmp (name, "_vptr.", 6) == 0)
+     field_class_name = name + 6;
+ 
+   if (field_class_name == NULL)
+     /* This field is not a virtual base class pointer.  */
+     return 0;
+ 
+   /* It's a virtual baseclass pointer, now we just need to find out whether
+      it is for this baseclass.  */
+   fieldtype = TYPE_FIELD_TYPE (type, index);
+   if (fieldtype == NULL || TYPE_CODE (fieldtype) != TYPE_CODE_PTR)
+     /* "Can't happen".  */
+     return 0;
+ 
+   /* What we check for is that either the types are equal (needed for
+      nameless types) or have the same name.  This is ugly, and a more
+      elegant solution should be devised (which would probably just push
+      the ugliness into symbol reading unless we change the stabs format).  */
+   if (TYPE_TARGET_TYPE (fieldtype) == basetype)
+     return 1;
+ 
+   if (TYPE_NAME (basetype) != NULL
+       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
+       && STREQ (TYPE_NAME (basetype),
+ 		TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
+     return 1;
+   return 0;
+ }
+ 
+ /* Compute the offset of the baseclass which is
+    the INDEXth baseclass of class TYPE,
+    for value at VALADDR (in host) at ADDRESS (in target).
+    The result is the offset of the baseclass value relative
+    to (the address of)(ARG) + OFFSET.
+ 
+    -1 is returned on error. */
+ 
+ int
+ gnuv3_baseclass_offset (struct type *type, int index, value_ptr * arg1p,
+ 			char *valaddr, CORE_ADDR address, int offset)
+ {
+   struct type *basetype = TYPE_BASECLASS (type, index);
+   CORE_ADDR coreptr;
+   struct type *pbc;
+   value_ptr testptr;
+   if (BASETYPE_VIA_VIRTUAL (type, index))
+     {
+       struct type **vbases;
+       if (arg1p)
+ 	offset -= VALUE_EMBEDDED_OFFSET (*arg1p);
+       vbases = virtual_base_list (type);
+ 
+       /* Completely wrong for non-trivial cases, i'm working on the correct way */
+       coreptr = (*((CORE_ADDR *) (valaddr)));
+       coreptr -= 12;
+       coreptr = value_as_long (value_at (builtin_type_int, coreptr, NULL));
+       return coreptr - offset;
+     }
+   /* Baseclass is easily computed.  */
+   return (TYPE_BASECLASS_BITPOS (type, index) / 8) /*- offset*/ ;
+ }
+ 
+ struct type *
+ gnuv3_rtti_type (value_ptr v, int *full, int *top, int *using_enc)
+ {
+   struct type *known_type;
+   struct type *rtti_type;
+   CORE_ADDR coreptr;
+   value_ptr vp;
+   int using_enclosing = 0;
+   long top_offset = 0;
+   char rtti_type_name[256];
+   struct minimal_symbol *sym;
+   struct symbol *sym2;
+   char *tempname;
+ 
+   if (full)
+     *full = 0;
+   if (top)
+     *top = -1;
+   if (using_enc)
+     *using_enc = 0;
+ 
+   /* Get declared type */
+   known_type = VALUE_TYPE (v);
+   CHECK_TYPEDEF (known_type);
+   /* RTTI works only or class objects */
+   if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
+     return NULL;
+ 
+   /* It's two words ahead of the pointer to the vtable */
+   fill_in_vptr_fieldno (known_type);
+   if (TYPE_VPTR_FIELDNO (known_type) == -1)
+     return NULL;
+   if (known_type != known_type->vptr_basetype)
+     *using_enc = 1;
+   known_type = known_type->vptr_basetype;
+   coreptr =
+     *((CORE_ADDR *) (VALUE_CONTENTS_ALL (v) + VALUE_OFFSET (v) +
+ 		     VALUE_EMBEDDED_OFFSET (v)));
+   coreptr -= 12;
+   *top =
+     value_as_long (value_at
+ 		   (builtin_type_int, coreptr, VALUE_BFD_SECTION (v)));
+   coreptr += 8;
+   vp = value_at (builtin_type_int, coreptr, VALUE_BFD_SECTION (v));
+   sym = lookup_minimal_symbol_by_pc (value_as_long (vp));
+   if (!sym)
+     return NULL;
+   tempname = strdup (SYMBOL_DEMANGLED_NAME (sym));
+   sym2 =
+     lookup_symbol (strstr (tempname, "for ") + 4, 0, VAR_NAMESPACE, 0, 0);
+   rtti_type = NULL;
+   if (sym2 != NULL)
+     rtti_type = SYMBOL_TYPE (sym2);
+   free (tempname);
+   if (*top == 0)
+     *full = 1;
+   return rtti_type;
+ }
+ 
+ /* Return a virtual function as a value.
+    ARG1 is the object which provides the virtual function
+    table pointer.  *ARG1P is side-effected in calling this function.
+    F is the list of member functions which contains the desired virtual
+    function.
+    J is an index into F which provides the desired virtual function.
+ 
+    TYPE is the type in which F is located.  */
+ value_ptr
+ gnuv3_virtual_fn_field (value_ptr * arg1p, struct fn_field * f, int j,
+ 			struct type * type, int offset)
+ {
+   value_ptr arg1 = *arg1p;
+   struct type *type1 = check_typedef (VALUE_TYPE (arg1));
+   unsigned int vtbl;
+ 
+   struct type *entry_type;
+   /* First, get the virtual function table pointer.  That comes
+      with a strange type, so cast it to type `pointer to long' (which
+      should serve just fine as a function type).  Then, index into
+      the table, and convert final value to appropriate function type.  */
+   value_ptr entry, vfn;
+   value_ptr vi = value_from_longest (builtin_type_int,
+ 				     f[j].voffset * 4);
+   struct type *fcontext = TYPE_FN_FIELD_FCONTEXT (f, j);
+   struct type *context;
+   if (fcontext == NULL)
+     /* We don't have an fcontext (e.g. the program was compiled with
+        g++ version 1).  Try to get the vtbl from the TYPE_VPTR_BASETYPE.
+        This won't work right for multiple inheritance, but at least we
+        should do as well as GDB 3.x did.  */
+     fcontext = TYPE_VPTR_BASETYPE (type);
+   context = lookup_pointer_type (fcontext);
+   /* Now context is a pointer to the basetype containing the vtbl.  */
+   if (TYPE_TARGET_TYPE (context) != type1)
+     {
+       value_ptr tmp = value_cast (context, value_addr (arg1));
+       VALUE_POINTED_TO_OFFSET (tmp) = 0;
+       arg1 = value_ind (tmp);
+       type1 = check_typedef (VALUE_TYPE (arg1));
+     }
+ 
+   context = type1;
+   /* Now context is the basetype containing the vtbl.  */
+ 
+   /* This type may have been defined before its virtual function table
+      was.  If so, fill in the virtual function table entry for the
+      type now.  */
+   if (TYPE_VPTR_FIELDNO (context) < 0)
+     fill_in_vptr_fieldno (context);
+ 
+   vtbl =
+     VALUE_ADDRESS (value_field (*arg1p, 0)) +
+     VALUE_EMBEDDED_OFFSET (value_field (*arg1p, 0)) +
+     VALUE_OFFSET (value_field (*arg1p, 0)) - 8;
+   vtbl =
+     unpack_pointer (builtin_type_int,
+ 		    VALUE_CONTENTS_ALL (value_at
+ 					(builtin_type_int, vtbl, NULL)));
+   vtbl += (f[j].voffset * 4) - 8;
+   vtbl = value_as_long (value_at (builtin_type_int, vtbl, NULL));
+ 
+ 
+   /* Reinstantiate the function pointer with the correct type.  */
+   VALUE_TYPE (vfn) = lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j));
+ 
+   *arg1p = arg1;
+   return vfn;
+ }
+ 
+ void
+ init_gnuv3_ops (void)
+ {
+   gnu_v3_abi_ops.cpo_shortname = "gnu-v3";
+   gnu_v3_abi_ops.cpo_longname = "GNU G++ Version 3 ABI";
+   gnu_v3_abi_ops.cpo_doc = "G++ Version 3 ABI";
+   gnu_v3_abi_ops.cpo_destructor_prefix_p = gnuv3_destructor_prefix_p;
+   gnu_v3_abi_ops.cpo_constructor_prefix_p = gnuv3_constructor_prefix_p;
+   gnu_v3_abi_ops.cpo_vtable_prefix_p = gnuv3_vtable_prefix_p;
+   gnu_v3_abi_ops.cpo_operator_prefix_p = gnuv3_operator_prefix_p;
+   gnu_v3_abi_ops.cpo_baseclass_offset = gnuv3_baseclass_offset;
+   gnu_v3_abi_ops.cpo_rtti_type = gnuv3_rtti_type;
+   /* Until it works, set it to NULL to disable the virtual function calling */
+   gnu_v3_abi_ops.cpo_virtual_fn_field = NULL;	/*gnuv3_virtual_fn_field; */
+ }
+ 
+ void
+ _initialize_gnu_v3_abi (void)
+ {
+   init_gnuv3_ops ();
+ 
+   /* constructor pattern = '_ZN' qualified name ('C1'|'C2'|'C3') 'E' params */
+   regcomp (&constructor_pattern, "^_ZN.*[1-9][a-zA-Z0-9$]*C[1-3]E",
+ 	   REG_NOSUB);
+ 
+   /* destructor pattern = '_ZN' qualified name ('D0'|'D1'|'D2') 'Ev' */
+   regcomp (&destructor_pattern, "^_ZN.*[1-9][a-zA-Z0-9$]*D[0-2]Ev$",
+ 	   REG_NOSUB);
+ 
+   register_cp_abi (gnu_v3_abi_ops);
+ }
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.62
diff -c -3 -p -w -B -b -r1.62 Makefile.in
*** Makefile.in	2001/02/18 07:22:16	1.62
--- Makefile.in	2001/03/20 16:50:29
*************** SFILES = ax-general.c ax-gdb.c bcache.c 
*** 536,542 ****
  	tui/tuiSource.h tui/tuiSourceWin.c tui/tuiSourceWin.h \
  	tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
  	tui/tui-file.h tui/tui-file.c \
! 	ui-file.h ui-file.c
  
  LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
  
--- 536,543 ----
  	tui/tuiSource.h tui/tuiSourceWin.c tui/tuiSourceWin.h \
  	tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
  	tui/tui-file.h tui/tui-file.c \
! 	ui-file.h ui-file.c \
! 	gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c cp-abi.c
  
  LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
  
*************** cli_script_h =	$(srcdir)/cli/cli-script.
*** 607,612 ****
--- 608,615 ----
  cli_setshow_h =	$(srcdir)/cli/cli-setshow.h
  cli_utils_h =	$(srcdir)/cli/cli-utils.h
  
+ cp_abi_h = cp-abi.h
+ 
  # Header files that need to have srcdir added.  Note that in the cases
  # where we use a macro like $(gdbcmd_h), things are carefully arranged
  # so that each .h file is listed exactly once (M-x tags-search works
*************** COMMON_OBS = version.o blockframe.o brea
*** 679,685 ****
  	c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
  	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
  	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
! 	ui-file.o tui-file.o
  
  OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
  
--- 682,689 ----
  	c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
  	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
  	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
! 	ui-file.o tui-file.o \
! 	gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o
  
  OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
  
*************** c-lang.o: c-lang.c c-lang.h $(defs_h) $(
*** 1220,1229 ****
  
  c-typeprint.o: c-typeprint.c c-lang.h $(defs_h) $(expression_h) \
  	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
! 	target.h typeprint.h $(value_h) gdb_string.h
  
  c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
! 	language.h $(symtab_h) valprint.h $(value_h)
  
  f-lang.o: f-lang.c f-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
  	language.h parser-defs.h $(symtab_h) gdb_string.h
--- 1224,1233 ----
  
  c-typeprint.o: c-typeprint.c c-lang.h $(defs_h) $(expression_h) \
  	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
! 	target.h typeprint.h $(value_h) gdb_string.h $(cp_abi_h)
  
  c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
! 	language.h $(symtab_h) valprint.h $(value_h) $(cp_abi_h)
  
  f-lang.o: f-lang.c f-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
  	language.h parser-defs.h $(symtab_h) gdb_string.h
*************** corefile.o: corefile.c $(dis-asm_h) $(de
*** 1284,1291 ****
  corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
  	target.h gdbthread.h gdb_string.h
  
  cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
! 	$(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h
  
  dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h \
  	$(gdbcore_h) target.h
--- 1288,1297 ----
  corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
  	target.h gdbthread.h gdb_string.h
  
+ cp-abi.o: cp-abi.c $(cp_abi_h)
+ 
  cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
! 	$(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h $(cp_abi_h)
  
  dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h \
  	$(gdbcore_h) target.h
*************** dcache.o: dcache.c $(dcache_h) $(defs_h)
*** 1293,1299 ****
  dbxread.o: dbxread.c $(breakpoint_h) buildsym.h $(command_h) \
  	complaints.h $(defs_h) $(expression_h) gdb-stabs.h $(gdbcore_h) \
  	$(gdbtypes_h) language.h objfiles.h partial-stab.h stabsread.h \
! 	symfile.h $(symtab_h) target.h gdb_string.h
  
  delta68-nat.o: delta68-nat.c $(defs_h)
  
--- 1299,1305 ----
  dbxread.o: dbxread.c $(breakpoint_h) buildsym.h $(command_h) \
  	complaints.h $(defs_h) $(expression_h) gdb-stabs.h $(gdbcore_h) \
  	$(gdbtypes_h) language.h objfiles.h partial-stab.h stabsread.h \
! 	symfile.h $(symtab_h) target.h gdb_string.h $(cp_abi_h)
  
  delta68-nat.o: delta68-nat.c $(defs_h)
  
*************** environ.o: environ.c $(defs_h) environ.h
*** 1322,1328 ****
  
  eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
  	$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
! 	gdb_string.h
  
  event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h) $(event_top_h)
  
--- 1328,1334 ----
  
  eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
  	$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
! 	gdb_string.h $(cp_abi_h)
  
  event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h) $(event_top_h)
  
*************** arch-utils.o: arch-utils.c $(defs_h) $(b
*** 1447,1453 ****
  
  gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
  	$(gdbtypes_h) language.h objfiles.h symfile.h $(symtab_h) target.h \
! 	$(value_h) gdb_string.h wrapper.h
  
  go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) gdb_wait.h $(gdbcore_h) \
  	$(command_h) $(floatformat_h) target.h i387-nat.h
--- 1453,1459 ----
  
  gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
  	$(gdbtypes_h) language.h objfiles.h symfile.h $(symtab_h) target.h \
! 	$(value_h) gdb_string.h wrapper.h $(cp_abi_h)
  
  go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) gdb_wait.h $(gdbcore_h) \
  	$(command_h) $(floatformat_h) target.h i387-nat.h
*************** go32-nat.o: go32-nat.c $(defs_h) $(infer
*** 1455,1460 ****
--- 1461,1470 ----
  gnu-nat.o: process_reply_S.h exc_request_S.h notify_S.h msg_reply_S.h \
  	exc_request_U.h msg_U.h gnu-nat.h
  
+ gnu-v3-abi.o: gnu-v3-abi.c $(cp_abi_h)
+ 
+ gnu-v2-abi.o: gnu-v2-abi.c $(cp_abi_h)
+ 
  h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h)
  
  h8500-tdep.o: h8500-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) \
*************** h8500-tdep.o: h8500-tdep.c $(bfd_h) $(di
*** 1463,1468 ****
--- 1473,1480 ----
  
  hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(gdbcore_h) $(inferior_h)
  
+ hpacc-abi.o: hpacc-abi.c $(cp_abi_h)
+ 
  hppa-tdep.o: hppa-tdep.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
  	$(inferior_h) objfiles.h symfile.h target.h
  
*************** jv-lang.o: jv-lang.c $(bfd_h) $(defs_h) 
*** 1543,1549 ****
  
  jv-typeprint.o: jv-typeprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
  	$(value_h) $(INCLUDE_DIR)/demangle.h jv-lang.h gdb_string.h \
! 	typeprint.h c-lang.h
  
  jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
  	$(expression_h) $(value_h) $(INCLUDE_DIR)/demangle.h valprint.h \
--- 1555,1561 ----
  
  jv-typeprint.o: jv-typeprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
  	$(value_h) $(INCLUDE_DIR)/demangle.h jv-lang.h gdb_string.h \
! 	typeprint.h c-lang.h $(cp_abi_h)
  
  jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
  	$(expression_h) $(value_h) $(INCLUDE_DIR)/demangle.h valprint.h \
*************** p-typeprint.o: p-typeprint.c p-lang.h $(
*** 1581,1587 ****
  	target.h typeprint.h $(value_h) gdb_string.h
  
  p-valprint.o: p-valprint.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
! 	language.h $(symtab_h) valprint.h $(value_h) gdb_string.h
  
  m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
  	$(gdbcore_h) gdb_string.h
--- 1593,1599 ----
  	target.h typeprint.h $(value_h) gdb_string.h
  
  p-valprint.o: p-valprint.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
! 	language.h $(symtab_h) valprint.h $(value_h) gdb_string.h $(cp_abi_h)
  
  m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
  	$(gdbcore_h) gdb_string.h
*************** os9kread.o: os9kread.c buildsym.h compla
*** 1623,1629 ****
  mem-break.o: mem-break.c $(defs_h) 
  
  minsyms.o: minsyms.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
! 	$(symtab_h) gdb_string.h
  
  mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) 
  
--- 1635,1641 ----
  mem-break.o: mem-break.c $(defs_h) 
  
  minsyms.o: minsyms.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
! 	$(symtab_h) gdb_string.h $(cp_abi_h)
  
  mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) 
  
*************** symmisc.o: symmisc.c $(bfd_h) $(breakpoi
*** 1941,1951 ****
  symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
  	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h objfiles.h \
  	gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
! 	gdb_string.h linespec.h
  
  linespec.o: linespec.c linespec.h $(defs_h) $(frame_h) $(value_h) \
  	objfiles.h symfile.h completer.h $(symtab_h) \
! 	$(INCLUDE_DIR)/demangle.h command.h
  
  # OBSOLETE tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
  # OBSOLETE	$(symtab_h)
--- 1953,1963 ----
  symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
  	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h objfiles.h \
  	gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
! 	gdb_string.h linespec.h $(cp_abi_h)
  
  linespec.o: linespec.c linespec.h $(defs_h) $(frame_h) $(value_h) \
  	objfiles.h symfile.h completer.h $(symtab_h) \
! 	$(INCLUDE_DIR)/demangle.h command.h $(cp_abi_h)
  
  # OBSOLETE tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
  # OBSOLETE	$(symtab_h)
*************** top.o: top.c top.h $(bfd_h) $(getopt_h) 
*** 1967,1973 ****
  
  typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
! 	$(value_h) gdb_string.h
  
  ultra3-nat.o: ultra3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h)
  
--- 1979,1985 ----
  
  typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
! 	$(value_h) gdb_string.h $(cp_abi.h)
  
  ultra3-nat.o: ultra3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h)
  
*************** valarith.o: valarith.c $(bfd_h) $(defs_h
*** 1984,1990 ****
  	gdb_string.h
  
  valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
! 	gdb_string.h
  
  valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
--- 1996,2002 ----
  	gdb_string.h
  
  valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
! 	gdb_string.h $(cp_abi_h)
  
  valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
*************** valprint.o: valprint.c $(defs_h) $(expre
*** 1992,1998 ****
  
  values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) $(symtab_h) target.h $(value_h) \
! 	gdb_string.h scm-lang.h
  
  vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
  
--- 2004,2010 ----
  
  values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
  	$(gdbcore_h) $(gdbtypes_h) $(symtab_h) target.h $(value_h) \
! 	gdb_string.h scm-lang.h $(cp_abi_h)
  
  vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
  

-- 

Scaldophobia: Fear the toilet will flush while showering.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]