* c-typeprint.c (cp_type_print_method_args): Don't recursively
	expand classes in the arguments to methods.
	(c_type_print_base): Use the name of the method to figure out
	if it is a constructor or destructor.  Use the type information
	to print out the method signature, instead of using the demangled
	name.
        * stabsread.c (read_member_functions): Update comment.
        Set TYPE_NAME if possible.
2002-10-11  David Carlton  <carlton@math.stanford.edu>

	* symtab.c (lookup_symbol_aux): Move chunks of code into separate
	functions.
	(lookup_symbol_aux_local): New function.
	(lookup_symbol_aux_symtabs): New function.
	(lookup_symbol_aux_psymtabs): New function.
	(lookup_symbol_aux_minsyms): New function.
2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* Makefile.in (buildsym.o): Depend on $(gdb_assert_h) and
	$(cp_support_h).
	(cp-support.o): Fix dependencies and add $(gdb_obstack_h) and
	$(gdb_assert_h).
	(symtab.o): Depend on $(cp_support_h).
	* symtab.h: Add opaque declaration for struct using_direct_node.
	(struct block): Add member 'language_specific'.
	(BLOCK_USING): New macro.
	* symtab.c: #include "cp-support.h"
	(lookup_symbol_aux): Call lookup_symbol_aux_nonlocal and
	lookup_symbol_aux_using when appropriate.
	(lookup_symbol_aux_nonlocal): New function.
	(lookup_symbol_aux_using): New function.
	(lookup_symbol_aux_using_loop): New function.
	* symfile.h: Add opaque declaration for struct obstack.
	Declare obsavestring to take a const char *.
	* symfile.c (obsavestring): Make first argument a const char *.
	* jv-lang.c (get_java_class_symtab): Initialize BLOCK_USING.
	* dwarf2read.c: New variable current_namespace.
	(scan_partial_symbols): Handle DW_TAG_namespace.
	(psymtab_to_symtab_1): Initialize current_namespace.
	(process_die): Handle DW_TAG_namespace,
	DW_TAG_imported_declaration, DW_TAG_imported_module.
	(read_namespace): New function.
	(dwarf2_name): New function.
	(dwarf2_extension): New function.
	(dwarf_tag_name): Add DWARF 3 names.
	(dwarf_attr_name): Ditto.
	(dwarf_type_encoding_name): Ditto.
	* cp-support.h: Opaque declaration for struct obstack.
	(struct using_direct): New struct.
	(struct using_direct_node): New struct.
	Add declarations for cp_add_using_obstack, cp_add_using_xmalloc,
	cp_copy_usings, cp_free_usings,	cp_find_first_component.
	* cp-support.c: #include "gdb_obstack.h", "gdb_assert.h".
	Comment on demangled name pitfalls.
	(cp_add_using_obstack): New function.
	(cp_add_using_xmalloc): New function.
	(cp_copy_usings): New function.
	(cp_free_usings): New function.
	(cp_find_first_component): New function.
	* buildsym.h: Declare processing_has_namespace_info.
	Declare add_using_directive.
	* buildsym.c: #include "gdb_assert.h", "cp-support.h".
	Change comment after #include "symfile.h".
	New variable using_list.
	(add_symbol_to_list): Scan for anonymous namespaces when
	appropriate.
	(scan_for_anonymous_namespaces): New function.
	(add_using_directive): New function.
	(start_symtab): Initialize processing_has_namespace_info,
	using_list.
	(end_symtab): Copy using_list into block.
	(copy_usings_to_obstack): New function.
	(finish_block): Set BLOCK_USING in general case and in C++
	function case.

2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/namespace.exp: Add tests involving namespaces
	  starting from C.
	* gdb.c++/namespace.cc: Add namespaces with names starting
	  from C and their contents.
