target: rewrite command 'examine_deferred' as COMMAND_HANDLER
Check for empty command line, add the mandatory 'usage' field. Change-Id: I9c3606242ec3dda9026fe19222162a110e618bff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7506 Tested-by: jenkins
This commit is contained in:
parent
cca64798f8
commit
2dda0e37d9
|
@ -5728,14 +5728,16 @@ COMMAND_HANDLER(handle_target_was_examined)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int jim_target_examine_deferred(Jim_Interp *interp, int argc, Jim_Obj * const *argv)
|
||||
COMMAND_HANDLER(handle_target_examine_deferred)
|
||||
{
|
||||
struct command_context *cmd_ctx = current_command_context(interp);
|
||||
assert(cmd_ctx);
|
||||
struct target *target = get_current_target(cmd_ctx);
|
||||
if (CMD_ARGC != 0)
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
Jim_SetResultBool(interp, target->defer_examine);
|
||||
return JIM_OK;
|
||||
struct target *target = get_current_target(CMD_CTX);
|
||||
|
||||
command_print(CMD, "%d", target->defer_examine ? 1 : 0);
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int jim_target_halt_gdb(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
|
||||
|
@ -6087,8 +6089,9 @@ static const struct command_registration target_instance_command_handlers[] = {
|
|||
{
|
||||
.name = "examine_deferred",
|
||||
.mode = COMMAND_EXEC,
|
||||
.jim_handler = jim_target_examine_deferred,
|
||||
.handler = handle_target_examine_deferred,
|
||||
.help = "used internally for reset processing",
|
||||
.usage = "",
|
||||
},
|
||||
{
|
||||
.name = "arp_halt_gdb",
|
||||
|
|
Loading…
Reference in New Issue