[Qt-creator] Remote debugging armv5te using Qt Creator
Christian Kandeler
christian.kandeler at nokia.com
Thu Feb 25 16:33:44 CET 2010
On Thursday 25 February 2010 16:01:38 ext gmenant.ext at orange-ftgroup.com
wrote:
> I'm using Qt Creator 1.3.1.
> About the sysroot, I don't know what I have to put in it (which path). It's
> probably my main problem though ! GDB is looking for libQtGui.so.4 in
> /usr/lib and the file is there (see below). I don't understand why he
> doesn't find it...
Gdb needs to find the libraries from the target device on the host as well, to
display debug information. I assume the Qt libs it finds in /usr/lib are the
x86 versions. You have to tell gdb where on your PC to find the set of target
libraries. The easiest way to do that is to put a copy of the device OS' file
system tree on the host system (only libraries and perhaps header files are
needed) and point the sysroot variable to the respective directory.
Example:
- You copy the relevant files from your device to the directory
/usr/share/cross on your PC, preserving the directory structure.
- Now you have directories such as /usr/share/cross/lib,
/usr/share/cross/usr/lib, /usr/share/cross/usr/include etc.
- Then you set gdb's sysroot variable to /usr/share/cross
- gdb should now pick up the right libraries
>> Which commands do you send to gdb when manually debugging?>
>
> Nothing for now but Qt Creator sends a lot of commands and I don't know why
> and how to configure them.
Well, it must get the right sysroot from somewhere. Perhaps it has been set up
with the correct sysroot at configure time? You can check that by starting gdb
and typing "show sysroot".
>>> 2 - What is the purpose of gdb startup file and gdbserver startup file ?
>>> What is the syntax ?
>
>> It's an sh script intended for doing preparations on the server side, like
>> copying your program or starting gdbserver. See the email you referenced
>> above for an example.
>
> Ok, I will try it when other points will be ok. Even with a embedded linux
> on my target, I will be able to copy and lanch gdbserver automatically ?
Yes, scp/ssh can do that.
Christian
More information about the Qt-creator-old
mailing list