This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/10646] New: pretty printers should also work for std::__debug::vector et al.
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 16 Sep 2009 19:51:53 -0000
- Subject: [Bug python/10646] New: pretty printers should also work for std::__debug::vector et al.
- Reply-to: sourceware-bugzilla at sourceware dot org
When code is compiled with -D_GLIBCXX_DEBUG, then std::vector is replaced with
std::__debug::vector.
Our pretty-printers should work on those as well.
Example:
#include <vector>
int main()
{
std::vector<int> v;
v.push_back(1);
return 0; // break here
}
g++ -g t.cc
gdb64-cvs -q ./a.out
(gdb) b 7
Breakpoint 1 at 0x4007b4: file t.cc, line 7.
(gdb) r
Breakpoint 1, main () at t.cc:7
7 return 0; // break here
(gdb) p v
$1 = std::vector of length 1, capacity 1 = {1}
g++ -g t.cc -D_GLIBCXX_DEBUG
gdb64-cvs -q ./a.out
(gdb) b 7
Breakpoint 1 at 0x400aa4: file t.cc, line 7.
(gdb) r
Breakpoint 1, main () at t.cc:7
7 return 0; // break here
(gdb) p v
$1 = {<std::__norm::vector<int, std::allocator<int> >> =
{<std::__norm::_Vector_base<int, std::allocator<int> >> = {
_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No
data fields>}, <No data fields>}, _M_start = 0x603010,
_M_finish = 0x603014,
_M_end_of_storage = 0x603014}}, <No data fields>},
<__gnu_debug::_Safe_sequence<std::__debug::vector<int, std::allocator<int> > >>
= {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators
= 0x0, _M_version = 2}, <No data fields>},
_M_guaranteed_capacity = 1}
(gdb) q
--
Summary: pretty printers should also work for
std::__debug::vector et al.
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned at sourceware dot org
ReportedBy: ppluzhnikov at google dot com
CC: gdb-prs at sourceware dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=10646
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.