Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator 2.7.1 and Qt 4.8.4 Cannot Remotely Debug Library

Using Qt Creator 2.7.1 and Qt 4.8.4, I made a Qt library and a simple Qt app that dynamically links against this library. I am attempting to remotely deploy and debug my App and step into my library functions when I call them. I can successfully set breakpoints and debug remotely, but I cannot step into my library functions using the debugger ( gdb ). When I first remotely launch my application using QtCreator in debug mode, I am met with the following warnings:

Could not load shared library symbols for 7 libraries, e.g. libcustom-stuff.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?

My debugger is setup using QtCreator as shown in these images ( Note that I have switched both the 'Target Path' and 'Path' in image #3 but it did not help: enter image description hereenter image description hereenter image description here

My 'Kit' is setup as follows:

enter image description here

In the 'Debugger Log' within Qt Creator I entered the 'Command':

info sharedlibrary

To which I got the response:

>~"From        To          Syms Read   Shared Object Library\n"
>~"0x400007e0  0x40011bf0  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/lib/ld-linux.so.3\n"
>~"                        No          libcustom-stuff.so.1\n"
>~"0x4006d018  0x400d7124  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtDBus.so.4\n"
>~"0x401065c4  0x4013dd18  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtXml.so.4\n"
>~"0x40172430  0x4024c1b4  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtNetwork.so.4\n"

I also ensured that both the library and app were built with:

CONFIG+=declarative_debug

In the 'Compile Output' pane for both the library and app I see the '-g' flag.

They both reside in the same directory on the file system so what is going on! Howcome I can debug and set breakpoints in the App, but not step into the Library calls? Any ideas are greatly appreciated.

UPDATE:

As per the suggestion by kikeenrique, I tried to load the debugging symbols from my Ubuntu Host ( not the ARM target ):

GNU gdb (Ubuntu/Linaro 7.4-0~69~lucid1) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Welcome to Fluke GDB Init Script for QtCreator
Reading symbols from /home/user/proj/output/exported-nfs/home/user/libcustom-stuff.so.1.0.0...done.
(gdb)

It seems GDB could load the symbols at least..

like image 770
PhilBot Avatar asked May 31 '13 19:05

PhilBot


1 Answers

Are you using a different architecture for your remote app?

If they are different you would need to use the same gdb server and client arch.

Try setting LD_LIBRARY_PATH in your project->build & Run->build environment with the path to your library.

like image 123
kikeenrique Avatar answered Sep 28 '22 05:09

kikeenrique