Module Name:    src
Committed By:   riastradh
Date:           Tue Jul 11 11:03:31 UTC 2023

Modified Files:
        src/sys/ddb: db_command.c

Log Message:
ddb: Cast pointer to uintptr_t first before db_expr_t.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/ddb/db_command.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_command.c
diff -u src/sys/ddb/db_command.c:1.183 src/sys/ddb/db_command.c:1.184
--- src/sys/ddb/db_command.c:1.183	Sun Jul  9 17:10:47 2023
+++ src/sys/ddb/db_command.c	Tue Jul 11 11:03:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.183 2023/07/09 17:10:47 riastradh Exp $	*/
+/*	$NetBSD: db_command.c,v 1.184 2023/07/11 11:03:31 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009, 2019
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.183 2023/07/09 17:10:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.184 2023/07/11 11:03:31 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1401,7 +1401,7 @@ db_show_all_tstiles(db_expr_t addr, bool
 			if (wchan == NULL)
 				goto next;
 			db_symstr(wchanname, sizeof(wchanname),
-			    (db_expr_t)wchan, DB_STGY_ANY);
+			    (db_expr_t)(uintptr_t)wchan, DB_STGY_ANY);
 			db_read_bytes((db_addr_t)&l->l_wmesg, sizeof(wmesg),
 			    (char *)&wmesg);
 			if (wmesg != NULL) {
@@ -1436,7 +1436,8 @@ db_show_all_tstiles(db_expr_t addr, bool
 			    wchanname);
 
 			if (trace && owner != NULL) {
-				db_stack_trace_print((db_expr_t)owner,
+				db_stack_trace_print(
+				    (db_expr_t)(uintptr_t)owner,
 				    /*have_addr*/true, /*count*/-1,
 				    /*modif(lwp)*/"a", db_printf);
 			}

Reply via email to