-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 2.1.0
-
None
Consider the following code:
#include <iostream> using namespace std; class A { public: A() : test(7) {} int test; void doSomething() const; }; void A::doSomething() const { cout << test << endl; } int main() { A a; a.doSomething(); return 0; }
Put a breakpoint in doSomething(), and right-click on 'this' or 'test'. The first action in the menu is Watch Expression "(A)0xaddr" (or ((A)0xaddr).test).
For some reason, this doesn't work for gdb. If I replace A with ::A it works.
Why is it done with the address anyway? Why not just used the name (this, this->test)?
- relates to
-
QTCREATORBUG-4020 Debugger (gdb) resolves wrong address for this
-
- Closed
-