Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/ddb Pull up following revision(s) (requested by uwe i...



details:   https://anonhg.NetBSD.org/src/rev/5e5b115b56a0
branches:  netbsd-9
changeset: 963552:5e5b115b56a0
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jan 26 11:25:22 2020 +0000

description:
Pull up following revision(s) (requested by uwe in ticket #655):

        sys/ddb/db_input.c: revision 1.27
        sys/ddb/db_lex.c: revision 1.23

Print db> prompt in db_read_line(), not db_readline().
The former is what DDB repl calls.  The latter performs the actual
input so let other code use it without the unwanted db> prompt.  It's
already used by ACPI (and AcpiOsWaitCommandReady supplies its own
prompt).  I also use it for my uncommitted Forth scripting for DDB.

diffstat:

 sys/ddb/db_input.c |  10 ++--------
 sys/ddb/db_lex.c   |  10 ++++++++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (72 lines):

diff -r bace3974e949 -r 5e5b115b56a0 sys/ddb/db_input.c
--- a/sys/ddb/db_input.c        Sun Jan 26 11:23:41 2020 +0000
+++ b/sys/ddb/db_input.c        Sun Jan 26 11:25:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $      */
+/*     $NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $        */
 
 /*
  * Mach Operating System
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -38,7 +38,6 @@
 
 #include <sys/param.h>
 #include <sys/proc.h>
-#include <sys/cpu.h>
 
 #include <ddb/ddb.h>
 
@@ -352,11 +351,6 @@
 db_readline(char *lstart, int lsize)
 {
 
-# ifdef MULTIPROCESSOR
-       db_printf("db{%ld}> ", (long)cpu_number());
-# else
-       db_printf("db> ");
-# endif
        db_force_whitespace();  /* synch output position */
 
        db_lbuf_start = lstart;
diff -r bace3974e949 -r 5e5b115b56a0 sys/ddb/db_lex.c
--- a/sys/ddb/db_lex.c  Sun Jan 26 11:23:41 2020 +0000
+++ b/sys/ddb/db_lex.c  Sun Jan 26 11:25:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $        */
+/*     $NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $  */
 
 /*
  * Mach Operating System
@@ -34,10 +34,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/cpu.h>
 
 #include <ddb/ddb.h>
 
@@ -61,6 +62,11 @@
 {
        int     i;
 
+#ifdef MULTIPROCESSOR
+       db_printf("db{%ld}> ", (long)cpu_number());
+#else
+       db_printf("db> ");
+#endif
        i = db_readline(db_line, sizeof(db_line));
        if (i == 0)
                return (0);     /* EOI */



Home | Main Index | Thread Index | Old Index