My problem already arises in a program like
#include <QList>
int main(int, char** ) {
QList<int> ls;
ls.append(10);
ls.append(11);
ls.append(12);
la.append(13);
for( int i = 0; i < 4; ++i ) qDebug("list[%d] %d", i, ls[i]);
}
#include <QList>
int main(int, char** ) {
QList<int> ls;
ls.append(10);
ls.append(11);
ls.append(12);
la.append(13);
for( int i = 0; i < 4; ++i ) qDebug("list[%d] %d", i, ls[i]);
}
To copy to clipboard, switch view to plain text mode
Compiled with
CONFIG += debug
CONFIG += debug
To copy to clipboard, switch view to plain text mode
the program runs as expected but at a gdb breakpoint on the for(... line I get
(gdb) p ls[1]
Could not find operator[].
(gdb) p ls[1]
Could not find operator[].
To copy to clipboard, switch view to plain text mode
I believe I got most debug libraries.
In the real program a QList gives trouble but if I can't see what element is being processed I am lost.
What do I forget / do wrong?
Regards,
Enno
Bookmarks