QtCreator toolchain setting & debug problem.



  • Hi,

    I use mips-linux-gnu-g++ (Sourcery G++ Lite 4.3-154) 4.3.3 to cross compile my application.
    QtCreator is 2.5.2

    1.What ABI in Tool chains setting should I use?
    I set the ABI to mips-linux-generic-elf-32bit, is that correct?

    2.Can't debug with mips-linux-gnu-gdb.
    when DEBUG->start debuging->start & debug remote applications....

    I got following 2 lines in application output window:
    Debugging starts
    Debugging has finished

    following outputs in Debuger log:

    sStarting debugger "GdbEngine" for ABI "mips-linux-generic-elf-32bit"...
    dStart parameters: 'Remote: "192.168.5.88:50000"' mode: 8
    dABI: mips-linux-generic-elf-32bit
    dLanguages: any
    dExecutable: /media/disk2/test/linux/debug/QtTest
    dDebugger: /media/disk2/cross_tools/gdb-7.2/bin/mips-linux-gnu-gdb
    dQML server: 127.0.0.1:3768
    dRemote: 192.168.5.88:50000, mips
    dSysroot:
    dDebug Source Location:
    dSymbol file:
    dDumper libraries:
    d
    dDebugger settings:
    dUseAlternatingRowColours: false (default: false)
    dFontSizeFollowsEditor: false (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: false (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)
    dGdbStartupCommands: (default: )
    dWatchdogTimeout: 20 (default: 20)
    dAutoEnrichParameters: false (default: false)
    dUseDynamicType: true (default: true)
    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)
    dBreakOnRaise: 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) [master]
    dQUEUE: SETUP ENGINE
    dCALL: SETUP ENGINE
    dTRYING TO START ADAPTER
    dENABLING TEST CASE: 0
    dSTARTING /media/disk2/cross_tools/gdb-7.2/bin/mips-linux-gnu-gdb -i mi --tty=/tmp/qt_temp.hZ1362
    dGDB STARTED, INITIALIZING IT



  • <29show version
    <30-list-features
    <31set print object on
    <32set breakpoint pending on
    <33set print elements 10000
    <34set overload-resolution off
    <35handle SIGSEGV nopass stop print
    <36set unwindonsignal on
    <37pwd
    <38set width 0
    <39set height 0
    <40-interpreter-exec console "set breakpoint always-inserted on"
    <41-interpreter-exec console "set trust-readonly-sections on"
    <42-interpreter-exec console "set auto-solib-add on"
    <43-interpreter-exec console "set remotecache on"
    <44-interpreter-exec console "maintenance set internal-warning quit no"
    <45-interpreter-exec console "maintenance set internal-error quit no"
    <46-interpreter-exec console "disassemble 0 0"
    <47-interpreter-exec console "python execfile('/media/disk2/QT/qt-creator-2.5.2-src/share/qtcreator/dumper/bridge.py')"
    <48-interpreter-exec console "python execfile('/media/disk2/QT/qt-creator-2.5.2-src/share/qtcreator/dumper/dumper.py')"
    <49-interpreter-exec console "python execfile('/media/disk2/QT/qt-creator-2.5.2-src/share/qtcreator/dumper/qttypes.py')"
    <50-interpreter-exec console "bbsetup"
    dADAPTER SUCCESSFULLY STARTED
    dNOTE: ENGINE SETUP OK
    dState changed from EngineSetupRequested(1) to EngineSetupOk(3) [master]
    dQUEUE: SETUP INFERIOR
    dState changed from EngineSetupOk(3) to InferiorSetupRequested(4) [master]
    dQUEUE: SETUP INFERIOR
    dCALL: SETUP INFERIOR
    sSetting up inferior...
    <51set debug-file-directory /media/disk2/test/linux
    <52-file-exec-and-symbols "/media/disk2/test/linux/debug/QtTest"

    =thread-group-added,id="i1"
    ~"GNU gdb (GDB) 7.2\n"
    .....
    ~"This GDB was configured as "--host=i686-pc-linux-gnu --target=mips-linux-gnu".\nFor bug reporting instructions, please see:\n"
    ~"http://www.gnu.org/software/gdb/bugs/.\n"
    &"show version\n"
    ~"GNU gdb (GDB) 7.2\n"
    .....
    ~"This GDB was configured as "--host=i686-pc-linux-gnu --target=mips-linux-gnu".\nFor bug reporting instructions, please see:\n"
    ~"http://www.gnu.org/software/gdb/bugs/.\n"
    29^done
    dPARSING VERSION: 29^done
    d
    dUNSUPPORTED GDB VERSION GNU gdb (GDB) 7.2
    .....
    dThis GDB was configured as "--host=i686-pc-linux-gnu --target=mips-linux-gnu".
    dFor bug reporting instructions, please see:
    dGNU gdb (GDB) 7.2
    ......
    dThis GDB was configured as "--host=i686-pc-linux-gnu --target=mips-linux-gnu".
    dFor bug reporting instructions, please see:
    d
    dUSING GDB VERSION: 70200, BUILD: 2010
    <53-interpreter-exec console "set target-async off"
    30^done,features=["frozen-varobjs","pending-breakpoints","thread-info","python"]
    dFEATURES: 30^done,data={features=["frozen-varobjs","pending-breakpoints","thread-info","python"]}
    d
    &"set print object on\n"
    31^done
    &"set breakpoint pending on\n"
    32^done
    &"set print elements 10000\n"
    33^done
    &"set overload-resolution off\n"
    34^done
    &"handle SIGSEGV nopass stop print\n"
    ~"Signal Stop\tPrint\tPass to program\tDescription\n"
    ~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n"
    35^done
    &"set unwindonsignal on\n"
    36^done
    &"pwd\n"
    ~"Working directory /home/abc.\n"
    37^done
    &"set width 0\n"
    38^done
    &"set height 0\n"
    39^done
    &"A syntax error in expression, near 0'.\n" 46^error,msg="A syntax error in expression, near0'."
    47^done
    &"set debug-file-directory /media/disk2/test/linux\n"
    51^done
    sSetting breakpoints...
    dSetting breakpoints...
    53^done
    dALL COMMANDS DONE; INVOKING CALLBACK
    <54maint print msymbols /tmp/gdb_ns_.Et1362
    &"maint print msymbols /tmp/gdb_ns_.Et1362\n"
    54^done
    dFOUND NON-NAMESPACED QT
    dNOTE: INFERIOR SETUP OK
    dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6) [master]
    dState changed from InferiorSetupOk(6) to EngineRunRequested(7) [master]
    dQUEUE: RUN ENGINE
    dCALL: RUN ENGINE
    <55-exec-run
    55^error,msg="Don't know how to run. Try \"help target"."
    dDon't know how to run. Try "help target".
    dNOTE: ENGINE RUN FAILED
    sRun failed.
    dState changed from EngineRunRequested(7) to EngineRunFailed(8) [master]
    dState changed from EngineRunFailed(8) to EngineShutdownRequested(20) [master]
    dQUEUE: SHUTDOWN ENGINE
    dCALL: SHUTDOWN ENGINE
    dPLAIN ADAPTER SHUTDOWN 20
    dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
    <56-gdb-exit
    56^exit
    dGDB CLAIMS EXIT; WAITING
    dGDB PROCESS FINISHED, status 0, code 0
    dNOTE: ENGINE SHUTDOWN OK
    dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22) [master]
    dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master]
    dQUEUE: FINISH DEBUGGER
    dNOTE: FINISH DEBUGGER
    dHANDLE RUNCONTROL FINISHED
    sDebugger finished.

    thanks


  • Moderators

    The ABI is only used to match up toolchains and Qt versions, so use whatever the Qt version is detected as (provided you are sure that the tool chain actually will work with the Qt library).

    Looks a bit like your application finished properly.



  • The debug does not connect to the target and the application does not run.

    In the log:
    <55-exec-run

    55^error,msg=“Don’t know how to run. Try \“help target\”.”
    dDon’t know how to run. Try “help target”.
    dNOTE: ENGINE RUN FAILED
    sRun failed.
    dState changed from EngineRunRequested(7) to EngineRunFailed(8)


  • Moderators

    Hmmm... Did you set up a remote linux device for your machine and is that used in the kit you build your project for?



  • Every thing is correct if I use gdb to debug in command line.



  • I find using Debug->Start Debug->Attach to Remote Debug Server... my application on the target board start to run.

    I guess "DEBUG->start debuging->start and debug remote applications…." not call "target remote xxxxxx" or it not think it's a remote debug.

    ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.