Windows Qt creator 2.5:意外的GDB退出,我如何知道GDB崩溃的原因?

Windows Qt creator 2.5:意外的GDB退出,我如何知道GDB崩溃的原因?,windows,qt,gdb,qt-creator,Windows,Qt,Gdb,Qt Creator,我下载了QtCreator 2.5,使用的是我从QT站点下载的mingw,名为:mingw-gcc440_1 在QT Creator 2.5和windows全局路径中设置路径。 当我编译时,我处于调试模式,但当我尝试使用GDB进行调试时 我在错误消息窗口中收到此错误:标题中出现意外的GDB退出,GDB进程崩溃。 我使用的是64位windows 7,但g++是32位编译, 我试图在QT Creator 2.5中搜索一些日志,但运气不佳 编译行示例: g++ -c -g -frtti -fexcep

我下载了QtCreator 2.5,使用的是我从QT站点下载的mingw,名为:mingw-gcc440_1 在QT Creator 2.5和windows全局路径中设置路径。 当我编译时,我处于调试模式,但当我尝试使用GDB进行调试时 我在错误消息窗口中收到此错误:标题中出现意外的GDB退出,GDB进程崩溃。 我使用的是64位windows 7,但g++是32位编译, 我试图在QT Creator 2.5中搜索一些日志,但运气不佳

编译行示例:

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\4.8.2_mingw\include\QtCore" -I"c:\Qt\4.8.2_mingw\include\QtNetwork" -I"c:\Qt\4.8.2_mingw\include\QtGui" -I"c:\Qt\4.8.2_mingw\include" -I"." -I"lib_json\include" -I"lib_json\include\json" -I"c:\Qt\4.8.2_mingw\include\ActiveQt" -I"debug" -I"." -I"c:\Qt\4.8.2_mingw\mkspecs\win32-g++" -o debug\main.o main.cpp
好的,我有调试器的日志,但我很难找到问题:

