This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix glitch with DW_AT_MIPS_linkage_name


On Sun, Jun 06, 2010 at 07:10:17PM +0200, Eric Botcazou wrote:
> Tested on i586-suse-linux, OK for mainline?
> 
> 
> 2010-06-06  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* dwarf2out.c (add_name_and_src_coords_attributes): Skip a leading '*'
> 	in the DW_AT_MIPS_linkage_name.
> 
> 
> -- 
> Eric Botcazou

> Index: dwarf2out.c
> ===================================================================
> --- dwarf2out.c	(revision 160335)
> +++ dwarf2out.c	(working copy)
> @@ -17211,8 +17211,14 @@ add_name_and_src_coords_attributes (dw_d
>  	      deferred_asm_name = asm_name;
>  	    }
>  	  else if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
> -	    add_AT_string (die, AT_linkage_name,

				^^^
> -			   IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
> +	    {
> +	      const char *name
> +		= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
> +	      /* Mimic what assemble_name_raw does with a leading '*'.  */
> +	      if (name[0] == '*')
> +		name = &name[1];
> +	      add_AT_string (die, DW_AT_MIPS_linkage_name, name);

				  ^^^^^^

This is not ok, you've reverted a DWARF4 support change.
You want to use AT_linkage_name as second argument to add_AT_string.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]