* Fixed the "unset" command and added useful error output (faulted before).
* Fixed removing temporary variables (they would always be removed except one after the first command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23555 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -104,7 +104,12 @@ cmd_unset_variable(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
remove_debug_variable(argv[2]);
|
||||
const char* variable = argv[1];
|
||||
|
||||
if (is_temporary_variable(variable))
|
||||
kprintf("You cannot remove temporary variables.\n");
|
||||
else if (!remove_debug_variable(variable))
|
||||
kprintf("Did not find variable %s.\n", variable);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -203,7 +208,7 @@ remove_all_temporary_debug_variables()
|
||||
for (int i = 0; i < kTemporaryVariableCount; i++) {
|
||||
Variable& variable = sTemporaryVariables[i];
|
||||
if (!variable.IsUsed())
|
||||
return;
|
||||
break;
|
||||
|
||||
variable.Uninit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user