tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ddb write and io memory
Hi,
I just ran into a problem with ddb when using the "write" command on
write-only IO registers.
Unfortunately it reads the memory location before writing it, to be able to
display the previous value. That's fatal with registers which don't care
about the R/W line but take any access to a specific address as a write
access. In most cases this will write all 1-bits before writing the desired
value, which could trigger unwanted effects.
Therefore I would like to change ddb/db_write_cmd.c as in the following
patch:
--- db_write_cmd.c 7 Mar 2009 22:02:17 -0000 1.23
+++ db_write_cmd.c 30 Jan 2010 19:43:24 -0000
@@ -46,7 +46,6 @@
db_expr_t count, const char *modif)
{
db_addr_t addr;
- db_expr_t old_value;
db_expr_t new_value;
int size;
bool wrote_one = false;
@@ -71,10 +70,8 @@
}
while (db_expression(&new_value)) {
- old_value = db_get_value(addr, size, false);
db_printsym(addr, DB_STGY_ANY, db_printf);
- db_printf("\t\t%s = ", db_num_to_str(old_value));
- db_printf("%s\n", db_num_to_str(new_value));
+ db_printf("\t\t= %s\n", db_num_to_str(new_value));
db_put_value(addr, size, new_value);
addr += size;
Any objections? Do we absolutely need to print the old value here?
--
Frank Wille
Home |
Main Index |
Thread Index |
Old Index