Comment 1 for bug 1031920

Revision history for this message
thierry bultel (tbultel) wrote :

I have encountered that issue recently, and started some analysis.

The issue is due to the fact that in qemu, gdbstub no longer reads the communication channel once
the debugged process is resumed with "cont".
Another way to say that, is that communication with gdb is only possible once the process thread execution
is re-routed in the gdb handler.

I am working on a fix.

The fix will consist in having an additional thread, launched that the internal gdbserver startup,
that will be wakeup when the debugged process is resumed.
That thread will be waiting on the communication channel for the eventually incoming CTRL-C request (0x3)
I start to have promising results but it still needs some testing.

Meanwhile, (this should likely be a separate discussion thread, but is somehow related with the named issue above) ,
I also noticed that with multithreaded
processes, a breakpoint does not suspend all the threads when it is hit.
This is a little bit annoying, and does not match the expected behaviour that is typically seen on a pure native gdb debugging
session.

Once it is ready I will post a patch to qemu mailing list

Best regards
Thierry