Module Name: src
Committed By: bsh
Date: Mon Sep 28 05:53:38 UTC 2009
Modified Files:
src/sys/ddb: db_access.c
Log Message:
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}?
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/ddb/db_access.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ddb/db_access.c
diff -u src/sys/ddb/db_access.c:1.20 src/sys/ddb/db_access.c:1.21
--- src/sys/ddb/db_access.c:1.20 Sun Sep 27 18:24:23 2009
+++ src/sys/ddb/db_access.c Mon Sep 28 05:53:37 2009
@@ -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 */