2012-06-17 51 views
0

我下載了QT Creator 2.5,使用了我從Qt站點下載的名爲MinGW-gcc440_1 的mingw在QT Creator 2.5和windows全局路徑中設置了路徑。 im在調試模式下,當我編譯,但是當我嘗試調試與GDB 即時通訊錯誤msg窗口中獲取此錯誤:意外的GDB退出標題,gdb進程崩潰。使用 IM窗口7,64位,但克++在32位編譯, 我試圖尋找一些日誌中QT創建者2.5與沒有運氣..Qt創建者2.5:意外的GDB退出,我怎麼知道爲什麼GDB崩潰了?

編譯行例如:

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. 
+0

如果你在64位編譯,它是否工作? – cmannett85

+0

我沒有嘗試在64位編譯,我需要它32位 – user63898

+0

你在優化代碼上運行調試器嗎?我想知道你是否已經對已經優化過的代碼設置了斷點。 – cmannett85

回答

0

gdb是版本6.8。 IIRC Creator建議7.0,所以你嘗試升級GDB?

你從哪裏得到GDB?從Qt Creator中使用某些mingw發行版發行的版本已知會中斷。你可以抓住一個Qt Creator團隊認爲能從這裏工作的地方:http://builds.qt-project.org/