* c-exp.y (qualified_name): Replace explicit check for valid

destructor name with call to destructor_name_p.

	* c-lang.h, c-typeprint.c (cp_type_print_method_args):  Removed,
	no longer needed.

	* c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base):
	Replace remaining fprintf_unfiltered calls with their filtered variant.
	(c_type_print_base):  Do not print return type for destructors from
	template classes.
	Replace cp_type_print_method_args with cplus_demangle call to get
	consistent type output for stubbed and unstubbed methods.

	* cp-valprint.c (cp_print_class_method):  Replace
	cp_type_print_method_args with cplus_demangle call to get consistent
	type output for stubbed and unstubbed methods.

	* gdbtypes.c, gdbtypes.h (get_destructor_fn_field):  New function
	to find the destructor field indices for a type.

	* gdbtypes.h (struct type):  Clarify comments for vptr_basetype
	and arg_types fields.
	(struct fn_field):  Remove args field, no longer used.

	* symtab.c (decode_line_1), valops.c (value_struct_elt,
	check_field_in):  Use get_destructor_fn_field to find the destructor
	field indices instead of assuming that the compiler passes the member
	function fields in a specific order.

	* symtab.c (find_methods):  Pass NULL instead of SYMBOL_BLOCK_VALUE
	to lookup_symbol.
	(list_symbol):  Replace cp_type_print_method_args with cplus_demangle
	call in zapped out code and explain why this code is zapped out.
This commit is contained in:
Peter Schauer 1996-12-14 09:17:22 +00:00
parent 93f8f531b0
commit a46d92a736
9 changed files with 186 additions and 156 deletions

View file

@ -1,5 +1,5 @@
/* Internal type definitions for GDB.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
@ -303,11 +303,14 @@ struct type
} *fields;
/* For types with virtual functions, VPTR_BASETYPE is the base class which
defined the virtual function table pointer.
/* For types with virtual functions (TYPE_CODE_STRUCT), VPTR_BASETYPE
is the base class which defined the virtual function table pointer.
For types that are pointer to member types, VPTR_BASETYPE
is the type that this pointer is a member of.
For types that are pointer to member types (TYPE_CODE_MEMBER),
VPTR_BASETYPE is the type that this pointer is a member of.
For method types (TYPE_CODE_METHOD), VPTR_BASETYPE is the aggregate
type that contains the method.
Unused otherwise. */
@ -327,7 +330,11 @@ struct type
union type_specific
{
/* ARG_TYPES is for TYPE_CODE_METHOD and TYPE_CODE_FUNC. */
/* ARG_TYPES is for TYPE_CODE_METHOD.
Contains the type of each argument, ending with a void type
after the last argument for normal member functions or a NULL
pointer after the last argument for functions with variable
arguments. */
struct type **arg_types;
@ -433,17 +440,10 @@ struct cplus_struct_type
char *physname;
/* The return value of the method */
/* The type of the method. */
struct type *type;
/* The argument list. Only valid if is_stub is clear. Contains
the type of each argument, including `this', and ending with
a NULL pointer after the last argument. Should not contain
a `this' pointer for static member functions. */
struct type **args;
/* For virtual functions.
First baseclass that defines this virtual function. */
@ -775,6 +775,8 @@ lookup_fundamental_type PARAMS ((struct objfile *, int));
extern void
fill_in_vptr_fieldno PARAMS ((struct type *));
extern int get_destructor_fn_field PARAMS ((struct type *, int *, int *));
extern int get_discrete_bounds PARAMS ((struct type*, LONGEST*, LONGEST*));
#if MAINTENANCE_CMDS