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

Caroline Tice ctice@apple.com
Tue Nov 7 23:00:00 GMT 2006


Attached is a modified version of the original patch I submitted a few  
weeks ago,
to add the ability to generate the DWARF pubtypes section on Darwin  
architectures
(or any other architecture that defines DEBUG_PUBTYPES_SECTION).  The  
original
patch had a bug in the code that calculated the size of the pubtypes  
section.

This patch has been bootstrapped on an x86 running Linux and on an x86  
running
Darwin.  The dejagnu testsuite has also been run on both architectures  
with no
regressions.  I am in the process of bootstrapping and running the  
dejagnu tests on
a PPC running Darwin.  Assuming those also pass, is this patch okay to  
commit
to GCC 4.3 (mainline)?

-- Caroline Tice
ctice@apple.com


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.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc5-fsf-pubtypes.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061107/723836de/attachment.txt>


More information about the Gcc-patches mailing list