Bug #17137 2010-05-09 16:20
athar
Weird values in watch window
The watch window shows excess values for a std::string, as can be seen in this screenshot:
http://91.121.45.177/etc/cbdbgc.png
To reproduce this, stop after the last push_back in the following code:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
std::string teststr="test";
std::vector<int> testvec;
testvec.push_back(5);
testvec.push_back(15);
7;
}
Then add watches for testvec and teststr in that order.
When doing it the other way around, it works as expected.
I'm using Code::Blocks svn 6181, Ubuntu 9.10 32 bit and gdb 7.0.
- Category
- Debugger
- Group
- Status
- Closed
- Close date
- 2011-04-09 21:38
- Assigned to
History
I just test it on the latest cc_branch.
It works as expect. I can't reproduce this bug.
(WindowsXP, GDB 7.1.5).
By the way, You can use a gdb 7.x with python pretty printer enabled.
It will show stl containers greatly.
The watches window was reimplemented in the debuggers branch.
Please test a nightly version from this branch and open another bug/s if you find any problems with it.
Thank you.