Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 PR kern/53893: add missing #ifdef DDB aroun...



details:   https://anonhg.NetBSD.org/src/rev/6eecb6e592b4
branches:  trunk
changeset: 447623:6eecb6e592b4
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jan 19 13:17:32 2019 +0000

description:
PR kern/53893: add missing #ifdef DDB around db_printf calls.

diffstat:

 sys/arch/x86/x86/db_memrw.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 1d4749fd9628 -r 6eecb6e592b4 sys/arch/x86/x86/db_memrw.c
--- a/sys/arch/x86/x86/db_memrw.c       Sat Jan 19 13:08:50 2019 +0000
+++ b/sys/arch/x86/x86/db_memrw.c       Sat Jan 19 13:17:32 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_memrw.c,v 1.7 2018/11/18 14:16:13 christos Exp $    */
+/*     $NetBSD: db_memrw.c,v 1.8 2019/01/19 13:17:32 martin Exp $      */
 
 /*-
  * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.7 2018/11/18 14:16:13 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.8 2019/01/19 13:17:32 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -90,7 +90,9 @@
        src = (char *)addr;
 
        if (db_validate_address((vaddr_t)src)) {
+#ifdef DDB
                db_printf("address %p is invalid\n", src);
+#endif
                return;
        }
 
@@ -111,7 +113,9 @@
 
        while (size-- > 0) {
                if (db_validate_address((vaddr_t)src)) {
+#ifdef DDB
                        db_printf("address %p is invalid\n", src);
+#endif
                        return;
                }
 
@@ -144,7 +148,9 @@
                pte = *ppte;
 
                if ((pte & PG_V) == 0) {
+#ifdef DDB
                        db_printf(" address %p not a valid page\n", dst);
+#endif
                        return;
                }
 



Home | Main Index | Thread Index | Old Index