Results 1 to 2 of 2

Thread: How to set up Qt debugging for Makefile projects?

  1. #1

    Default How to set up Qt debugging for Makefile projects?

    I'm trying to get debugging for my makefile project to work. Debugging works fine on Qt projects that use qmake.
    I'm running Mac OS X Mountain Lion, Qt 4.7.4 and Qt Creator 2.4.1, and trying to debug a .c project.

    When I set up break points and tell debugger to run it runs ignoring break points - although it stops on segment fault causing lines, so it runs after all, and not just fails to start. Below I pasted first ~150 lines of debug log - it contains information about some errors, but I'm a debugging newbie, and don't understand them, and even less what to do about them. I suspect it's something with gdb not working with python (it complains about undefined command 'python'), but then again even though similar errors are there when working with qmake projects, debugger seems to function for the latter:


    sStarting debugger 'GdbEngine' for ABI 'x86-macos-generic-mach_o-64bit'...
    dStart parameters: 'Run /Users/Kuba/Code/Sketchpad/Trial project/trial' mode: 1
    dABI: x86-macos-generic-mach_o-64bit
    dExecutable: /Users/Kuba/Code/Sketchpad/Trial project/trial
    dDirectory: /Users/Kuba/Code/Sketchpad/Trial project
    dDebugger: /usr/bin/gdb
    dProject: /Users/Kuba/Code/Sketchpad/Trial project (built: /Users/Kuba/Code/Sketchpad/Trial project)
    dQML server: 127.0.0.1:3768
    dSysroot:
    dDebug Source Loaction:
    dSymbol file:
    dDumper libraries: /usr/local/Qt4.8/qtc-debugging-helper/ /Users/Kuba/QtSDK/Qt Creator.app/Contents/qtc-debugging-helper/92501880/ /Users/Kuba/Library/Application Support/Nokia/QtCreator/qtc-debugging-helper/92501880/
    d
    dDebugger settings:
    dUseAlternatingRowColours: false (default: false)
    dFontSizeFollowsEditor: true (default: false) ***
    dUseMessageBoxForSignals: true (default: true)
    dAutoQuit: false (default: false)
    dLogTimeStamps: false (default: false)
    dVerboseLog: false (default: false)
    dCloseBuffersOnExit: false (default: false)
    dSwitchModeOnExit: false (default: false)
    dUseDebuggingHelper: true (default: true)
    dUseCodeModel: true (default: true)
    dShowThreadNames: true (default: false) ***
    dUseToolTips: false (default: false)
    dUseToolTipsInLocalsView: false (default: false)
    dUseToolTipsInBreakpointsView: false (default: false)
    dUseAddressInBreakpointsView: false (default: false)
    dUseAddressInStackView: false (default: false)
    dLoadGdbInit: true (default: true)
    dScriptFile: (default: )
    dWatchdogTimeout: 20 (default: 20)
    dAutoEnrichParameters: false (default: false)
    dTargetAsync: false (default: false)
    dMaximalStackDepth: 20 (default: 20)
    dAlwaysAdjustStackColumnWidths: false (default: false)
    dShowStandardNamespace: true (default: true)
    dShowQtNamespace: true (default: true)
    dSortStructMembers: true (default: true)
    dAutoDerefPointers: true (default: true)
    dAlwaysAdjustLocalsColumnWidths: false (default: false)
    dListSourceFiles: false (default: false)
    dSkipKnownFrames: false (default: false)
    dEnableReverseDebugging: false (default: false)
    dAllPluginBreakpoints: true (default: true)
    dSelectedPluginBreakpoints: false (default: false)
    dAdjustBreakpointLocations: true (default: true)
    dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
    dNoPluginBreakpoints: false (default: false)
    dSelectedPluginBreakpointsPattern: .* (default: .*)
    dBreakOnThrow: false (default: false)
    dBreakOnCatch: false (default: false)
    dBreakOnWarning: false (default: false)
    dBreakOnFatal: false (default: false)
    dAlwaysAdjustRegistersColumnWidths: false (default: false)
    dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
    dAlwaysAdjustThreadsColumnWidths: false (default: false)
    dAlwaysAdjustModulesColumnWidths: false (default: false)
    dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
    dQUEUE: SETUP ENGINE
    dCALL: SETUP ENGINE
    dTRYING TO START ADAPTER
    dENABLING TEST CASE: 0
    dSTARTING /usr/bin/gdb -i mi --tty=/var/folders/kl/8kkz9_ss6k5_k6q4jb23jjdr0000gr/T/qt_temp.Hn5985
    dGDB STARTED, INITIALIZING IT
    <921show version
    <922-list-features
    <923set print object on
    <924set breakpoint pending on
    <925set print elements 10000
    <926set overload-resolution off
    <927handle SIGSEGV nopass stop print
    <928set unwindonsignal on
    <929pwd
    <930set width 0
    <931set height 0
    <932set auto-solib-add on
    <933-interpreter-exec console "maintenance set internal-warning quit no"
    <934-interpreter-exec console "maintenance set internal-error quit no"
    <935-interpreter-exec console "disassemble 0 0"
    <936-interpreter-exec console "python execfile('/Users/Kuba/QtSDK/Qt Creator.app/Contents/Resources/dumper/bridge.py')"
    <937-interpreter-exec console "python execfile('/Users/Kuba/QtSDK/Qt Creator.app/Contents/Resources/dumper/dumper.py')"
    <938-interpreter-exec console "python execfile('/Users/Kuba/QtSDK/Qt Creator.app/Contents/Resources/dumper/qttypes.py')"
    <939-interpreter-exec console "bbsetup"
    dADAPTER SUCCESSFULLY STARTED
    dNOTE: ENGINE SETUP OK
    dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
    dQUEUE: SETUP INFERIOR
    dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
    dQUEUE: SETUP INFERIOR
    >~"GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)\n"
    >~"Copyright 2004 Free Software Foundation, Inc.\n"
    >~"GDB is free software, covered by the GNU General Public License, and you are\n"
    >~"welcome to change it and/or distribute copies of it under certain conditions.\n"
    >~"Type \"show copying\" to see the conditions.\n"
    >~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
    >~"This GDB was configured as \"x86_64-apple-darwin\"."
    >~"\n"
    >&"show version\n"
    >~"GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)\n"
    >~"Copyright 2004 Free Software Foundation, Inc.\n"
    >~"GDB is free software, covered by the GNU General Public License, and you are\n"
    >~"welcome to change it and/or distribute copies of it under certain conditions.\n"
    >~"Type \"show copying\" to see the conditions.\n"
    >~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
    >~"This GDB was configured as \"x86_64-apple-darwin\".\n"
    >921^done
    dPARSING VERSION: 921^done
    d
    dUNSUPPORTED GDB VERSION GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)
    dCopyright 2004 Free Software Foundation, Inc.
    dGDB is free software, covered by the GNU General Public License, and you are
    dwelcome to change it and/or distribute copies of it under certain conditions.
    dType "show copying" to see the conditions.
    dThere is absolutely no warranty for GDB. Type "show warranty" for details.
    dThis GDB was configured as "x86_64-apple-darwin".
    dGNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)
    dCopyright 2004 Free Software Foundation, Inc.
    dGDB is free software, covered by the GNU General Public License, and you are
    dwelcome to change it and/or distribute copies of it under certain conditions.
    dType "show copying" to see the conditions.
    dThere is absolutely no warranty for GDB. Type "show warranty" for details.
    dThis GDB was configured as "x86_64-apple-darwin".
    d
    dUSING GDB VERSION: 60350, BUILD: 1822 (APPLE)
    >922^error,msg="Undefined MI command: list-features"
    dFEATURES: 922^error,data={msg="Undefined MI command: list-features"}
    d
    >&"set print object on\n"
    >923^done
    >&"set breakpoint pending on\n"
    >924^done
    >&"set print elements 10000\n"
    >925^done
    >&"set overload-resolution off\n"
    >926^done
    >&"handle SIGSEGV nopass stop print\n"
    >927^done
    >&"set unwindonsignal on\n"
    >928^done
    >&"pwd\n"
    >~"Working directory /Users/Kuba/Code/Sketchpad/Trial project.\n"
    >929^done
    >&"set width 0\n"
    >930^done
    >&"set height 0\n"
    >931^done
    >&"set auto-solib-add on\n"
    >932^done
    >933^error,msg="Undefined maintenance set command: \"internal-warning quit no\". Try \"help maintenance set\"."
    >934^error,msg="Undefined maintenance set command: \"internal-error quit no\". Try \"help maintenance set\"."
    >Dump of assembler code from 0x0 to 0x0:
    >End of assembler dump.
    >935^done,time={wallclock="0.00005",user="0.00004" ,system="0.00001",start="1351153081.820196",end="1 351153081.820246"}
    >936^error,msg="Undefined command: \"python\". Try \"help\"."
    >937^error,msg="Undefined command: \"python\". Try \"help\"."
    >938^error,msg="Undefined command: \"python\". Try \"help\"."
    >939^error,msg="Undefined command: \"bbsetup\". Try \"help\"."
    dUNEXPECTED GDB STDERR: Undefined maintenance set command: "internal-warning quit no". Try "help maintenance set".
    dUndefined maintenance set command: "internal-error quit no". Try "help maintenance set".
    dUndefined command: "python". Try "help".
    dUndefined command: "python". Try "help".
    dUndefined command: "python". Try "help".
    dUndefined command: "bbsetup". Try "help".
    d
    dCALL: SETUP INFERIOR
    sSetting up inferior...
    <940-file-exec-and-symbols "/Users/Kuba/Code/Sketchpad/Trial project/trial"
    >&"warning: Could not find object file \"/opt/etlocal/var/macports/build/_opt_etlocal_var_macports_sources_rsync.macports.o rg_release_ports_x11_openmotif/openmotif/work/openmotif-2.3.3/lib/Xm/.libs/XmStrDefs.o\" - no debug information available for \"XmStrDefs.c\".\n"
    Could not find object file "/opt/etlocal/var/macports/build/_opt_etlocal_var_macports_sources_rsync.macports.o rg_release_ports_x11_openmotif/openmotif/work/openmotif-2.3.3/lib/Xm/.libs/XmStrDefs.o" - no debug information available for "XmStrDefs.c".

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set up Qt debugging for Makefile projects?

    all the errors and warning you see are expected when debugging on mac. your problem must be further down in the log

Similar Threads

  1. Replies: 8
    Last Post: 28th October 2013, 01:08
  2. Replies: 1
    Last Post: 31st March 2011, 18:38
  3. Replies: 0
    Last Post: 12th October 2010, 04:14
  4. Replies: 2
    Last Post: 7th September 2010, 21:19
  5. Replies: 3
    Last Post: 6th September 2010, 23:00

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.