public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* error using pretty printing
@ 2009-04-01 23:28 Tiago Maluta
  2009-04-01 23:51 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Tiago Maluta @ 2009-04-01 23:28 UTC (permalink / raw)
  To: archer

I followed the steps to Pretty Printing (part 1) [1] after reading the
blog post about Installing a Python-enabled debugger [2]


[1] http://tromey.com/blog/?p=524
[2] http://tromey.com/blog/?p=494


Trying the little example to print 'str' value I got the same result
that gdb without python support would print.

/opt/gdb/archer/install/bin/gdb a.out
GNU gdb (GDB) 6.8.50.20090106-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) l
1       #include <string>
2       std::string str = "hello world";
3       int main ()
4       {
5         return 0;
6       }
(gdb) break 5
Breakpoint 1 at 0x804865e: file 1.cpp, line 5.
(gdb) r
Starting program: /home/maluta/foo.d/s.cpp/a.out

Breakpoint 1, main () at 1.cpp:5
5         return 0;
(gdb) print str
$1 = {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x804b014 "hello world"}}

But I had python support enabled:

(gdb) python print 44
44

* I'm libstdc++.so.6.0.10 with gcc 4.3.1 (gentoo)
* Using the 'today' git pull has the same problem

May I forgot something?


--tm


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

end of thread, other threads:[~2009-04-03 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-01 23:28 error using pretty printing Tiago Maluta
2009-04-01 23:51 ` Tom Tromey
2009-04-02 15:24   ` Phil Muldoon
2009-04-02 16:13     ` Tom Tromey
2009-04-03 11:40   ` Vladimir Prus

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).