The gdb process terminated unexpectedly (code 1)



  • Hello. I tried to debug simple app like this:
    @---main.cpp---

    #include <QDebug>
    int main()
    {
    for (int i = 0; i < 10; i++)
    qDebug() << i;
    return 0;
    }

    @

    And i always have this problem.
    I installed Qt5.2.0 with QtCreator and MinGW tools for WinXP 32bit. But in auto-detected debuggers I have gdb.exe with type 'Not recognized'. I added gdbserver.exe. And its type is 'GDB' and i think that's it.
    But it's not and I have 'The gdb process terminated unexpectedly (code 1)' when run app.
    Can anyone tell me what I do wrong or don't do?
    That is gdb log:
    @
    sStarting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
    dStart parameters: 'test' mode: 1
    dABI: x86-windows-msys-pe-32bit
    dLanguages: c++
    dExecutable: C:\Qt\debug\gs\exp\debug\test.exe
    dDirectory: C:\Qt\debug\gs\exp
    dDebugger: C:\Qt\Qt5.2.0\Tools\mingw48_32\bin\gdbserver.exe
    dProject: C:\Dropbox\PRJ\gs\expressions (built: C:\Qt\debug\gs\exp)
    dQML server: 127.0.0.1:3768
    dRemote: :0
    dSysroot:
    dDebug Source Location:
    dDumper libraries: C:\Qt\Qt5.2.0\5.2.0\mingw48_32\qtc-debugging-helper\ C:\Qt\Qt5.2.0\Tools\QtCreator\qtc-debugging-helper\2335925848\ C:\Documents and Settings\Admin\Local Settings\Application Data\QtProject\QtCreator\qtc-debugging-helper\2335925848
    dDebugger settings:
    dAlwaysAdjustModulesColumnWidths: false (default: false)
    dAlwaysAdjustThreadsColumnWidths: false (default: false)
    dQmlInspector.ShowAppOnTop: false (default: false)
    dShowQmlObjectTree: true (default: true)
    dQmlInspector.FromQml: false (default: false)
    dBreakOnThrow: false (default: false)
    dSelectedPluginBreakpointsPattern: .* (default: .*)
    dBreakOnWarning: false (default: false)
    dBreakOnCatch: false (default: false)
    dBreakOnAbort: false (default: false)
    dBreakOnFatal: false (default: false)
    dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
    dAlwaysAdjustRegistersColumnWidths: false (default: false)
    dWarnOnReleaseBuilds: true (default: true)
    dTargetAsync: false (default: false)
    dIntelFlavor: false (default: false)
    dMultiInferior: false (default: false)
    dMaximalStackDepth: 30 (default: 20) ***
    dIdentifyDebugInfoPackages: false (default: false)
    dAttemptQuickStart: false (default: false)
    dLoadGdbDumpers: true (default: true)
    dGdbCustomDumperCommands: (default: )
    dGdbStartupCommands: (default: )
    dWatchdogTimeout: 20 (default: 20)
    dGdbPostAttachCommands: (default: )
    dUseDynamicType: true (default: true)
    dAutoEnrichParameters: true (default: true)
    dEnableReverseDebugging: false (default: false)
    dSkipKnownFrames: false (default: false)
    dAllPluginBreakpoints: true (default: true)
    dAdjustBreakpointLocations: true (default: true)
    dSelectedPluginBreakpoints: false (default: false)
    dNoPluginBreakpoints: false (default: false)
    dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
    dShowStandardNamespace: true (default: true)
    dAlwaysAdjustStackColumnWidths: false (default: false)
    dSortStructMembers: true (default: true)
    dShowQtNamespace: true (default: true)
    dAlwaysAdjustLocalsColumnWidths: false (default: false)
    dAutoDerefPointers: true (default: true)
    dListSourceFiles: false (default: false)
    dMaximalStringLength: 10000 (default: 10000)
    dCloseBuffersOnExit: false (default: false)
    dBreakpointsFullPath: false (default: false)
    dSwitchModeOnExit: false (default: false)
    dUseDebuggingHelper: true (default: true)
    dRaiseOnInterrupt: true (default: true)
    dShowThreadNames: false (default: false)
    dUseCodeModel: true (default: true)
    dUseAlternatingRowColours: false (default: false)
    dUseMessageBoxForSignals: true (default: true)
    dFontSizeFollowsEditor: false (default: false)
    dAutoQuit: false (default: false)
    dVerboseLog: false (default: false)
    dLogTimeStamps: false (default: false)
    dSourcePaths: (default: )
    dSymbolPaths: (default: )
    dBreakOnCrtDbgReport: false (default: false)
    dBreakEvent: (default: )
    dBreakpointCorrection: true (default: true)
    dCDB_Console: false (default: false)
    dLoadGdbInit: true (default: true)
    dIgnoreFirstChanceAccessViolation: false (default: false)
    dUseToolTipsInLocalsView: false (default: false)
    dUseToolTips: true (default: true)
    dUseToolTipsInBreakpointsView: false (default: true) ***
    dUseToolTipsInBreakpointsView: false (default: false)
    dUseAddressInStackView: false (default: false)
    dUseAddressInBreakpointsView: false (default: false)
    dAdditionalArguments: (default: )
    dRegisterForPostMortem: 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 C:/Qt/Qt5.2.0/Tools/mingw48_32/bin/gdbserver.exe -i mi --tty=\.\pipe\creator-13200-11056
    dGDB STARTED, INITIALIZING IT
    <1show version
    <2show debug-file-directory
    <3set print object on
    <4set breakpoint pending on
    <5set print elements 10000
    <6handle SIGSEGV nopass stop print
    <7set unwindonsignal on
    <8set width 0
    <9set height 0
    sSetting up inferior...
    <10set substitute-path C:/iwmake/build_mingw_opensource C:/Qt/Qt5.2.0/5.2.0/mingw48_32
    <11set substitute-path C:/ndk_buildrepos/qt-desktop/src C:/Qt/Qt5.2.0/5.2.0/mingw48_32
    <12set substitute-path Q:/qt5_workdir/w/s C:/Qt/Qt5.2.0/5.2.0/mingw48_32
    <13-interpreter-exec console "set auto-solib-add on"
    <14pwd
    dUNEXPECTED GDB STDERR: Unknown argument: -i
    dGDB PROCESS FINISHED, status 0, code 1
    dNOTE: ENGINE ILL ******
    dState changed from EngineSetupRequested(1) to EngineShutdownRequested(20) [master]
    dQUEUE: SHUTDOWN ENGINE
    dCALL: SHUTDOWN ENGINE
    dPLAIN ADAPTER SHUTDOWN 20
    dINITIATE GDBENGINE SHUTDOWN IN STATE 1, PROC: 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.
    @



  • It's solved.
    I have environment variable PYTHONPATH witch sets the path to Python3.3 libraries in my OS. After removing it all became normal.



  • As side note: The debugger settings need to point to a gdb, not gdbserver.


Log in to reply
 

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