Make the ddb(4) "set" command list variables when called without parameters.
Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL
This commit is contained in:
parent
923fadf4e8
commit
410d6f52ca
@ -134,6 +134,17 @@ db_set_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
int t;
|
||||
|
||||
t = db_read_token();
|
||||
if (t == tEOL) {
|
||||
for (vp = db_vars; vp < db_evars; vp++) {
|
||||
if (!db_read_variable(vp, &value)) {
|
||||
db_printf("$%s\n", vp->name);
|
||||
continue;
|
||||
}
|
||||
db_printf("$%-8s = %ld\n",
|
||||
vp->name, (unsigned long)value);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (t != tDOLLAR) {
|
||||
db_error("Unknown variable\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user