Patchwork [google-main] Add DW_AT_GNU_pubtypes and DW_AT_GNU_pubnames to comdat type units. (issue5553069)

login
register
mail settings
Submitter Sterling Augustine
Date Jan. 19, 2012, 10:45 p.m.
Message ID <20120119224500.C8231160ABD@sterling.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/136914/
State New
Headers show

Comments

Sterling Augustine - Jan. 19, 2012, 10:45 p.m.
commit de9e01e3b50f75bcd47da9d32ab0691c65094df5
Author: Sterling Augustine <saugustine@google.com>
Date:   Thu Jan 19 14:31:14 2012 -0800

    Add DW_AT_GNU_pubtypes and Add DW_AT_GNU_pubnames to comdat type dies.

M	gcc/dwarf2out.c

Tested:
	Via make check-c and make check-c++. No new issues found.

ChangeLog:

2012-01-19   Sterling Augustine  <saugustine@google.com>

	* gcc/dwarf2out.c (break_out_comdat_types): Call add_AT_lineptr with
	DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes.


--
This patch is available for review at http://codereview.appspot.com/5553069
Cary Coutant - Jan. 20, 2012, 6:48 p.m.
For the record...

My LGTM bounced from gcc-patches because I sent it from my phone,
which has no way to send plain text email. grrr.

-cary

On Thu, Jan 19, 2012 at 3:33 PM, Cary Coutant <ccoutant@google.com> wrote:
> LGTM
>
> -cary
>
> On Jan 19, 2012 2:45 PM, "Sterling Augustine" <saugustine@google.com> wrote:
>>
>> commit de9e01e3b50f75bcd47da9d32ab0691c65094df5
>> Author: Sterling Augustine <saugustine@google.com>
>> Date:   Thu Jan 19 14:31:14 2012 -0800
>>
>>    Add DW_AT_GNU_pubtypes and Add DW_AT_GNU_pubnames to comdat type dies.
>>
>> M       gcc/dwarf2out.c
>>
>> Tested:
>>        Via make check-c and make check-c++. No new issues found.
>>
>> ChangeLog:
>>
>> 2012-01-19   Sterling Augustine  <saugustine@google.com>
>>
>>        * gcc/dwarf2out.c (break_out_comdat_types): Call add_AT_lineptr
>> with
>>        DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes.
>>
>> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
>> index 57f18ad..3e34354 100644
>> --- a/gcc/dwarf2out.c
>> +++ b/gcc/dwarf2out.c
>> @@ -7287,6 +7287,15 @@ break_out_comdat_types (dw_die_ref die)
>>         type_node->root_die = unit;
>>         type_node->next = comdat_type_list;
>>         comdat_type_list = type_node;
>> +        if (targetm.want_debug_pub_sections)
>> +        {
>> +          /* FIXME: Should use add_AT_pubnamesptr.  This works because
>> most
>> +             targets don't care what the base section is.  */
>> +          add_AT_lineptr (unit, DW_AT_GNU_pubnames,
>> +                          debug_pubnames_section_label);
>> +          add_AT_lineptr (unit, DW_AT_GNU_pubtypes,
>> +                          debug_pubtypes_section_label);
>> +        }
>>
>>         /* Generate the type signature.  */
>>         generate_type_signature (c, type_node);
>>
>> --
>> This patch is available for review at
>> http://codereview.appspot.com/5553069

Patch

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 57f18ad..3e34354 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7287,6 +7287,15 @@  break_out_comdat_types (dw_die_ref die)
         type_node->root_die = unit;
         type_node->next = comdat_type_list;
         comdat_type_list = type_node;
+        if (targetm.want_debug_pub_sections)
+        {
+          /* FIXME: Should use add_AT_pubnamesptr.  This works because most
+             targets don't care what the base section is.  */
+          add_AT_lineptr (unit, DW_AT_GNU_pubnames,
+                          debug_pubnames_section_label);
+          add_AT_lineptr (unit, DW_AT_GNU_pubtypes,
+                          debug_pubtypes_section_label);
+        }
 
         /* Generate the type signature.  */
         generate_type_signature (c, type_node);