Public bug reported:
Binary package hint: kdbg
Hardware: HP 6710b ; Ubuntu 8.04, Gnome, up-to-date. (german locale)
In one of my program, I have a list of vectors of int and iterator to it:
list<vector<int>> data;
list<vector<int> >::iterator dataIt;
Then i have a breakpoint in line:
cout << (*dataIt)[0] ;
When debugging, everything works fine, until I set in window "Watched
expressions" watching state of "(*dataIt)[0]" and a breakpoint in this line
(note: this line is in a for loop).
Then I run it, and it works for the first loop (i'm clicking Step Over button),
but on the second loop, the kdbg step into line 132 in
/usr/include/c++/4.2/bits/stl_list.h (operator*() const), then jumps to line
133, then 474 (operator[](size_type __n)), and then I can't debugging this
program any more.
Problem doesn't exist, when I use Run button instead of Step Over.
P.S. Code:
#include <iostream>
#include <list>
#include <vector>
#include <fstream>
using namespace std;
int main() {
list<vector<int> > data;
ifstream fd("nehData");
int nr, value;
while (!fd.eof()) {
vector<int> tmp(5);
for ( int i=0; i<5; i++) {
fd >> nr >> value;
tmp[i]=value;
}
data.push_back(tmp);
}
list<vector<int> >::iterator dataIt=data.begin();
for (; dataIt != data.end() ; dataIt++) {
cout << (*dataIt)[0]<<endl ;
}
}
Format of nehData file:
int int int int int int int int int int
int int int int int int int int int int
(...)
P.S.2 It works on my second computer with Ubuntu 8.04 (also Gnome, but
using english-us locale), but doesn't work when running remotly from the
first computer.
** Affects: kdbg (Ubuntu)
Importance: Undecided
Status: New
** Summary changed:
- kdbg step into stl_list.h when checking expression value from vector from list
+ kdbg step into stl_list.h when checking expression value
--
kdbg step into stl_list.h when checking expression value
https://bugs.launchpad.net/bugs/302925
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs