gcc HEAD dwarf-2, synthetic methods no longer public, gdb confused

Mark Mitchell mark@codesourcery.com
Sun Jul 4 19:42:00 GMT 2004


Daniel Jacobowitz wrote:

>On Sun, Jul 04, 2004 at 07:19:19AM -0400, Michael Chastain wrote:
>  
>
>>Here's my next problem with gcc HEAD -gdwarf-2.  I suspect this is a bug
>>in gdb rather than gcc.
>>
>>I've got a test program with a class, Alpha, that has a
>>compiler-synthesized assignment operator.  That is, Alpha does not
>>declare or define an operator=, so the C++ compiler has to generate
>>one itself.
>>
>>With the old gcc HEAD, the dwarf-2 info looks like this:
>>
>> <2><f6b>: Abbrev Number: 21 (DW_TAG_subprogram)
>>     DW_AT_sibling     : <f98>
>>     DW_AT_external    : 1
>>     DW_AT_name        : (indirect string, offset: 0x9a3): operator=
>>     DW_AT_MIPS_linkage_name: _ZN5AlphaaSERKS_
>>     DW_AT_type        : <fd1>
>>     DW_AT_artificial  : 1
>>     DW_AT_declaration : 1
>>
>>With the new gcc HEAD, the dwarf-2 info looks like this:
>>
>> <2><f6b>: Abbrev Number: 21 (DW_TAG_subprogram)
>>     DW_AT_sibling     : <f86>
>>     DW_AT_name        : (indirect string, offset: 0x999): operator=
>>     DW_AT_type        : <fbd>
>>     DW_AT_artificial  : 1
>>     DW_AT_declaration : 1
>>
>>The difference is that DW_AT_external and DW_AT_MIPS_linkage_name
>>have gone away.
>>    
>>
>
>Is the method code emitted beforehand?  How about afterwards?  I'm
>assuming that it is emitted in both cases.  Is it marked .globl before
>and after?
>
This patch should restore the behavior before my patch.

Tested on x86_64-unknown-linux-gnu, applied on the mainline.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb/attachments/20040704/6bfad847/attachment.ksh>


More information about the Gdb mailing list