Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot step into QT sources in my application only
Forum Updated to NodeBB v4.3 + New Features

Cannot step into QT sources in my application only

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 385 Views
  • 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.
  • Y Offline
    Y Offline
    yeghia
    wrote on last edited by
    #1

    Hi Folks

    I have a problem with debugging QT sources in my application specifically. I installed precompiled QT 6.2.3 version for Linux. When I create a QT project in QtCreator or compile one of the QT’s examples I can debug them, everything is fine. But my application is using QT but it is not based on qmake system – it is plain makefile based one. When I compare build instructions in both cases I don’t see what might cause that I see only assembly instructions (although I see source file names and corresponding line numbers).

    Here are the command lines for compilation of one of the files in my application and for link step:

    *<tools>/tools/bin/c++ -MT .build/rhel8/obj/moc_tcl_notifier.o -MD -MP -MF .build/rhel8/deps/moc_tcl_notifier.Td -std=gnu++17 -pthread -Wshadow -Wno-class-memaccess -mcx16 -msse3 -mssse3 -mpopcnt -mcx16 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -O0

    g++ -Wextra -D_REENTRANT -DQT_QML_DEBUG <some_dir>/make/../build/bin/rhel8/EC <tools>/tools/bin/c++ -L/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -L<tools>/tools/lib -o <some_dir>/make/../build/bin/rhel8/EC .build/rhel8/obj/command_input.o .build/rhel8/obj/main.o .build/rhel8/obj/options.o .build/rhel8/obj/tcl_notifier.o .build/rhel8/obj/moc_tcl_notifier.o ../sys/.build/rhel8/obj/sys.a ../libedit/.build/rhel8/obj/libedit.a -g -ltcl8.6 -ltinfo -lpthread -lrt -Wl,-rpath=<tools>/tools/lib -Wl,-rpath=/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Widgets.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Gui.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Core.so*

    <tools>/tools/bin/c++ and g++ are the same executable (gcc 11.2.0).

    Here are the command lines for a sample application generated by QtCreator:

    *g++ -c -pipe -g -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../diagramscene -I. -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtWidgets -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtGui -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtCore -I. -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/mkspecs/linux-g++ -o moc_diagramtextitem.o moc_diagramtextitem.cpp

    g++ -Wl,-rpath,/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -Wl,-rpath-link,/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -o diagramscene mainwindow.o diagramitem.o main.o arrow.o diagramtextitem.o diagramscene.o qrc_diagramscene.o moc_mainwindow.o moc_diagramscene.o moc_diagramtextitem.o /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Widgets.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Gui.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Core.so -lpthread -lGL*

    Any idea where to look?

    Regards
    Yeghia

    JonBJ 1 Reply Last reply
    0
    • Y yeghia

      Hi Folks

      I have a problem with debugging QT sources in my application specifically. I installed precompiled QT 6.2.3 version for Linux. When I create a QT project in QtCreator or compile one of the QT’s examples I can debug them, everything is fine. But my application is using QT but it is not based on qmake system – it is plain makefile based one. When I compare build instructions in both cases I don’t see what might cause that I see only assembly instructions (although I see source file names and corresponding line numbers).

      Here are the command lines for compilation of one of the files in my application and for link step:

      *<tools>/tools/bin/c++ -MT .build/rhel8/obj/moc_tcl_notifier.o -MD -MP -MF .build/rhel8/deps/moc_tcl_notifier.Td -std=gnu++17 -pthread -Wshadow -Wno-class-memaccess -mcx16 -msse3 -mssse3 -mpopcnt -mcx16 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -O0

      g++ -Wextra -D_REENTRANT -DQT_QML_DEBUG <some_dir>/make/../build/bin/rhel8/EC <tools>/tools/bin/c++ -L/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -L<tools>/tools/lib -o <some_dir>/make/../build/bin/rhel8/EC .build/rhel8/obj/command_input.o .build/rhel8/obj/main.o .build/rhel8/obj/options.o .build/rhel8/obj/tcl_notifier.o .build/rhel8/obj/moc_tcl_notifier.o ../sys/.build/rhel8/obj/sys.a ../libedit/.build/rhel8/obj/libedit.a -g -ltcl8.6 -ltinfo -lpthread -lrt -Wl,-rpath=<tools>/tools/lib -Wl,-rpath=/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Widgets.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Gui.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Core.so*

      <tools>/tools/bin/c++ and g++ are the same executable (gcc 11.2.0).

      Here are the command lines for a sample application generated by QtCreator:

      *g++ -c -pipe -g -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../diagramscene -I. -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtWidgets -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtGui -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtCore -I. -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/mkspecs/linux-g++ -o moc_diagramtextitem.o moc_diagramtextitem.cpp

      g++ -Wl,-rpath,/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -Wl,-rpath-link,/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib -o diagramscene mainwindow.o diagramitem.o main.o arrow.o diagramtextitem.o diagramscene.o qrc_diagramscene.o moc_mainwindow.o moc_diagramscene.o moc_diagramtextitem.o /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Widgets.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Gui.so /ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/lib/libQt6Core.so -lpthread -lGL*

      Any idea where to look?

      Regards
      Yeghia

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @yeghia
      I see the g++ compilation line has g++ -c -pipe -g. The -g means compile with debug. (You say this debugs well.)

      On your own file's compilation line, <tools>/tools/bin/c++ -MT ..., what option is compiling for debug? (You say this does not show source lines in debug.)

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yeghia
        wrote on last edited by
        #3

        I guess I dropped part of the line, sorry about that. Here is the one in full, as you can see there is -g option present right after -O0.

        <tools>/tools/bin/c++ -MT .build/rhel8/obj/tcl_notifier.o -MD -MP -MF .build/rhel8/deps/tcl_notifier.Td -std=gnu++17 -pipe -pthread -Wall -Wshadow -Wno-class-memaccess -mcx16 -msse3 -mssse3 -mpopcnt -mcx16 -DQT_QML_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtCore -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtWidgets -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtGui -fPIC -O0 -g -I.build/rhel8/obj -I../../ -I<tools>/tools/include -I<tools>/tools/include/boost -c -o .build/rhel8/obj/tcl_notifier.o tcl_notifier.cpp

        JonBJ 1 Reply Last reply
        0
        • Y yeghia

          I guess I dropped part of the line, sorry about that. Here is the one in full, as you can see there is -g option present right after -O0.

          <tools>/tools/bin/c++ -MT .build/rhel8/obj/tcl_notifier.o -MD -MP -MF .build/rhel8/deps/tcl_notifier.Td -std=gnu++17 -pipe -pthread -Wall -Wshadow -Wno-class-memaccess -mcx16 -msse3 -mssse3 -mpopcnt -mcx16 -DQT_QML_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtCore -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtWidgets -I/ct/users/yeghia/QT6.2.3/6.2.3/gcc_64/include/QtGui -fPIC -O0 -g -I.build/rhel8/obj -I../../ -I<tools>/tools/include -I<tools>/tools/include/boost -c -o .build/rhel8/obj/tcl_notifier.o tcl_notifier.cpp

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @yeghia
          Then all I know is that when it works you use g++ -g on the source file but when it does not you use <tools>/tools/bin/c++ -g. I have no idea how <tools>/tools/bin/c++ relates to g++, maybe there is some issue there.

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            yeghia
            wrote on last edited by
            #5

            @yeghia said in Cannot step into QT sources in my application only:

            <tools>/tools/bin/c++ and g++ are the same executable (gcc 11.2.0).

            they are the exactly the same binaries: gcc 11.2.0

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved