add support for the `D' kgdb detach command
add comment about minimum requirement for KGDB_BUFLEN
This commit is contained in:
parent
e3a3a9f56f
commit
d5738f5104
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kgdb_stub.c,v 1.11 2001/11/20 08:43:46 lukem Exp $ */
|
||||
/* $NetBSD: kgdb_stub.c,v 1.12 2002/01/05 22:57:38 dbj Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.11 2001/11/20 08:43:46 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.12 2002/01/05 22:57:38 dbj Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
|
@ -88,6 +88,7 @@ static int (*kgdb_getc) __P((void *));
|
|||
static void (*kgdb_putc) __P((void *, int));
|
||||
static void *kgdb_ioarg;
|
||||
|
||||
/* KGDB_BUFLEN must be at least (2*KGDB_NUMREGS*sizeof(kgdb_reg_t)+1) */
|
||||
static u_char buffer[KGDB_BUFLEN];
|
||||
static kgdb_reg_t gdb_regs[KGDB_NUMREGS];
|
||||
|
||||
|
@ -497,10 +498,12 @@ kgdb_trap(type, regs)
|
|||
kgdb_send("OK");
|
||||
continue;
|
||||
|
||||
case KGDB_DETACH:
|
||||
case KGDB_KILL:
|
||||
kgdb_active = 0;
|
||||
printf("kgdb detached\n");
|
||||
db_clear_single_step(regs);
|
||||
kgdb_send("OK");
|
||||
goto out;
|
||||
|
||||
case KGDB_CONT:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kgdb.h,v 1.5 1998/09/13 14:46:24 christos Exp $ */
|
||||
/* $NetBSD: kgdb.h,v 1.6 2002/01/05 22:57:38 dbj Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -64,6 +64,7 @@
|
|||
#define KGDB_CONT 'c'
|
||||
#define KGDB_STEP 's'
|
||||
#define KGDB_KILL 'k'
|
||||
#define KGDB_DETACH 'D'
|
||||
#define KGDB_SIGNAL '?'
|
||||
#define KGDB_DEBUG 'd'
|
||||
|
||||
|
|
Loading…
Reference in New Issue