Source-Changes-HG archive

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

[src/trunk]: src/sys introduce DDB_END_CMD and replace more than 20 copies of...



details:   https://anonhg.NetBSD.org/src/rev/6ca9fed3ded2
branches:  trunk
changeset: 952994:6ca9fed3ded2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Feb 23 07:13:51 2021 +0000

description:
introduce DDB_END_CMD and replace more than 20 copies of the same
list of NULLs and 0.  idea from rillig@.

all touched ports built, several booted.

diffstat:

 sys/arch/aarch64/aarch64/db_machdep.c   |  10 +++----
 sys/arch/alpha/alpha/db_interface.c     |   6 ++--
 sys/arch/amd64/amd64/db_interface.c     |   6 ++--
 sys/arch/arm/arm32/db_machdep.c         |   6 ++--
 sys/arch/hppa/hppa/db_machdep.c         |   6 ++--
 sys/arch/i386/i386/db_interface.c       |   6 ++--
 sys/arch/ia64/ia64/db_interface.c       |   6 ++--
 sys/arch/mips/mips/db_interface.c       |   6 ++--
 sys/arch/powerpc/powerpc/db_interface.c |   7 ++---
 sys/arch/sh3/sh3/db_interface.c         |   6 ++--
 sys/arch/sparc/sparc/db_interface.c     |   6 ++--
 sys/arch/sparc/sparc/db_machdep.c       |   6 ++--
 sys/arch/sparc64/sparc64/db_interface.c |   6 ++--
 sys/arch/sparc64/sparc64/db_machdep.c   |   6 ++--
 sys/arch/sun3/sun3/db_machdep.c         |   6 ++--
 sys/arch/vax/vax/db_machdep.c           |   6 ++--
 sys/ddb/db_command.c                    |   8 +++---
 sys/ddb/db_command.h                    |   4 ++-
 sys/dev/sbus/esp_sbus.c                 |   6 ++--
 sys/dev/usb/usb.c                       |   6 ++--
 sys/modules/examples/ddbping/ddbping.c  |  41 ++++++++++++--------------------
 21 files changed, 77 insertions(+), 89 deletions(-)

diffs (truncated from 611 to 300 lines):

diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c     Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c     Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.33 2021/02/05 21:44:34 joerg Exp $ */
+/* $NetBSD: db_machdep.c,v 1.34 2021/02/23 07:13:51 mrg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.33 2021/02/05 21:44:34 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.34 2021/02/23 07:13:51 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -163,10 +163,8 @@
        },
 #endif
        {
-               DDB_ADD_CMD(NULL, NULL, 0,
-                   NULL,
-                   NULL, NULL)
-       }
+               DDB_END_CMD
+       },
 };
 
 const struct db_variable db_regs[] = {
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/alpha/alpha/db_interface.c
--- a/sys/arch/alpha/alpha/db_interface.c       Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/alpha/alpha/db_interface.c       Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.35 2020/09/18 00:02:43 thorpej Exp $ */
+/* $NetBSD: db_interface.c,v 1.36 2021/02/23 07:13:51 mrg Exp $ */
 
 /*
  * Mach Operating System
@@ -52,7 +52,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.35 2020/09/18 00:02:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.36 2021/02/23 07:13:51 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -95,7 +95,7 @@
        { DDB_ADD_CMD("cpu",    db_mach_cpu,    0,
          "switch to another cpu", "cpu-no", NULL) },
 #endif
-       { DDB_ADD_CMD(NULL,     NULL,           0,NULL,NULL,NULL) },
+       { DDB_END_CMD },
 };
 
 static int db_alpha_regop(const struct db_variable *, db_expr_t *, int);
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/amd64/amd64/db_interface.c
--- a/sys/arch/amd64/amd64/db_interface.c       Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/amd64/amd64/db_interface.c       Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.38 2020/07/14 00:45:52 yamaguchi Exp $      */
+/*     $NetBSD: db_interface.c,v 1.39 2021/02/23 07:13:51 mrg Exp $    */
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.38 2020/07/14 00:45:52 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.39 2021/02/23 07:13:51 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -85,7 +85,7 @@
        { DDB_ADD_CMD("cpu",    db_mach_cpu,    0,
          "switch to another cpu", "cpu-no", NULL) },
 #endif
-       { DDB_ADD_CMD(NULL, NULL, 0, NULL, NULL, NULL) },
+       { DDB_END_CMD },
 };
 
 void kdbprinttrap(int, int);
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/arm/arm32/db_machdep.c
--- a/sys/arch/arm/arm32/db_machdep.c   Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/arm/arm32/db_machdep.c   Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.c,v 1.38 2020/12/03 10:23:45 rin Exp $      */
+/*     $NetBSD: db_machdep.c,v 1.39 2021/02/23 07:13:51 mrg Exp $      */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.38 2020/12/03 10:23:45 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.39 2021/02/23 07:13:51 mrg Exp $");
 
 #include <sys/param.h>
 
@@ -142,7 +142,7 @@
 #endif
 #endif /* _KERNEL */
 
-       { DDB_ADD_CMD(NULL,     NULL,           0,NULL,NULL,NULL) }
+       { DDB_END_CMD },
 };
 
 void
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/hppa/hppa/db_machdep.c
--- a/sys/arch/hppa/hppa/db_machdep.c   Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/hppa/hppa/db_machdep.c   Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
- /*    $NetBSD: db_machdep.c,v 1.8 2019/04/15 20:45:08 skrll Exp $     */
+ /*    $NetBSD: db_machdep.c,v 1.9 2021/02/23 07:13:52 mrg Exp $       */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.8 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.9 2021/02/23 07:13:52 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/lwp.h>
@@ -125,7 +125,7 @@
          "[/l] [addr]",
          "   addr:\tdisplay this trap frame (current kernel frame otherwise)\n"
          "   /l:\tdisplay the trap frame from lwp") },
