From 44ada67f788d5025a7d4dd7b214bafc618c7f982 Mon Sep 17 00:00:00 2001 From: Ariane van der Steldt Date: Sun, 22 May 2011 19:21:56 +0000 Subject: In ddb, when dereferencing a pointer, use sizeof a pointer. Enables show map /f *kernel_map to succeed without nullpointer errors on 64-bit archs. ok miod@ --- sys/ddb/db_expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c index 9549ea11623..2a94f70dcb4 100644 --- a/sys/ddb/db_expr.c +++ b/sys/ddb/db_expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_expr.c,v 1.8 2006/03/13 06:23:20 jsg Exp $ */ +/* $OpenBSD: db_expr.c,v 1.9 2011/05/22 19:21:55 ariane Exp $ */ /* $NetBSD: db_expr.c,v 1.5 1996/02/05 01:56:58 christos Exp $ */ /* @@ -118,7 +118,7 @@ db_unary(db_expr_t *valuep) db_error("Syntax error\n"); /*NOTREACHED*/ } - *valuep = db_get_value((db_addr_t)*valuep, sizeof(int), FALSE); + *valuep = db_get_value((db_addr_t)*valuep, sizeof(db_addr_t), FALSE); return (TRUE); } db_unread_token(t); -- cgit v1.2.3