This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
error using pretty printing
- From: Tiago Maluta <maluta_tiago at yahoo dot com dot br>
- To: archer at sourceware dot org
- Date: Wed, 01 Apr 2009 21:27:14 +0000
- Subject: error using pretty printing
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