Remote debugging, no hostname field in Qt Creator 2.7.1?
-
I'm trying to remote debug a linux program from a Qt Creator 2.7.1 instance in a windows machine. I cross compiled GDB with "--host=i686-pc-mingw32 --target=i586-suse-linux" options and created a MinGW-remote Kit to use this specific GDB debugger. If I debug in a terminal with the cross-compiled GDB, everything works correctly. However, when trying to use Qt Creator, I go to "Debug -> Start Debugging -> Attach to remote debug server..." and while there is a Port field, there is no way to configure the hostname and the logger shows GDB doing "target remote tcp::<my-port>", failing after a timeout.
How come there is no way to set a hostname in this dialog?
-
The kit you select contains a device which in turn contains information on how to talk to that device.
So to connect some device you have not yet used go to Tools>Options>Devices and add a new device. Then go to Tools>Options>Build & Run>Kits and set up a new kit that makes use of that device. Cloning an existing one and changing the device field most likely works best. Make sure to give a good name and maybe even set an icon for the new kit to make it easier to identify.
Then go to Debug>Start Debugging>Attach to remote debug server... and select the new kit.
The nice thing about this approach is that it is really fast to switch between different devices without having to reenter all the settings all the time (once the kits are set up that is;).
-
Thanks, that did it. Although I find it weird that using a 'generic linux device' requires a username and password. In my case I'm using gdbserver so I don't need to actually connect to the machine, so I just use a dummy username.
Do you know if there's a way to tell Qt where to look for sources? Something similar to GDB's dir command? It seems the source path mapping entries in the Debug properties are not doing what I think they should. I have a source tree similar to:
/project/binary
/project/lib1
/project/lib2
/project/lib3If I were to debug something from within GDB, I would do:
dir /project/binary:/project/lib1...
set solib-search-path lib1:lib2:lib3But when I debug with Qt Creator, it can't find the sources unless I copy everything in a single directory and use that as the working directory, which is less than idea, to say the least.
-
The user/password is needed to deploy your application via SSH.
You can always enter raw gdb commands into the debugger log area:-) I am no expert on the debugger plugin, I can not really help with that. Sorry.