This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17357] Unable to see stl types content


https://sourceware.org/bugzilla/show_bug.cgi?id=17357

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
I have no trouble printing STL types on my Fedora 20 box using 
"GNU gdb (GDB) 7.8.50.20140904-cvs" (~current HEAD) with the STL printers
provided by libstdc++:

$ cat ~/tmp/stltest.cc
#include <iostream>
#include <string>
using namespace std;

void func() {
    string s("1234");
    cout << s.data() << endl;
}

int main() {
    func();
    return 0;
}
$ g++ -g ~/tmp/stltest.cc -o ~/tmp/stltest
$ ./gdb -q -D data-directory ~/tmp/stltest
Reading symbols from /home/keiths/tmp/17164...done.
(gdb) start
Temporary breakpoint 1 at 0x400bc9: file /home/keiths/tmp/17164.cc, line 11.
Starting program: /home/keiths/tmp/17164 

Temporary breakpoint 1, main () at /home/keiths/tmp/17164.cc:11
11        func();
(gdb) s
func () at /home/keiths/tmp/17164.cc:6
6        string s("1234");  // length matters
(gdb) n
7        cout << s.data() << endl;
(gdb) p s
$1 = "1234"
(gdb) ptype s
type = std::string

I suspect that if this is not working for you under QtCreator, and the
QtCreator developers say that QtCreator is working, you have a system problem
such as out-of-sync (or non-existant) pretty-printers.

Please provide (using *same* gdb that QtCreator is using):
output of "show version"
output of "show configuration"
output of session showing problems OUTSIDE QtCreator

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]