Source-Changes-HG archive

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

[src/trunk]: src/sys/ddb quick fix for crash(8) build failure caused by my pr...



details:   https://anonhg.NetBSD.org/src/rev/17351a2376c8
branches:  trunk
changeset: 747712:17351a2376c8
user:      bsh <bsh%NetBSD.org@localhost>
date:      Mon Sep 28 05:53:37 2009 +0000

description:
quick fix for crash(8) build failure caused by my previous commit (rev
1.20).

The problem was reported Ty Sarna and Geoff Wing.  Thanks.

XXX: I made #if too messy. split db_access.c into two files for
db_{get,put}_values and db_read_{int,ptr}?

diffstat:

 sys/ddb/db_access.c |  20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 0d0f9ad852a5 -r 17351a2376c8 sys/ddb/db_access.c
--- a/sys/ddb/db_access.c       Mon Sep 28 00:39:03 2009 +0000
+++ b/sys/ddb/db_access.c       Mon Sep 28 05:53:37 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_access.c,v 1.20 2009/09/27 18:24:23 bsh Exp $       */
+/*     $NetBSD: db_access.c,v 1.21 2009/09/28 05:53:37 bsh Exp $       */
 
 /*
  * Mach Operating System
@@ -30,9 +30,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.20 2009/09/27 18:24:23 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.21 2009/09/28 05:53:37 bsh Exp $");
 
+#if defined(_KERNEL_OPT)
 #include "opt_kgdb.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -44,10 +46,14 @@
  * Access unaligned data items on aligned (longword)
  * boundaries.
  *
- * This file is shared by ddb and kgdb.
+ * This file is shared by ddb, kgdb and crash(8).
  */
 
-#if defined(DDB) || defined(KGDB) && defined(SOFTWARE_SSTEP)
+#if defined(DDB) || !defined(DDB) && !defined(KGDB)
+#define        _COMPILE_THIS
+#endif
+
+#if defined(_COMPILE_THIS) || defined(KGDB) && defined(SOFTWARE_SSTEP)
 
 const int db_extend[] = {      /* table for sign-extending */
        0,
@@ -97,9 +103,9 @@
        db_write_bytes(addr, size, data);
 }
 
-#endif /* DDB || KGDB && SOFTWARE_SSTEP */
+#endif /* _COMPILE_THIS || KGDB && SOFTWARE_SSTEP */
 
-#ifdef DDB
+#ifdef _COMPILE_THIS
 
 void *
 db_read_ptr(const char *name)
@@ -131,4 +137,4 @@
        return p;
 }
 
-#endif /* DDB */
+#endif /* _COMPILE_THIS */



Home | Main Index | Thread Index | Old Index