This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to dwarf2out.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch to dwarf2out.c
- From: Jason Merrill <jason at cygnus dot com>
- Date: Mon, 13 Mar 2000 07:09:04 -0800
It doesn't make sense for static locals to have their linkage name listed, and
it breaks gdb.
2000-03-13 Jason Merrill <jason@casey.cygnus.com>
* dwarf2out.c (add_name_and_src_coords_attributes): Only add
DW_AT_MIPS_linkage_name for TREE_PUBLIC decls.
(ASM_OUTPUT_DWARF_ADDR_CONST): Don't output trailing newline.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.160
diff -c -p -r1.160 dwarf2out.c
*** dwarf2out.c 2000/03/09 19:01:47 1.160
--- dwarf2out.c 2000/03/13 15:07:50
*************** dwarf2out.c P
*** 365,371 ****
do { \
fprintf ((FILE), "\t%s\t", UNALIGNED_WORD_ASM_OP); \
output_addr_const ((FILE), (RTX)); \
- fputc ('\n', (FILE)); \
} while (0)
#endif
--- 365,370 ----
*************** add_name_and_src_coords_attributes (die,
*** 7464,7469 ****
--- 7463,7469 ----
add_src_coords_attributes (die, decl);
if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
+ && TREE_PUBLIC (decl)
&& DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
add_AT_string (die, DW_AT_MIPS_linkage_name,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));