This does not seem to be a "Debug" build
-
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.
-
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.
-
-
Your Qt libraries are built in Release mode. You need libraries built in Debug mode if you want to debug them.
-
Your Qt libraries are built in Release mode. You need libraries built in Debug mode if you want to debug them.
-
But what if I can not choose debug mode cause it does not have "debug " to select ?
-
But what if I can not choose debug mode cause it does not have "debug " to select ?
@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.
-
This does not seem to be a "Debug" build.
Just enable Debug in your cmake in Qt Creator.
-
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. -
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. -
@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.@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. -
-
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? -
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? -
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).