On Oct 4, 2012, at 8:26 PM, Cary Coutant wrote:

>> Index: gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C
>> ===================================================================
>> --- gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C     (revision 192048)
>> +++ gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C     (working copy)
>> @@ -59,11 +59,11 @@
>> // { dg-final { scan-assembler "foo\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler "staticfn1\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler "staticfn2\[^\n\r\]*DW_AT_name" } }
>> -// { dg-final { scan-assembler-not "staticfn3\[^\n\r\]*DW_AT_name" } }
>> -// { dg-final { scan-assembler-not "staticfn4\[^\n\r\]*DW_AT_name" } }
>> +// { dg-final { scan-assembler "staticfn3\[^\n\r\]*DW_AT_name" } }
>> +// { dg-final { scan-assembler "staticfn4\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler-not "staticfn5\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler-not "staticfn6\[^\n\r\]*DW_AT_name" } }
>> -// { dg-final { scan-assembler-not "method1\[^\n\r\]*DW_AT_name" } }
>> +// { dg-final { scan-assembler "method1\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler "arg1\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler "arg2\[^\n\r\]*DW_AT_name" } }
>> // { dg-final { scan-assembler "arg3\[^\n\r\]*DW_AT_name" } }
> 
> The fact that these two tests were specifically checking for the
> absence of staticfn3 and staticfn4 leads me to believe that the
> current behavior is deliberate. Jakub, that change was yours (it dates
> back to November 2008). Are you OK with Paul's change?
> 
> It seems to me that there are cases where we just want to emit the
> class for the context info (like a namespace, which doesn't have to be
> complete everywhere). Is there a way to tell the debugger that this
> class declaration is incomplete and that it should look elsewhere for
> a full definition?
> 
> -cary

The code itself (where I changed dwarf2out.c) is from 2003-02-28, by rth, what 
appears to be the original implementation of the -feliminate-unused-debug-types 
flag.

Looking at Jakub's change from 2008 and PR/27017 it fixes, it looks more like a 
case of much more debug information that was missing and Jakub's change 
corrected that.  It looks like those two testcase files describe the resulting 
behavior, but I don't read the discussion in PR/27017 as saying that having 
"staticfn3" omitted was specifically desired. 

        paul

Reply via email to