Qtcreator is opening disassembler view while trying step into.



  • Qtcreator is opening disassembler view while trying step into.
    QtCreator version - 4.6.2
    Qt 5.11.1 MinGW 32 bit (default available in installer)
    Windows 7 SP1



  • @gmatbarua
    Are you sure you have compiled your app for debug?
    Is the function you are trying to step into you in your own code or in Qt's code?



  • Compilation is done for debug mode.
    I stepping into my own function.
    My code is very simple, to check the debugging functionalities. I am new to qtcreator.

    #include <QTextStream>
    
    #include "myFunc.h"
    
    QTextStream cout(stdout);
    QTextStream cin(stdin);
    QTextStream cerr(stderr);
    
    int return5()
    {
        return 5;
    }
    
    void test()
    {
        int i;
    }
    
    int main(int argc, char *argv[])
    {
        QString greet = "Hello world !!!";
    
        for(int i = 1; i <=10; i++)
        {
            cout << "#" << i << "\t" << greet << endl;
        }
        cout << add(10,20) << endl;
        return 0;
    }
    }
    

    When I press F11, the below line is selected

    QString greet = "Hello world !!!";
    

    Then pressing F10, the below line is selected.

         cout << "#" << i << "\t" << greet << endl;
    

    The again pressing F10, shows the disassembler screen.



  • @gmatbarua

    • It's possible compiler/debugger is skipping some lines for optimizations. I don't know whether MinGW lets you control that.
    • I'm slightly surprised at your choice of cout etc. for the QTextStream variable names. C++ has its own cout etc., might be best not to clash with those?
    • When you land on your cout ... line and press "step into" (F10?), it might be stepping into the Qt code, or it might step over that, hit the return 0, exit main(), and then be located in the MinGW C runtime startup. Either of these might only be able to show assembler. Why don't you try putting a few more lines into your code and see what happens?


  • Sir,
    Perhaps there is a misunderstanding going on.
    F10 stands for step over
    F11 stands for step into.
    With this can you peruse the above post again?



  • Even for the below code, I am facing same disassembler issue.

    #include <iostream>
    
    int main(int argc, char *argv[])
    {
        for(int i = 1; i <=10; i++)
        {
            std::cout << "#" << i << "\tHello" << std::endl;
            std::cout << "ha ha ha\n";
        }
        return 0;
    }
    

    F11, highlights

    for(int i = 1; i <=10; i++)
    

    Then F10, highlights

    std::cout << "#" << i << "\tHello" << std::endl;
    

    Then F10, instead of highlighting

    std::cout << "ha ha ha\n";
    

    opens the disassembler screen.



  • Any response from any Qt expert?
    I am concerned because if there are no solution in Windows 7, I will install linux and do the development in Linux alone.


  • Qt Champions 2017

    @gmatbarua
    Hi
    Can you try uncheck this if checked or reverse, then quit creator.
    open it again, check it and close it and again and then open
    and check ?

    alt text

    ps. worked fine in win 7 for me with mingw.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.