Casting from a pointer, to a db_expr_t, has to go via an intptr_t.

(db_expr_t == int64_t on sh5, for example).
This commit is contained in:
scw 2002-08-26 11:34:27 +00:00
parent 41e5042829
commit a82718b34d
3 changed files with 19 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_command.c,v 1.65 2002/02/15 11:18:26 simonb Exp $ */
/* $NetBSD: db_command.c,v 1.66 2002/08/26 11:34:28 scw Exp $ */
/*
* Mach Operating System
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.65 2002/02/15 11:18:26 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.66 2002/08/26 11:34:28 scw Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@ -484,9 +484,9 @@ db_map_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
full = TRUE;
if (have_addr == FALSE)
addr = (db_expr_t) kernel_map;
addr = (db_expr_t)(intptr_t) kernel_map;
uvm_map_printit((struct vm_map *) addr, full, db_printf);
uvm_map_printit((struct vm_map *)(intptr_t) addr, full, db_printf);
}
/*ARGSUSED*/
@ -513,7 +513,8 @@ db_object_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
if (modif[0] == 'f')
full = TRUE;
uvm_object_printit((struct uvm_object *) addr, full, db_printf);
uvm_object_printit((struct uvm_object *)(intptr_t) addr, full,
db_printf);
}
/*ARGSUSED*/
@ -525,7 +526,7 @@ db_page_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
if (modif[0] == 'f')
full = TRUE;
uvm_page_printit((struct vm_page *) addr, full, db_printf);
uvm_page_printit((struct vm_page *)(intptr_t) addr, full, db_printf);
}
/*ARGSUSED*/
@ -537,7 +538,7 @@ db_buf_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
if (modif[0] == 'f')
full = TRUE;
vfs_buf_print((struct buf *)addr, full, db_printf);
vfs_buf_print((struct buf *)(intptr_t) addr, full, db_printf);
}
/*ARGSUSED*/
@ -561,7 +562,7 @@ db_vnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
if (modif[0] == 'f')
full = TRUE;
vfs_vnode_print((struct vnode *)addr, full, db_printf);
vfs_vnode_print((struct vnode *)(intptr_t) addr, full, db_printf);
}
/*ARGSUSED*/
@ -569,7 +570,7 @@ static void
db_pool_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
pool_printit((struct pool *)addr, modif, db_printf);
pool_printit((struct pool *)(intptr_t) addr, modif, db_printf);
}
/*ARGSUSED*/
@ -578,7 +579,7 @@ db_namecache_print_cmd(db_expr_t addr, int have_addr, db_expr_t count,
char *modif)
{
namecache_print((struct vnode *)addr, db_printf);
namecache_print((struct vnode *)(intptr_t) addr, db_printf);
}
/*ARGSUSED*/
@ -610,7 +611,7 @@ db_fncall(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
db_flush_lex();
return;
}
func = (db_expr_t (*)(db_expr_t, ...)) fn_addr;
func = (db_expr_t (*)(db_expr_t, ...))(intptr_t) fn_addr;
t = db_read_token();
if (t == tLPAREN) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_xxx.c,v 1.16 2002/02/15 07:33:54 simonb Exp $ */
/* $NetBSD: db_xxx.c,v 1.17 2002/08/26 11:34:29 scw Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.16 2002/02/15 07:33:54 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.17 2002/08/26 11:34:29 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -173,7 +173,8 @@ db_show_all_procs(db_expr_t addr, int haddr, db_expr_t count, char *modif)
}
if (p->p_wchan && p->p_wmesg) {
db_printf(" %-12s", p->p_wmesg);
db_printsym((db_expr_t)p->p_wchan,
db_printsym(
(db_expr_t)(intptr_t)p->p_wchan,
DB_STGY_XTRN, db_printf);
}
db_printf("\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_prf.c,v 1.84 2002/06/05 17:53:52 drochner Exp $ */
/* $NetBSD: subr_prf.c,v 1.85 2002/08/26 11:34:27 scw Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.84 2002/06/05 17:53:52 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.85 2002/08/26 11:34:27 scw Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@ -242,7 +242,7 @@ panic(fmt, va_alist)
intrace=1;
printf("Begin traceback...\n");
db_stack_trace_print(
(db_expr_t)__builtin_frame_address(0),
(db_expr_t)(intptr_t)__builtin_frame_address(0),
TRUE, 65535, "", printf);
printf("End traceback...\n");
intrace=0;