command: Cleaned up cmd_debug_bmp
This commit is contained in:
parent
a467568325
commit
e013b48139
|
@ -615,23 +615,20 @@ static bool cmd_traceswo(target *t, int argc, const char **argv)
|
||||||
static bool cmd_debug_bmp(target *t, int argc, const char **argv)
|
static bool cmd_debug_bmp(target *t, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
(void)t;
|
(void)t;
|
||||||
bool print_status = false;
|
if (argc == 2) {
|
||||||
if (argc == 1) {
|
if (!parse_enable_or_disable(argv[1], &debug_bmp))
|
||||||
print_status = true;
|
return false;
|
||||||
} else if (argc == 2) {
|
}
|
||||||
if (parse_enable_or_disable(argv[1], &debug_bmp)) {
|
else if (argc > 2) {
|
||||||
print_status = true;
|
gdb_outf("usage: monitor debug [enable|disable]\n");
|
||||||
}
|
return false;
|
||||||
} else {
|
|
||||||
gdb_outf("Unrecognized command format\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_status) {
|
gdb_outf("Debug mode is %s\n", debug_bmp ? "enabled" : "disabled");
|
||||||
gdb_outf("Debug mode is %s\n", debug_bmp ? "enabled" : "disabled");
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool cmd_heapinfo(target *t, int argc, const char **argv)
|
static bool cmd_heapinfo(target *t, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
|
|
Loading…
Reference in New Issue