Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14844

rvalue references "not accessible" in Locals and Watchers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 3.5.0-rc1
    • Debugger
    • Windows 7 64 bit
      MinGW g++ 4.9.1
      gdb 7.8

    Description

      1. Open project tests\manual\debugger\simple\simple.pro from Creator's repository and configure it to use a MinGW-based kit.
      2. Set a breakpoint in function void testRValueReference() and let the debugger run there:
            struct X { X() : a(2), b(3) {} int a, b; };
        
            X testRValueReferenceHelper1()
            {
                return X();
            }
        
            X testRValueReferenceHelper2(X &&x)
            {
                return x;
            }
        
            void testRValueReference()
            {
                X &&x1 = testRValueReferenceHelper1();
                X &&x2 = testRValueReferenceHelper2(std::move(x1));
                X &&x3 = testRValueReferenceHelper2(testRValueReferenceHelper1());
        
                X y1 = testRValueReferenceHelper1();
                X y2 = testRValueReferenceHelper2(std::move(y1));
                X y3 = testRValueReferenceHelper2(testRValueReferenceHelper1());
        
                BREAK_HERE;
                // Continue.
                dummyStatement(&x1, &x2, &x3, &y1, &y2, &y3);
            }
        
      3. See the values for x1, x2 and x3 in Locals and Expressions view.
        They are all displayed as "not accessible".

      As far as I understand C++11 these are valid references and the value they are referencing should be displayed.

      Attachments

        1. left.log
          4 kB
          Robert Löhning
        2. right.log
          47 kB
          Robert Löhning

        Activity

          People

            hjk hjk
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: