GDB quits unexpectedly with error code 1.
-
wrote on 19 Nov 2013, 12:15 last edited by
I am not being able to debug my c++ code because the debugger shows the error message saying it quit unexpectedly with error code 1. What is the way out?
Config:
Qt Creator: 2.7.2 (based on Qt 5.1.0 - 64 bit)
Qt 5.1.0
OS: Mac
Compiler: Clang 3.2Debugger log messages:
sStarting debugger "QmlCppEngine" for ABI "x86-macos-generic-mach_o-64bit"...
dStart parameters: 'gui' mode: 1
dABI: x86-macos-generic-mach_o-64bit
dLanguages: c++ qml
dExecutable: /Users/folsom/Saurabh/software/UI_ROOT/trunk/source/gui/gui.app/Contents/MacOS/gui -qmljsdebugger=port:3768,block
dDirectory: /Users/folsom/Saurabh/software/UI_ROOT/trunk/source/gui/gui.app/Contents/MacOS
dDebugger: /usr/bin/gdb
dProject: /Users/folsom/Saurabh/software/UI_ROOT/trunk/source (built: /Users/folsom/Saurabh/software/UI_ROOT/trunk/source)
dQML server: 127.0.0.1:3768
dRemote: :0
dSysroot:
dDebug Source Location: /usr/src/debug/qt5base/src/corelib:/usr/src/debug/qt5base/src/gui:/usr/src/debug/qt5base/src/network:/usr/src/debug/qt5base/src/v8:/usr/src/debug/qt5declarative/src/qml
dSymbol file:
dDumper libraries: /Users/folsom/Qt5.1.0//5.1.0/clang_64//qtc-debugging-helper/libdumper.dylib /Users/folsom/Qt5.1.0//5.1.0/clang_64//qtc-debugging-helper/ /Users/folsom/Qt5.1.0/Qt Creator.app/Contents/qtc-debugging-helper/3765330530/ /Users/folsom/Library/Application Support/QtProject/QtCreator/qtc-debugging-helper/3765330530/
dDebugger settings:
dUseToolTipsInBreakpointsView: false (default: false)
dUseToolTipsInLocalsView: false (default: false)
dUseToolTips: false (default: false)
dLoadGdbInit: true (default: true)
dUseAddressInStackView: false (default: false)
dUseAddressInBreakpointsView: false (default: false)
dBreakpointsFullPath: false (default: false)
dSwitchModeOnExit: false (default: false)
dCloseBuffersOnExit: false (default: false)
.........
.........
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4) [master]
dQUEUE: SETUP INFERIOR
dQUEUE: SETUP INFERIORdCALL: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4)
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4)
dQUEUE: SETUP INFERIOR
dCALL: SETUP INFERIOR
dNOTE: INFERIOR SETUP OK
dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6)
dCALL: SETUP INFERIOR
<25-exec-arguments -qmljsdebugger=port:3768,block
<26-file-exec-and-symbols "/Users/folsom/Saurabh/software/UI_ROOT/trunk/source/gui/gui.app/Contents/MacOS/gui"
dUNEXPECTED GDB STDERR: No symbol table is loaded. Use the "file" command.
dNo symbol table is loaded. Use the "file" command.23^error,msg="No symbol table is loaded. Use the \"file" command."
24^error,msg="No symbol table is loaded. Use the \"file" command."
25^done,time={wallclock="0.00002",user="0.00001",system="0.00000",start="1384860945.770213",end="1384860945.770229"}
dUNEXPECTED GDB STDERR: gdb stack crawl at point of internal error:
dUNEXPECTED GDB STDERR: 0 gdb-i386-apple-darwin 0x000000010b315f31 internal_vproblem + 174
dUNEXPECTED GDB STDERR: 1 gdb-i386-apple-darwin 0x000000010b315e79 internal_verror + 30
dUNEXPECTED GDB STDERR: 2 gdb-i386-apple-darwin 0x000000010b315579 do_cleanups + 0
dUNEXPECTED GDB STDERR: 3 gdb-i386-apple-darwin 0x000000010b318e86 hex_string_custom + 0
dUNEXPECTED GDB STDERR: 4 gdb-i386-apple-darwin 0x000000010b35287b macho_symfile_read + 1244
dUNEXPECTED GDB STDERR: 5 gdb-i386-apple-darwin 0x000000010b25f161 syms_from_objfile + 1270
d6 gdb-i386-apple-darwin 0x000000010b25ff3a symbol_file_add_with_addrs_or_offsets_using_objfile + 744
dUNEXPECTED GDB STDERR: 7 gdb-i386-apple-darwin 0x000000010b2606b5 symbol_file_add_main_1 + 227
d8 gdb-i386-apple-darwin 0x000000010b260852 symbol_file_command + 134
dUNEXPECTED GDB STDERR: 9 gdb-i386-apple-darwin 0x000000010b2a94af file_command + 29
dUNEXPECTED GDB STDERR: 10 gdb-i386-apple-darwin 0x000000010b313862 execute_command + 479
dUNEXPECTED GDB STDERR: 11 gdb-i386-apple-darwin 0x000000010b22c423 mi_execute_cli_command + 124
d12 gdb-i386-apple-darwin 0x000000010b22b6b5 captured_mi_execute_command + 490
dUNEXPECTED GDB STDERR: 13 gdb-i386-apple-darwin 0x000000010b28500a catch_exception + 174
dUNEXPECTED GDB STDERR: 14 gdb-i386-apple-darwin 0x000000010b22b39d mi_execute_command + 174~"/SourceCache/gdb/gdb-1824/src/gdb/macosx/machoread.c:739: internal-error: assertion failure in function "int macho_read_indirect_symbols(bfd *, struct bfd_mach_o_dysymtab_command *, struct bfd_mach_o_symtab_command *, struct objfile *)": (strlen (sname) + sizeof ("dyld_stub_") + 1) < 4096\n\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\n"
dGDB PROCESS FINISHED, status 0, code 1
dNOTE: ENGINE ILL ****** -
wrote on 21 Nov 2013, 12:24 last edited by
You could try to upgrade gdb. The one from Apple is really old.
You could also upgrade to Qt Creator 3.0 beta and try LLDB instead of GDB. That is the debugger XCode seems to use nowadays from what I hear.
-
wrote on 28 Nov 2013, 20:07 last edited by
It's GDB crashing when reading debug info. There is nothing Qt Creator can do here. Either compile with GCC or use LLDB for debugging, but for the latter you really need Qt Creator "latest" (3.0 beta, or rc if that's out)