This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/10659] New: pretty-printing: Display vectors of vectors as matrix
- From: "jan dot kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 18 Sep 2009 17:18:58 -0000
- Subject: [Bug python/10659] New: pretty-printing: Display vectors of vectors as matrix
- Reply-to: sourceware-bugzilla at sourceware dot org
Vector of vectors is currently displayed as:
(gdb) p test
$1 = std::vector of length 2, capacity 2 = {std::vector of length 2, capacity 2
= {0, 1}, std::vector of length 2, capacity 2 = {2, 3}}
while user suggested something like:
(gdb) p test
$1 = std::vector of length 2, capacity 2 = {std::vector of length 2, capacity 2
= {0, 1}, std::vector of length 2, capacity 2 = {2, 3}}
matrix contents =
0 2
1 3
Testcase:
#include <vector>
#include <iostream>
int main(){
std::vector< std::vector<int> > test(2, std::vector<int>(2,0));
test[0][0]=0;
test[0][1]=1;
test[1][0]=2;
test[1][1]=3;
int a=test[1][0];
std::cout << a;
}
--
Summary: pretty-printing: Display vectors of vectors as matrix
Product: gdb
Version: archer
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: python
AssignedTo: unassigned at sourceware dot org
ReportedBy: jan dot kratochvil at redhat dot com
CC: gdb-prs at sourceware dot org,pmuldoon at redhat dot
com,tromey at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10659
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.