On Tue, 3 Mar 2009, Øyvind Harboe wrote:
> You could use "catch {halt 0}" or modify handle_wait_halt_command to
> be a silent no-op when ms=0
> if poll has side effects that you want to avoid.
Well, actually the documentation for "halt" says that an argument of 0
should skip waiting for the halted state. This patch brings the code in
agreement with the doc.
diff --git a/src/target/target.c b/src/target/target.c
index 6a72c5b..81063a6 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -1759,6 +1759,9 @@ int handle_halt_command(struct command_context_s
*cmd_ctx, char *cmd, char **arg
return retval;
}
+ if (argc == 1 && strcmp(args[0], "0") == 0)
+ return ERROR_OK;
+
return handle_wait_halt_command(cmd_ctx, cmd, args, argc);
}
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development