diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-06 19:05:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-06 19:05:59 +0000 |
commit | ee0b8b4c3e2e3376ebaa0037becf937eddb45025 (patch) | |
tree | f116133b7b298712ae300bc57dcffde56f4d7a34 /sys/arch | |
parent | 0b8bbf9148d97517c81469fe223bebc0999c653e (diff) |
Make sure we alter ddb variables as ints, not longs; only matters on 64 bit
platforms.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/sparc64/db_interface.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index 4a0f1b77568..35fc20317a7 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.20 2006/07/06 17:51:26 miod Exp $ */ +/* $OpenBSD: db_interface.c,v 1.21 2006/07/06 19:05:56 miod Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -120,33 +120,12 @@ db__short_value(struct db_variable *var, db_expr_t *expr, int mode) } #endif -static int -db__int_value(struct db_variable *var, db_expr_t *expr, int mode) -{ - - switch (mode) { - case DB_VAR_SET: - *var->valuep = *(int *)expr; - break; - case DB_VAR_GET: - *expr = *(int *)var->valuep; - break; -#ifdef DIAGNOSTIC - default: - printf("db__int_value: mode %d\n", mode); - break; -#endif - } - - return 0; -} - struct db_variable db_regs[] = { { "tstate", (long *)&DDB_TF->tf_tstate, FCN_NULL, }, { "pc", (long *)&DDB_TF->tf_pc, FCN_NULL, }, { "npc", (long *)&DDB_TF->tf_npc, FCN_NULL, }, { "ipl", (long *)&DDB_TF->tf_oldpil, db__char_value, }, - { "y", (long *)&DDB_TF->tf_y, db__int_value, }, + { "y", (long *)&DDB_TF->tf_y, db_var_rw_int, }, { "g0", (long *)&nil, FCN_NULL, }, { "g1", (long *)&DDB_TF->tf_global[1], FCN_NULL, }, { "g2", (long *)&DDB_TF->tf_global[2], FCN_NULL, }, |