Commit Graph

192 Commits

Author SHA1 Message Date
Tom Tromey 0cc2414c91 gdb
* m2-typeprint.c (m2_record_fields): Don't use
	TYPE_DECLARED_TYPE.
	* gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
	(struct main_type) <flag_declared_class>: New field.
	(struct cplus_struct_type) <declared_type>: Remove.
	<ntemplate_args>: Move earlier.
	(DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
	(DECLARED_TYPE_TEMPLATE): Remove.
	(TYPE_DECLARED_TYPE): Remove.
	* gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
	* dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
	* c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
	TYPE_DECLARED_TYPE.
gdb/testsuite
	* gdb.dwarf2/member-ptr-forwardref.exp: Update expected result for
	type-printing change.
2010-02-02 16:47:14 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Daniel Jacobowitz d48cc9dd6f 2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
Paul Brook  <paul@codesourcery.com>

	* c-typeprint.c (c_type_print_base): Skip artificial fields.
	Use get_vptr_fieldno to skip the vtable pointer.
	* dwarf2read.c (dwarf2_add_field): Set FIELD_ARTIFICIAL on artificial
	fields.
	(dwarf2_add_member_fn): Complain about virtual member functions
	without DW_AT_vtable_elem_location and force TYPE_CPLUS_DYNAMIC.
	* gdbtypes.c (get_vptr_fieldno): Update comment.
	* gdbtypes.h (struct cplus_struct_type): Add is_dynamic.
	(TYPE_CPLUS_DYNAMIC): New macro.
	* gnu-v3-abi.c (gnuv3_dynamic_class): New.
	(gnuv3_get_vtable): Rewrite to use gnuv3_dynamic_class.  Move higher.
	(gnuv3_rtti_type, gnuv3_get_virtual_fn, gnuv3_baseclass_offset): Use
	gnuv3_get_vtable.
	* varobj.c (cplus_class_num_children, cplus_describe_child): Skip
	artificial fields.  Use get_vptr_fieldno to skip the vtable pointer.
2009-11-12 19:47:25 +00:00
Pierre Muller 5aafa1cc49 ARI fix: OP eol rule.
* blockframe.c (find_pc_partial_function): Avoid operator at end of
	line.
	* buildsym.c (find_symbol_in_list): Idem.
	(start_subfile, patch_subfile_names): Idem.
	* c-exp.y (variable, yylex): Idem.
	* c-typeprint.c (c_print_type, c_type_print_base): Idem.
	* c-valprint.c (c_val_print): Idem.
	* coffread.c (patch_opaque_types, process_coff_symbol): Idem.
	* corelow.c (core_open): Idem.
	* cris-tdep.c (move_reg_to_mem_movem_op): Idem.
	* cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
2009-10-06 22:47:20 +00:00
Ulrich Weigand 5081068481 * gdbtypes.c (make_pointer_type, make_reference_type,
smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
	Use type architecture instead of current_gdbarch.

	* gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
	Add GDBARCH paramter.
	* gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
	Add GDBARCH parameter.   Use it instead of current_gdbarch.
	* c-typeprint.c (c_type_print_modifier): Update call.
	* parse.c (push_type_address_space): Likewise.

	* findvar.c (extract_typed_address, store_typed_address): Use type
	architecture instead of current_gdbarch.

	* value.c (value_as_address, unpack_field_as_long): Use type architecture
	instead of current_gdbarch.

	* doublest.c (floatformat_from_length): Add GDBARCH argument.  Use it
	instead of current_gdbarch.
	(floatformat_from_type): Pass type architecture.

	* infcall.c (find_function_addr): Use type architecture instead
	of current_gdbarch.

	* valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
	value_bit_index): Use type architecture instead of current_gdbarch.
	* valops.c (value_cast, value_slice): Likewise.

	* value.h (modify_field): Add TYPE argument.
	* value.c (modify_field): Add TYPE argument.  Use type architecture
	instead of current_gdbarch.
	(set_internalvar_component): Likewise.
	* eval.c (evaluate_struct_tuple): Update call.
	* valops.c (value_assign): Likewise.
	* ada-lang.c (modify_general_field): Likewise.  Add TYPE argument.
	(make_array_descriptor): Update calls.
	(move_bits): Add BITS_BIG_ENDIAN_P argument.  Use it instead of
	current_gdbarch.
	(ada_value_assign, value_assign_to_component): Update calls.
	(decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
	value_assign_to_component): Use type arch instead of current_gdbarch.

	* printcmd.c (float_type_from_length): Remove GDBARCH argument,
	use type architecture instead.
	(print_scalar_formatted, printf_command): Update calls.  Use type
	architecture instead of current_gdbarch.
	* valprint.c (val_print_type_code_int): Use type architecture
	instead of current_gdbarch.
	* varobj.c (value_get_print_value): Likewise.
	* python/python-prettyprint.c (print_string_repr): Add GDBARCH
	argument.  Use it instead of current_gdbarch.
	(apply_val_pretty_printer): Update call.

	* ada-valprint.c (ada_val_print_1): Use type architecture instead
	of current_gdbarch.
	* c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
	Use it instead of current_gdbarch.
	(c_val_print): Update calls passing type architecture.
	* f-valprint.c (f_val_print): Use type architecture instead of
	current_gdbarch.
	* jv-valprint (java_value_print): Likewise.
	* m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
	Use it instead of current_gdbarch.
	(print_unpacked_pointer): Update calls passing type architecture.
	* scm-valprint.c (scm_scmval_print): Use type architecture instead of
	current_gdbarch.

	* gnu-v3-abi.c (get_class_arch): Remove.
	(gnuv3_rtti_type): Use get_type_arch instead of get_class_arch.  Remove
	special-case check for Java classes.
	(gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
	gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
	Use get_type_arch instead of get_class_arch.
2009-07-02 12:57:14 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Jan Kratochvil d6a843b594 Convert static_kind into loc_kind enum.
* gdbtypes.h (enum field_loc_kind): New.
	(union field_location): New field dwarf_block.
	(struct field): Rename static_kind as loc_kind.
	(FIELD_STATIC_KIND): Rename to ...
	(FIELD_LOC_KIND): ... here.
	(TYPE_FIELD_STATIC_KIND): Rename to ...
	(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
	(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
	(TYPE_FIELD_STATIC): Remove.
	(TYPE_FIELD_BITPOS): Reformat.
	(SET_FIELD_BITPOS): New.
	(FIELD_PHYSADDR): Rename to ...
	(FIELD_STATIC_PHYSADDR): ... here.
	(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
	(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
	(FIELD_PHYSNAME): Rename to ...
	(FIELD_STATIC_PHYSNAME): ... here.
	(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
	(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
	(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
	(field_is_static): New declaration.
	* gdbtypes.c (field_is_static): New function.
	(copy_type_recursive): Update throughout.
	* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
	eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
	p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
2008-10-08 12:49:13 +00:00
Jan Kratochvil d78df37042 gdb/
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
	* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
	(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
	valops.c (value_cast), varobj.c (c_number_of_children): Replace
	TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
	(f77_get_upperbound): ... this function handling now only
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_lowerbound): Replace with ...
	(f77_get_lowerbound): ... this function handling now only
	TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
	Update their callers.
	* eval.c (evaluate_subexp_standard): Update their callers.
	* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
	(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
	prototypes.
	(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
	* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
	the lower_bound_was_default variable.  Update the
	f77_get_dynamic_upperbound, f77_get_upperbound and
	TYPE_ARRAY_UPPER_BOUND_TYPE calls.
	* gdbtypes.c (print_bound_type): Remove the function.
	(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
	LOWER_BOUND_TYPE.
	* gdbtypes.h (enum array_bound_type): Remove.
	(struct main_type): Remove the fields upper_bound_type and
	lower_bound_type.  Comment the new overload of the field artificial.
	(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
	(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.

gdb/testsuite/
	* gdb.base/maint.exp (maint print type): Remove printing
	UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
2008-10-02 22:06:08 +00:00
Tom Tromey 5c6ce71d76 gdb
* scm-lang.c (scm_language_defn): Update.
	* p-typeprint.c (pascal_print_typedef): New function.
	* p-lang.h: (pascal_print_typedef): Declare.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* m2-typeprint.c (m2_print_typedef): New function.
	* m2-lang.h (m2_print_typedef): Declare.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
	Remove.
	(struct language_defn) <la_print_typedef>: New field.
	(default_print_typedef): Declare.
	(LA_PRINT_TYPEDEF): New define.
	* language.c (unknown_language_defn): Update.
	(auto_language_defn): Update.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-typeprint.c (c_print_typedef): New function.
	* c-lang.h (c_print_typedef): Declare.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Update.
	(asm_language_defn): Update.
	(minimal_language_defn): Update.
	* ada-lang.c (ada_language_defn): Update.
	* typeprint.c (default_print_typedef): New function.
gdb/doc
	* gdbint.texinfo (Language Support): Remove text about omitting
	support for a language.
2008-09-27 21:29:30 +00:00
Daniel Jacobowitz d6350901aa * alpha-tdep.h (ALPHA_REGISTER_BYTES): Delete.
* arm-tdep.h (STATUS_REGISTER_SIZE): Delete.
	* breakpoint.c (args_for_catchpoint_enable, current_exception_event):
	Delete.
	* c-typeprint.c (c_type_print_base): Delete handling of template
	instantiations.
	* cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET)
	(METHOD_PTR_TO_VOFFSET): Delete.
	* defs.h (QUIT_FIXME): Delete.
	* f-lang.h (DEFAULT_DOTMAIN_NAME_IN_MF77, DEFAULT_MAIN_NAME_IN_MF77)
	(DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY, DEFAULT_DOTMAIN_NAME_IN_XLF): Delete.
	* gdbtypes.h (struct cplus_struct_type): Delete is_inlined,
	ninstantiations, and instantiations.
	(TYPE_INSTANTIATIONS, TYPE_NINSTANTIATIONS, TYPE_INSTANTIATION)
	(TYPE_FN_FIELD_INLINED): Delete.
	* srec.h (SREC_BINARY): Delete.
	* symtab.c (symbol_init_demangled_name): Delete.
	* symtab.h (SYMBOL_INIT_DEMANGLED_NAME, symbol_init_demangled_name)
	(SYMBOL_OBJFILE, struct exception_event_record, CURRENT_EXCEPTION_KIND)
	(CURRENT_EXCEPTION_CATCH_SAL, CURRENT_EXCEPTION_CATCH_LINE)
	(CURRENT_EXCEPTION_CATCH_FILE, CURRENT_EXCEPTION_CATCH_PC)
	(CURRENT_EXCEPTION_THROW_SAL, CURRENT_EXCEPTION_THROW_LINE)
	(CURRENT_EXCEPTION_THROW_FILE, CURRENT_EXCEPTION_THROW_PC): Delete.
	* target.h (enum thread_control_capabilities): Delete tc_switch.
	(target_can_switch_threads): Delete.
2008-05-03 22:20:13 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Ulrich Weigand 086280be76 * gdbtypes.h (struct cplus_struct_type): Remove runtime_ptr member.
(TYPE_RUNTIME_PTR, TYPE_VTABLE, TYPE_HAS_VTABLE,
	TYPE_PRIMARY_BASE, TYPE_VIRTUAL_BASE_LIST): Remove macros.
	(HP_ACC_VFUNC_START, HP_ACC_VBASE_START, HP_ACC_TYPEINFO_OFFSET,
	HP_ACC_TOP_OFFSET_OFFSET): Likewise.
	(has_vtable, primary_base_class, virtual_base_list_length,
	virtual_base_list_length_skip_primaries, virtual_base_index,
	virtual_base_index_skip_primaries, class_index_in_primary_list,
	count_virtual_fns): Remove prototypes.
	* gdbtypes.c (has_vtable, primary_base_class, current_vbase_list,
	virtual_base_list_aux, virtual_base_list, virtual_base_list_length,
	virtual_base_list_length_skip_primaries, virtual_base_index,
	virtual_base_index_skip_primaries, class_index_in_primary_list,
	count_virtual_fns): Remove.

	* cp-valprint.c (cp_print_hpacc_virtual_table_entries): Remove.
	(hpacc_vtbl_ptr_name, hpacc_vtbl_ptr_type_name): Remove.
	(cp_print_value_fields): Remove support for HP aCC vtables.
	(cp_print_value): Likewise.
	* c-typeprint.c (c_type_print_base): Likewise.

	* value.h (find_rt_vbase_offset): Remove prototype.
	* valops.c (find_rt_vbase_offset): Remove.
	(search_struct_method): Remove support for HP aCC vtables.
	(find_method_list): Likewise.
2007-11-02 19:35:19 +00:00
Thiago Jung Bauermann 7678ef8fb0 2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* c-lang.c (c_create_fundamental_type): Create fundamental
	types for DFP.
	* c-typeprint.c (c_type_print_varspec_prefix): Add
	TYPE_CODE_DECFLOAT to no prefix needed case.
	(c_type_print_varspec_suffix): Add TYPE_CODE_DECFLOAT to no
	suffix needed case.
	* c-valprint.c (c_val_print): Call print_decimal_floating to
	print DFP values.
	* dwarf2read.c (read_base_type): Read DW_ATE_decimal_float
	attribute code and return TYPE_CODE_DECFLOAT.
	(dwarf_base_type): Set dwarf2_fundamental_type for DFP values.
	* gdbtypes.c (gdbtypes_post_init): Initialize builtin_decfloat,
	builtin_decdouble and builtin_declong.
	* gdbtypes.h (enum type_code): Add TYPE_CODE_DECFLOAT as a
	type code for DFP.
	(FT_DECFLOAT, FT_DBL_PREC_DECFLOAT, FT_EXT_PREC_DECFLOAT): New
	types, for decimal floating point.
	(FT_NUM_MEMBERS):  Increment, new types added.
	(struct builtin_type): Add builtin_decfloat, builtin_decdouble
	and builtin_declong.
	* valprint.c (print_decimal_floating): New function to print DFP
	values.
	* value.h (print_decimal_floating): Prototype.
2007-10-25 17:57:34 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Ulrich Weigand d3e9c991c8 * hppa-hpux-tdep.c (args_for_find_stub, HP_ACC_EH_notify_hook,
HP_ACC_EH_set_hook_value, HP_ACC_EH_notify_callback, HP_ACC_EH_break,
	HP_ACC_EH_catch_throw, HP_ACC_EH_catch_catch, __eh_notification,
	hp_cxx_exception_support, hp_cxx_exception_support_initialized,
	eh_notify_hook_addr, eh_notify_callback_addr, eh_break_addr,
	eh_catch_throw_addr, break_callback_sal, setup_d_pid_in_inferior,
	find_stub_with_shl_get, cover_find_stub_with_shl_get,
	initialize_hp_cxx_exception_support, child_enable_exception_callback,
	current_ex_event, child_get_current_exception_event): Remove.
	(hppa_hpux_inferior_created): Remove.
	(hppa_hpux_init_abi): Do not install hppa_hpux_inferior_created.

	* breakpoint.h (deprecated_exception_catchpoints_are_fragile): Remove.
	(deprecated_exception_support_initialized): Remove.
	* breakpoint.c (deprecated_exception_catchpoints_are_fragile): Remove.
	(deprecated_exception_support_initialized): Remove.
	(breakpoint_init_inferior): Remove handling of non-zero
	deprecated_exception_catchpoints_are_fragile.

	* symtab.h (deprecated_hp_som_som_object_present): Remove.
	* symtab.c (deprecated_hp_som_som_object_present): Remove.
	* c-typeprint.c (c_type_print_base): Remove handling of non-zero
	deprecated_hp_som_som_object_present.
	* eval.c (evaluate_subexp_standard): Likewise.
	* valops.c (value_cast): Likewise.

	* parse.c (parse_nested_classes_for_hpacc, coloncolon): Remove.
	* parser-defs.h (parse_nested_classes_for_hpacc): Remove.
	* c-exp.y (yylex): Do not call parse_nested_classes_for_hpacc.
2007-06-05 22:47:50 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz d5d6fca504 Warning fixes.
* ada-lang.c (find_struct_field): Initialize *byte_offset_p.
	* breakpoint.c (do_enable_breakpoint): Ignore both mem_cnt and i.
	* c-typeprint.c (c_type_print_varspec_suffix): Don't test length
	greater than or equal to zero.
	* m2-typeprint.c (m2_array): Likewise.
	* p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
	* gdbtypes.c (copy_type_recursive): Correct == typo.
	* i386-tdep.c (i386_skip_prologue): Remove stray semicolon.
	* linux-nat.c (linux_nat_info_proc_cmd): Don't compare a pointer
	greater than zero.
	* macroscope.c (sal_macro_scope): Don't name a local variable "main".
	(default_macro_scope): Remove unused variable.
	* prologue-value.h (pv_area_find_reg): Don't name an argument
	"register".
	* remote-fileio.c (remote_fio_func_map): Add missing braces.
	* remote.c (sigint_remote_twice_token, sigint_remote_token): Change
	type.
	(cleanup_sigint_signal_handler): Remove casts.
	* valprint.c (val_print): Use a volatile local for the modified
	argument.
	* varobj.c (languages): Remove extra array dimension.
	(varobj_create): Correct access to languages array.
	* mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Add
	missing braces.
	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
	* mi/mi-cmd-env.c (mi_cmd_env_path, mi_cmd_env_dir): Likewise.
	* mi/mi-getopt.c (mi_valid_noargs): Likewise.
	* mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
	(mi_cmd_data_write_memory): Likewise.
	* signals/signals.c (target_signal_to_string): Cast to int before
	comparing.
	* tui/tui-layout.c (init_and_make_win): Take and return a void *.
	Update all callers.
2007-01-03 19:01:25 +00:00
Daniel Jacobowitz 0d5de0100f * NEWS: Mention pointer to member improvements.
* Makefile.in (gnu-v3-abi.o): Delete special rule.
	(eval.o, gnu-v3-abi.o, ia64-tdep.o): Update.
	* ada-valprint.c (ada_print_scalar): Update for new type codes.
	* c-typeprint.c (c_print_type): Update for new type codes.
	(c_type_print_varspec_prefix, c_type_print_varspec_suffix)
	(c_type_print_base): Likewise.
	(c_type_print_args): Rewrite.
	* c-valprint.c (c_val_print): Update for new type codes.  Remove
	support for references to members.  Treat methods like functions.
	* cp-abi.c (cplus_print_method_ptr, cplus_method_ptr_size)
	(cplus_make_method_ptr, cplus_method_ptr_to_value): New.
	* cp-abi.h (cplus_print_method_ptr, cplus_method_ptr_size)
	(cplus_make_method_ptr, cplus_method_ptr_to_value): New prototypes.
	(struct cp_abi_ops): Add corresponding members.
	* cp-valprint.c (cp_print_class_method): Delete.
	(cp_find_class_member): New function.
	(cp_print_class_member): Use it.  Simplify support for bogus
	member pointers.
	* dwarf2read.c (quirk_gcc_member_function_pointer): Use
	lookup_methodptr_type.
	(read_tag_ptr_to_member_type): Likewise, and lookup_memberptr_type.
	* eval.c (evaluate_subexp_standard): Implement EVAL_SKIP for
	OP_SCOPE.  Update call to value_aggregate_elt.  Rewrite member
	pointer support.
	(evaluate_subexp_for_address): Handle OP_SCOPE explicitly.  Handle
	references returned by user defined operators.
	* f-typeprint.c (f_print_type, f_type_print_varspec_prefix)
	(f_type_print_varspec_suffix): Remove support for member pointers.
	* gdbtypes.c (lookup_memberptr_type): Renamed from lookup_member_type
	and adjusted.
	(smash_to_memberptr_type): Likewise, from smash_to_member_type.
	(lookup_methodptr_type): New.
	(rank_one_type): Adjust for TYPE_CODE_MEMBERPTR.
	(recursive_dump_type): Update for new types.
	* gdbtypes.h (enum type_code): Replace TYPE_CODE_MEMBER with
	TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR.
	(lookup_memberptr_type, lookup_methodptr_type)
	(smash_to_memberptr_type): New prototypes.
	(smash_to_method_type): Formatting fix.
	(lookup_member_type, smash_to_member_type): Delete prototypes.
	* gnu-v3-abi.c (gnuv3_get_vtable, gnuv3_get_virtual_fn): New.
	Do not rely on debug information for the vptr or the method's
	enclosing type.  Handle function descriptors for IA64.
	(gnuv3_virtual_fn_field): Rewrite using the new functions.
	(gnuv3_find_method_in, gnuv3_print_method_ptr)
	(gnuv3_method_ptr_size, gnuv3_make_method_ptr)
	(gnuv3_method_ptr_to_value): New.
	(init_gnuv3_ops): Set new members of gnu_v3_abi_ops.
	* hpread.c (hpread_type_lookup): Update for new types.
	* infcall.c (value_arg_coerce): Likewise.
	* m2-typeprint.c (m2_print_type): Remove explicit support
	for member pointers.
	* m2-valprint.c (m2_val_print): Likewise.
	* p-typeprint.c (pascal_type_print_varspec_prefix)
	(pascal_type_print_varspec_suffix, pascal_type_print_base): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	(pascal_object_print_class_method, pascal_object_print_class_member):
	Delete.
	* p-lang.h (pascal_object_print_class_method)
	(pascal_object_print_class_member): Delete prototypes.
	* stabsread.c (read_type): Update for new types.
	* typeprint.c (print_type_scalar): Likewise.
	* valops.c (value_struct_elt_for_reference, value_namespace_elt)
	(value_maybe_namespace_elt, value_aggregate_elt): Add want_address
	argument.  Construct a pointer to member if the address of a
	function or data member is requested.
	(value_cast_pointers): Don't modify the input value.
	(value_cast): Adjust pointer to member handling for new types.
	Allow null pointer to member constants.  Don't modify the input
	value.
	(value_ind): Remove pointer to member check.  Handle function
	descriptors for function pointers.
	(value_struct_elt, value_find_oload_method_list, check_field):
	Remove pointer to member checks.
	* value.c (unpack_long): Allow pointers to data members.
	(value_from_longest): Allow member pointers.
	* value.h (value_aggregate_elt): Add want_address.
	* varobj.c (c_variable_editable): Remove check for members.
	* gdbarch.sh: Add vtable_function_descriptors and vbit_in_delta.
	* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Handle descriptors
	in virtual tables.
	(ia64_gdbarch_init): Call set_gdbarch_vtable_function_descriptors.
	* c-lang.h (cp_print_class_method): Delete prototype.
	* arm-tdep.c (arm_gdbarch_init): Call set_gdbarch_vbit_in_delta.
	* mips-tdep.c (mips_gdbarch_init): Likewise.
	* gdbarch.c, gdbarch.h: Regenerated.

	* gdb.cp/classes.exp (test_pointers_to_class_members): Update expected
	output.  Test the types of members and member pointers.
	* gdb.cp/inherit.exp (test_print_mi_member_types): Remove KFAILs for
	gdb/2092.
	* gdb.cp/member-ptr.exp: Search for a comment instead of a
	statement.  Enable for GCC.  Update expected output for some tests
	and add new tests.  Remove obsolete GCC KFAILs.  Allow GCC's class
	layout.
	* gdb.cp/member-ptr.cc (Padding, Padding::vspacer, Base, Base::get_x)
	(Base::vget_base, Left, Left::vget, Right, Right::vget, Diamond)
	(Diamond::vget_base): New.
	(main): Add new tests.
	* gdb.cp/printmethod.exp: Update expected output for member functions.
	* gdb.cp/virtfunc.exp (test_virtual_calls): Add a KFAIL for
	print pEe->D::vg().
2007-01-03 18:05:45 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Baurzhan Ismagulov 3d263c1d0a 2005-01-29 Baurzhan Ismagulov <ibr@radix50.net>
* ax-gdb.c, ax-general.c, bcache.c, bfd-target.c, bsd-kvm.c,
	* buildsym.c, c-lang.c, c-typeprint.c, c-valprint.c, charset.c,
	* coff-pe-read.c, coffread.c, complaints.c, copying.c: I18n markup.
2005-01-29 17:53:26 +00:00
Andrew Cagney f83f82bc15 2004-04-08 Andrew Cagney <cagney@redhat.com>
* breakpoint.h (deprecated_exception_catchpoints_are_fragile)
	(deprecated_exception_support_initialized): Declare.
	* hppa-hpux-tdep.c (initialize_hp_cxx_exception_support)
	(initialize_hp_cxx_exception_support)
	(child_enable_exception_callback): Update.
	* breakpoint.c (deprecated_exception_catchpoints_are_fragile)
	(deprecated_exception_support_initialized): Rename
	deprecated_exception_catchpoints_are_fragile and
	deprecated_exception_support_initialized.
	(breakpoint_init_inferior, breakpoint_init_inferior): Update.

	* symtab.c (deprecated_hp_som_som_object_present): Rename
	hp_som_som_object_present.
	* symtab.h (deprecated_hp_som_som_object_present): Declare.
	* symfile.c (hp_som_som_object_present, RESET_HP_UX_GLOBALS):
	Update.  Delete extern declaration.
	* valops.c (hp_som_som_object_present): Ditto.
	* parse.c (deprecated_hp_som_som_object_present)
	(parse_nested_classes_for_hpacc): Ditto.
	* hpread.c (hp_som_som_object_present, hpread_expand_symtab): Ditto.
	* hppa-hpux-tdep.c (hp_som_som_object_present)
	(initialize_hp_cxx_exception_support): Ditto.
	* eval.c (hp_som_som_object_present, evaluate_subexp_standard): Ditto.
	* cp-valprint.c (hp_som_som_object_present)
	(cp_print_class_method): Ditto.
	* c-typeprint.c (hp_som_som_object_present):
	(c_type_print_base): Ditto.
	* c-exp.y (hp_som_som_object_present): Ditto.
2004-04-08 21:18:13 +00:00
Andrew Cagney 6314a34934 2003-11-07 Andrew Cagney <cagney@redhat.com>
* top.c (print_gdb_version): Replace STREQ with strcmp.
	* valops.c (value_struct_elt_for_reference): Ditto.
	(value_struct_elt_for_reference): Ditto.
	* symtab.c (gdb_mangle_name): Ditto.
	(find_line_symtab): Ditto.
	* symmisc.c (maintenance_print_symbols): Ditto.
	* symfile.c (symbol_file_command): Ditto.
	* stabsread.c (define_symbol, read_type): Ditto.
	(cleanup_undefined_types, scan_file_globals): Ditto.
	* solib.c (solib_map_sections): Ditto.
	* solib-svr4.c (bfd_lookup_symbol): Ditto.
	* rs6000-tdep.c (skip_prologue): Ditto.
	* p-valprint.c (pascal_value_print): Ditto.
	(pascal_object_is_vtbl_ptr_type): Ditto.
	* objfiles.c (in_plt_section): Ditto.
	* minsyms.c (lookup_minimal_symbol): Ditto.
	(compact_minimal_symbols): Ditto.
	(find_solib_trampoline_target): Ditto.
	* mdebugread.c (parse_type): Ditto.
	* language.c (set_language_command): Ditto.
	(set_type_command, set_range_command): Ditto.
	* f-lang.c (add_common_block): Ditto.
	(add_common_block): Ditto.
	(find_first_common_named): Ditto.
	(patch_all_commons_by_name): Ditto.
	* elfread.c (elf_locate_sections): Ditto.
	(elf_locate_sections): Ditto.
	(elfstab_offset_sections): Ditto.
	* dwarf2read.c (dwarf2_locate_sections): Ditto.
	* dbxread.c (add_old_header_file): Ditto.
	(find_corresponding_bincl_psymtab): Ditto.
	(read_dbx_symtab, process_one_symbol): Ditto.
	* coffread.c (patch_opaque_types): Ditto.
	* cli/cli-decode.c (delete_cmd): Ditto.
	* cli/cli-cmds.c (pwd_command, list_command): Ditto.
	* c-typeprint.c (c_type_print_base): Ditto.
	* breakpoint.c (bpstat_stop_status): Ditto.
	(clear_command, breakpoint_re_set_one): Ditto.
2003-11-08 00:13:03 +00:00
Andrew Cagney bf896cb059 2003-11-06 Andrew Cagney <cagney@redhat.com>
* valops.c (destructor_name_p): Replace STREQN with strncmp.
	* top.c (command_line_input): Ditto.
	* objc-exp.y (yylex): Ditto.
	* minsyms.c (prim_record_minimal_symbol_and_info): Ditto.
	* jv-exp.y (yylex): Ditto.
	* f-exp.y (yylex): Ditto.
	* event-top.c (command_line_handler): Ditto.
	* environ.c (get_in_environ): Ditto.
	(set_in_environ): Ditto.
	* dwarfread.c (handle_producer): Ditto.
	* dbxread.c (process_one_symbol): Ditto.
	* c-typeprint.c (c_type_print_base): Ditto.
	* c-exp.y (yylex): Ditto.

2003-11-06  Andrew Cagney  <cagney@redhat.com>

	* mi-cmd-var.c (mi_cmd_var_set_format): Replace STREQN with
	strncmp.
2003-11-06 22:54:02 +00:00
Andrew Cagney 52f0bd74b2 2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
	* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
	* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
	* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
	* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
	* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
	* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
	* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
	* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
	* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
	* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
	* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
	* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
	* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
	* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
	* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
	* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
	* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
	* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
	* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
	* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
	* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 16:32:14 +00:00
David Carlton 5c4e30cabe 2003-09-11 David Carlton <carlton@kealia.com>
* gdbtypes.h: Add TYPE_CODE_NAMESPACE.
	* gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
	(recursive_dump_type): Ditto.
	* printcmd.c (print_formatted): Ditto.
	* typeprint.c (print_type_scalar): Ditto.
	* c-typeprint.c (c_type_print_varspec_prefix): Ditto.
	(c_type_print_varspec_suffix, c_type_print_base): Ditto.
	* cp-support.h: Declare cp_check_possible_namespace_symbols,
	maint_cplus_cmd_list.
	* cp-support.c: Make maint_cplus_cmd_list extern.
	* cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h,
	command.h.
	(lookup_symbol_file): Look in possible namespace blocks when
	appropriate.
	(initialize_namespace_symtab): New.
	(get_possible_namespace_block, free_namespace_block)
	(check_possible_namespace_symbols)
	(check_possible_namespace_symbols_loop)
	(check_one_possible_namespace_symbol)
	(lookup_possible_namespace_symbol, maintenance_cplus_namespace)
	(_initialize_cp_namespace): Ditto.
	* block.h: Declare allocate_block.
	* block.c (allocate_block): New.
	* jv-lang.c (get_java_class_symtab): Allocate blocks via
	allocate_block.
	* symfile.h: Update declaration of add_psymbol_to_list.
	* symfile.c (add_psymbol_to_list): Return the partial symbol in
	question.
	* dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to
	scan_partial_symbols_call.
	(scan_partial_symbols): Add NAMESPACE argument; update calls to
	helper functions.
	(add_partial_symbol): If necessary, scan mangled names for names
	of namespaces.
	(add_partial_namespace): Add NAMESPACE argument; generate partial
	symbols associated  to namespaces.
	(add_partial_enumeration): Add NAMESPACE argument.
	(new_symbol): Allow namespace syms.
	(read_namespace): Generate namespace syms.
	* objfiles.h: Add opaque declaration of struct symtab.
	(struct objfile): Add cp_namespace_symtab member.
	* objfiles.c (allocate_objfile): Set
	objfile->cp_namespace_symtab.
	* Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h,
	dictionary_h, command_h.

2003-09-11  David Carlton  <carlton@kealia.com>

	* gdb.c++/namespace.exp: Add tests for namespace types.
	* gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
	(test_namespace): New.
2003-09-11 19:49:20 +00:00
Daniel Jacobowitz d3336fcd34 Update copyright date with last commit. 2003-01-04 21:54:54 +00:00
Daniel Jacobowitz 248f805530 Suggested by Stewart Brown <sb24@avaya.com>:
* c-typeprint.c (c_type_print_varspec_prefix): Pass value of show
	in recursive calls.  Handle TYPE_CODE_TYPEDEF.
	(c_type_print_varspec_suffix): Likewise.
2003-01-04 21:51:53 +00:00
Kevin Buettner 321432c0c6 * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
(ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
	``char *'' for return and parameter types.
	* gdbarch.h, gdbarch.c: Regenerate.
	* gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
	return type from ``char *'' to ``const char *''.
	* c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
	const.
2002-12-11 20:19:39 +00:00
Kevin Buettner 9750e763c1 * c-lang.h (c_type_print_varspec_prefix): Delete.
* c-typeprint.c (c_type_print_varspec_prefix): Make static.  Add
	``need_post_space'' parameter.  Adjust all callers.
2002-10-14 22:58:28 +00:00
Andrew Cagney 04ea0df192 2002-07-29 Andrew Cagney <ac131313@redhat.com>
* gdb_obstack.h: New file.
* symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
(obstack_chunk_alloc, obstack_chunk_free): Delete macros.
* objfiles.h: Include "gdb_obstack.h".
* Makefile.in (gdb_obstack_h): Define.
(symtab_h): Add $(gdb_obstack_h).
(objfiles_h): Add $(gdb_obstack_h).

* objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
* macrotab.c, cp-valprint.c, dbxread.c: Ditto.
* ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
* macroexp.c, p-typeprint.c, stabsread.c: Ditto.
* symtab.c, f-typeprint.c, mdebugread.c: Ditto.
* p-valprint.c, symmisc.c, typeprint.c: Ditto.
* symfile.c, coffread.c, c-typeprint.c: Ditto.
* buildsym.c, bcache.c, ada-typeprint.c: Ditto.

* Makefile.in (bcache.o): Update dependencies.
(buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
(ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
(dbxread.o, dstread.o, f-typeprint.o): Ditto.
(objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
(stabsread.o, symfile.o, symmisc.o): Ditto.
(symtab.o, typeprint.o, macroexp.o): Ditto.
(macrotab.o, mdebugread.o): Ditto.
(f_lang_h, coff_sym_h, coff_symconst_h): Define.
(coff_ecoff_h, aout_aout64_h): Define.
(aout_stabs_gnu_h, libaout_h): Define.
2002-07-29 22:55:26 +00:00
Daniel Jacobowitz ad2f7632f9 2002-06-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
        (struct main_type): Remove arg_types member.  Update comments for
        struct field.
        (TYPE_ARG_TYPES): Remove.
        (TYPE_FN_FIELD_ARGS): Update.
        (smash_to_method_type): Update prototype.

        * c-typeprint.c (cp_type_print_method_args): Take method type
        instead of argument list.  Use new argument layout.  Simplify.
        (c_type_print_args): Use new argument layout.  Simplify.
        (c_type_print_base): Update call to cp_type_print_method_args.
        * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
        argument; use die->type instead.  Update call to
        smash_to_method_type.
        (read_structure_scope): Update call to dwarf2_add_member_fn.
        * gdbtypes.c (allocate_stub_method): Update comment.
        (smash_to_method_type): Take new NARGS and VARARGS arguments.
        Use new argument layout.
        (check_stub_method): Use new argument layout.  Don't count
        void as an argument.
        (print_arg_types): Update comments.  Use new argument layout.
        (recursive_dump_type): Don't print arg_types member.
        * hpread.c (hpread_read_struct_type): Use new argument layout.
        (fixup_class_method_type): Likewise.
        (hpread_type_lookup): Likewise.
        * stabsread.c (read_type): Update calls to read_args and
        smash_to_method_type.
        (read_args): Use new argument layout.  Simplify.
        * valops.c (typecmp): Use new argument layout.  Update parameters
        and comments.  Simplify.
        (hand_function_call): Use new argument layout.
        (search_struct_method): Update call to typecmp.
        (find_overload_match): Use new argument layout.
2002-06-14 14:34:26 +00:00
Daniel Jacobowitz 2fdde8f831 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE.
        (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use
        TYPE_INSTANCE_FLAGS.
        (struct main_type): New.
        (struct type): Move most members to struct main_type.  Change
        cv_type and as_type to new type_chain member.  Add instance_flags.
        (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros.
        (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove.
        (finish_cv_type): Remove prototype.
        * gdbtypes.c (alloc_type): Update comment.  Allocate TYPE_MAIN_TYPE.
        Set TYPE_CHAIN.
        (alloc_type_instance): New function.
        (smash_type): New function.
        (make_pointer_type, make_reference_type, make_function_type)
        (smash_to_member_type, smash_to_method_type): Call smash_type.
        (make_qualified_type): New function.
        (make_type_with_address_space): Call make_qualified_type.
        (make_cv_type): Likewise.
        (finish_cv_type): Remove unnecessary function.
        (replace_type): Update comment.  Copy TYPE_MAIN_TYPE.
        (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS;
        remove TYPE_CV_TYPE and TYPE_AS_TYPE.
        * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS.
        * dwarf2read.c (read_structure_scope): Don't call finish_cv_type.
        * hpread.c (hpread_read_struct_type): Likewise.
        * stabsread.c (read_struct_type): Likewise.

2002-05-14  Daniel Jacobowitz  <drow@mvista.com>

        * gdb.base/maint.exp (maint print type): Update for new type
        structure.
2002-05-14 18:30:53 +00:00
Daniel Jacobowitz 0004e5a2cf 2002-05-13 Daniel Jacobowitz <drow@mvista.com>
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
        (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref)
        (gen_address_of, gen_struct_ref, gen_repeat): Use type
        access macros.
        * c-typeprint.c (cp_type_print_method_args): Likewise.
        (c_type_print_args): Likewise.
        * d10v-tdep.c (d10v_push_arguments): Likewise.
        (d10v_extract_return_value): Likewise.
        * expprint.c (print_subexp): Likewise.
        * gdbtypes.c (lookup_primitive_typename): Likewise.
        (lookup_template_type, add_mangled_type, print_arg_types): Likewise.
        * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB)
        (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE)
        (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS)
        (TYPE_VECTOR): Likewise.
        * hpread.c (hpread_read_struct_type)
        (fix_static_member_physnames, fixup_class_method_type)
        (hpread_type_lookup): Likewise.
        * mdebugread.c (parse_symbol, parse_type): Likewise.
        * p-lang.c (is_pascal_string_type): Likewise.
        * valops.c (hand_function_call): Likewise.
        * x86-64-tdep.c (classify_argument): Likewise.

        * hpread.c (hpread_read_function_type)
        (hpread_read_doc_function_type): Call replace_type.
        * dstread.c (create_new_type): Delete.
        (decode_dst_structure, process_dst_function): Call alloc_type.
        Use type access macros.
2002-05-13 14:00:36 +00:00
Jim Blandy bdc2fc72b3 * c-typeprint.c (c_type_print_varspec_suffix): If a function type
is prototyped and has no arguments, print its argument list as
`(void)'.
2002-02-09 16:08:53 +00:00
Daniel Jacobowitz d7f0b9ce2d 2002-01-20 Daniel Jacobowitz <drow@mvista.com>
* buildsym.c: Update copyright years.
	* c-typeprint.c: Likewise.
	* dwarf2read.c: Likewise.
	* f-typeprint.c: Likewise.
	* gdbtypes.c: Likewise.
	* gdbtypes.h: Likewise.
	* hp-symtab-read.c: Likewise.
	* hpread.c: Likewise.
	* mdebugread.c: Likewise.
	* p-typeprint.c: Likewise.
2002-01-20 19:42:04 +00:00
Daniel Jacobowitz b02dede253 2002-01-20 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct cplus_struct_type): Add is_artificial to
	member function fields.  Add accessor macro
	TYPE_FN_FIELD_ARTIFICIAL.
	* dwarf2read.c (dwarf2_add_member_fn): Check for artificial methods.
	* c-typeprint.c (c_type_print_base): Skip artificial member
	functions.
2002-01-20 19:20:16 +00:00
Daniel Jacobowitz b012904272 * c-typeprint.c (is_type_conversion_operator): Add additional
check for non-conversion operators.
2002-01-16 02:43:38 +00:00
Jason Merrill 39c22d1ade * c-typeprint.c (is_type_conversion_operator): Fix thinko. 2002-01-10 00:06:02 +00:00
Fred Fish 74a9bb82c5 Approved by Jim Blandy:
2001-12-11  Fred Fish  <fnf@redhat.com>
	* c-typeprint.c (c_type_print_base): Use type flags access macros
	to test bits.
	* ch-typeprint.c (chill_type_print_base): Ditto.
	* ch-valprint.c (chill_val_print): Ditto.
	* d10v-tdep.c (d10v_pointer_to_address): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn): Ditto.
	* dwarfread.c (read_structure_scope): Ditto.
	* gdbtypes.c (create_range_type): Dittol
	(create_set_type): Ditto.
	(check_typedef): Ditto.
	* jv-typeprint.c (java_type_print_base): Ditto.
	* p-typeprint.c (pascal_type_print_base): Ditto
	* p-valprint.c (pascal_val_print): Ditto.
	* stabsread.c (read_cfront_member_functions): Ditto.
	(read_member_functions): Ditto.
	(cleanup_undefined_types): Ditto.
	* valprint.c (val_print): Ditto.
	* valops.c (hand_function_call): Remove is_prototyped
	variable and just use type flag test macro directly.
2001-12-12 02:11:52 +00:00
Michael Snyder 47663de598 2001-11-14 Michael Snyder <msnyder@redhat.com>
Add address space identifiers to expression language for types.
	* c-exp.y (space_identifier, cv_with_space_id,
	const_or_volatile_or_space_identifier_noopt,
	const_or_volatile_or_space_identifier): New terminals.
	(ptype): Accept const_or_volatile_or_space_identifier.
	(typebase): Accept const_or_volatile_or_space_identifier.
	* c-typeprint.c (c_type_print_cv_qualifier): Rename to
	c_type_print_modifier.  Handle address space modified types.
	* gdbtypes.h (TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE):
	New type flags.
	(struct type): Add new field as_type for addr-space qualified types.
	(TYPE_AS_TYPE): New macro, retrieves the chain of types that are
	identical to this one except for address-space qualification.
	* gdbtypes.c (alloc_type): Initialize new field 'as_type'.
	(address_space_name_to_int): New function.
	(address_space_int_to_name): New function.
	(make_type_with_address_space): New function.
	(make_cv_type): Handle as_type field of new struct type object.
	* parse.c (check_type_stack_depth): New function.
	(push_type_address_space): New function.
	(follow_types): Handle types with address-space qualifier.
	* parser-defs.h (enum type_pieces): Add enum tp_space_identifier.
2001-11-15 01:55:59 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table.  This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h".  These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted.  These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
2001-04-27 00:19:09 +00:00
Jim Blandy 7f0b5c30f8 * c-typeprint.c (c_type_print_cv_qualifier): Don't print `const'
qualifier on C++ references; all references are innately const.
2001-04-24 23:12:50 +00:00
J.T. Conklin 3172dc307b * arch-utils.c (#include "gdbthread.h"): Removed.
(#include "symfile.h"): Removed.
(XMALLOC): Removed unused macro.
* breakpoint.c (tbreak_command): Removed local declaration.
(awatch_command, do_enable_breakpoint, set_breakpoint_count):
Remove duplicate declarations.
(bpstat_should_step, bpstat_have_active_hw_watchpoints)
(remove_solib_event_breakpoints): Fix indentation botch.
* c-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* ch-exp.c (ch_terminal_match_float_literal, parse_expr)
(parse_primval, parse_untyped_expr, parse_opt_untyped_expr):
Removed duplicate declarations.
* ch-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* corefile.c (#include "frame.h"): Removed
(#include "symfile.h"): Removed.
(#include "language.h"): Removed.
* dbxread.c (#include "command.h"): Removed.
* environ.c (#include "gdbcore.h"): Removed.
* event-loop.c (#include "top.h"): Removed.
* f-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
(#include "typeprint.h"): Removed.
(#include "frame.h"): Removed.
* gdbtypes.h (print_type_scalar): Removed declaration.
* infcmd.c (#include "completer.h"): Removed.
* language.c (#include "frame.h"): Removed.
* m2-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
* m2-valprint.c (#include "valprint.h"): Removed.
* p-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* p-valprint.c (#include "typeprint.h"): Removed.
* parse.c (#include "linespec.h"): Removed.
* regcache.c (#include "frame.h"): Removed.
* remote.c (#include "frame.h"): Removed.
(getpkt_sane): Make static.
* source.c (#include "completer.h"): Removed.
* stack.c (#include "symfile.h"): Removed.
(#include "objfiles.h"): Removed.
* symfile.c (#include "completer.h"): Removed.
* tracepoint.c (#include "completer.h"): Removed.
* values.c (#include "frame.h"): Removed.
* varobj.c (#include "valprint.h"): Removed.
* wrapper.c (#include "frame.h"): Removed.

* memattr.c (create_mem_region): Removed unused variable.
* remote-nrom.c: Removed spurious semicolon after init_nrom_ops.
-------------------------------------------------------------------
2001-03-27 20:36:24 +00:00
Jim Blandy 2adab5d0b2 Revert previous change, committed to trunk accidentally. 2001-03-24 03:23:20 +00:00
Jim Blandy 9e40428556 A single-file branch to help me keep things straight while adapting
GDB to the GNU V3 C++ ABI.

* c-typeprint.c: Commit Dan Berlin's changes.
2001-03-24 03:21:46 +00:00
J.T. Conklin 5565b5569b 2001-03-06 J.T. Conklin <jtc@redback.com>
* symtab.h (decode_line_1): Removed declaration.

        * symfile.c (#include <assert.h>): Removed.

        * arch-utils.c (#include <ctype.h>): Removed.
        * c-typeprint.c: Likewise.
        * dbxread.c: Likewise.
        * gdbtypes.c: Likewise.
        * target.c: Likewise.
        * os9kread.c: Likewise.

        * c-valprint.c (#include "demangle.h"): Removed.
        * ch-typeprint.c: Likewise.
        * eval.c: Likewise.
        * f-typeprint.c: Likewise.
        * f-valprint.c: Likewise.
        * m2-typeprint.c: Likewise.
        * typeprint.c: Likewise.
        * p-typeprint.c: Likewise.
        * valarith.c: Likewise.
        * valprint.c: Likewise.

        * m2-typeprint.c (#include "gdb_string.h"): Removed.
        * nlmread.c: Likewise.

        * mdebugread.c (#include "gdb-stabs.h"): Removed.
        * minsyms.c: Likewise.
        * mipsread.c: Likewise.
        * nlmread.c: Likewise.

        * m2-typeprint.c (#include "obstack.h"): Removed.
        * m2-valprint.c: Likewise.

        * event-loop.c (#include <setjmp.h>): Removed.
2001-03-07 02:57:08 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Pierre Muller a5238fbc03 2000-09-04 Pierre Muller <muller@ics.u-strasbg.fr>
* c-typeprint.c (c_typedef_print): remove (replaced by typedef_print in
	typeprint.c).
	* typeprint.c (typedef_print): new function. (old c_typedef_print
	function with pascal language support added).
	* value.h (c_printdef_print): removed.
	(typedef_print): declare.
	* symtab.c (print_symbol_info): call to c_typedef_print replaced by
	call to typedef_print.
2000-09-04 08:29:25 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Jason Molenda dfcd3bfb6f import gdb-2000-02-04 snapshot 2000-02-05 07:30:26 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Stu Grossman 433732f25e * c-typeprint.c (c_print_type): Don't crash if varstring is null.
* expprint.c expression.h (dump_expression):  Rename to
	dump_prefix_expression.
	* Print out the expression in normal form.  Call print_longest
	instead of trying to do it ourselves.
	* (dump_postfix_expression):  New function, prints out the expression
	with indentation and better formatting and interpretation.
	* parse.c (parse_exp_1):  Put calls to dump expressions under ifdef
	MAINTENANCE_CMDS and expressiondebug variable.
1998-08-12 15:50:59 +00:00
Peter Schauer a46d92a736 * 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.
1996-12-14 09:17:22 +00:00
Fred Fish 637e7c56ac (Fix from Jim Wilson)
* c-typeprint.c (cp_type_print_method_args): Pass -1 for show in
	recursive call to type_print.
1996-11-13 00:28:25 +00:00
Fred Fish 81afee37d0 * demangle.c (is_cplus_marker): New function, checks if a
character is one of the commonly used C++ marker characters.
	* defs.h (is_cplus_marker):  Add prototype.
	* c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle),
	cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol),
	stabsread.c (define_symbol, read_member_functions, read_struct_fields),
	symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P),
	values.c (vb_match):  Use is_cplus_marker instead of comparison
	with CPLUS_MARKER.
1996-02-16 06:14:15 +00:00
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Per Bothner fda36387eb * parse.c (follow_types): Given (TYPE[]) (i.e. with no length),
create a 0-length array type, and set BOUND_CANNOT_BE_DETERMINED.
	* valops.c (value_cast):  If a cast like (TYPE[])VALUE (i.e. array
	of unknown length) use sizeof(VALUE)/sizeof(TYPE) as the length.
	* c-typeprint.c (c_type_print_varspec_suffix):  If array length
	is 0, print it, but not if upper_bound is BOUND_CANNOT_BE_DETERMINED.
1995-02-17 23:20:29 +00:00
Per Bothner 27202b6a47 * buildsym.c (finish_block): If finishing a function without known
parameter type info, set that from parameter symbols.
	* c-typeprint.c (c_type_print_varspec_suffix):  For TYPE_CODE_FUNC,
	print parameter types, if available.
	* ch-typeprint.c (chill_type_print_base):  Likewise.

	* gdbtypes.h (struct type):  Remove function type field.
	(TYPE_FUNCTION_TYPE):  Remove macro.  We can't as simply re-use
	function types now that we're also storing parameter types.
	And the payoff is much less.
	* gdbtypes.c (make_function_type):  Don't use/set TYPE_FUNCTION_TYPE.
	(recursive_dump_type):  Don't print TYPE_FUNCTION_TYPE.
	* dwarfread.c (read_subroutine_type):  Don't set TYPE_FUNCTION_TYPE.
1995-02-12 18:46:45 +00:00
Per Bothner ead95f8ac2 * eval.c (evaluate_subexp): Clean up handling of
OP_UNDETERMINED_ARGLIST (no backtracking, more general).

	* f-valprint.c (f_val_print):  Print TYPE_CODE_STRING using
	LA_PRINT_STRING, and not val_print_string (which reads from inferior).

	* ch-lang.c (chill_is_varying_struct), ch-lang.h:  Remve function
	duplicate function made redundant by chill_varying_type.

	Re-write of f77 string and complex number support:

	* language.h (struct language_defn):  New fields string_lower_bound
	and string_char_type.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
	language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
	(f_language_defn), ch-lang.c (chill_language_defn):  Set new fields.
	* gdbtypes.c (create_string_type):  Use new string_char_type field.
	* valops.c (value_string):  Use new string_lower_bound field.

	* defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT):  Removed.
	* f-lang.c (f_create_fundamental_type, _initialize_f_language),
	m2-lang.c (m2_create_fundamental_type),
	gdbtypes.c (_initialize_gdbtypes):  Set TYPE_TARGET_TYPE of complex
	types.  Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
	* mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
	Removed.  Use builtin_type_complex and builtin_type_double_complex.

	* gdbtypes.h (enum type_code):  Removed TYPE_CODE_LITERAL_STRING
	and TYPE_CODE_LITERAL_COMPLEX.
	* c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c:  Removed uses of
	TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
	* gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
	f77_create_literal_string_type):  Removed.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
	VALUE_SUBSTRING_MYADDR):  Removed.

	* expression.h (enum exp_opcode):  Rename OP_F77_LITERAL_COMPLEX to
	OP_COMPLEX.
	* parse.c:  Update accordingly.

	* f-valprint.c (f77_print_cmplx):  Removed.
	(f_val_print case TYPE_CODE_COMPLEX):  Re-write to use print_floating.

	* f-exp.y (STRING_LITERAL):  Use OP_STRING instead of OP_ARRAY.
	* eval.c (evaluate_subexp):  For case OP_ARRAY, don't call
	f77_value_literal_string.
	* valops.c, value.h (f77_value_literal_string, f77_value_substring,
	f77_assign_from_literal_string, f77_assign_from_literal_complex):
	Removed.
	(value_assign):  No longer need to handle literal types.
	* valops.c (f77_value_literal_complex), value.h:  Re-written and
	renamed to value_literal_complex.  Last arg is now a (complex) type.
	* valops.c (f77_cast_into_complex):  Re-written and renamed to
	cast_into_complex.
	* eval.c (evaluate_subexp):  Update accordingly.
1995-02-02 03:37:26 +00:00
Peter Schauer 84bdfea6aa * c-typeprint.c (c_type_print_base): Use `show' of -1 to print
the return type of methods to avoid infinite loops with anonymous
	types.
	* valops.c (search_struct_field):  Handle anonymous unions.

	* sparc-tdep.c (sunos4_skip_trampoline_code):  New function
	to correctly handle steps into -g compiled PIC objects in the
	main executable.
	* config/sparc/tm-sun4os4.h (SKIP_TRAMPOLINE_CODE):
	Redefine to use sunos4_skip_trampoline_code.

	* dwarfread.c (DWARF_REG_TO_REGNUM):  Provide a default mapping
	from DWARF to GDB register numbering.
	* dwarfread.c (locval):  Use DWARF_REG_TO_REGNUM to map the
	register value.
	* config/mips/tm-mipsv4.h (DWARF_REG_TO_REGNUM):  Define.
1994-12-17 10:46:32 +00:00
Peter Schauer 4c664b8d0a * cp-valprint.c (static_field_print): New variable, controls
printing of static members.
	(_initialize_cp_valprint):  New print set subcommand
	"static-members". Turn on printing of static members by default.
	(cp_print_value_fields):  Print static members if necessary.

	* solib.c:  Remove inclusion of libelf.h and elf/mips.h.
	(elf_locate_base):  Use only standard BFD functions to collect
	information about the .dynamic section. Check for DT_MIPS_RLD_MAP
	tag only if it got defined via the inclusion of <link.h>.

	* f-exp.y:  Write block for OP_VAR_VALUE.
	* f-valprint.c (info_common_command):  Handle `info common'
	without an argument correctly.

	* c-typeprint.c (c_type_print_base):  Handle template constructors.
	* symtab.c (gdb_mangle_name):  Handle template method mangling,
	get rid of GCC_MANGLE_BUG code, which only applied to gcc-2.2.2.
1994-09-17 11:35:51 +00:00
Stan Shebs 22d7f91e32 * c-typeprint.c (c_type_print_varspec_prefix,
c_type_print_varspec_suffix): Add cases for Fortran type codes.
	 * eval.c (evaluate_subexp): For OP_ARRAY expressions in Fortran,
	 call f77_value_literal_string instead.
	 * f_exp.y: Include <string.h>, move include of parser-defs.h.
	 (parse_number): Translate 'd' floats to 'e' so atof() works.
	 (yylex): Remove unused variables.
	 * f-lang.c: Include <string.h>.
	 (get_bf_for_fcn): Remove unused variable.
	 * f-typeprint.c (f_type_print_varspec_prefix,
	 f_type_print_varspec_suffix): Remove unused
	 variables, add cases to switch statements.
	 (f_type_print_base): Remove unused variables.
	 * f-valprint.c (gdbcore.h, command.h): Include.
	 (f77_get_dynamic_lowerbound, f77_get_dynamic_upperbound):
	 Call read_memory_integer with correct number of arguments.
	 (f77_get_dynamic_upperbound): Call f77_get_dynamic_lowerbound
	 with correct argument type.
	 (f77_print_array): Removed unused array array_size_array.
	 (f_val_print): Don't use a CORE_ADDR as a char *.
	 * valops.c (value_cast): Handle COMPLEX and BOOL types.
	 (value_assign): Handle Fortran literal string and complex values.
	 (f77_cast_into_complex, f77_assign_from_literal_string,
	 f77_assign_from_literal_complex): New functions.
1994-09-07 00:23:16 +00:00
Per Bothner 6a2eecace5 * c-typeprint.c (c_typedef_print): Add missing Chill support. 1994-09-02 00:34:43 +00:00
Peter Schauer f3806e3b6c * c-typeprint.c (c_print_type): Assume demangled arguments
if a '(' is found in varstring, Looking for ')' at the end of
	varstring did fail with demangled const member functions, which
	have a trailing `const'.
	* remote.c (get_offsets, putpkt):  Change to `char' buffers,
	to avoid errors when compiling with DEC c89.
	(remote_wait):  Cast to `char *' before passing buffer to
	fputs_filtered, to avoid errors when compiling with DEC c89.
	(remote_wait):  Do not return inferior_pid by default, this
	statement is never reached, which causes warnings from some
	compilers.
	* stabsread.c (scan_file_globals):  Ignore static minimal symbols.
	* symfile.c (load_command):  If called with no argument, try
	to get the filename from the executable file.
	(generic_load):  Remove check for NULL filename, it is done
	in load_command now.
1994-08-19 20:44:18 +00:00
Stan Shebs 054308add9 * Makefile.in (dcache_h): Remove redundant definition.
(init.c): Add a comment.
	(top.c): Remove explicit compile action.
	* breakpoint.c (mention): Share code indicating location of
	break/watchpoints, don't print address if addressprint is off.
	* breakpoint.c, c-typeprint.c, c-valprint.c, energize.c, symtab.h
	(demangle): Remove redundant declarations.
	* eval.c: Remove redundant function declarations.
	* objfiles.h: Cosmetic and grammatical improvements.
	* TODO: Various updates.
1994-06-30 02:51:50 +00:00
Jim Kingdon 0e4ad984b1 * c-typeprint.c (c_type_print_base): Have SHOW == 0 mean to print
full details on structure elements without names.  This partially
	reverts the changes of 1 Jul 1993 and 31 Aug 1993; I think this aspect
	of those changes was accidental.
1994-01-27 23:55:10 +00:00
Jim Kingdon dac317dc3f * c-typeprint.c (c_type_print_varspec_suffix, case TYPE_CODE_FUNC):
Print our "()" first, then recurse for the target type.
1994-01-15 15:27:49 +00:00
Jim Kingdon dda398c369 * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
* gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
	what cleanup_undefined_types does for arrays, except we clear
	TYPE_FLAG_TARGET_STUB if we fix up the type.
	* stabsread.c (cleanup_undefined_types): Add comments about how
	doing arrays here is no longer the clean way to do it.
	(read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
	add_undefined_type.
	* c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
	outside switch so it happens for all type codes.
	* cp-valprint.c (cp_print_value_fields): Recurse to val_print,
	instead of c_val_print, so that check_stub_type gets called.

	* gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
	TYPE_FLAG_SIGNED.  It was inconsistently set, never checked
	(except in recursive_dump_type), and is pointless.
1993-11-15 20:13:30 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon 4f9bddb4fc * c-typeprint.c (c_type_print_base, TYPE_FN_FIELD_STUB code):
If demangled name lacks a colon, don't dump core.
1993-09-30 22:14:03 +00:00
K. Richard Pixley 72cd0384f2 gcc lint 1993-09-08 21:23:41 +00:00
Jim Kingdon 875fc229ff * c-typeprint.c (c_print_type_base): Treat show = 0 just like
show < 0.  The only case where we had been distinguishing is that
	show = 0 used to print "struct  " or "enum  " instead of
	"struct {...}" or "enum {...}" which seems clearly wrong.
1993-08-31 15:44:44 +00:00
Jim Kingdon b2bebdb0f1 * gdbtypes.h (struct type): Add field tag_name.
* gdbtypes.c (type_name_no_tag), c-typeprint.c (c_type_print_base):
	Use it.
	* {coff,dwarf,mips,stabs}read.c: Set it.
1993-07-02 02:57:06 +00:00
Jim Kingdon fd09c96316 * dbxread.c (process_one_symbol): If we find a LOC_BLOCK where we
don't expect it, change it to LOC_STATIC so at least we don't coredump.

	* c-typeprint.c (c_type_print_base): Don't error() on invalid type.
1993-06-29 15:25:27 +00:00
Fred Fish 86e3a5e40f * c-typeprint.c (c_type_print_base): Avoid dereferencing NULL
names for TYPE_CODE_STRUCT and TYPE_CODE_UNION types.
	TYPE_CODE_ENUM was already testing for this.
1993-05-30 00:03:59 +00:00
Jim Kingdon 8789d972a3 * c-typeprint.c (c_type_print_base): Don't print typedef'd names
as struct, union, or enum tags.
1993-05-24 15:44:12 +00:00
Fred Fish 5aefc1ca23 Remove chill sanitizations, which are no longer necessary. 1993-04-16 23:22:41 +00:00
Fred Fish 5e81259d23 * utils.c (fputs_demangled, fprint_symbol): Remove.
* utils.c (fprintf_symbol_filtered):  New function which combines
	the functionality of fputs_demangled and fprint_symbol.  Uses a
	caller provided language parameter to select the appropriate
	demangler, and caller provided args to pass to the demangler.
	* defs.h (fputs_demangled, fprint_symbol):  Remove prototypes.
	* defs.h (fprintf_symbol_filtered):  Add prototype.
	* c-typeprint.c (cp_type_print_method_args):  Replace calls to
	fputs_demangled with call to fprintf_symbol_filtered.
	* cp-valprint.c (demangle.h):  Include
	* cp-valprint.c (cp_print_value_fields):  Replace calls to
	fprint_symbol with calls to fprintf_symbol_filtered.
	* printcmd.c (print_frame_args):  Replace call to fprint_symbol
	with call to fprintf_symbol_filtered.
	* stack.c (print_frame_info, frame_info):  Add language variable
	to pass to fprintf_symbol_demangled and initialize it from the
	symbol's language.  Replace calls to fputs_demangled with calls
	to fprintf_symbol_filtered.
	* symtab.c (find_methods):  Replace call to fputs_demangled with
	call to fprintf_symbol_filtered.
	**** start-sanitize-chill ****
	* ch-valprint.c (demangle.h):  Include.
	* ch-valprint.c (chill_print_value_fields):  Replace call to
	fprint_symbol with call to new fprintf_symbol_filtered.
	**** end-sanitize-chill ****
1993-03-11 19:27:51 +00:00
Fred Fish bd5d07d94c * utils.c (fputs_demangled): Complete rewrite to clean up and
add a language parameter that is used to select the demangling
	algorithm.
	* defs.h (enum language):  Move further up in file so enum can
	be used in prototypes.
	* defs.h (fputs_demangled):  Update prototype to add lang arg.
	* c-typeprint.c (cp_type_print_method_args):  Add language arg
	to fputs_demangled calls, remove DMGL_PARAMS flag.
	* stack.c (print_frame_info):  Remove obsolete code so we don't
	have to update fputs_demangled usage in it.
	* stack.c (print_frame_info, frame_info):  Add language variable
	to pass to fputs_demangled and initialize it from the symbol's
	language.  Call fputs_demangled with language arg.
	* symtab.c (find_methods):  Add language arg to fputs_demangled
	call.
1993-03-11 17:44:39 +00:00
Fred Fish c4413e2c9b * c-exp.y (exp:STRING): Convert C strings into array-of-char
constants with an explicit null byte terminator.  OP_STRING is
	now used for real string types.
	* c-lang.c (builtin_type_*):  Move declarations to lang.c since
	they are used by all languages.
	* c-lang.c (_initialize_c_language):  Move initializations of
	builtin_type_* to lang.c.
	* c-typeprint.c (c_type_print_varspec_prefix,
	c_type_print_varspec_suffix):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* c-valprint.c (c_val_print):  Change the way character arrays
	are printed as strings to be consistent with the way strings
	are printed when pointer-to-char types are dereferenced.
	Remove test of print_max before calling val_print_string, which
	now does it's own test.
	* eval.c (evaluate_subexp):  Add case for OP_ARRAY.
	* expprint.c (print_subexp, dump_expression):  Add case for OP_ARRAY.
	* expression.h (enum exp_opcode):  Add OP_ARRAY and document.
	* gdbtypes.c (builtin_type_*):  Add declarations moved from
	c-lang.c.
	* gdbtypes.c (create_string_type):  New function to create real
	string types.
	* gdbtypes.c (recursive_dump_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* gdbtypes.c (_initialize_gdbtypes):  Add initializations of
	builtin_type_* types moved from c-lang.c.
	* gdbtypes.h (enum type_code):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* gdbtypes.h (builtin_type_string):  Add extern declaration.
	* gdbtypes.h (create_string_type):  Add prototype.
	* m2-lang.c (m2_create_fundamental_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* m88k-tdep.c (pushed_size):  TYPE_CODE_PASCAL_ARRAY renamed to
	TYPE_CODE_STRING.
	* mipsread.c (_initialize_mipsread):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_ARRAY.
	* printcmd.c (print_formatted):  Recognize TYPE_CODE_STRING.
	* typeprint.c (print_type_scalar):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* valops.c (allocate_space_in_inferior):  New function and
	prototype, using code ripped out of value_string.
	* valops.c (value_string):  Rewritten to use new function
	allocate_space_in_inferior, but temporarily disabled until some
	other support is in place.
	* valops.c (value_array):  New function to create array constants.
	* valprint.c (val_print_string):  Add comment to document use,
	complete rewrite to fix several small buglets.
	* value.h (value_array):  Add prototype.
	* value.h (val_print_string):  Change prototype to match rewrite.
	**** start-sanitize-chill ****
	* ch-valprint.c (chill_val_print):  Add case for TYPE_CODE_STRING.
	* ch-exp.y (match_character_literal):  Disable recognition of
	control sequence form of character literals and document why.
	**** end-sanitize-chill ****
1993-01-16 05:15:58 +00:00
Fred Fish 2e4964adfc * defs.h (STRCMP, STREQ, STREQN): New macros.
* defs.h (demangle_and_match):  Remove prototype.
	* dwarfread.c (STREQ, STREQN):  Remove macros, replaced with STREQ
	  and STREQN defined in defs.h.
	* dwarfread.c (set_cu_language):  For completely unknown languages,
	  try to deduce the language from the filename.  Retain behavior
	  that for known languages we don't know how to handle, we use
	  language_unknown.
	* dwarfread.c (enum_type, symthesize_typedef):  Initialize language
	  and demangled name fields in symbol.
	* dwarfread.c, mipsread.c, partial-stab.h:  For all usages of
	  ADD_PSYMBOL_TO_LIST, add language and objfile parameters.
	* dwarfread.c (new_symbol):  Attempt to demangle C++ symbol names
	  and cache the results in SYMBOL_DEMANGLED_NAME for the symbol.
	* elfread.c (STREQ):  Remove macro, use STREQ defined in defs.h.
	  Replace usages throughout.
	* elfread.c (demangle.h):  Include.
	* elfread.c (record_minimal_symbol):  Remove prototype and function.
	* gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES,
	  B_CLRALL):  Moved from symtab.h to gdbtypes.h.
	* infcmd.c (jump_command):  Remove code to demangle name and add
	  it to a cleanup list.  Now just use SYMBOL_DEMANGLED_NAME.
	* minsyms.c (demangle.h):  Include.
	* minsyms.c (lookup_minimal_symbol):  Indent comment to match code.
	* minsyms.c (install_minimal_symbols):  Attempt to demangle symbol
	  names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME.
	* mipsread.c (psymtab_language):  Add static variable.
	* stabsread.c (demangle.h):  Include.
	* stabsread.c (define_symbol):  Attempt to demangle C++ symbol
	  names and cache them in the SYMBOL_DEMANGLED_NAME field.
	* stack.c (return_command):  Remove explicit demangling of name
	  and use of cleanups.  Just use SYMBOL_DEMANGLED_NAME.
	* symfile.c (demangle.h):  Include.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):  Fix
	  to match macros in symfile.h and allow them to be compiled
	  if INLINE_ADD_PSYMBOL is not true.
	* symfile.h (INLINE_ADD_PSYMBOL):  Default to true if not set.
	* symfile.h (ADD_PSYMBOL_*):  Add language and objfile parameters.
	  Add code to demangle and cache C++ symbol names.  Use macro form
	  if INLINE_ADD_PSYMBOL is true, otherwise use C function form.
	* symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	  Remove, also defined in symfile.c, which we already fixed.
	* symtab.c (expensive_mangler):  Remove prototype and function.
	* symtab.c (find_methods):  Remove physnames parameter and fix
	  prototype to match.
	* symtab.c (completion_list_add_symbol):  Name changed to
	  completion_list_add_name.
	* symtab.c (COMPLETION_LIST_ADD_SYMBOL):  New macro, adds both
	  the normal symbol name and the cached C++ demangled name.
	* symtab.c (lookup_demangled_partial_symbol,
	  lookup_demangled_block_symbol):  Remove prototypes and functions.
	* symtab.c (lookup_symbol):  Remove use of expensive_mangler,
	  use lookup_block_symbol instead of lookup_demangled_block_symbol.
	  Remove code to try demangling names and matching them.
	* symtab.c (lookup_partial_symbol, lookup_block_symbol):
	  Fix to try matching the cached demangled name if no match is
	  found using the regular symbol name.
	* symtab.c (find_methods):  Remove unused physnames array.
	* symtab.c (name_match, NAME_MATCH):  Remove function and macro,
	  replaced with SYMBOL_MATCHES_REGEXP from symtab.h.
	* symtab.c (completion_list_add_symbol):  Rewrite to use cached
	  C++ demangled symbol names.
	* symtab.h:  Much reformatting of structures and such to add
	  whitespace to make them more readable, and make them more
	  consistent with other gdb structure definitions.
	* symtab.h (general_symbol_info): New struct containing fields
	  common to all symbols.
	* symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME,
	  SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME,
	  SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE):  New macros.
	* symtab. (struct minimal_symbol, struct partial_symbol, struct
	  symbol): Use general_symbol_info struct.
	* utils.c (demangle_and_match):  Remove, no longer used.
	* valops.c (demangle.h):  Include.
	* xcoffexec.c (eq):  Remove macro, replace usages with STREQ.
	* blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c,
	  infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c,
	  symmisc.c, symtab.c, valops.c:  Replace references to minimal
	  symbol fields with appropriate macros.
	* breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c,
	  coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c,
	  demangle.c, elfread.c, energize.c, environ.c, exec.c,
	  gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c,
	  main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c,
	  remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c,
	  sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c,
	  symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h,
	  tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c:  Replace strcmp
	  and strncmp usages with STREQ, STREQN, or STRCMP as appropriate.
	* breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c,
	  mipsread.c, printcmd.c, source.c, stabsread.c, stack.c,
	  symmisc.c, tm-29k.h, valops.c, values.c:  Replace SYMBOL_NAME
	  references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as
	  appropriate.
	* buildsym.c (start_subfile, patch_subfile_names):  Default the
	  source language to what can be deduced from the filename.
	* buildsym.c (end_symtab):  Update the source language in the
	  allocated symtab to match what we have been using.
	* buildsym.h (struct subfile):  Add a language field.
	* c-typeprint.c (c_print_type):  Remove code to do explicit
	  demangling.
	* dbxread.c (psymtab_language):  Add static variable.
	* dbxread.c (start_psymtab):  Initialize psymtab_language using
	  deduce_language_from_filename.
1992-12-23 06:34:57 +00:00
Fred Fish a8a69e6332 * Makefile.in (VERSION): Bump to 4.7.4.
* Makefile.in (SFILES_MAINDIR):  Add typeprint.c, c-typeprint.c,
	  m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
	* Makefile.in (HFILES):  Add valprint.h.
	* Makefile.in (OBS):  Add typeprint.o, c-typeprint.o,
	  m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
	* typeprint.c, typeprint.h:  New files for language independent
	  type printing functions.
	* c-typeprint.c, m2-typeprint.c:  New files for language dependent
	  type printing functions and definitions.
	* valprint.h:  New include file for language independent value
	  printing definitions.
	* c-valprint.c, cp-valprint.c, m2-valprint.c:  New files for language
	  dependent value printing functions.
	* c-exp.y (production ptype):  Add range_type variable and use new
	  create_range_type function.
	* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
	  infcmd.c (path_var_name), language.c (unk_op_print_tab),
	  m2-lang.c (m2_op_print_tab):  Change from ANSI-obsolescent
	  "const static" to ANSI-conformant "static const".
	* c-exp.y (c_create_fundamental_type):  Remove unused nbytes.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add c_print_type,
	  and c_val_print.
	* c-lang.h (c_print_type, c_val_print):  Add prototypes.
	* coffread.c (decode_type):  Add range_type variable and call to
	  new create_range_type function.
	* complaints.c (complain):  Remove unused val variable.
	* complaints.c (_initialize_complaints):  Make it void.
	* convex-tdep.c (value_of_trapped_internalvar):  Add range_type
	  variable and call new create_range_type function.
	* defs.h (enum val_prettyprint):  Move enum from value.h to here
	  so we can avoid having to include value.h just for prototypes that
	  need the enum (thanks ANSI).
	* dwarfread.c (struct_type):  Local anonymous_size variable is
	  only used if !BITS_BIG_ENDIAN.
	* dwarfread.c (decode_subscript_data_item):  Add rangetype
	  variable and call new create_range_type function.
	* elfread.c (elf_symfile_read):  Remove unused dbx and text_sect
	  variables.
	* eval.c (evaluate_subexp):  Remove unused local variable name
	  and the statement with no side effects that initializes it.
	* expprint.c (print_subexp):  Change local_printstr to
	  LA_PRINT_STRING.
	* gdbtypes.c (create_range_type):  New function that creates
	  a range type using code fragments from object file readers as
	  an example of what has to be initialized.
	* gdbtypes.c (create_array_type):  Removed index_type, low_bound,
	  and high_bound parameters, replaced with a single range_type
	  parameter.  Change function body to use passed in range_type
	  rather than handcrafting one.
	* gdbtypes.h (create_range_type):  Add prototype.
	* gdbtypes.h (create_array_type):  Change prototype parameters.
	* infrun.c (normal_stop):  Remove unused local variables tem and c.
	* infrun.c (hook_stop_stub):  Return 0 rather than random value.
	* language.c (unk_lang_print_type, unk_lang_val_print):  Add
	  stub functions that call error if called.
	* language.c (unknown_language_defn, auto_language_defn,
	  local_language_defn):  Add initializers unk_lang_print_type and
	  unk_lang_val_print.
	* language.h (struct language_defn):  Reformat for larger
	  comments, add la_print_type and la_val_print members.  Add
	  LA_PRINT_TYPE and LA_VAL_PRINT macros.  Change local_printchar
	  to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
	* m2-lang.c (m2_create_fundamental_type):  Remove unused local
	  variable nbytes.
	* m2-lang.c (m2_language_defn):  Add initializers m2_print_type
	  and m2_val_print.
	* m2-lang.h (m2_print_type, m2_val_print):  Add prototypes.
	* main.c (execute_command): Remove unused local variable cmdlines.
	* main.c (echo_command), stabsread.c (read_type), printcmd.c
	  (clear_displays), symmisc.c (block_depth), values.c
	  (clear_value_history):
	  Make testing of truth value of assignment result explicit.
	* mipsread.c (upgrade_type):  Update FIXME to include future use
	  of create_range_type.
	* printcmd.c (ptype_command, ptype_eval, whatis_command,
	  whatis_exp, maintenance_print_type):  Move prototypes and functions
	  to new typeprint.c.
	* printcmd.c (_initialize_printcmd):  Move add_com calls for
	  ptype_command and whatis_command to new typeprint.c.
	* ser-bsd.c (serial_open):  Remove unused variable sgttyb.
	* source.c (find_source_lines):  Local variable c only used
	  when LSEEK_NOT_LINEAR is defined.
	* stabsread.c (read_array_type):  Use new create_range_type
	  function.
	* stabsread.c (read_range_type):  Add new index_type variable and
	  call new create_range_type function rather than handcrafting
	  range types.
	* symmisc.c (type_print_1):  Change usages to LA_PRINT_TYPE.
	* symtab.c (typedef_print usages):  Use c_typedef_print, renamed.
	* symtab.c (type_print_base usages):  Use c_type_print_base.
	* symtab.c (type_print_varspec_prefix usages):  Use
	  c_type_print_varspec_prefix.
	* symtab.c (type_print_method_args usages):  Use
	  cp_type_print_method_args.
	* valprint.c:  Completely ripped apart and the fragments used
	  to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
	  valprint.h.  Remaining stuff is language independent.
	* value.h (struct fn_field):  Forward declare for prototypes.
	* value.h (type_print_1):  Remove prototype.
	* value.h (enum val_prettyprint):  Moved to defs.h.
	* value.h (typedef_print):  Prototype renamed to c_typedef_print.
	* value.h (baseclass_offset):  Add prototype.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-typeprint.c, ch-valprint.c.
	* Makefile.in (OBS):  Add ch-typeprint.o, ch-valprint.o.
	* ch-typeprint.c:  New file for language dependent type printing.
	* ch-valprint.c:  New file for language dependent value printing.
	* ch-exp.y (parse_number):  Remove prototype and stub function.
	* ch-exp.y (decode_integer_literal):  Removed unused digits and
	  temp variables.
	* ch-exp.y (convert_float):  Completely ifdef out for now.
	* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
	  ch-lang.c (chill_op_print_tab):
	  Change from ANSI-obsolescent "const static" to ANSI-conformant
	  "static const".
	* ch-exp.y (yylex):  Add unhandled storage class enumeration
	  literals to switch statement for completeness.
	* ch-lang.c (chill_create_fundamental_types):  Remove unused
	  nbytes variable.  Change dummy type to 2 bytes to match int.
	  Handle FT_VOID types gratuituously added to chill DWARF by
	  compiler.  Change FT_CHAR case to generate an TYPE_CODE_CHAR
	  type rather than a one byte TYPE_CODE_INT type.
	* ch-lang.c (chill_language_defn):  Add chill_print_type and
	  chill_val_print.
	* ch-lang.h (chill_print_type, chill_val_print):  Add prototypes.
	**** end-sanitize-chill ****
1992-12-18 20:21:32 +00:00