2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* Makefile.in (buildsym.o): Depend on $(gdb_assert_h) and
	$(cp_support_h).
	(cp-support.o): Fix dependencies and add $(gdb_obstack_h) and
	$(gdb_assert_h).
	(symtab.o): Depend on $(cp_support_h).
	* symtab.h: Add opaque declaration for struct using_direct_node.
	(struct block): Add member 'language_specific'.
	(BLOCK_USING): New macro.
	* symtab.c: #include "cp-support.h"
	(lookup_symbol_aux): Call lookup_symbol_aux_nonlocal and
	lookup_symbol_aux_using when appropriate.
	(lookup_symbol_aux_nonlocal): New function.
	(lookup_symbol_aux_using): New function.
	(lookup_symbol_aux_using_loop): New function.
	* symfile.h: Add opaque declaration for struct obstack.
	Declare obsavestring to take a const char *.
	* symfile.c (obsavestring): Make first argument a const char *.
	* jv-lang.c (get_java_class_symtab): Initialize BLOCK_USING.
	* dwarf2read.c: New variable current_namespace.
	(scan_partial_symbols): Handle DW_TAG_namespace.
	(psymtab_to_symtab_1): Initialize current_namespace.
	(process_die): Handle DW_TAG_namespace,
	DW_TAG_imported_declaration, DW_TAG_imported_module.
	(read_namespace): New function.
	(dwarf2_name): New function.
	(dwarf2_extension): New function.
	(dwarf_tag_name): Add DWARF 3 names.
	(dwarf_attr_name): Ditto.
	(dwarf_type_encoding_name): Ditto.
	* cp-support.h: Opaque declaration for struct obstack.
	(struct using_direct): New struct.
	(struct using_direct_node): New struct.
	Add declarations for cp_add_using_obstack, cp_add_using_xmalloc,
	cp_copy_usings, cp_free_usings,	cp_find_first_component.
	* cp-support.c: #include "gdb_obstack.h", "gdb_assert.h".
	Comment on demangled name pitfalls.
	(cp_add_using_obstack): New function.
	(cp_add_using_xmalloc): New function.
	(cp_copy_usings): New function.
	(cp_free_usings): New function.
	(cp_find_first_component): New function.
	* buildsym.h: Declare processing_has_namespace_info.
	Declare add_using_directive.
	* buildsym.c: #include "gdb_assert.h", "cp-support.h".
	Change comment after #include "symfile.h".
	New variable using_list.
	(add_symbol_to_list): Scan for anonymous namespaces when
	appropriate.
	(scan_for_anonymous_namespaces): New function.
	(add_using_directive): New function.
	(start_symtab): Initialize processing_has_namespace_info,
	using_list.
	(end_symtab): Copy using_list into block.
	(copy_usings_to_obstack): New function.
	(finish_block): Set BLOCK_USING in general case and in C++
	function case.

2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/namespace.exp: Add tests involving namespaces
	  starting from C.
	* gdb.c++/namespace.cc: Add namespaces with names starting
	  from C and their contents.
2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* Makefile.in (buildsym.o): Depend on $(gdb_assert_h) and
	$(cp_support_h).
	(cp-support.o): Fix dependencies and add $(gdb_obstack_h) and
	$(gdb_assert_h).
	(symtab.o): Depend on $(cp_support_h).
	* symtab.h: Add opaque declaration for struct using_direct_node.
	(struct block): Add member 'language_specific'.
	(BLOCK_USING): New macro.
	* symtab.c: #include "cp-support.h"
	(lookup_symbol_aux): Call lookup_symbol_aux_nonlocal and
	lookup_symbol_aux_using when appropriate.
	(lookup_symbol_aux_nonlocal): New function.
	(lookup_symbol_aux_using): New function.
	(lookup_symbol_aux_using_loop): New function.
	* symfile.h: Add opaque declaration for struct obstack.
	Declare obsavestring to take a const char *.
	* symfile.c (obsavestring): Make first argument a const char *.
	* jv-lang.c (get_java_class_symtab): Initialize BLOCK_USING.
	* dwarf2read.c: New variable current_namespace.
	(scan_partial_symbols): Handle DW_TAG_namespace.
	(psymtab_to_symtab_1): Initialize current_namespace.
	(process_die): Handle DW_TAG_namespace,
	DW_TAG_imported_declaration, DW_TAG_imported_module.
	(read_namespace): New function.
	(dwarf2_name): New function.
	(dwarf2_extension): New function.
	(dwarf_tag_name): Add DWARF 3 names.
	(dwarf_attr_name): Ditto.
	(dwarf_type_encoding_name): Ditto.
	* cp-support.h: Opaque declaration for struct obstack.
	(struct using_direct): New struct.
	(struct using_direct_node): New struct.
	Add declarations for cp_add_using_obstack, cp_add_using_xmalloc,
	cp_copy_usings, cp_free_usings,	cp_find_first_component.
	* cp-support.c: #include "gdb_obstack.h", "gdb_assert.h".
	Comment on demangled name pitfalls.
	(cp_add_using_obstack): New function.
	(cp_add_using_xmalloc): New function.
	(cp_copy_usings): New function.
	(cp_free_usings): New function.
	(cp_find_first_component): New function.
	* buildsym.h: Declare processing_has_namespace_info.
	Declare add_using_directive.
	* buildsym.c: #include "gdb_assert.h", "cp-support.h".
	Change comment after #include "symfile.h".
	New variable using_list.
	(add_symbol_to_list): Scan for anonymous namespaces when
	appropriate.
	(scan_for_anonymous_namespaces): New function.
	(add_using_directive): New function.
	(start_symtab): Initialize processing_has_namespace_info,
	using_list.
	(end_symtab): Copy using_list into block.
	(copy_usings_to_obstack): New function.
	(finish_block): Set BLOCK_USING in general case and in C++
	function case.

2002-10-22  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/namespace.exp: Add tests involving namespaces
	  starting from C.
	* gdb.c++/namespace.cc: Add namespaces with names starting
	  from C and their contents.
Merge drow-cplus-merge-20021025 to drow-cplus-branch.
Merge drow-cplus-merge-20021025 to drow-cplus-branch.
Merge drow-cplus-merge-20021025 to drow-cplus-branch.
	* c-typeprint.c (c_type_print_base): Print method qualifiers.
        * c-typeprint.c (c_type_print_modifier_before): New function.
        (c_type_print_modifier_after): New function.
        (c_type_print_base): Call c_type_print_modifier_before and
        c_type_print_modifier_after.
	* gdb.c++/method.exp (print this): Allow "A const".
	* gdb.c++/templates.exp (ptype fvpchar)
	(print Foo<volatile char *>::Foo): Allow consts after type names.
	* gdb.c++/templates.exp: Correct some undoubled backslashes.
	Make a synthetic operator= optional.
	(print Garply<Garply<char> >::garply): Allow const THIS pointer.
	* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
	based on method name.
	* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
	based on method name.
	* c-typeprint.c (c_type_print_args): Remove.
	(cp_type_print_method_args): Remove unused PREFIX argument.
	Simplify logic.  Skip FIELD_ARTIFICIAL arguments.
	(c_type_print_varspec_suffix): Call cp_type_print_method_args.
	(c_type_print_base): Handle template classes when looking for
	constructor field names.  Update call to cp_type_print_method_args.