-       { DDB_ADD_CMD(NULL,     NULL,           0, NULL, NULL, NULL) }
+       { DDB_END_CMD },
 };
 
 void
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/i386/i386/db_interface.c
--- a/sys/arch/i386/i386/db_interface.c Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/i386/i386/db_interface.c Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.85 2020/07/14 00:45:52 yamaguchi Exp $      */
+/*     $NetBSD: db_interface.c,v 1.86 2021/02/23 07:13:52 mrg Exp $    */
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.85 2020/07/14 00:45:52 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.86 2021/02/23 07:13:52 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -86,7 +86,7 @@
        { DDB_ADD_CMD("cpu",    db_mach_cpu,    0,
          "switch to another cpu", "cpu-no", NULL) },
 #endif
-       { DDB_ADD_CMD(NULL, NULL, 0, NULL, NULL, NULL) },
+       { DDB_END_CMD },
 };
 
 void kdbprinttrap(int, int);
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/ia64/ia64/db_interface.c
--- a/sys/arch/ia64/ia64/db_interface.c Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/ia64/ia64/db_interface.c Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.8 2014/04/03 17:05:58 martin Exp $ */
+/* $NetBSD: db_interface.c,v 1.9 2021/02/23 07:13:52 mrg Exp $ */
 
 /*-
  * Copyright (c) 2003-2005 Marcel Moolenaar
@@ -80,7 +80,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.8 2014/04/03 17:05:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.9 2021/02/23 07:13:52 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -118,7 +118,7 @@
          "[vector]",
          "   vector:\tthe vector to show (all vectors otherwise)") },
 
-       { DDB_ADD_CMD(NULL, NULL, 0, NULL,NULL,NULL) },
+       { DDB_END_CMD },
 };
 
 static int
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/mips/mips/db_interface.c
--- a/sys/arch/mips/mips/db_interface.c Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/mips/mips/db_interface.c Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.91 2020/08/23 03:21:57 simonb Exp $ */
+/*     $NetBSD: db_interface.c,v 1.92 2021/02/23 07:13:52 mrg Exp $    */
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.91 2020/08/23 03:21:57 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.92 2021/02/23 07:13:52 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
@@ -827,7 +827,7 @@
                "delete cp0 watchpoint",
                "address", NULL) },
 #endif /* (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0 */
-       { DDB_ADD_CMD(NULL,     NULL,               0,  NULL,NULL,NULL) }
+       { DDB_END_CMD },
 };
 #endif /* !KGDB */
 
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c   Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c   Tue Feb 23 07:13:51 2021 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: db_interface.c,v 1.54 2020/07/06 09:34:18 rin Exp $ */
+/*     $NetBSD: db_interface.c,v 1.55 2021/02/23 07:13:52 mrg Exp $ */
 /*     $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.54 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.55 2021/02/23 07:13:52 mrg Exp $");
 
 #define USERACC
 
@@ -156,8 +156,7 @@
          "switch to another cpu", "cpu-no", NULL) },
 #endif /* MULTIPROCESSOR */
 
-       { DDB_ADD_CMD(NULL,     NULL,                   0,
-         NULL,NULL,NULL) }
+       { DDB_END_CMD },
 };
 
 void
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/sh3/sh3/db_interface.c
--- a/sys/arch/sh3/sh3/db_interface.c   Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/sh3/sh3/db_interface.c   Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.65 2020/08/03 21:53:25 uwe Exp $    */
+/*     $NetBSD: db_interface.c,v 1.66 2021/02/23 07:13:52 mrg Exp $    */
 
 /*-
  * Copyright (C) 2002 UCHIYAMA Yasushi.  All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.65 2020/08/03 21:53:25 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.66 2021/02/23 07:13:52 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -120,7 +120,7 @@
                "Dump TLB contents.",
                NULL, NULL) },
 
-       { DDB_ADD_CMD(NULL, NULL, 0, NULL, NULL,NULL) }
+       { DDB_END_CMD },
 };
 
 int db_active;
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/sparc/sparc/db_interface.c
--- a/sys/arch/sparc/sparc/db_interface.c       Tue Feb 23 01:31:30 2021 +0000
+++ b/sys/arch/sparc/sparc/db_interface.c       Tue Feb 23 07:13:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.95 2021/01/24 07:36:54 mrg Exp $ */
+/*     $NetBSD: db_interface.c,v 1.96 2021/02/23 07:13:52 mrg Exp $ */
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.95 2021/01/24 07:36:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.96 2021/02/23 07:13:52 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -453,7 +453,7 @@
        { DDB_ADD_CMD("xcall",  db_xcall_cmd,   0,
          "show xcall information on all cpus", NULL, NULL) },
 #endif
-       { DDB_ADD_CMD(NULL,     NULL,           0,      NULL,NULL,NULL) }
+       { DDB_END_CMD },
 };
 #endif /* DDB */
 
diff -r 2f11a6afdb82 -r 6ca9fed3ded2 sys/arch/sparc/sparc/db_machdep.c
--- a/sys/arch/sparc/sparc/db_machdep.c Tue Feb 23 01:31:30 2021 +0000



Home | Main Index | Thread Index | Old Index