How debugger with Qt on target from host?
-
-
Try change your setup in a way that allows ssh connection without any extra options.
-
This looks like you either did not specify the sysroot correctly, or the sysroot misses some libraries. At the very least, copy the contents of /lib/* from the target to $sysroot/lib/* on the host.
-
-
-
what do you mean "ssh connection without any extra options"?
-
I init the sysyroot to be the directory to the copy of the target root on the host, and I get this error:
"Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code."
I can't find any information about the right arguments for the debbuger...
-
-
-
Just ssh root@1.0.0.1, no -o ‘StrictHostKeyChecking no’
-
Pastebin the debugger log and put a link here (contents of the right pane of Windows->Views->Debugger Log)
-
-
-
when I try only ssh root@1.0.0.1 , I get this message:
"RSA host key for 1.0.0.1 has changed and you have requested strict checking.
Host key verification failed." -
The copy of the board root is /ROOT
The executable and the file for debug are in /DEBUG-ROOT/MyProject
the debug output :
dQUIT DEBUGGER REQUESTED IN STATE 11
dState changed from InferiorRunOk(11) to InferiorStopRequested(13).
dCALL: INTERRUPT INFERIOR
sStop requested...
dTRYING TO INTERRUPT INFERIOR
<83-exec-interrupt
83^done
*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0x2c80e550",func="??",args=[]},thread-id="1",stopped-threads="all"
dNOTE: INFERIOR STOP OK
dNOTE: ... WHILE DYING.
dNOTE: ... FORWARDING TO 'STOP OK'.
dState changed from InferiorStopRequested(13) to InferiorStopOk(14).
dState changed from InferiorStopOk(14) to InferiorShutdownRequested(17).
dQUEUE: SHUTDOWN INFERIOR
dNOTE: ... IGNORING STOP MESSAGE
dCALL: SHUTDOWN INFERIOR
<84detach
&"detach\n"
~"Ending remote debugging.\n"
=thread-group-exited,id="i1"
sThread group i1 exited
=library-unloaded,id="/lib/ld-linux.so.3",target-name="/lib/ld-linux.so.3",host-name="/home/eyal/Desktop/ROOT/lib/ld-linux.so.3",thread-group="i1"
sLibrary /lib/ld-linux.so.3 unloaded
84^done
dINFERIOR SUCCESSFULLY SHUT DOWN
dState changed from InferiorShutdownRequested(17) to InferiorShutdownOk(19).
dState changed from InferiorShutdownOk(19) to EngineShutdownRequested(20).
dQUEUE: SHUTDOWN ENGINE
dCALL: SHUTDOWN ENGINE
dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
<85-gdb-exit
85^exit
dGDB CLAIMS EXIT; WAITING
dGDB PROCESS FINISHED, status 0, code 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22).
dState changed from EngineShutdownOk(22) to DebuggerFinished(23).
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
dATTEMPT SYNC
sStarting debugger 'GdbEngine' for ABI 'unknown-unknown-unknown-unknown-unknown'...
dStart parameters: 'Remote: "1.0.0.1:1234"' mode: 6
dABI: unknown-unknown-unknown-unknown-unknown
dExecutable: /DEBUG-ROOT/MyProject
dDebugger: /home/eyal/QtSDK/pythongdb/gdb
dQML server: 127.0.0.1:3768
dRemote: 1.0.0.1:1234, arm
dGnu target: arm-none-linux-gnueabi
dSysroot: /home/eyal/Desktop/ROOT
dDebug Source Loaction: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8:/home/eyal/Desktop/ROOT/usr/src/debug/qtdeclarative/src/declarative/qml
dSymbol file:
dDumper libraries:
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)
dLoadGdbInit: true (default: true)
dScriptFile: (default: )
dWatchdogTimeout: 20 (default: 20)
dAutoEnrichParameters: true (default: false) ***
dTargetAsync: true (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: true (default: false) ***
dBreakOnFatal: true (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).
dQUEUE: SETUP ENGINE
dCALL: SETUP ENGINE
dTRYING TO START ADAPTER
dENABLING TEST CASE: 0
dSTARTING /home/eyal/QtSDK/pythongdb/gdb -i mi
dGDB STARTED, INITIALIZING IT
<86show version
<87-list-features
<88set print object on
<89set breakpoint pending on
<90set print elements 10000
<91set overload-resolution off
<92handle SIGSEGV nopass stop print
<93set unwindonsignal on
<94pwd
<95set width 0
<96set height 0
<97set auto-solib-add on
<98-interpreter-exec console "maintenance set internal-warning quit no"
<99-interpreter-exec console "maintenance set internal-error quit no"
<100-interpreter-exec console "disassemble 0 0"
<101-interpreter-exec console "python execfile('/home/eyal/QtSDK/QtCreator/share/qtcreator/dumper/bridge.py')"
<102-interpreter-exec console "python execfile('/home/eyal/QtSDK/QtCreator/share/qtcreator/dumper/dumper.py')"
<103-interpreter-exec console "python execfile('/home/eyal/QtSDK/QtCreator/share/qtcreator/dumper/qttypes.py')"
<104-interpreter-exec console "bbsetup"
dADAPTER SUCCESSFULLY STARTED
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
dQUEUE: SETUP INFERIOR
dCALL: SETUP INFERIOR
sSetting up inferior...
<105set debug-file-directory /home/eyal/debug.txt
<106directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib
<107directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui
<108directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network
<109directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8
<110directory /home/eyal/Desktop/ROOT/usr/src/debug/qtdeclarative/src/declarative/qml
<111set architecture arm
<112set gnutarget arm-none-linux-gnueabi
<113set sysroot /home/eyal/Desktop/ROOT
<114set target-async on
<115-file-exec-and-symbols "/DEBUG-ROOT/MyProject"=thread-group-added,id="i1"
-
~"GNU gdb (GDB) 7.2\n"
~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
~"License 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.\n"
~"This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".\nFor bug reporting instructions, please see:\n"
~"http://www.gnu.org/software/gdb/bugs/.\n"
&"/home/eyal/.gdbinit:1: Error in sourced command file:\n"
&"192.168.23.44:1234: Network is unreachable.\n"
&"show version\n"
~"GNU gdb (GDB) 7.2\n"
~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
~"License 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.\n"
~"This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".\nFor bug reporting instructions, please see:\n"
~"http://www.gnu.org/software/gdb/bugs/.\n"
86^done
dPARSING VERSION: 86^done
d
dSUPPORTED GDB VERSION GNU gdb (GDB) 7.2
dCopyright (C) 2010 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 "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".
dFor bug reporting instructions, please see:
dhttp://www.gnu.org/software/gdb/bugs/.
dGNU gdb (GDB) 7.2
dCopyright (C) 2010 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 "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".
dFor bug reporting instructions, please see:
dhttp://www.gnu.org/software/gdb/bugs/.
d
dUSING GDB VERSION: 70200, BUILD: 2010
87^done,features=["frozen-varobjs","pending-breakpoints","thread-info","python"]
dFEATURES: 87^done,data={features=["frozen-varobjs","pending-breakpoints","thread-info","python"]}
d
&"set print object on\n"
88^done
&"set breakpoint pending on\n"
89^done
&"set print elements 10000\n"
90^done
&"set overload-resolution off\n"
91^done
&"handle SIGSEGV nopass stop print\n"
~"Signal Stop\tPrint\tPass to program\tDescription\n"
~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n"
92^done
&"set unwindonsignal on\n"
93^done
&"pwd\n"
~"Working directory /home/eyal.\n"
94^done
&"set width 0\n"
95^done
&"set height 0\n"
96^done
&"set auto-solib-add on\n"
97^done
98^done
99^done
&"A syntax error in expression, near0'.\n" 100^error,msg="A syntax error in expression, near
0'."
101^done
102^done
103^done
~"dumpers=[{type="QLinkedList",formats=""},{type="QSize",formats=""},{type="QFileInfo",formats=""},{type="QAbstractItemModel",formats=""},{type="std__stack",formats=""},{type="QTextDocument",formats=""},{type="QTJSC__JSValue",formats=""},{type="__gnu_cxx__hash_set",formats=""},{type="QStringList",formats=""},{type="QRegion",formats=""},{type="std__wstring",formats=""},{type="QString",formats="Inline,Separate Window",editable="true"},{type="QTextCodec",formats=""},{type="QBasicAtomicInt",formats=""},{type="QScriptValue",formats=""},{type="QTime",formats=""},{type="QSharedData",formats=""},{type="std__vector",formats="",editable="true"},{type="QRegExp",formats=""},{type="QTextCursor",formats=""},{type="QxXmlAttributes",formats=""},{type="QDateTime",formats=""},{type="QList",formats=""},{type="QStandardItem",formats=""},{type="std__deque",formats=""},{type="QFixed",formats=""},{type="QHash",formats=""},{type="QSharedPointer",formats=""},{type="QUrl",formats=""},{type="std__set",formats=""},{type="std__list",formats=""},{type="std__basic_string",formats=""},{type="QPoint",formats=""},{type="QHostAddress",formats=""},{type="QStack",formats=""},{type="QScopedPointer",formats=""},{type="QRectF",formats=""},{type="QMultiMap",formats=""},{type="QMapNode",formats=""},{type="QModelIndex",formats="Normal,Enhanced"},{type="QLocale",formats=""},{type="QSharedDataPointer",formats=""},{type="QVariant",formats=""},{type="string",formats="",editable="true"},{type="QBasicAtomicPointer",formats=""},{type="QVector",formats="",editable="true"},{type="QDate",formats=""},{type="QFile",formats=""},{type="QAtomicInt",formats=""},{type="TBuf",formats=""},{type="QWeakPointer",formats=""},{type="QSizeF",formats=""},{type="__m128 -
",formats="As Floats,As Doubles"},{type="boost__optional",formats=""},{type="wstring",formats=""},{type="QPointF",formats=""},{type="TLitC",formats=""},{type="QRect",formats=""},{type="QByteArray",formats=""},{type="QMap",formats=""},{type="boost__shared_ptr",formats=""},{type="QChar",formats=""},{type="QDir",formats=""},{type="QPixmap",formats=""},{type="QFlags",formats=""},{type="std__map",formats=""},{type="QHashNode",formats=""},{type="QTemporaryFile",formats=""},{type="QObject",formats=""},{type="Eigen__Matrix",formats=""},{type="std__string",formats="",editable="true"},{type="QImage",formats="Normal,Displayed"},{type="QSet",formats=""},],hasInferiorThreadList="1"\n"
104^done
&"set debug-file-directory /home/eyal/debug.txt\n"
105^done
&"directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib\n"
&"Warning: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib: No such file or directory.\n"
~"Source directories searched: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:$cdir:$cwd\n"
106^done
&"directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui\n"
&"Warning: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui: No such file or directory.\n"
~"Source directories searched: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:$cdir:$cwd\n"
107^done
&"directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network\n"
&"Warning: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network: No such file or directory.\n"
~"Source directories searched: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:$cdir:$cwd\n"
108^done
&"directory /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8\n"
&"Warning: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8: No such file or directory.\n"
~"Source directories searched: /home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:$cdir:$cwd\n"
109^done
&"directory /home/eyal/Desktop/ROOT/usr/src/debug/qtdeclarative/src/declarative/qml\n"
&"Warning: /home/eyal/Desktop/ROOT/usr/src/debug/qtdeclarative/src/declarative/qml: No such file or directory.\n"
~"Source directories searched: /home/eyal/Desktop/ROOT/usr/src/debug/qtdeclarative/src/declarative/qml:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/v8:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/network:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/gui:/home/eyal/Desktop/ROOT/usr/src/debug/qt5base/src/corelib:$cdir:$cwd\n"
110^done
&"set architecture arm\n"
~"The target architecture is assumed to be arm\n"
111^done
&"set gnutarget arm-none-linux-gnueabi\n"
112^done
&"set sysroot /home/eyal/Desktop/ROOT\n"
113^done
&"set target-async on\n"
114^done
115^done
<116target remote 1.0.0.1:1234
&"target remote 1.0.0.1:1234\n"
~"Remote debugging using 1.0.0.1:1234\n"
=thread-group-started,id="i1",pid="42000"
sThread group i1 created
dTaking notice of pid 42000
=thread-created,id="1",group-id="i1"
sThread 1 created
=library-loaded,id="/lib/ld-linux.so.3",target-name="/lib/ld-linux.so.3",host-name="/home/eyal/Desktop/ROOT/lib/ld-linux.so.3",symbols-loaded="0",thread-group="i1"
sLibrary /lib/ld-linux.so.3 loaded
~"Reading symbols from /home/eyal/Desktop/ROOT/lib/ld-linux.so.3..."
sReading /home/eyal/Desktop/ROOT/lib/ld-linux.so.3......
~"(no debugging symbols found)...done.\n"
~"Loaded symbols for /home/eyal/Desktop/ROOT/lib/ld-linux.so.3\n"
~"0x2c80e550 in ?? ()\n"
*stopped,frame={addr="0x2c80e550",func="??",args=[]},thread-id="1",stopped-threads="all"
116^done
dINFERIOR STARTED
sAttached to stopped application
sSetting breakpoints...
dSetting breakpoints...
<117-break-insert -f ""operandslistmanageritem.cpp":58"
<118-break-insert -f ""operandslistmanageritem.cpp":152"
<119-break-insert -f ""recentlyusedappsupdateritem.cpp":21"
dATTEMPT SYNC
&"No symbol table is loaded. Use the "file" command.\n"
117^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="\\"operandslistmanageritem.cpp":58",times="0",original-location="\\"operandslistmanageritem.cpp":58"}
&"No symbol table is loaded. Use the "file" command.\n"
118^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="\\"operandslistmanageritem.cpp":152",times="0",original-location="\\"operandslistmanageritem.cpp":152"}
&"No symbol table is loaded. Use the "file" command.\n"
119^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="\\"recentlyusedappsupdateritem.cpp":21",times="0",original-location="\\"recentlyusedappsupdateritem.cpp":21"}
dALL COMMANDS DONE; INVOKING CALLBACK -
<120maint print msymbols /tmp/gdb_ns_.Ny2370
&"maint print msymbols /tmp/gdb_ns_.Ny2370\n"
120^done
dFOUND NON-NAMESPACED QT
<121-break-insert -f 'qWarning'
<122-break-insert -f 'qFatal'
&"Function "qWarning" not defined.\n"
121^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="'qWarning'",times="0",original-location="'qWarning'"}
&"Function "qFatal" not defined.\n"
122^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="'qFatal'",times="0",original-location="'qFatal'"}
<123-break-commands 5 return
dNOTE: INFERIOR SETUP OK
dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
dQUEUE: RUN ENGINE
dCALL: RUN ENGINE
dNOTE: ENGINE RUN AND INFERIOR STOP OK
dState changed from EngineRunRequested(7) to InferiorStopOk(14).
dNOTE: INFERIOR RUN REQUESTED
dState changed from InferiorStopOk(14) to InferiorRunRequested(10).
sRunning requested...
<124-exec-continue
123^done
124^running
dNOTE: INFERIOR RUN OK
dState changed from InferiorRunRequested(10) to InferiorRunOk(11).
*running,thread-id="all" -
Hi everyone,
I'm currently having the same issues as you with settings sysroot path since I'm using QtCreator 2.5.1 (before I used 2.2.1 and no problem at all with remote debugging).
Have you successully find out this issue? I'm curious about the solution!
Thanks
-
Hi Noth35 ,
Sorry but i didn't figure out how to fix this and make it work....
however, I understand that we need to config this property to be the directory of the copy of the device filesystem on the computer(the root of filesystem).
when I config this i get into debug mode, but the debbuger can't stop on breakpoints...I will be happy to know if you will find solution for this isue.
-
Hi goli,
Thanks for your reply. I did really hope you had the solution.
I'll continue to look for a way to set it, I will reply if I'll find something...So you debug with printf/qdebug ;)?
-
In Qt Creator 2.5 the sysroot is part of the Qt version. Since that is not an ideal place in 2.6 we have moved it again;-)
Sorry for the inconvenience. I think the 2.6 version will fix quite a few issues wrt. remote devices and hope we can keep things in this area a bit more stable going forward.
-
Thanks for your reply.
Is that also true for version 2.4? Seems to have same issue with it...
I'll keep using previous version of QtCreator, awaiting 2.6.