2002-11-22  David Carlton  <carlton@math.stanford.edu>

	* symtab.h: Add opaque declarations for struct namespace_info and
	struct obstack.
	(struct block): The language_specific stuff is now a struct
	namespace_info rather than a struct using_direct_node.
	(BLOCK_NAMESPACE): New macro.
	Delete macro BLOCK_USING.
	Add declarations for block_using, block_all_usings,
	block_set_using, block_scope, block_set_scope.
	* symtab.c: #include "gdb_assert.h"
	(lookup_symbol_aux): Move minsym stuff inside
	lookup_symbol_aux_nonlocal, and always do global search via
	lookup_symbol_aux_using.
	(lookup_symbol_aux_nonlocal): Do minsym search.
	(lookup_symbol_aux_using): Calculate usings via block_all_usings;
	handle namespace scope.
	(lookup_symbol_aux_using_loop): New function, not to be confused
	with the previous function of the same name.  (Sorry about that.)
	(lookup_symbol_namespace): Renamed from
	lookup_symbol_aux_using_loop.
	(lookup_symbol_aux_minsyms): Add block_index argument, delete
	is_a_field_of_this argument, and only check either global or
	static symbols rather than both of them.
	(block_using): New function.
	(block_all_usings): New function.
	(block_set_using): New function.
	(block_scope): New function.
	(block_set_scope): New function.
	(block_initialize_namespace): New function.
	* jv-lang.c (get_java_class_symtab): BLOCK_NAMESPACE instead of
	BLOCK_USING.
	* dwarf2read.c: Delete variable current_namespace, and replace its
	uses by processing_current_namespace (from buildsym.h).
	(scan_partial_symbols): Allow empty pdi.name if we're
	reading a namespace.
	* cp-support.h (struct namespace_info): New struct.
	* cp-support.c: Add comment.
	* buildsym.h: New variable processing_current_namespace.
	* buildsym.c (add_symbol_to_list): Do fast search for
	"(anonymous namespace)".
	(scan_for_anonymous_namespaces): Delete FIXME.  Convert for loop
	into a clearer while loop.
	(finish_block): Replace BLOCK_USING by BLOCK_NAMESPACE.
	(finish_block): Set block_scope of function blocks rather than
	generating using directives that would have a similar effect.
	(end_symtab): Set using via block_set_using rather than
	BLOCK_USING.
	* Makefile.in (symtab.o): Depend on gdb_assert_h.
2002-11-22  David Carlton  <carlton@math.stanford.edu>

	* symtab.h: Add opaque declarations for struct namespace_info and
	struct obstack.
	(struct block): The language_specific stuff is now a struct
	namespace_info rather than a struct using_direct_node.
	(BLOCK_NAMESPACE): New macro.
	Delete macro BLOCK_USING.
	Add declarations for block_using, block_all_usings,
	block_set_using, block_scope, block_set_scope.
	* symtab.c: #include "gdb_assert.h"
	(lookup_symbol_aux): Move minsym stuff inside
	lookup_symbol_aux_nonlocal, and always do global search via
	lookup_symbol_aux_using.
	(lookup_symbol_aux_nonlocal): Do minsym search.
	(lookup_symbol_aux_using): Calculate usings via block_all_usings;
	handle namespace scope.
	(lookup_symbol_aux_using_loop): New function, not to be confused
	with the previous function of the same name.  (Sorry about that.)
	(lookup_symbol_namespace): Renamed from
	lookup_symbol_aux_using_loop.
	(lookup_symbol_aux_minsyms): Add block_index argument, delete
	is_a_field_of_this argument, and only check either global or
	static symbols rather than both of them.
	(block_using): New function.
	(block_all_usings): New function.
	(block_set_using): New function.
	(block_scope): New function.
	(block_set_scope): New function.
	(block_initialize_namespace): New function.
	* jv-lang.c (get_java_class_symtab): BLOCK_NAMESPACE instead of
	BLOCK_USING.
	* dwarf2read.c: Delete variable current_namespace, and replace its
	uses by processing_current_namespace (from buildsym.h).
	(scan_partial_symbols): Allow empty pdi.name if we're
	reading a namespace.
	* cp-support.h (struct namespace_info): New struct.
	* cp-support.c: Add comment.
	* buildsym.h: New variable processing_current_namespace.
	* buildsym.c (add_symbol_to_list): Do fast search for
	"(anonymous namespace)".
	(scan_for_anonymous_namespaces): Delete FIXME.  Convert for loop
	into a clearer while loop.
	(finish_block): Replace BLOCK_USING by BLOCK_NAMESPACE.
	(finish_block): Set block_scope of function blocks rather than
	generating using directives that would have a similar effect.
	(end_symtab): Set using via block_set_using rather than
	BLOCK_USING.
	* Makefile.in (symtab.o): Depend on gdb_assert_h.
Merge drow-cplus-branch to:
  cvs rtag -D 2003-12-14 00:00:00 UTC drow-cplus-merge-20031214 gdb+dejagnu
Merge drow-cplus-branch to:
  cvs rtag -D 2003-12-14 00:00:00 UTC drow-cplus-merge-20031214 gdb+dejagnu