Unable to debug under Linux!
-
wrote on 23 Nov 2016, 14:56 last edited by
Hi,
When ever I run my Qt Widget app in debug mode I get this error message box:
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: Found. Section .gnu.hash: Found. Section .gnu_debuglink: Not found.
I'm using Qt Creator 4.1.0 from Qt offline installer.
Header of generated Makefile:
############################################################################# # Makefile for building: bin/SyncAccountsManager # Generated by qmake (3.0) (Qt 5.7.0) # Project: SyncAccountsManager.pro # Template: app # Command: /home/mbnoimi/.Qt/5.7/gcc_64/bin/qmake -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile SyncAccountsManager.pro ############################################################################# MAKEFILE = Makefile ####### Compiler, tools and options CC = gcc CXX = g++ DEFINES = -DAPPNAME=\"\" -DQT_QML_DEBUG -DQT_SQL_LIB -DQT_CORE_LIB CFLAGS = -pipe -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
Used .pro file:
QT += core sql QT -= gui TARGET = VoileTesto DEFINES += APPNAME=\\\"$$APPNAME\\\" CONFIG += c++11 CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += src/main.cpp \ src/connectdb.cpp HEADERS += \ src/connectdb.h DESTDIR = bin
-
wrote on 23 Nov 2016, 15:00 last edited by
-
BTW, gdb doesn't show any error in Qt Creator preferences windows as shown in the below screenshot:
@mbnoimi Why should gdb show any errors?
Can you post the whole Makefile?
Did you rerun qmake and rebuild your app after changing to debug mode? -
@mbnoimi Why should gdb show any errors?
Can you post the whole Makefile?
Did you rerun qmake and rebuild your app after changing to debug mode?wrote on 24 Nov 2016, 15:17 last edited by@jsulm said in Unable to debug under Linux!:
@mbnoimi Why should gdb show any errors?
Can you post the whole Makefile?https://gist.github.com/mbnoimi/a39b90da0a6e3a76d1565d79a6bd36d0
Did you rerun qmake and rebuild your app after changing to debug mode?
Of course.
-
@jsulm said in Unable to debug under Linux!:
@mbnoimi Why should gdb show any errors?
Can you post the whole Makefile?https://gist.github.com/mbnoimi/a39b90da0a6e3a76d1565d79a6bd36d0
Did you rerun qmake and rebuild your app after changing to debug mode?
Of course.
@mbnoimi Looks good. Could you try to load your application in GDB directly? Just to be sure it is really not a debug build. Could be that for some reason QtCreator starts the release build with debugger.
-
@mbnoimi Looks good. Could you try to load your application in GDB directly? Just to be sure it is really not a debug build. Could be that for some reason QtCreator starts the release build with debugger.
wrote on 25 Nov 2016, 08:37 last edited by mbnoimi@jsulm said in Unable to debug under Linux!:
@mbnoimi Looks good. Could you try to load your application in GDB directly? Just to be sure it is really not a debug build. Could be that for some reason QtCreator starts the release build with debugger.
It seems Qt Creator didn't make a debug build at all
no debugging symbols found
!!!$ gdb SyncAccountsManager GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from SyncAccountsManager...(no debugging symbols found)...done. (gdb) Quit mbnoimi@mbnoimi-laptop ~/HPC/SyncAccountsManager/bin $
-
@jsulm said in Unable to debug under Linux!:
@mbnoimi Looks good. Could you try to load your application in GDB directly? Just to be sure it is really not a debug build. Could be that for some reason QtCreator starts the release build with debugger.
It seems Qt Creator didn't make a debug build at all
no debugging symbols found
!!!$ gdb SyncAccountsManager GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from SyncAccountsManager...(no debugging symbols found)...done. (gdb) Quit mbnoimi@mbnoimi-laptop ~/HPC/SyncAccountsManager/bin $
@mbnoimi From which directory did you load SyncAccountsManager? Usually QtCreator creates one directory for debug build and one for release. Also did you switch to debug mode in QtCreator?
-
@mbnoimi From which directory did you load SyncAccountsManager? Usually QtCreator creates one directory for debug build and one for release. Also did you switch to debug mode in QtCreator?
wrote on 25 Nov 2016, 08:51 last edited by@jsulm said in Unable to debug under Linux!:
@mbnoimi From which directory did you load SyncAccountsManager? Usually QtCreator creates one directory for debug build and one for release. Also did you switch to debug mode in QtCreator?
OMG, I figure out what's going on!
This problem occurs when I uncheck "Shadow build" from project configurations.
Thanks @jsulm ... I'll file a bug report about this problem
1/8