c++/10499: [3.2, 3.3, 3.4] Debug information for some C++ headers is missing classes (template specific?)

drow@mvista.com drow@mvista.com
Fri Apr 25 15:06:00 GMT 2003


>Number:         10499
>Category:       c++
>Synopsis:       [3.2, 3.3, 3.4] Debug information for some C++ headers is missing classes (template specific?)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 25 14:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     drow@mvista.com
>Release:        3.4 20030308, 3.3 cvs, 3.2.3
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Compile this testcase (from Ben Kosnik) with -g:
#include <sstream>

int main()
{
  std::stringstream s;  // (gdb) p s
  return 0;
}

Look in the debug info for information about stringstream.
In DWARF-2 (the problem is also visible in stabs+) this
is all there is:
 <3><ef9>: Abbrev Number: 17 (DW_TAG_typedef)
     DW_AT_name        : (indirect string, offset: 0xddd): stringstream 
     DW_AT_decl_file   : 3      
     DW_AT_decl_line   : 144    
     DW_AT_type        : <f13>  
 <1><f13>: Abbrev Number: 13 (DW_TAG_structure_type)
     DW_AT_name        : (indirect string, offset: 0x7b9): basic_stringstream<char,std::char_traits<char>,std::allocator<char> >
     DW_AT_declaration : 1      

i.e  just a declaration.

Also in 3.4, the typedef is emitted in the
DW_TAG_lexical_block associated with main.
That doesn't make a whole lot of sense and will eventually
confuse GDB.
>How-To-Repeat:
Compile above testcase with -g
>Fix:
The debug information for the body of basic_stringstream needs
to be emitted.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list