dATTEMPT SYNC
sStarting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
dStart parameters: 'LiveU_windows' mode: 1
dABI: x86-windows-msys-pe-32bit
dLanguages: c++ 
dExecutable: D:\dev\cpp\Qt\Qt_mingw\LiveU_windows\LiveU_windows\debug\LiveU_windows.exe 
dDirectory: D:\dev\cpp\Qt\Qt_mingw\LiveU_windows\LiveU_windows
dProject: D:\dev\cpp\Qt\Qt_mingw\LiveU_windows\LiveU_windows (built: D:\dev\cpp\Qt\Qt_mingw\LiveU_windows\LiveU_windows)
dQt: C:\Qt\4.8.2_mingw
dQML server: 127.0.0.1:3768
dSysroot: 
dDebug Source Location: 
dSymbol file: 
dDumper libraries:  C:\Qt\4.8.2_mingw\qtc-debugging-helper\ D:\Qt\qtcreator-2.5.0\qtc-debugging-helper\188129479\ C:\Users\meirmaya\AppData\Local\Nokia\QtCreator\qtc-debugging-helper\188129479\
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: true  (default: false)  ***
dUseToolTips: false  (default: false)
dUseToolTipsInLocalsView: false  (default: false)
dUseToolTipsInBreakpointsView: false  (default: false)
dUseAddressInBreakpointsView: false  (default: false)
dUseAddressInStackView: false  (default: false)
dRegisterForPostMortem: 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 D:/Qt/MinGW-gcc440_1/mingw/bin/gdb.exe -i mi --tty=\\.\pipe\creator-1832-26962
dGDB STARTED, INITIALIZING IT
<1show version
<2-list-features
<3set print object on
<4set breakpoint pending on
<5set print elements 10000
<6set overload-resolution off
<7handle SIGSEGV nopass stop print
<8set unwindonsignal on
<9pwd
<10set width 0
<11set height 0
<12-interpreter-exec console "set breakpoint always-inserted on"
<13-interpreter-exec console "set trust-readonly-sections on"
<14-interpreter-exec console "set auto-solib-add on"
<15-interpreter-exec console "set remotecache on"
<16-interpreter-exec console "maintenance set internal-warning quit no"
<17-interpreter-exec console "maintenance set internal-error quit no"
<18-interpreter-exec console "disassemble 0 0"
<19-interpreter-exec console "python execfile('D:/Qt/qtcreator-2.5.0/share/qtcreator/dumper/bridge.py')"
<20-interpreter-exec console "python execfile('D:/Qt/qtcreator-2.5.0/share/qtcreator/dumper/dumper.py')"
<21-interpreter-exec console "python execfile('D:/Qt/qtcreator-2.5.0/share/qtcreator/dumper/qttypes.py')"
<22-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
>~"GNU gdb 6.8\n"
>~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
>~"This is free software: you are free to change and redistribute it.\n"
>~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
>~"and \"show warranty\" for details.\n"
>~"This GDB was configured as \"i686-pc-mingw32\".\n"
dCALL: SETUP INFERIOR
sSetting up inferior...
<23set substitute-path C:/iwmake/build_mingw_opensource C:/Qt/4.8.2_mingw
<24set substitute-path C:/ndk_buildrepos/qt-desktop/src C:/Qt/4.8.2_mingw
<25set substitute-path C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt C:/Qt/4.8.2_mingw
<26-file-exec-and-symbols "D:/dev/cpp/Qt/Qt_mingw/LiveU_windows/LiveU_windows/debug/LiveU_windows.exe"
>&"show version\n"
>~"GNU gdb 6.8\n"
>~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
>~"This is free software: you are free to change and redistribute it.\n"
>~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
>~"and \"show warranty\" for details.\n"
>~"This GDB was configured as \"i686-pc-mingw32\".\n"
>1^done
dPARSING VERSION: 1^done
d
dUNSUPPORTED GDB VERSION GNU gdb 6.8
dCopyright (C) 2008 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "i686-pc-mingw32".
dGNU gdb 6.8
dCopyright (C) 2008 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "i686-pc-mingw32".
d
dUSING GDB VERSION: 60800, BUILD: 2008
<27-interpreter-exec console "set target-async off"
>2^done,features=["frozen-varobjs","pending-breakpoints"]
dFEATURES: 2^done,data={features=["frozen-varobjs","pending-breakpoints"]}
d
>&"set print object on\n"
>3^done
>&"set breakpoint pending on\n"
>4^done
>&"set print elements 10000\n"
>5^done
>&"set overload-resolution off\n"
>6^done
>&"handle SIGSEGV nopass stop print\n"
>~"Signal        Stop\tPrint\tPass to program\tDescription\n"
>~"SIGSEGV       Yes\tYes\tNo\t\tSegmentation fault\n"
>7^done
>&"set unwindonsignal on\n"
>8^done
>&"pwd\n"
>~"Working directory D:\\dev\\cpp\\Qt\\Qt_mingw\\LiveU_windows\\LiveU_windows.\n"
>9^done
>&"set width 0\n"
>10^done
>&"set height 0\n"
>11^done
>&"Undefined set breakpoint command: \"always-inserted on\".  Try \"help set breakpoint\".\n"
>12^error,msg="Undefined set breakpoint command: \"always-inserted on\".  Try \"help set breakpoint\"."
>13^done
>14^done
>15^done
>&"Undefined maintenance set command: \"internal-warning quit no\".  Try \"help maintenance set\".\n"
>16^error,msg="Undefined maintenance set command: \"internal-warning quit no\".  Try \"help maintenance set\"."
>&"Undefined maintenance set command: \"internal-error quit no\".  Try \"help maintenance set\".\n"
>17^error,msg="Undefined maintenance set command: \"internal-error quit no\".  Try \"help maintenance set\"."
>~"Dump of assembler code from 0x0 to 0x0:\n"
>~"End of assembler dump.\n"
>18^done
>&"Undefined command: \"python\".  Try \"help\".\n"
>19^error,msg="Undefined command: \"python\".  Try \"help\"."
>&"Undefined command: \"python\".  Try \"help\".\n"
>20^error,msg="Undefined command: \"python\".  Try \"help\"."
>&"Undefined command: \"python\".  Try \"help\".\n"
>21^error,msg="Undefined command: \"python\".  Try \"help\"."
>&"Undefined command: \"bbsetup\".  Try \"help\".\n"
>22^error,msg="Undefined command: \"bbsetup\".  Try \"help\"."
>&"set substitute-path C:/iwmake/build_mingw_opensource C:/Qt/4.8.2_mingw\n"
>23^done
>&"set substitute-path C:/ndk_buildrepos/qt-desktop/src C:/Qt/4.8.2_mingw\n"
>24^done
>&"set substitute-path C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt C:/Qt/4.8.2_mingw\n"
>25^done
>26^done
sSetting breakpoints...
dSetting breakpoints...
<28-break-insert -f "\"main.cpp\":17"
>&"No symbol \"target\" in current context.\n"
>27^error,msg="No symbol \"target\" in current context."
dATTEMPT SYNC
>28^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x004014b3",func="qMain(int, char**)",file="main.cpp",fullname="D:\\dev\\cpp\\Qt\\Qt_mingw\\LiveU_windows\\LiveU_windows/main.cpp",line="17",times="0"}
<29info line *0x4014b3
>&"info line *0x4014b3\n"
>~"Line 17 of \"main.cpp\" starts at address 0x4014b3 <_Z5qMainiPPc+259> and ends at 0x4014d6 <_Z5qMainiPPc+294>.\n"
>29^done
dALL COMMANDS DONE; INVOKING CALLBACK
<30maint print msymbols C:/Users/meirmaya/AppData/Local/Temp/gdb_ns_.lY1832
>&"maint print msymbols C:/Users/meirmaya/AppData/Local/Temp/gdb_ns_.lY1832\n"
dHANDLE GDB ERROR: The gdb process was ended forcefully
dGDB PROCESS FINISHED, status 1, code -1073741819
dNOTE: ENGINE ILL ******
dState changed from InferiorSetupRequested(4) to EngineShutdownRequested(20) [master]
dQUEUE: SHUTDOWN ENGINE
dCALL: SHUTDOWN ENGINE
dPLAIN ADAPTER SHUTDOWN 20
dINITIATE GDBENGINE SHUTDOWN IN STATE 4, 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.

该gdb是版本6.8。IIRC Creator推荐7.0,那么您是否尝试过升级GDB


你从哪里得到的GDB?一些mingw发行版中提供的一个已知在使用Qt Creator时会损坏。您可以从这里找到一个Qt Creator团队认为可以使用的工具:

如果您使用64位编译,它可以使用吗?我没有尝试使用64位编译,我需要它使用32位。您是否在优化代码上运行调试器?我想知道您是否在经过优化的代码上设置了断点。我用编译行示例更新了这个问题