Implement the `detach' command for remote GDB. It gets you back at DDB.

This commit is contained in:
Joerg Wunsch 1997-03-30 16:03:00 +00:00
parent 568b59b9df
commit 514e9fd6b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24418
2 changed files with 16 additions and 0 deletions

View File

@ -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)&registers, remcomOutBuffer, NUMREGBYTES);
break;

View File

@ -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)&registers, remcomOutBuffer, NUMREGBYTES);
break;