Remote debugging with QtCreator



  • I have established a ssh connection between target device and my Desktop PC Ubuntu 14.04.
    I have the debug binaries flashed on to the target .

    I have started gdbserver in my target device with port 2345 for my executable.
    To start remote debugging in Qt creator I give
    Debug->STart Debugging->Attach to running debug server

    I get the below error on starting the debug

    Error:
    Debugging starts
    Could not load shared library symbols for linux-gate.so.1.
    Do you need "set solib-search-path" or "set sysroot"?Debugging has finished

    Gdbserver version in target:
    GNU gdbserver (crosstool-NG 1.21.0) 7.10

    Desktop details:
    Ubuntu 14.04
    Qtcreator version 4.0.1
    Qt 5.6.1

    Configuration in Qtcreator for gdb:
    Additional attach commands ( gdb of Qtcreator)
    set solib-search-path /home/XXX/xxx/xxx_GEN/xxx/generated/staging/xxxx86make/usr/lib/:/home/XXX/xxx/xxx_GEN/xxx/generated/bin/xxxx86make/debug/
    set handle SIG32 noprint nostop
    set handle SIG64 noprint nostop
    set detach-on-fork on

    Sysroot path is set in Build & Run configuration of Qtcreator.

    I find linux-gate library is a dynamic virtual lib that is embedded as part of the binary. Any idea why this is not loading ?


  • Moderators

    @Veepee said in Remote debugging with QtCreator:

    linux-gate.so.1

    it can depend on other libraries.
    What does "ldd linux-gate.so.1" say?



  • I cannot give ldd linux-gate.so.1 because linux-gate is a virtual dynamic lib and does not exist in the system

    ldd linux-gate.so.1

    ldd: ./linux-gate.so.1: No such file or directory



  • This looks to be an issue with gdb 7.7.1
    The issue gets resolved when I upgrade to 7.8 or later.


  • Moderators

    @Veepee Regarding your use of the ldd - you need to pass the whole path to the library so it can actually find it...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.