Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb Fix crash(8). Will revisit.



details:   https://anonhg.NetBSD.org/src/rev/af4f8a70df7c
branches:  trunk
changeset: 846566:af4f8a70df7c
user:      ad <ad%NetBSD.org@localhost>
date:      Fri Nov 22 23:01:49 2019 +0000

description:
Fix crash(8).  Will revisit.

diffstat:

 sys/ddb/db_lex.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r e5179dd271ff -r af4f8a70df7c sys/ddb/db_lex.c
--- a/sys/ddb/db_lex.c  Fri Nov 22 20:07:53 2019 +0000
+++ b/sys/ddb/db_lex.c  Fri Nov 22 23:01:49 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_lex.c,v 1.24 2019/10/02 09:36:30 rin Exp $  */
+/*     $NetBSD: db_lex.c,v 1.25 2019/11/22 23:01:49 ad Exp $   */
 
 /*
  * Mach Operating System
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.24 2019/10/02 09:36:30 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.25 2019/11/22 23:01:49 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -62,11 +62,18 @@
 {
        int     i;
 
+#ifdef _KERNEL
+       /*
+        * crash(8) prints the prompt using libedit.  That's why we used to
+        * print it in db_readline().  But now people are using db_read_line()
+        * for general purpose input, so..
+        */
 #ifdef MULTIPROCESSOR
        db_printf("db{%ld}> ", (long)cpu_number());
 #else
        db_printf("db> ");
 #endif
+#endif
        i = db_readline(db_line, sizeof(db_line));
        if (i == 0)
                return (0);     /* EOI */



Home | Main Index | Thread Index | Old Index