The enclosed patch fixes a reversed conditional when calculating the is_static flag while generating gdb index--is_static is the opposite of the DW_AT_external flag.
OK for google 4.7? Sterling 2012-09-10 Sterling Augustine <saugust...@google.com> * dwarf2out.c (output_pubname): Correct conditional. Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 191084) +++ dwarf2out.c (working copy) @@ -9436,7 +9436,7 @@ output_pubname (dw_offset die_offset, pubname_entry *entry) { dw_die_ref die = entry->die; - int is_static = get_AT_flag (die, DW_AT_external) ? 1 : 0; + int is_static = get_AT_flag (die, DW_AT_external) ? 0 : 1; dw2_asm_output_data (DWARF_OFFSET_SIZE, die_offset, "DIE offset"); -- This patch is available for review at http://codereview.appspot.com/6498114