Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb "set" now displays the name of the variable, old val...
details: https://anonhg.NetBSD.org/src/rev/473c514a5ed6
branches: trunk
changeset: 494323:473c514a5ed6
user: jhawk <jhawk%NetBSD.org@localhost>
date: Wed Jul 05 16:29:25 2000 +0000
description:
"set" now displays the name of the variable, old value, and new value,
just as "write" does.
diffstat:
sys/ddb/TODO | 6 +++---
sys/ddb/db_variables.c | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r 4cc13f9b92bd -r 473c514a5ed6 sys/ddb/TODO
--- a/sys/ddb/TODO Wed Jul 05 16:19:48 2000 +0000
+++ b/sys/ddb/TODO Wed Jul 05 16:29:25 2000 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO,v 1.3 2000/06/17 05:57:41 jhawk Exp $
+$NetBSD: TODO,v 1.4 2000/07/05 16:29:26 jhawk Exp $
In rough order.
@@ -22,9 +22,9 @@
Features to be implemented:
1. Have "ps" print pids with a 0t prefix to reduce radix
- confusion.
+ confusion. This is very ugly...needs thought.
-2. "set" should display the old value as "write" does.
+done "set" should display the old value as "write" does.
3. Support 64-bit longs in "write". /L or /q? both? long versus quad?
diff -r 4cc13f9b92bd -r 473c514a5ed6 sys/ddb/db_variables.c
--- a/sys/ddb/db_variables.c Wed Jul 05 16:19:48 2000 +0000
+++ b/sys/ddb/db_variables.c Wed Jul 05 16:29:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_variables.c,v 1.18 2000/06/27 17:55:39 mrg Exp $ */
+/* $NetBSD: db_variables.c,v 1.19 2000/07/05 16:29:25 jhawk Exp $ */
/*
* Mach Operating System
@@ -234,6 +234,7 @@
char * modif;
{
db_expr_t value;
+ db_expr_t old_value;
struct db_variable *vp;
int t;
@@ -260,5 +261,8 @@
/*NOTREACHED*/
}
+ db_read_variable(vp, &old_value);
+ db_printf("$%s\t\t%s = ", vp->name, db_num_to_str(old_value));
+ db_printf("%s\n", db_num_to_str(value));
db_write_variable(vp, &value);
}
Home |
Main Index |
Thread Index |
Old Index