Hello, I'm currently trying to debug remotely an application through gdb using Qt Creator. Majo had the same issue previously (http://www.mail-archive.com/qt-creator@trolltech.com/msg02532.html) but I don't know what was its final results.
---------------------------------------------------------- State of the art : I've gdbserver on my device and gdb on my host. Gdb is configured into Qt Creator (Tools>Options>Debug>Gdb) without gdb startup script. My application is built using the right compiler (out of Qt Creator) My application is on the device. ---------------------------------------------------------- Procedure : I launch my application using gdbserver on the device : gdbserver host:port ./application I start debugging using gdb in Qt Creator : Debug>Start Debugging>Start and attach to remote application (using i386 option) ---------------------------------------------------------- Log on the device console : Process KeycodeTester created; pid = 1074 Listening on port 2345 Remote debugging from host 192.168.2.200 gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread ---------------------------------------------------------- Log on the Qt Creator gdb console : sLancer le débogueur pour la chaîne d'outils 'GCC'... dDebugger settings: dUseAlternatingRowColours: false (default: false) dUseMessageBoxForSignals: true (default: true) dAutoQuit: false (default: false) dLogTimeStamps: true (default: false) dUseDebuggingHelper: true (default: true) dUseCustomDebuggingHelperLocation: false (default: false) dCustomDebuggingHelperLocation: (default: ) dDebugDebuggingHelpers: false (default: false) dUseCodeModel: true (default: true) dUseToolTips: false (default: false) dUseToolTipsInLocalsView: false (default: false) dUseToolTipsInBreakpointsView: false (default: false) dUseAddressInBreakpointsView: false (default: false) dUseAddressInStackView: false (default: false) dLocation: /my_OE/tmp/cross/armv5te/bin/arm-angstrom-linux-gnueabi-gdb (default: gdb) dEnvironment: (default: ) dScriptFile: (default: ) dWatchdogTimeout: 20 (default: 20) dMaximalStackDepth: 20 (default: 20) dListSourceFiles: false (default: false) dSkipKnownFrames: false (default: false) dEnableReverseDebugging: false (default: false) dAllPluginBreakpoints: true (default: true) dSelectedPluginBreakpoints: false (default: false) dNoPluginBreakpoints: false (default: false) dSelectedPluginBreakpointsPattern: .* (default: .*) dUsePreciseBreakpoints: false (default: true) d/home/gdrz9888/dev/test/KeycodeTester/KeycodeTester0xa014960 dState changed from DebuggerNotReady(0) to EngineStarting(1). dState changed from EngineStarting(1) to AdapterStarting(2). dTRYING TO START ADAPTER sNo server start script given. Assuming server runs already. dSTARTING GDB dGDB STARTED, INITIALIZING IT <581show version <582-interpreter-exec console "help bb" <583set print static-members off <584set breakpoint pending on <585set print elements 10000 <586set overload-resolution off <587handle SIGSEGV nopass stop print <588set unwindonsignal on <589set width 0 <590set height 0 <591set environment LD_PRELOAD /home/gdrz9888/qtsdk-2010.01/qt/qtc-debugging-helper/libgdbmacros.so dState changed from AdapterStarting(2) to AdapterStarted(3). dADAPTER SUCCESSFULLY STARTED sDémarrage de l'inférieur... dState changed from AdapterStarted(3) to InferiorStarting(6). <592set architecture i386 <593-file-exec-and-symbols "/home/gdrz9888/dev/test/KeycodeTester/KeycodeTester" t17:10:08.892 >~"GNU gdb 6.8\n" t17:10:08.892 >~"Copyright (C) 2008 Free Software Foundation, Inc.\n" t17:10:08.893 >~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n" t17:10:08.893 >~"This is free software: you are free to change and redistribute it.\n" t17:10:08.893 >~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n" t17:10:08.893 >~"and \"show warranty\" for details.\n" t17:10:08.893 >~"This GDB was configured as \"--host=x86 --target=arm-angstrom-linux-gnueabi\".\n" t17:10:08.893 t17:10:08.981 >&"show version\n" t17:10:08.981 >~"GNU gdb 6.8\n" t17:10:08.981 >~"Copyright (C) 2008 Free Software Foundation, Inc.\n" t17:10:08.981 >~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n" t17:10:08.981 >~"This is free software: you are free to change and redistribute it.\n" t17:10:08.981 >~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n" t17:10:08.981 >~"and \"show warranty\" for details.\n" t17:10:08.981 >~"This GDB was configured as \"--host=x86 --target=arm-angstrom-linux-gnueabi\".\n" t17:10:08.981 >581^done tResponse time: show version: 0.318 s dVERSION: 581^done,{logstreamoutput="show version\n",consolestreamoutput="GNU gdb 6.8\nCopyright (C) 2008 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"--host=x86 --target=arm-angstrom-linux-gnueabi\".\nGNU gdb 6.8\nCopyright (C) 2008 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"--host=x86 --target=arm-angstrom-linux-gnueabi\".\n"} d dGDB VERSION: 60800, BUILD: 0 t17:10:08.982 t17:10:08.982 >&"Undefined command: \"bb\". Try \"help\".\n" t17:10:08.982 >582^error,msg="Undefined command: \"bb\". Try \"help\"." tResponse time: -interpreter-exec console "help bb": 0.319 s t17:10:08.982 t17:10:08.982 >&"set print static-members off\n" t17:10:08.982 >583^done tResponse time: set print static-members off: 0.319 s t17:10:08.982 t17:10:08.982 >&"set breakpoint pending on\n" t17:10:08.982 >584^done tResponse time: set breakpoint pending on: 0.319 s t17:10:08.982 t17:10:08.982 >&"set print elements 10000\n" t17:10:08.982 >585^done tResponse time: set print elements 10000: 0.319 s t17:10:08.982 t17:10:08.982 >&"set overload-resolution off\n" t17:10:08.982 >586^done tResponse time: set overload-resolution off: 0.319 s t17:10:08.982 t17:10:08.982 >&"handle SIGSEGV nopass stop print\n" t17:10:08.982 >~"Signal Stop\tPrint\tPass to program\tDescription\n" t17:10:08.982 >~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n" t17:10:08.982 >587^done tResponse time: handle SIGSEGV nopass stop print: 0.318 s t17:10:08.982 t17:10:08.982 >&"set unwindonsignal on\n" t17:10:08.982 >588^done tResponse time: set unwindonsignal on: 0.318 s t17:10:08.982 t17:10:08.982 >&"set width 0\n" t17:10:08.982 >589^done tResponse time: set width 0: 0.318 s t17:10:08.982 t17:10:08.982 >&"set height 0\n" t17:10:08.983 >590^done tResponse time: set height 0: 0.319 s t17:10:08.983 t17:10:08.983 >&"set environment LD_PRELOAD /home/gdrz9888/qtsdk-2010.01/qt/qtc-debugging-helper/libgdbmacros.so\n" t17:10:08.983 >591^done tResponse time: set environment LD_PRELOAD /home/gdrz9888/qtsdk-2010.01/qt/qtc-debugging-helper/libgdbmacros.so: 0.319 s t17:10:08.983 t17:10:08.983 >&"set architecture i386\n" t17:10:08.983 >&"Undefined item: \"i386\".\n" t17:10:08.983 >592^error,msg="Undefined item: \"i386\"." tResponse time: set architecture i386: 0.316 s t17:10:08.983 t17:10:08.983 >593^done tResponse time: -file-exec-and-symbols "/home/gdrz9888/dev/test/KeycodeTester/KeycodeTester": 0.316 s <594target remote 192.168.2.202:2345 t17:10:08.983 t17:10:09.091 >&"target remote 192.168.2.202:2345\n" t17:10:09.091 >~"Remote debugging using 192.168.2.202:2345\n" t17:10:09.091 >~"[New Thread 1078]\n" s[New Thread 1078] t17:10:09.091 >&"warning: Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code." t17:10:09.091 >&"\n" t17:10:09.141 >~"0x40000800 in ?? ()\n" t17:10:09.141 >594^done tResponse time: target remote 192.168.2.202:2345: 0.158 s dState changed from InferiorStarting(6) to InferiorStopped(13). dINFERIOR STARTED sAttaché au processus inférieur. <595set substitute-path /var/tmp/qt-x11-src-4.6.1 /home/gdrz9888/qtsdk-2010.01/qt sDéfinit les points d'arrêts... <596-break-list t17:10:09.142 t17:10:09.180 >&"set substitute-path /var/tmp/qt-x11-src-4.6.1 /home/gdrz9888/qtsdk-2010.01/qt\n" t17:10:09.180 >595^done tResponse time: set substitute-path /var/tmp/qt-x11-src-4.6.1 /home/gdrz9888/qtsdk-2010.01/qt: 0.038 s t17:10:09.180 t17:10:09.180 >596^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]} tResponse time: -break-list: 0.038 s dALL COMMANDS DONE; INVOKING CALLBACK dBREAKPOINTS SET, CONTINUING INFERIOR STARTUP dState changed from InferiorStopped(13) to InferiorRunningRequested(8). <597-exec-continue t17:10:09.181 t17:10:09.230 >597^running dState changed from InferiorRunningRequested(8) to InferiorRunning(10). sEn cours d'éxecution... tResponse time: -exec-continue: 0.05 s t17:10:09.231 t17:10:09.715 >&"warning: .dynamic section for \"/usr/lib/libQtGui.so.4\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.718 >&"Error while mapping shared library sections:\n" t17:10:09.718 >&"/usr/lib/libts-1.0.so.0: No such file or directory.\n" t17:10:09.718 >&"warning: .dynamic section for \"/usr/lib/libpng12.so.0\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.718 >&"warning: .dynamic section for \"/usr/lib/libfreetype.so.6\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.718 >&"warning: .dynamic section for \"/usr/lib/libQtNetwork.so.4\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.719 >&"warning: .dynamic section for \"/usr/lib/libQtCore.so.4\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.719 >&"Error while mapping shared library sections:\n" t17:10:09.719 >&"/usr/lib/libz.so.1: No such file or directory.\n" t17:10:09.719 >&"warning: .dynamic section for \"/lib/librt.so.1\" is not at the expected address\n" t17:10:09.719 >&"warning: difference appears to be caused by prelink, adjusting expectations\n" t17:10:09.719 >&"warning: .dynamic section for \"/lib/libdl.so.2\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.719 >&"warning: .dynamic section for \"/lib/libpthread.so.0\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.719 >&"warning: .dynamic section for \"/usr/lib/libstdc++.so.6\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"warning: .dynamic section for \"/lib/libm.so.6\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"warning: .dynamic section for \"/lib/libgcc_s.so.1\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"warning: .dynamic section for \"/lib/libc.so.6\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"warning: .dynamic section for \"/usr/lib/libssl.so.0.9.8\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"warning: .dynamic section for \"/usr/lib/libcrypto.so.0.9.8\" is not at the expected address (wrong library or version mismatch?)\n" t17:10:09.761 >&"Error while mapping shared library sections:\n" t17:10:09.761 >&"/lib/ld-linux.so.3: No such file or directory.\n" ---------------------------------------------------------- Questions : 1 - Gdbserver is logging an error : "gdbserver: error initializing thread_db library: version mismatch between libthread_db and libpthread" and I have not this error when I'm debugging remotely without Qt Creator. I guess it is due to commands sent by Qt creator to gdb. How can we configure the commands sent by Qt Creator to gdb/gdbserver ? 2 - What is the purpose of gdb startup file and gdbserver startup file ? What is the syntax ? 3 - Where do warnings at the end of the Qt Creator log come from ? Thanks for your answers and also for your work. Guillaume. ********************************* This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. ******************************** _______________________________________________ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator