[Bug debug/68904] DWARF for class ios_base says it's a declaration

2015-12-15 Thread ivan.soleimanipour at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68904

ivan.soleimanipour at oracle dot com changed:

   What|Removed |Added

 CC||ivan.soleimanipour at oracle 
dot c
   ||om

--- Comment #5 from ivan.soleimanipour at oracle dot com ---
I see now why Andrew was asking the questions he was asking.

What we failed to notice is that the definition of ios_base in t.o
is abbreviated. It contains only nested classes, 'static const' members and
typedefs. There is no member function or data member information.
There is a more complete definition in `libstdc++.so.6.0.18.

So now the questions become:
- How does gcc decide to emit this abbreviated form?
- Why is it then not _fully_ abbreviated? Why bother with the typedefs and
such?

FWIW -fno-eliminate-unused-debug-types seems to make no difference.

[Bug debug/68904] DWARF for class ios_base says it's a declaration

2015-12-14 Thread chihin.ko at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68904

--- Comment #4 from chihin ko  ---
(In reply to Andrew Pinski from comment #1)
> Can you try:
> -fno-eliminate-unused-debug-types
> 
> I bet the full type debug info is going to be emitted in a different TU
> which is why GCC is not emitting it here.
> 
> 
> Also look at the debug info inside libstdc++.so/libstdc++.a to see if the
> full debug info is emitted there.

The problem is for class "ios_base", the attribute 
DW_AT_declaration   yes(1)
should not be there, because the full definition of the class is here:

< 2><0xb0f9>  DW_TAG_class_type
DW_AT_name "ios_base"
DW_AT_declaration  yes(1)  <=== should not have
this
DW_AT_sibling  <0xb4ab>
< 3><0xb103>DW_TAG_enumeration_type
  DW_AT_name "event"
  DW_AT_byte_size0x0004
  DW_AT_decl_file0x0025
/pkg/gnu/include/c++/4.9.3/bits/ios_base
.h
  DW_AT_decl_line0x01a3
  DW_AT_sibling  <0xb123>
< 4><0xb110>  DW_TAG_enumerator
DW_AT_name "erase_event"
DW_AT_const_value  0x

[Bug debug/68904] DWARF for class ios_base says it's a declaration

2015-12-14 Thread chihin.ko at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68904

--- Comment #3 from chihin ko  ---
Created attachment 37033
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37033&action=edit
dwarf dump of test case test.cc

[Bug debug/68904] DWARF for class ios_base says it's a declaration

2015-12-14 Thread chihin.ko at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68904

--- Comment #2 from chihin ko  ---
Created attachment 37032
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37032&action=edit
test case

[Bug debug/68904] DWARF for class ios_base says it's a declaration

2015-12-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68904

--- Comment #1 from Andrew Pinski  ---
Can you try:
-fno-eliminate-unused-debug-types

I bet the full type debug info is going to be emitted in a different TU which
is why GCC is not emitting it here.


Also look at the debug info inside libstdc++.so/libstdc++.a to see if the full
debug info is emitted there.