diff mbox

[Google,4.7] Fix static bit for C++ structs in gdb-index v7 (issue6506098)

Message ID 20120911231836.A4C2A16376A@sterling.mtv.corp.google.com
State New
Headers show

Commit Message

Sterling Augustine Sept. 11, 2012, 11:18 p.m. UTC
The enclosed patch fixes yet another bug with the gdb-index v7 flag byte
by reporting certain structs and types as static only for non-C++ and
non-java.

OK for Google 4.7?

Sterling

2012-09-11  Sterling Augustine  <saugustine@google.com>

	* dwarf2out.c (output_pubname):


--
This patch is available for review at http://codereview.appspot.com/6506098

Comments

Cary Coutant Sept. 12, 2012, 12:13 a.m. UTC | #1
> The enclosed patch fixes yet another bug with the gdb-index v7 flag byte
> by reporting certain structs and types as static only for non-C++ and
> non-java.
>
> OK for Google 4.7?
>
> Sterling
>
> 2012-09-11  Sterling Augustine  <saugustine@google.com>
>
>         * dwarf2out.c (output_pubname):

OK for google/gcc-4_7.

-cary
Sterling Augustine Sept. 12, 2012, 12:19 a.m. UTC | #2
On Tue, Sep 11, 2012 at 5:13 PM, Cary Coutant <ccoutant@google.com> wrote:
>> The enclosed patch fixes yet another bug with the gdb-index v7 flag byte
>> by reporting certain structs and types as static only for non-C++ and
>> non-java.
>>
>> OK for Google 4.7?
>>
>> Sterling
>>
>> 2012-09-11  Sterling Augustine  <saugustine@google.com>
>>
>>         * dwarf2out.c (output_pubname):
>
> OK for google/gcc-4_7.

Committed as r191207.

Sterling
diff mbox

Patch

Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 191203)
+++ dwarf2out.c	(working copy)
@@ -9484,7 +9484,8 @@  output_pubname (dw_offset die_offset, pubname_entr
         case DW_TAG_union_type:
         case DW_TAG_enumeration_type:
           GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags, GDB_INDEX_SYMBOL_KIND_TYPE);
-          GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
+          if (!is_cxx () && !is_java ())
+            GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
           break;
         default:
 	  /* For unrecognized TAGs, don't set the flags.  */