Better reporting when monitor command fails.
This commit is contained in:
parent
9e98cfa220
commit
554e34517e
|
@ -374,7 +374,8 @@ handle_q_packet(char *packet, int len)
|
|||
else if(c == 0)
|
||||
gdb_putpacketz("OK");
|
||||
else
|
||||
gdb_putpacketz("E");
|
||||
gdb_putpacket(hexify(pbuf, "Failed\n", strlen("Failed\n")),
|
||||
2 * strlen("Failed\n"));
|
||||
|
||||
} else if (!strncmp (packet, "qSupported", 10)) {
|
||||
/* Query supported protocol features */
|
||||
|
|
|
@ -448,7 +448,9 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
|||
DEBUG_WARN("No test for this core type yet\n");
|
||||
}
|
||||
} else if (opt->opt_mode == BMP_MODE_MONITOR) {
|
||||
command_process(t, opt->opt_monitor);
|
||||
res = command_process(t, opt->opt_monitor);
|
||||
if (res)
|
||||
DEBUG_WARN("Command \"%s\" failed\n", opt->opt_monitor);
|
||||
}
|
||||
if ((opt->opt_mode == BMP_MODE_TEST) ||
|
||||
(opt->opt_mode == BMP_MODE_SWJ_TEST))
|
||||
|
|
|
@ -574,7 +574,7 @@ int target_command(target *t, int argc, const char *argv[])
|
|||
for (struct target_command_s *tc = t->commands; tc; tc = tc->next)
|
||||
for(const struct command_s *c = tc->cmds; c->cmd; c++)
|
||||
if(!strncmp(argv[0], c->cmd, strlen(argv[0])))
|
||||
return !c->handler(t, argc, argv);
|
||||
return (c->handler(t, argc, argv)) ? 0 : 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue