diff options
-rw-r--r-- | sys/amd64/amd64/amd64-gdbstub.c | 8 | ||||
-rw-r--r-- | sys/i386/i386/i386-gdbstub.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c index 4035f97..e019fef 100644 --- a/sys/amd64/amd64/amd64-gdbstub.c +++ b/sys/amd64/amd64/amd64-gdbstub.c @@ -71,6 +71,8 @@ * * ? What was the last sigval ? SNN (signal NN) * + * D detach OK + * * All commands and responses are sent with a packet which includes a * checksum. A packet consists of * @@ -91,6 +93,7 @@ ****************************************************************************/ #include <sys/param.h> +#include <sys/reboot.h> #include <sys/systm.h> #include <machine/cons.h> @@ -488,6 +491,11 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code) remcomOutBuffer[3] = 0; break; + case 'D': /* detach; say OK and turn off gdb */ + putpacket(remcomOutBuffer); + boothowto &= ~RB_GDB; + return; + case 'g': /* return the value of the CPU registers */ mem2hex ((vm_offset_t)®isters, remcomOutBuffer, NUMREGBYTES); break; diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c index 4035f97..e019fef 100644 --- a/sys/i386/i386/i386-gdbstub.c +++ b/sys/i386/i386/i386-gdbstub.c @@ -71,6 +71,8 @@ * * ? What was the last sigval ? SNN (signal NN) * + * D detach OK + * * All commands and responses are sent with a packet which includes a * checksum. A packet consists of * @@ -91,6 +93,7 @@ ****************************************************************************/ #include <sys/param.h> +#include <sys/reboot.h> #include <sys/systm.h> #include <machine/cons.h> @@ -488,6 +491,11 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code) remcomOutBuffer[3] = 0; break; + case 'D': /* detach; say OK and turn off gdb */ + putpacket(remcomOutBuffer); + boothowto &= ~RB_GDB; + return; + case 'g': /* return the value of the CPU registers */ mem2hex ((vm_offset_t)®isters, remcomOutBuffer, NUMREGBYTES); break; |