target: whitespace cleanup
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Thu, 13 Oct 2011 18:58:06 +0000 (19:58 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 13 Oct 2011 20:18:43 +0000 (20:18 +0000)
Change-Id: I1453f4f3dc0add529da20577e38b8b82d7d00366
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Reviewed-on: http://openocd.zylin.com/18
Reviewed-by: Alex Austin <alex.austin@spectrumdsi.com>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/target.c

index e03b39892a3b9bdd1e9cce6c27dd7a3e51eca279..b68eee36acd91998c30ed0ed0cb7b9caea9b3a19 100644 (file)
@@ -3050,42 +3050,41 @@ static int handle_bp_command_set(struct command_context *cmd_ctx,
                uint32_t addr, uint32_t asid, uint32_t length, int hw)
 {
        struct target *target = get_current_target(cmd_ctx);
-       
-               if (asid == 0)
-               {       int retval = breakpoint_add(target, addr, length, hw);
-                       if (ERROR_OK == retval)
-                               command_print(cmd_ctx, "breakpoint set at 0x%8.8" PRIx32 "", addr);
-                       else
-                       {
-                               LOG_ERROR("Failure setting breakpoint, the same address(IVA) is already used");
-                               return retval;
-                       }
-               }
-               else if (addr == 0)
+
+       if (asid == 0)
+       {
+               int retval = breakpoint_add(target, addr, length, hw);
+               if (ERROR_OK == retval)
+                       command_print(cmd_ctx, "breakpoint set at 0x%8.8" PRIx32 "", addr);
+               else
                {
-                       int retval = context_breakpoint_add(target, asid, length, hw);
-                       if (ERROR_OK == retval)
-                               command_print(cmd_ctx, "Context breakpoint set at 0x%8.8" PRIx32 "", asid);
-                       else
-                       {
-                               LOG_ERROR("Failure setting breakpoint, the same address(CONTEXTID) is already used");
-                               return retval;
-                       }
+                       LOG_ERROR("Failure setting breakpoint, the same address(IVA) is already used");
+                       return retval;
                }
+       }
+       else if (addr == 0)
+       {
+               int retval = context_breakpoint_add(target, asid, length, hw);
+               if (ERROR_OK == retval)
+                       command_print(cmd_ctx, "Context breakpoint set at 0x%8.8" PRIx32 "", asid);
                else
-               {       
-                       int retval = hybrid_breakpoint_add(target, addr, asid, length, hw);
-                       if(ERROR_OK == retval)
+               {
+                       LOG_ERROR("Failure setting breakpoint, the same address(CONTEXTID) is already used");
+                       return retval;
+               }
+       }
+       else
+       {
+               int retval = hybrid_breakpoint_add(target, addr, asid, length, hw);
+               if(ERROR_OK == retval)
                        command_print(cmd_ctx, "Hybrid breakpoint set at 0x%8.8" PRIx32 "", asid);
-                       else
-                       {
-                               LOG_ERROR("Failure setting breakpoint, the same address is already used");
-                               return retval;
-                       }
+               else
+               {
+                       LOG_ERROR("Failure setting breakpoint, the same address is already used");
+                       return retval;
                }
+       }
        return ERROR_OK;
-
-       
 }
 
 COMMAND_HANDLER(handle_bp_command)
@@ -3106,7 +3105,6 @@ COMMAND_HANDLER(handle_bp_command)
                        return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
 
                case 3:
-
                        if(strcmp(CMD_ARGV[2], "hw") == 0)
                        {
                                hw = BKPT_HARD;
@@ -3132,12 +3130,11 @@ COMMAND_HANDLER(handle_bp_command)
                        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], asid);
                        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], length);
                        return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
+
                default:
                        command_print(CMD_CTX, "usage: bp <address> [<asid>]<length> ['hw'|'hw_ctx']");
                        return ERROR_COMMAND_SYNTAX_ERROR;
        }
-
-       
 }
 
 COMMAND_HANDLER(handle_rbp_command)
@@ -5108,7 +5105,7 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        retval = 0;
        LOG_DEBUG("%d",argc);
        /* argv[1] = target to associate in smp
-        * argv[2] = target to assoicate in smp 
+        * argv[2] = target to assoicate in smp
         * argv[3] ...
         */
 
@@ -5145,7 +5142,7 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        target->head = head;
        curr=curr->next;
        }
-       return retval; 
+       return retval;
 }
 
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)