Close debugging session when remote connection is closed
Original Reporter info from Mantis: ccrause @ccrause
-
Reporter name: Christo Crause
Original Reporter info from Mantis: ccrause @ccrause
- Reporter name: Christo Crause
Description:
When debugging a remote target over a gdbserver connection the connection can unexpectedly drop out for a number of reasons (connection terminated, gdbserver terminated etc.). I want GDBMIDebugger to detect the message &"Remote connection closed\n" which gdb sends when the connection drops out and close the debugging session.
The attached patch looks for this message in DoLogStream and then call SetDebuggerState(dsStop); to terminate the debugging session. Not quite elegant, but it saves me the hassle of pressing Ctrl-F2.
Additional information:
The gdb/mi output when the remote connecion is lost:
<< TCmdLineDebugger.ReadLn "=thread-group-exited,id="i1""
<< TCmdLineDebugger.ReadLn "&"Remote connection closed\n""
Mantis conversion info:
- Mantis ID: 36076
- Version: 2.1 (SVN)
- Fixed in version: 2.2
- Fixed in revision: 61886 (#e35fc25d)
- Target version: 2.2