Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Unable to debug under Linux!
Forum Updated to NodeBB v4.3 + New Features

Unable to debug under Linux!

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
8 Posts 2 Posters 4.3k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on 23 Nov 2016, 14:56 last edited by
    #1

    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
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on 23 Nov 2016, 15:00 last edited by
      #2

      BTW, gdb doesn't show any error in Qt Creator preferences windows as shown in the below screenshot:

      Prefrences of gdb

      J 1 Reply Last reply 24 Nov 2016, 06:00
      0
      • M mbnoimi
        23 Nov 2016, 15:00

        BTW, gdb doesn't show any error in Qt Creator preferences windows as shown in the below screenshot:

        Prefrences of gdb

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 24 Nov 2016, 06:00 last edited by
        #3

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

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

        M 1 Reply Last reply 24 Nov 2016, 15:17
        0
        • J jsulm
          24 Nov 2016, 06:00

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

          M Offline
          M Offline
          mbnoimi
          wrote on 24 Nov 2016, 15:17 last edited by
          #4

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

          J 1 Reply Last reply 25 Nov 2016, 05:15
          0
          • M mbnoimi
            24 Nov 2016, 15:17

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

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 25 Nov 2016, 05:15 last edited by
            #5

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

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

            M 1 Reply Last reply 25 Nov 2016, 08:37
            0
            • J jsulm
              25 Nov 2016, 05:15

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

              M Offline
              M Offline
              mbnoimi
              wrote on 25 Nov 2016, 08:37 last edited by mbnoimi
              #6

              @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 $ 
              
              J 1 Reply Last reply 25 Nov 2016, 08:41
              0
              • M mbnoimi
                25 Nov 2016, 08:37

                @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 $ 
                
                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 25 Nov 2016, 08:41 last edited by
                #7

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

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

                M 1 Reply Last reply 25 Nov 2016, 08:51
                1
                • J jsulm
                  25 Nov 2016, 08:41

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

                  M Offline
                  M Offline
                  mbnoimi
                  wrote on 25 Nov 2016, 08:51 last edited by
                  #8

                  @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 Reply Last reply
                  0

                  1/8

                  23 Nov 2016, 14:56

                  • Login

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