How to terminate gdbserver?

yehudahs picture yehudahs · Jan 1, 2014 · Viewed 27k times · Source

I am trying to debug with gdbserver. after I terminat the gdb client on the host I see that the gdbserver is still listening :

Remote side has terminated connection.  GDBserver will reopen the connection.
Listening on port 5004

I tried to exit gdbserver with everything I have found anywhere no luck: quit,exit,q, monitor exit,Esc,Cnt+c... nothing kills it. Moreover, when I opened another terminal and looked for the process running gdbserver (with the commands ps,top) I couldn't find it there... my question is - How to terminate gdbserver ?

Answer

Konstantin Shemyak picture Konstantin Shemyak · May 14, 2014

Give command

monitor exit

from your host gdb before terminating the client. If you have already terminated it, just attach with another one.