Commit Graph

15 Commits

Author SHA1 Message Date
Jakub Jelinek c8a27c4018 rtl.def (DEBUG_IMPLICIT_PTR): New rtl code.
* rtl.def (DEBUG_IMPLICIT_PTR): New rtl code.
	* rtl.h (DEBUG_IMPLICIT_PTR_DECL): Define.
	* rtl.c (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_IMPLICIT_PTR.
	* print-rtl.c (print_rtx): Likewise.
	* cselib.c (rtx_equal_for_cselib_p, cselib_hash_rtx): Likewise.
	* cfgexpand.c (expand_debug_expr): Generate DEBUG_IMPLICIT_PTR
	for ADDR_EXPR with non-addressable object.
	* dwarf2out.c (enum dw_val_class): Add dw_val_class_decl_ref.
	(struct dw_val_struct): Add v.val_decl_ref.
	(dwarf_stack_op_name, output_loc_operands, output_loc_operands_raw):
	Handle DW_OP_GNU_implicit_pointer.
	(size_of_loc_descr): Likewise.  Fix up DW_OP_call_ref size.
	(get_ref_die_offset_label): New function.
	(implicit_ptr_descriptor): New function.
	(mem_loc_descriptor): Handle DEBUG_IMPLICIT_PTR.
	(loc_descriptor): Likewise.
	(gen_variable_die): Put even definitions into decl_die_table.
	(resolve_addr_in_expr): Resolve still unresolved
	DW_OP_GNU_implicit_pointer operands, if it can't be resolved
	return false.
	(dwarf2out_finish): Call output_location_lists after outputting
	.debug_info and .debug_abbrev instead of before.

	* dwarf2.h (DW_OP_GNU_implicit_pointer): New.

2010-09-09  Roland McGrath  <roland@redhat.com>

	* dwarf2out.c (DWARF_REF_SIZE): Define.
	(size_of_loc_descr): Use it for DW_OP_call_ref.

From-SVN: r164050
2010-09-09 08:43:47 +02:00
Jakub Jelinek f0057424da dwarf2.h (enum dwarf_type): Add DW_ATE_UTF.
* dwarf2.h (enum dwarf_type): Add DW_ATE_UTF.

	* dwarf2out.c (base_type_die): Use DW_ATE_UTF for
	C++ char16_t and char32_t.

From-SVN: r161095
2010-06-21 18:29:51 +02:00
Tristan Gingold 4b9c045f7e dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and DW_TAG_HP_Bliss_field_set.
2010-06-08  Tristan Gingold  <gingold@adacore.com>

	* dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and
	DW_TAG_HP_Bliss_field_set.
	(enum dwarf_attribute): Add DW_AT_HP_prologue, DW_AT_HP_epilogue,
	DW_AT_HP_unit_name, DW_AT_HP_unit_size, DW_AT_HP_widened_byte_size,
	DW_AT_HP_definition_points, DW_AT_HP_default_location and
	DW_AT_HP_is_result_param.
	(enum dwarf_type): Add DW_ATE_HP_VAX_float, DW_ATE_HP_VAX_float_d,
	DW_ATE_HP_packed_decimal, DW_ATE_HP_zoned_decimal, DW_ATE_HP_edited,
	DW_ATE_HP_signed_fixed, DW_ATE_HP_unsigned_fixed,
	DW_ATE_HP_VAX_complex_float and DW_ATE_HP_VAX_complex_float_d.
	(enum dwarf_line_number_x_ops): Add
	DW_LNE_HP_source_file_correlation.
	(enum dwarf_source_language): Add DW_LANG_HP_Bliss,
	DW_LANG_HP_Basic91, DW_LANG_HP_Pascal91, DW_LANG_HP_IMacro,
	DW_LANG_HP_Assembler.

From-SVN: r160430
2010-06-08 09:51:27 +00:00
Jakub Jelinek b172360dd4 dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn field.
* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
	field.

From-SVN: r157983
2010-04-06 09:37:37 +02:00
Joel Brobecker d9019c9941 Add new DW_AT_use_GNAT_descriptive_type CU attribute.
* dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.

From-SVN: r155855
2010-01-13 11:13:53 +00:00
Joel Brobecker df7b6aaae4 * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNAT_descriptive_type.
From-SVN: r155501
2009-12-29 04:14:21 +00:00
Jonas Maebe 9cd4e79ba8 Checking this in for: Jonas Maebe <jonas.maebe@elis.ugent.be>
Add DWARF attribute value for the "Borland fastcall" calling
        convention.
        * elf/dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.

From-SVN: r153970
2009-11-06 14:36:57 +00:00
Jakub Jelinek 7613143b72 dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type and DW_TAG_template_alias.
* dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type
	and DW_TAG_template_alias.
	(dwarf_attr_name): Handle DW_AT_main_subprogram,
	DW_AT_data_bit_offset, DW_AT_const_expr, DW_AT_enum_class,
	DW_AT_linkage_name, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by,
	DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded,
	DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required
	and DW_AT_GNU_odr_signature.
	(dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
	DW_FORM_flag_present and DW_FORM_ref_sig8.
	(output_signature): Only print name on the first byte.
	(output_die): Likewise for dw_val_class_data8.

	* include/dwarf2.h (DW_LANG_Python): Add comment that it is
	a DWARF 4 addition.

From-SVN: r152853
2009-10-15 18:40:52 +02:00
Dodji Seketeli 7653f2738f DWARF for Template parm pack is a gnu extension.
include/ChangeLog:
	* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
	DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
	and DW_TAG_formal_parameter_pack until DWARF 5 is out.

gcc/ChangeLog:
	* dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
	generic_parameter_die, template_parameter_pack_die,
	gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
	DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
	DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.

gcc/testsuite/ChangeLog:
	* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust after renaming
	DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack
	into DW_TAG_GNU_template_parameter_pack and
	DW_TAG_GNU_formal_parameter_pack.
	* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.

From-SVN: r152188
2009-09-26 01:23:18 +02:00
Cary Coutant 5ae5f59651 Add rest of new values from DWARF Version 4.
include/

	Add rest of new values from DWARF Version 4.
	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
	New tags.
	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
	attributes.
	(DW_LANG_Python): New language.

From-SVN: r152181
2009-09-25 11:33:04 -07:00
Dodji Seketeli d40a19da13 re PR debug/41266 (Emit DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack)
Fix for PR debug/41266

ChangeLog:

	* include/dwarf2.h (enum dwarf_tag): Add
	DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack.

gcc/ChangeLog:

	* dwarf2out.c (template_parameter_pack_die,
	gen_formal_parameter_pack_die ): New functions.
	(make_ith_pack_parameter_name): Remove this function.
	(dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
	DW_TAG_formal_parameter_pack.
	(gen_generic_params_dies): Represent each template parameter pack
	by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
	represented by usual DW_TAG_template_*_parameter DIEs that are
	children of the DW_TAG_template_parameter_pack element DIE.
	(generic_parameter_die): This doesn't deal with parameter pack
	names anymore. Don't generate DW_AT_name for some DIEs, e.g. children of
	parameter pack DIEs.
	(gen_formal_parameter_die): Add a flag to not emit DW_AT_name
	in certain cases, e.g. for pack elements.
	(gen_formal_types_die, gen_decl_die): Adjust usage of
	gen_formal_parameter_die.
	(gen_subprogram_die): Represent each function parameter pack by a
	DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
	represented by usual DW_TAG_formal_parameter DIEs that are children
	of the DW_TAG_formal_parameter_pack DIE. Remove references to
	____builtin_va_alist decls as no part of the compiler uses those
	anymore.
	* langhooks.h (struct lang_hooks_for_decls): Add
	function_parm_expanded_from_pack_p, get_generic_function_decl
	and function_parameter_pack_p hooks.  Fix comment for
	get_innermost_generic_parms hook.
	* langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
	LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
	macros and use them to initialize lang_hook.

gcc/cp/ChangeLog:

	* cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
	LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P,
	LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these
	hooks for the c++ FE.
	* cp-tree.h (function_parameter_pack_p, get_function_template_decl,
	function_parameter_expanded_from_pack_p): Declare ...
	* pt.c (function_parameter_pack_p, get_function_template_decl,
	function_parameter_expanded_from_pack_p): ... new hooks.
	(get_template_info): Make this more robust.
	(template_args_variadic_p, make_ith_pack_parameter_name): Add a new
	line between comment and function.
	(get_template_argument_pack_elems): Fix comment.
	(tsubst_decl): Arguments of function parameter packs are not
	parameter packs themselves.

gcc/testsuite/ChangeLog:
	* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust.
	* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
	* g++.dg/debug/dwarf2/template-params-4.C: Likewise.

From-SVN: r152043
2009-09-22 22:20:03 +02:00
Dodji Seketeli f9329c35d7 Emit DWARF for template parameters (PR debug/30161)
ChangeLog:
	PR debug/30161
	* include/dwarf2.h (enum dwarf_tag): Added
	DW_TAG_GNU_template_template_param
	(enum dwarf_attribute): Added DW_AT_GNU_template_name.

gcc/ChangeLog:
	PR debug/30161
	* cgraph.h (cgraph_get_node): Declare ...
	* cgraph.c (cgraph_get_node): ... new function.
	* dwarf2out.c (gen_generic_params_dies,
	generic_parameter_die, tree_add_const_value_attribute_for_decl,
	make_ith_pack_parameter_name,
	append_entry_to_tmpl_value_parm_die_table,
	gen_remaining_tmpl_value_param_die_attribute): New functions.
	(gen_subprogram_die): Generate debug info for template parameters
	if debug info level is higher than DINFO_LEVEL_TERSE.
	Use tree_add_const_value_attribute_for_decl instead of
	tree_add_const_value_attribute.
	(gen_const_die): Use tree_add_const_value_attribute_for_decl
	instead of tree_add_const_value_attribute.
	(gen_struct_or_union_type_die): Generate debug
	info for template parameters if debug info level is higher than
	DINFO_LEVEL_TERSE.
	(tree_add_const_value_attribute): Handle integral and pointer
	constants. Update comment.
	(dwarf_tag_name): Support DW_TAG_GNU_template_template_param.
	(dwarf_attr_name): Support DW_AT_GNU_template_name.
	(reference_to_unused): Fix thinko. Remove redundant predicates from
	tests.
	(tree_add_const_value_attribute): Make this work for constant
	expressions only.
	tree_add_const_value_attribute_for_decl is to be used for variable
	DECLs now.
	(add_location_or_const_value_attribute): Use
	tree_add_const_value_attribute_for_decl now.
	(dwarf2out_finish): Emit the DW_AT_const_value attribute of
	DW_TAG_template_value_param DIEs after function DIEs have been
	emitted.
	* langhooks.h (lang_hooks_for_types): Add
	get_argument_pack_elems.
	(lang_hooks_for_decls): Add generic_generic_parameter_decl_p.
	(lang_hooks): Added get_innermost_generic_parms,
	get_innermost_generic_args.
	* langhooks-def.h (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
	LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
	LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
	LANG_HOOKS_GENERIC_GENERIC_PARAMETER_DECL_P): New language hooks.

gcc/cp/ChangeLog:
	PR debug/30161
	* cp-tree.h (get_template_info): Parameter should be const.
	(CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
	(get_template_argument_pack_elems,
	get_primary_template_innermost_parameters,
	get_template_innermost_arguments, template_template_parameter_p):
	Declare ...
	* pt.c (get_template_argument_pack_elems,
	get_template_innermost_parameters, get_template_innermost_arguments,
	template_template_parameter_p):
	... New C++ front end implementation of new language hooks.
	(primary_template_instantiation_p): New private helper.
	(make_ith_pack_parameter_name): Use snprintf and strnlen instead of
	printf and strlen.
	(get_template_info): Const-ify parameter.
	* cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
	LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
	LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
	LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
	interfaces for the C++ front-end.

gcc/testsuite/ChangeLog:
	PR debug/30161
	* g++.dg/debug/dwarf2/template-params-1.C: New test.
	* g++.dg/debug/dwarf2/template-params-2.C: Likewise.
	* g++.dg/debug/dwarf2/template-params-3.C: Likewise.
	* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
	* g++.dg/debug/dwarf2/template-params-5.C: Likewise.
	* g++.dg/debug/dwarf2/template-params-6.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-1.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-2.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-3.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-4.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-5.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-6.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.

From-SVN: r151249
2009-08-31 23:48:04 +02:00
Cary Coutant 07d9f9b861 Add some dwarf4 values.
* dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit.
	(enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc,
	DW_FORM_flag_present, DW_FORM_sig8.
	(enum dwarf_attribute): Add DW_AT_signature.

From-SVN: r149836
2009-07-20 21:00:52 +00:00
Jakub Jelinek 116b072217 dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value and DW_OP_stack_value.
2009-07-09  Jakub Jelinek  <jakub@redhat.com>

	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
	and DW_OP_stack_value.

From-SVN: r149438
2009-07-09 20:16:56 +00:00
Tom Tromey a80b057408 unwind-dw2-fde-darwin.c: Include dwarf2.h.
gcc
	* unwind-dw2-fde-darwin.c: Include dwarf2.h.
	* config/mmix/mmix.c: Include dwarf2.h.
	* config/rs6000/darwin-fallback.c: Include dwarf2.h.
	* config/xtensa/unwind-dw2-xtensa.c: Include dwarf2.h.
	* config/sh/sh.c: Include dwarf2.h.
	* config/i386/i386.c: Include dwarf2.h.
	* Makefile.in (DWARF2_H): Remove 'elf'.
	* except.c: Include dwarf2.h.
	* unwind-dw2.c: Include dwarf2.h.
	* dwarf2out.c: Include dwarf2.h.
	* unwind-dw2-fde-glibc.c: Include dwarf2.h.
	* unwind-dw2-fde.c: Include dwarf2.h.
	* dwarf2asm.c: Include dwarf2.h.
gcc/ada
	* raise-gcc.c: Include dwarf2h (unconditionally).
include
	* elf/dwarf2.h: Remove, renaming to...
	* dwarf2.h: ... this.

From-SVN: r149433
2009-07-09 19:41:25 +00:00