PATCH [gcc 4.3]: Add ability to generate DWARF pubtypes section

Geoffrey Keating geoffk@apple.com
Fri Nov 10 23:04:00 GMT 2006


Hi Caroline,

> 2006-11-07  Caroline Tice  <ctice@apple.com>
> 
>        * dwarf2out.c (debug_pubtypes_section): New static global
> variable.
>        (pubname_entry):  Add DEF_VEC_O and DEF_VEC_ALLOC_O statements
> for
>        this type.
>        (pubname_table):  Redefine as a vector.
>        (pubtype_table):  New static global variable, defined as a
> vector.
>        (pubname_table_allocated): Remove static global variable.
>        (pubname_table_in_use): Remove static global variable.
>        (PUBNAME_TABLE_INCREMENT): Remove constant.
>        (size_of_pubnames): Add parameter to deal with either pubnames or
>        pubtypes, and change code to deal with table being a vector.
>        (add_pubname):  Change to deal with table being a vector.
>        (add_pubtype):  New function.
>        (output_pubnames): Add parameter to deal with either pubnames or
>        pubtypes, and change code to deal with table being a vector.
>        (gen_array_type_die):  Add call to add_pubtype.
>        (gen_enumeration_type_die): Add call to add_pubtype.
>        (gen_struct_or_union_type_die): Add call to add_pubtype.
>        (gen_subroutine_type_die): Add call to add_pubtype.
>        (gen_typedef_die):  Add call to add_pubtype.
>        (dwarf2out_init): Add code to initialize pubname_table and
>        pubtype_table vectors; also initialize debug_pubtypes_section.
>        (prune_unused_types):  Change to deal with pubnames being a
> vector.
>        (dwarf2out_finish): Change to deal with pubnames being a
> vector; add
>        pubnames table to call to output_pubnames;  Add code to output
> pubtypes
>        table if DEBUG_PUBTYPES_SECTION is defined.
>        * config/darwin.c (darwin_file_start):  Add
> DEBUG_PUBTYPES_SECTION to
>        debugnames.
>        * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global
> variable.
> 
> 
> /testsuite:
> 2006-11-07  Caroline Tice  <ctice@apple.com>
> 
>        * testsuite/gcc.dg/pubtypes-1.c: New file/testcase.
>        * testsuite/gcc.dg/pubtypes-2.c: New file/testcase.
>        * testsuite/gcc.dg/pubtypes-3.c: New file/testcase.
>        * testsuite/gcc.dg/pubtypes-4.c: New file/testcase.
>        * testsuite/g++.dg/pubtypes.C: New file/testcase.

This is OK.



More information about the Gcc-patches mailing list