You are not logged in.


Monday, January 28th 2013, 10:08am

QtCreator 2.6: remote Linux debugging issues

Hi all.

I'm encountering some issues when remote debugging a Qt application using QtCreator 2.6.1.

My scenario:
- Target: ARM embedded Linux with Qt4.7 and gdbserver
- Host: x86 running QtCreator 2.6.1 and gdb

My settings:
On QtCreator, I have added compiler, Qt libraries, device and kit on Tools->Options->Build&Run:

Name: mytarget
Type: Generic Linux
Machine type: Physical Device
Authentication Type: Password
Host name: <target IP address>
Free Ports: 1000-10100
SSH port: 22
Timeout: 5s
Username: root
Password: <my password>

Name: myboard
Device type: Generic Linux Device
Device: mytarget
Sysroot: (empty)
Compiler: link to the compiler I have added
Debugger: link to the cross gdb (i.e., arm-linux-gdb)
Qt version: link to the new Qt I have added
Qt mkspec: link to a specific mkspec that I have created starting from linux-g++

With these settings, I have been able of successfully cross-compiling my application.

When trying remote debugging, the only viable method seems to be "Attach to Running Application", since:
- "Start and Debug external application" doesn't let select my kit (i.e., only "Desktop" is available)
- "Attach to Remote Debug Server" doesn't let select my kit (i.e., only "Desktop" is available)
- "Start Remote Debug Server Attached to Process" does nothing

Therefore, I have started my remote application and used "Attach to Running Application" to start remote debugging.

The result of "Attach to Running Application", however, changes based on kit's sysroot setting:
- If I leave sysroot empty, then remote debugging complains with the error message "Cannot find ABI for remote process"
- If I set sysroot equal to a copy of the remote filesystem, then remote debugging complains with the error message "Cannot find local executable for remote process"
- Finally, if I set sysroot equal to the build directory of the project, remote debugging works

I would really appreciate if someone can answer one or more of the following questions:

1. What is the purpose of kit's sysroot field and what it should contain ?

2. I assume that the kit should be a property independent by the specific project. So, why remote debugging works only if I set sysroot equal to the application build directory ?

3. What is the right method for remote debugging of a Qt application in my scenario ? "Attach to Running Application ?

4. Why "Start and Debug external application" and "Attach to Remote Debug Server" don't let me select my kit ?

Many thanks for your help.


Monday, January 28th 2013, 11:36am

FYI, I got the answer here: I was missign the delpoyment settings, which seem to be mandatory to have a working debugging.