mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 02:12:45 +00:00
Implement the `detach' command for remote GDB. It gets you back at DDB.
This commit is contained in:
parent
568b59b9df
commit
514e9fd6b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24418
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user