]> git.sur5r.net Git - openocd/commitdiff
Oleksandr Tymoshenko <gonzo@bluezbox.com>:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 21 Jun 2009 04:58:53 +0000 (04:58 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 21 Jun 2009 04:58:53 +0000 (04:58 +0000)
Resume command works only if resume address is provided.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2348 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/target.c

index e059861dc80203cc581741e368bc5c4325a9cfef..b7917cade9987e5018aa3a0c8e2b18f72a2a3d48 100644 (file)
@@ -1996,6 +1996,7 @@ static int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, ch
 
 static int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
+       int current = 1;
        if (argc > 1)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
@@ -2011,9 +2012,10 @@ static int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, c
                int retval = parse_u32(args[0], &addr);
                if (ERROR_OK != retval)
                        return retval;
+               current = 0;
        }
 
-       return target_resume(target, 0, addr, 1, 0);
+       return target_resume(target, current, addr, 1, 0);
 }
 
 static int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)