#include <oskit/gdb_serial.h>void gdb_serial_exit(int exit_code);
This function sends a message to the remote debugger indicating that the program being debugged is terminating. This message causes the debugger to display an appropriate message on the debugger's console along with the exit_code, and causes it to break the connection (i.e., stop listening for further messages on the serial port). If no remote debugging connection is currently active, this function does nothing.The client OS should typically call this function just before it reboots for any reason, so that the debugger does not hang indefinitely waiting for a response from a kernel that is no longer running. Alternatively, if the remote debugging facility is being used to debug a user-mode process running under the kernel, then this function should be called when that process terminates.
Note that despite its name, this function does return. It does not by itself cause the machine to ``exit'' or reboot or hang or whatever; it merely notifies the debugger that the subject program is about to terminate.
- exit_code
- Exit code to pass back to the remote debugger. Typically this value is simply printed on the remote debugger's console.
- gdb_serial_send
- 10.18.8
- gdb_serial_recv
- 10.18.7