[Qt-creator] debugger and qt-creator...

paulo paulo.jnkml at gmail.com
Sat May 22 19:42:33 CEST 2010


Hi,
I tried the following code and I could verify the following symptoms:
- in the main routine you can access the a.i in the locals window, but 
not in f(A&).
- However if I add a &a to the watchers window then I can dereference 
the struct and access the *&a.i

#include <iostream>


struct A {
	A(const int i) :i(i) {}
	int i;
};


void f(A& a) {
	std::cout << a.i;
}

int main(int argc, char *argv[]) {
	A a(1);
	f(a);
	return 0;
}


qtc binary 1.3.84 rev 91cd56e0c6

cheers
paulo

Andre Poenitz wrote:
> On Sat, May 22, 2010 at 05:25:59PM +0900, paulo wrote:
>> Hi (again me)
>>
>> yap the debugger...
>> well I'm debugging some code, and my classes are not shown correctly.
>> I can inspect the variable at the place where it was declared, but when 
>> I try to do the same after passing it as an argument into a function I 
>> click on the plus sign and nothing...
>> If I add it to the watch exp, nothing again.
>> However if shows the members ok if I add them like obj_name.member_var 
>> to the watch window.
> 
> Could you create some minimal example reproducing this behaviour?
> 
> Andre'
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
> 



More information about the Qt-creator-old mailing list