Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. This does not seem to be a "Debug" build
QtWS25 Last Chance

This does not seem to be a "Debug" build

Scheduled Pinned Locked Moved Solved Mobile and Embedded
18 Posts 9 Posters 27.2k 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.
  • Z Offline
    Z Offline
    ZeAL0T
    wrote on last edited by SGaist
    #1

    I'm trying to use a debugger with an android device and get the window with such warning message:
    @
    This does not seem to be a "Debug" build.
    Setting breakpoints by file name and line number may fail.

    Section .debug_info: Not found.
    Section .debug_abbrev: Not found.
    Section .debug_line: Not found.
    Section .debug_str: Not found.
    Section .debug_loc: Not found.
    Section .debug_range: Not found.
    Section .gdb_index: Not found.
    Section .note.gnu.build-id: Not found.
    Section .gnu.hash: Not found.
    Section .gnu_debuglink: Not found.
    @

    I'm using the Qt Creator 2.8.1 based on Qt 5.1.1 (GCC 4.6.1, 64 bit).
    The Qt libraries, the application and all the depends was built with the GCC 4.8.

    The most strange in this situation that I can use a debugger for the main Application, but all libraries are not able for debugging.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZeAL0T
      wrote on last edited by
      #2

      The problem was solved by changing the library type from dynamic to static.
      Maybe someone knows why the dynamic libraries are not able for debugging?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        billconan
        wrote on last edited by
        #3

        I'm still seeing this with Qt5.3.

        How did you set to use static? did you rebuild Qt yourself?

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZeAL0T
          wrote on last edited by
          #4

          I didn't mean Qt. I told about my libraries. When they were static I could use the debugger.

          But right now (at version Qt 5.3.1 and Creator 3.2.1) I can use debugger in my libraries even when they are shared.

          I rebuilt Qt several times, but only for changing qreal type to double precision and never used it as static.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            billconan
            wrote on last edited by
            #5

            I'm still seeing this issue on mac with all the latest Qt and creator. might be a bug?

            I don't have any libraries, just the main program.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              ttguy
              wrote on last edited by
              #6

              A solution that worked for me was to got to project>Build settings.
              Click Run Cmake and in the cmake wizard that appears add -DCMAKE_BUILD_TYPE=Debug to the command line arguments and click Run Cmake. This sets up the build to be a debug build type

              1 Reply Last reply
              2
              • jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Your Qt libraries are built in Release mode. You need libraries built in Debug mode if you want to debug them.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                ZanyFeetZ 1 Reply Last reply
                1
                • jsulmJ jsulm

                  Your Qt libraries are built in Release mode. You need libraries built in Debug mode if you want to debug them.

                  ZanyFeetZ Offline
                  ZanyFeetZ Offline
                  ZanyFeet
                  wrote on last edited by
                  #8

                  @jsulm Thank you. That has solved my problem.

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    ElsonAmber
                    wrote on last edited by
                    #9

                    But what if I can not choose debug mode cause it does not have "debug " to select ?

                    jsulmJ 1 Reply Last reply
                    0
                    • E ElsonAmber

                      But what if I can not choose debug mode cause it does not have "debug " to select ?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by jsulm
                      #10

                      @ElsonAmber Then you should add Debug configuration to your project configuration: go to "Projects/Build&Run/Build Settings", then click Add combobox and select Debug.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DungeonLords
                        wrote on last edited by DungeonLords
                        #11

                        This does not seem to be a "Debug" build.

                        Just enable Debug in your cmake in Qt Creator.

                        -DCMAKE_BUILD_TYPE:STRING=Debug.png

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          Dane 0
                          wrote on last edited by
                          #12

                          I am getting the exact same error.
                          @jsulm How do I "build libraries in Debug mode"?
                          My project is using qmake, and everything is set to "Debug" mode everywhere that it possibly can be. The effective qmake call is "/home/dane/buildroot/output/host/usr/bin/qmake /home/dane/dev/qt/test_qt_quick_qmake/test_qt_quick_qmake.pro -spec devices/linux-buildroot-g++ CONFIG+=debug CONFIG+=qml_debug && /usr/bin/make qmake_all".
                          I can debug (set breakpoints in) the QML side of the project on the target but not the C++ side.

                          JonBJ 1 Reply Last reply
                          0
                          • D Dane 0

                            I am getting the exact same error.
                            @jsulm How do I "build libraries in Debug mode"?
                            My project is using qmake, and everything is set to "Debug" mode everywhere that it possibly can be. The effective qmake call is "/home/dane/buildroot/output/host/usr/bin/qmake /home/dane/dev/qt/test_qt_quick_qmake/test_qt_quick_qmake.pro -spec devices/linux-buildroot-g++ CONFIG+=debug CONFIG+=qml_debug && /usr/bin/make qmake_all".
                            I can debug (set breakpoints in) the QML side of the project on the target but not the C++ side.

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

                            @Dane-0
                            Have you set both as per https://doc.qt.io/qtcreator/creator-debugging-qml.html#mixed-c-qml-debugging ? Other people seem to have had the reverse trouble: C++ debugging works but not QML.

                            D 1 Reply Last reply
                            0
                            • JonBJ JonB

                              @Dane-0
                              Have you set both as per https://doc.qt.io/qtcreator/creator-debugging-qml.html#mixed-c-qml-debugging ? Other people seem to have had the reverse trouble: C++ debugging works but not QML.

                              D Offline
                              D Offline
                              Dane 0
                              wrote on last edited by
                              #14

                              @JonB Both "Enable C++" and "Enable QML" are ticked under "Debugger settings" (Projects->Build & Run->Run).
                              I get the exact same error message as the OP:

                              This does not seem to be a "Debug" build.
                              Setting breakpoints by file name and line number may fail.
                              Section .debug_info: Not found.
                              Section .debug_abbrev: Not found.
                              Section .debug_line: Not found.
                              Section .debug_str: Not found.
                              Section .debug_loc: Not found.
                              Section .debug_range: Not found.
                              Section .gdb_index: Not found.
                              Section .note.gnu.build-id: Not found.
                              Section .gnu.hash: Not found.
                              Section .gnu_debuglink: Not found.

                              1 Reply Last reply
                              0
                              • D Dane 0 referenced this topic on
                              • D Offline
                                D Offline
                                Dane 0
                                wrote on last edited by
                                #15

                                Inspecting the compiled executable with objdump reveals that there are no debug sections, and looking at the Makefile generated by QMake I can see that the CFLAGS and CXXFLAGS for the embedded target do not include the -g option.
                                Why would QMake not be including the -g option when it is being called with CONFIG+=debug? How can I fix or workaround this?

                                jsulmJ 1 Reply Last reply
                                0
                                • D Dane 0

                                  Inspecting the compiled executable with objdump reveals that there are no debug sections, and looking at the Makefile generated by QMake I can see that the CFLAGS and CXXFLAGS for the embedded target do not include the -g option.
                                  Why would QMake not be including the -g option when it is being called with CONFIG+=debug? How can I fix or workaround this?

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  @Dane-0 Did you try from a clean state: delete everything in build folder, run qmake and then build. Maybe you already built in release mode in same folder, so qmake does not update makefiles.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    Dane 0
                                    wrote on last edited by
                                    #17

                                    I just found this:
                                    https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-setting-up-a-qt5-application-development-environment/#comment-2267741
                                    which seems probably like the correct explanation for what is happening.
                                    I have now set BR2_ENABLE_DEBUG=y in BuildRoot and am busy with a BuildRoot clean / rebuild. Will revert once done (will take some time).

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      Dane 0
                                      wrote on last edited by
                                      #18

                                      Yip that solved it. BR2_ENABLE_DEBUG=y in BuildRoot. Easy once you know! ;-)

                                      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