Why would I want that?
- I need to debug the i386 variant
- I don't want to screw up my system
- I need a large display since the program uses some big data structures and need to see them at the same time (no, pretty print is not enough)
- actually I would like to use DDD or something like that so I don't feel (that much) like a cripple man (I always had this feeling when facing the task of using gdb - powerful but feels incredibly like a huge hack and the interface is planly ugly from an usability POV)
- cgdb is not enough and has a marginal gain compared to plain gdb (and you loose tab completion)
- I wasn't planning on installing X in the qemu machine
Now, after reading all kinds of threads on the net, reading qemu's docs and gdb's docs, I gave up, I am installing X in the qemu machine.
BTW, I couldn't find a way to tell DDD to connect to a socket to debug :-/.
Of course, any help and advices would be mostly appreciated.
2 comments:
Oh, c'mon, this is easy :-) Of course, it's harder to help you since you didn't say what errors...
Avoid using serial ports; TCP works better, and in particular gdbserver is broken on serial in unstable at the moment (fixed upstream). Tell qemu to forward a TCP port to your guest. Run gdbserver on that port "gdbserver :PORT ./program". Then, from outside the guest, run "gdb ./program" and "target remote :FORWARDEDPORT".
You tell DDD to connect to a socket by typing the same command at DDD's GDB console.
If you found the manual unclear, please, post to the GDB mailing list saying what you looked for and had trouble finding. Otherwise we can't fix it.
CGDB supports tab completion perfectly fine. You are probably using an old version.
Post a Comment