public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/51873] New: stringstream is opaque with g++
@ 2012-01-16 17:10 nikolay at totalviewtech dot com
  2012-01-16 17:51 ` [Bug debug/51873] " redi at gcc dot gnu.org
  2012-01-16 18:59 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: nikolay at totalviewtech dot com @ 2012-01-16 17:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51873

             Bug #: 51873
           Summary: stringstream is opaque with g++
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nikolay@totalviewtech.com


Consider this example:
----------------------------
#include <iostream>
#include <sstream>
using namespace std;

int main()
{

std::stringstream msg;
char ch;

  msg << "hello";

  for (int n = 0; n < 4; n++)
  {
    msg >> ch;
    cout << ch << endl;
  }

 return 0;
}
-----------------------------
If you compile it with -g and try to debug it msg variable is reported as
opaque.
13        for (int n = 0; n < 4; n++)
(gdb) p msg
$1 = <incomplete type>
(gdb) 

Same in Totalview.

Here is a dwarf:
<2><acb>: Abbrev Number: 12 (DW_TAG_structure_type)
     DW_AT_name        :
basic_stringstream<char,std::char_traits<char>,std::allocator<char> >    
     DW_AT_declaration : 1    
.....
<2><5dd2>: Abbrev Number: 7 (DW_TAG_typedef)
     DW_AT_name        : stringstream    
     DW_AT_decl_file   : 26    
     DW_AT_decl_line   : 143    
     DW_AT_type        : <acb>    
 <2><5de6>: Abbrev Number: 103 (DW_TAG_variable)
     DW_AT_name        : msg    
     DW_AT_decl_file   : 2    
     DW_AT_decl_line   : 8    
     DW_AT_type        : <5dd2>    
     DW_AT_location    : 3 byte block: 91 e0 7c     (DW_OP_fbreg: -416)

There is only declaration of stringstream and no definition.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug debug/51873] stringstream is opaque with g++
  2012-01-16 17:10 [Bug debug/51873] New: stringstream is opaque with g++ nikolay at totalviewtech dot com
@ 2012-01-16 17:51 ` redi at gcc dot gnu.org
  2012-01-16 18:59 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-16 17:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51873

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-16 17:46:53 UTC ---
Works for me if I ensure the right libstdc++.so is found, via RPATH or
LD_LIBRARY_PATH

(gdb) p msg
$1 = {<std::basic_iostream<char, std::char_traits<char> >> = {
... lots of output ...
}}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug debug/51873] stringstream is opaque with g++
  2012-01-16 17:10 [Bug debug/51873] New: stringstream is opaque with g++ nikolay at totalviewtech dot com
  2012-01-16 17:51 ` [Bug debug/51873] " redi at gcc dot gnu.org
@ 2012-01-16 18:59 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-16 18:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51873

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-16 18:55:29 UTC ---
Dup of older bug 10499.

*** This bug has been marked as a duplicate of bug 10499 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-16 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16 17:10 [Bug debug/51873] New: stringstream is opaque with g++ nikolay at totalviewtech dot com
2012-01-16 17:51 ` [Bug debug/51873] " redi at gcc dot gnu.org
2012-01-16 18:59 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).