I've just spent a whole day trying to find a way to enable gdb debugging from QtCreater or Eclipse. I learned that there are basically two approaches to launch the target application:
- using ssh (
ssh host gdb
) - using gdbserver
I was able to use both approaches to launch gdb remotely and start the application. However, GDB never reponds to any breakpoints set in the IDE. Also I can't pause the application to inspect the program state. In QtCreator I just get an obscure stack trace (I might have been looking at the traces of ssh or gdb actually...).
Can anyone help me to get started?
Progress!
I found that with QtCreater 2.0 there is an feature called "Attach and debug remote appliction." It's based on gdbserver. The good thing is that it stops on the IDE's breakpoints. However there are two issues:
- when it hits a breakpoint it only shows assembly code, not the source code
- gdb often quits because of 'signal received'
I should probably mention that the remote executable is compiled with an older version of gcc than the one installed on my local PC. Perhaps some of the problems are related to this.