Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Qtcreator is opening disassembler view while trying step into.

    General and Desktop
    3
    8
    1153
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gmatbarua last edited by

      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

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @gmatbarua last edited by

        @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?

        1 Reply Last reply Reply Quote 3
        • G
          gmatbarua last edited by gmatbarua

          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.

          JonB 1 Reply Last reply Reply Quote 0
          • JonB
            JonB @gmatbarua last edited by

            @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?
            1 Reply Last reply Reply Quote 0
            • G
              gmatbarua last edited by gmatbarua

              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?

              1 Reply Last reply Reply Quote 0
              • G
                gmatbarua last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • G
                  gmatbarua last edited by

                  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.

                  mrjj 1 Reply Last reply Reply Quote 0
                  • mrjj
                    mrjj Lifetime Qt Champion @gmatbarua last edited by mrjj

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post