Module Name:    src
Committed By:   msaitoh
Date:           Wed Aug 31 05:24:41 UTC 2022

Modified Files:
        src/sys/kern: subr_lockdebug.c

Log Message:
Fix previous to make it compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/kern/subr_lockdebug.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/kern/subr_lockdebug.c
diff -u src/sys/kern/subr_lockdebug.c:1.81 src/sys/kern/subr_lockdebug.c:1.82
--- src/sys/kern/subr_lockdebug.c:1.81	Tue Aug 30 22:38:17 2022
+++ src/sys/kern/subr_lockdebug.c	Wed Aug 31 05:24:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_lockdebug.c,v 1.81 2022/08/30 22:38:17 riastradh Exp $	*/
+/*	$NetBSD: subr_lockdebug.c,v 1.82 2022/08/31 05:24:41 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.81 2022/08/30 22:38:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.82 2022/08/31 05:24:41 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -56,6 +56,13 @@ __KERNEL_RCSID(0, "$NetBSD: subr_lockdeb
 
 #include <machine/lock.h>
 
+#ifdef DDB
+#include <machine/db_machdep.h>
+#include <ddb/db_interface.h>
+#include <ddb/db_access.h>
+#include <ddb/db_sym.h>
+#endif
+
 unsigned int		ld_panic;
 
 #ifdef LOCKDEBUG
@@ -708,13 +715,6 @@ lockdebug_mem_check(const char *func, si
 }
 #endif /* _KERNEL */
 
-#ifdef DDB
-#include <machine/db_machdep.h>
-#include <ddb/db_interface.h>
-#include <ddb/db_access.h>
-#include <ddb/db_sym.h>
-#endif
-
 /*
  * lockdebug_dump:
  *
@@ -856,8 +856,8 @@ lockdebug_lock_print(void *addr,
 
 	(*pr)("WARNING: lock print is unreliable without LOCKDEBUG\n");
 	db_symstr(sym, sizeof(sym), (db_expr_t)addr, DB_STGY_ANY);
-	db_read_bytes((db_addr_t)addr, sizeof(word), &word);
-	(*pr)("%s: possible owner: %p, bits: 0x%x\n", sym,
+	db_read_bytes((db_addr_t)addr, sizeof(word), (char *)&word);
+	(*pr)("%s: possible owner: %p, bits: 0x%" PRIxPTR "\n", sym,
 	    (void *)(word & ~(uintptr_t)ALIGNBYTES), word & ALIGNBYTES);
 #endif	/* LOCKDEBUG */
 }

Reply via email to