Break into debugger by typing `+++++',
This commit is contained in:
parent
b71bddab49
commit
f10d7699fc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: consinit.c,v 1.6 2000/06/24 04:20:58 eeh Exp $ */
|
||||
/* $NetBSD: consinit.c,v 1.7 2000/07/10 20:24:23 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Eduardo E. Horvath
|
||||
|
@ -107,9 +107,17 @@ prom_cngetc(dev)
|
|||
{
|
||||
unsigned char ch = '\0';
|
||||
int l;
|
||||
#ifdef DDB
|
||||
static int nplus = 0;
|
||||
#endif
|
||||
|
||||
while ((l = OF_read(stdin, &ch, 1)) != 1)
|
||||
/* void */;
|
||||
#ifdef DDB
|
||||
if (ch == '+') {
|
||||
if (nplus++ > 3) Debugger();
|
||||
} else nplus = 0;
|
||||
#endif
|
||||
if (ch == '\r')
|
||||
ch = '\n';
|
||||
return ch;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcons.c,v 1.2 2000/06/24 16:51:36 eeh Exp $ */
|
||||
/* $NetBSD: pcons.c,v 1.3 2000/07/10 20:24:23 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Eduardo E. Horvath
|
||||
|
@ -273,13 +273,25 @@ pcons_poll(aux)
|
|||
struct pconssoftc *sc = aux;
|
||||
struct tty *tp = sc->of_tty;
|
||||
char ch;
|
||||
static int nas = 0;
|
||||
#ifdef DDB
|
||||
static int nplus = 0;
|
||||
#endif
|
||||
|
||||
|
||||
while (OF_read(stdin, &ch, 1) > 0) {
|
||||
if (ch == 'a') {
|
||||
if (nas++ > 3) Debugger();
|
||||
} else nas = 0;
|
||||
#ifdef DDB
|
||||
if (ch == '+') {
|
||||
if (nplus++ > 3) {
|
||||
extern int db_active;
|
||||
|
||||
if (!db_active)
|
||||
Debugger();
|
||||
else
|
||||
/* Debugger is probably hozed */
|
||||
callrom();
|
||||
}
|
||||
} else nplus = 0;
|
||||
#endif
|
||||
if (tp && (tp->t_state & TS_ISOPEN))
|
||||
(*linesw[tp->t_line].l_rint)(ch, tp);
|
||||
}
|
||||
|
@ -318,3 +330,9 @@ pcons_cnpollc(dev, on)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pcons_dopoll __P((void));
|
||||
void
|
||||
pcons_dopoll() {
|
||||
pcons_poll((void*)pcons_cd.cd_devs[0]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue