diff options
author | joerg <joerg@FreeBSD.org> | 1997-03-30 16:03:00 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-03-30 16:03:00 +0000 |
commit | 29d246343bb7aa77721c635e334f75c86cff923e (patch) | |
tree | c321329c91dd20657bba7957b83890fa46d3f3c6 /sys | |
parent | 10839f021938ebb1f41764e4c36e87b88dae4320 (diff) | |
download | FreeBSD-src-29d246343bb7aa77721c635e334f75c86cff923e.zip FreeBSD-src-29d246343bb7aa77721c635e334f75c86cff923e.tar.gz |
Implement the `detach' command for remote GDB. It gets you back at DDB.
Diffstat (limited to 'sys')
-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; |