You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe you can read the source of qemu.
Actually there are two state in gdb. Which are RUNNING and !RUNNING.
The interrupt packet is special. It only need to be handled in RUNNING state. When the interrupt packet is received in RUNNING state, the vm should be stopped and gdb will transfer to !RUNNING state.
On the other hand, the normal packet only need to be handled in !RUNNING state. There's no need to handle normal packet in RUNNING state. It doesn't make any sense.
So there's no need to put conn_try_recv_intr to another thread. Just handle the packet in corresponding state in one thread.
The text was updated successfully, but these errors were encountered:
After some thinking, I am still confused about the comments. The key here is that when the emulator is running in gdbstub->ops->cont(args), there's no way to switch from RUNNING to !RUNNING state for the emulator. In other words, the routine is under the emulator side so gdbstub side can react to the packet with a single thread in this case. I am not sure if registering a signal handler can be a better solution, but we definitely need some mechanism to receive the packet when the emulator is running.
Could you provide a piece of sample to show your idea? Or if possible sending a pull request for this will be appreciated.
Maybe you can read the source of qemu.
Actually there are two state in gdb. Which are RUNNING and !RUNNING.
So there's no need to put conn_try_recv_intr to another thread. Just handle the packet in corresponding state in one thread.
The text was updated successfully, but these errors were encountered: