Commit 520cda8c by Jakub Jelinek Committed by Jakub Jelinek

dwarf2.h (DW_AT_GNU_macros): New.

	* dwarf2.h (DW_AT_GNU_macros): New.
	(enum dwarf_macro_record_type): New enum.  Add DW_MACRO_GNU_*.

	* dwarf2out.c (struct macinfo_struct): Change code to unsigned char.
	(DEBUG_MACRO_SECTION, DEBUG_MACRO_SECTION_LABEL): Define.
	(dwarf_attr_name): Handle DW_AT_GNU_macros.
	(dwarf2out_define): If the vector is empty and
	lineno is 0, emit a dummy entry first.
	(dwarf2out_undef): Likewise.  Remove redundant semicolon.
	(htab_macinfo_hash, htab_macinfo_eq, output_macinfo_op,
	optimize_macinfo_range): New functions.
	(output_macinfo): Use them.  If !dwarf_strict and .debug_str is
	mergeable, optimize longer strings using
	DW_MACRO_GNU_{define,undef}_indirect and if HAVE_COMDAT_GROUP,
	optimize longer sequences of define/undef ops from headers
	using DW_MACRO_GNU_transparent_include.  For !dwarf_strict
	emit a section headers.
	(dwarf2out_init): For !dwarf_strict set debug_macinfo_section
	and macinfo_section_label to DEBUG_MACRO_SECTION
	resp. DEBUG_MACRO_SECTION_LABEL.
	(dwarf2out_finish): For !dwarf_strict emit DW_AT_GNU_macros
	instead of DW_AT_macro_info.

From-SVN: r176653
parent e967adf4
2011-07-22 Jakub Jelinek <jakub@redhat.com> 2011-07-22 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (struct macinfo_struct): Change code to unsigned char.
(DEBUG_MACRO_SECTION, DEBUG_MACRO_SECTION_LABEL): Define.
(dwarf_attr_name): Handle DW_AT_GNU_macros.
(dwarf2out_define): If the vector is empty and
lineno is 0, emit a dummy entry first.
(dwarf2out_undef): Likewise. Remove redundant semicolon.
(htab_macinfo_hash, htab_macinfo_eq, output_macinfo_op,
optimize_macinfo_range): New functions.
(output_macinfo): Use them. If !dwarf_strict and .debug_str is
mergeable, optimize longer strings using
DW_MACRO_GNU_{define,undef}_indirect and if HAVE_COMDAT_GROUP,
optimize longer sequences of define/undef ops from headers
using DW_MACRO_GNU_transparent_include. For !dwarf_strict
emit a section headers.
(dwarf2out_init): For !dwarf_strict set debug_macinfo_section
and macinfo_section_label to DEBUG_MACRO_SECTION
resp. DEBUG_MACRO_SECTION_LABEL.
(dwarf2out_finish): For !dwarf_strict emit DW_AT_GNU_macros
instead of DW_AT_macro_info.
PR other/32998 PR other/32998
* common.opt (grecord-gcc-switches, gno-record-gcc-switches): New * common.opt (grecord-gcc-switches, gno-record-gcc-switches): New
options. options.
......
2011-07-22 Jakub Jelinek <jakub@redhat.com> 2011-07-22 Jakub Jelinek <jakub@redhat.com>
* dwarf2.h (DW_AT_GNU_macros): New.
(enum dwarf_macro_record_type): New enum. Add DW_MACRO_GNU_*.
PR c++/49756 PR c++/49756
* libiberty.h (stack_limit_increase): New prototype. * libiberty.h (stack_limit_increase): New prototype.
......
...@@ -366,6 +366,8 @@ enum dwarf_attribute ...@@ -366,6 +366,8 @@ enum dwarf_attribute
DW_AT_GNU_all_tail_call_sites = 0x2116, DW_AT_GNU_all_tail_call_sites = 0x2116,
DW_AT_GNU_all_call_sites = 0x2117, DW_AT_GNU_all_call_sites = 0x2117,
DW_AT_GNU_all_source_call_sites = 0x2118, DW_AT_GNU_all_source_call_sites = 0x2118,
/* Section offset into .debug_macro section. */
DW_AT_GNU_macros = 0x2119,
/* VMS extensions. */ /* VMS extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201, DW_AT_VMS_rtnbeg_pd_address = 0x2201,
/* GNAT extensions. */ /* GNAT extensions. */
...@@ -879,6 +881,20 @@ enum dwarf_macinfo_record_type ...@@ -879,6 +881,20 @@ enum dwarf_macinfo_record_type
DW_MACINFO_end_file = 4, DW_MACINFO_end_file = 4,
DW_MACINFO_vendor_ext = 255 DW_MACINFO_vendor_ext = 255
}; };
/* Names and codes for new style macro information. */
enum dwarf_macro_record_type
{
DW_MACRO_GNU_define = 1,
DW_MACRO_GNU_undef = 2,
DW_MACRO_GNU_start_file = 3,
DW_MACRO_GNU_end_file = 4,
DW_MACRO_GNU_define_indirect = 5,
DW_MACRO_GNU_undef_indirect = 6,
DW_MACRO_GNU_transparent_include = 7,
DW_MACRO_GNU_lo_user = 0xe0,
DW_MACRO_GNU_hi_user = 0xff
};
/* @@@ For use with GNU frame unwind information. */ /* @@@ For use with GNU frame unwind information. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment