[RFA] gcj PR debug/40990

David Daney ddaney@caviumnetworks.com
Mon Aug 10 17:28:00 GMT 2009


Andrew Haley wrote:
> Dodji Seketeli wrote:
>> Le 10/08/2009 18:03, Andrew Haley a écrit :
>>> Andrew Haley wrote:
>>>> Dodji Seketeli wrote:
>>>>> I noticed that gcj was emitting some "unnamed" methods for the class
>>>>> java.lang.String. I am not sure what those methods are. Maybe the
>>>>> contructors ? I am talking about the methods represented the DIE 0x88, for
>>>>> instance. In any case, before this patch, gcj was emitting the string "()"
>>>>> as method name, in the .debug_pubnames section. Now with the patch, it just
>>>>> emits an empty string. This is weird, but I think the patch doesn't make
>>>>> the situation worse.
>>>> I don't know.  I'll have a look.
>>> It's quite explicit:
>>>
>>> 	  if (! DECL_CONSTRUCTOR_P (node))
>>> 	    put_decl_node (DECL_NAME (node));
>>>
>>> So, constructors don't have names.  What does C++ do for constructors?
>> In c++, for a class named "s", the name of the constructor in the dwarf
>> output would be the string "s".
> 
> Mkay, so we should do


This may be a naive suggestion, but why not s::<init> or similar to 
match the class file names?

David Daney


> 
> Index: lang.c
> ===================================================================
> --- lang.c	(revision 150373)
> +++ lang.c	(working copy)
> @@ -379,6 +379,8 @@
>  	    }
>  	  if (! DECL_CONSTRUCTOR_P (node))
>  	    put_decl_node (DECL_NAME (node));
> +	  else
> +	    put_decl_node (TYPE_NAME (DECL_CONTEXT (node)));
>  	  if (TREE_TYPE (node) != NULL_TREE)
>  	    {
>  	      int i = 0;
> 
> Could you please do me a favour and try this?
> 
> Thanks,
> Andrew.
> 



More information about the Gcc-patches mailing list