[patch] Emit DW_AT_artificial for types
Eric Botcazou
ebotcazou@adacore.com
Sun Apr 10 10:31:00 GMT 2011
Hi,
as permitted by the DWARF-[234] standards, this patch makes the compiler emit
the DW_AT_artificial attribute for compiler-generated types; there are a lot
of them in Ada. GDB doesn't use it (yet), but other debuggers do use it to
speed up type lookups.
Tested on i586-suse-linux, OK for the mainline?
2011-04-10 Eric Botcazou <ebotcazou@adacore.com>
Olivier Hainque <hainque@adacore.com>
Nicolas Setton <setton@adacore.com>
* tree.h (TYPE_ARTIFICIAL): New flag.
* dwarf2out.c (modified_type_die): Add a DW_AT_artificial attribute to
the DIE of the type if it is artificial.
(gen_array_type_die): Likewise.
(gen_enumeration_type_die): Likewise.
(gen_struct_or_union_type_die): Likewise.
ada/
* gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
the type according to the ARTIFICIAL_P parameter.
(create_type_decl): Likewise.
(create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
2011-04-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/debug1.ads: New test.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 3556 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110410/371d07c7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug1.ads
Type: text/x-adasrc
Size: 302 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110410/371d07c7/attachment-0001.bin>
More information about the Gcc-patches
mailing list