Initial ETM cleanups. Most of these are cosmetic:
[openocd.git] / src / target / arm11.c
index 7f92ce470d690cbb6ce6401aca69e476c683361d..65fb2642233fb5c6487f39a76c8a66dae24ade9b 100644 (file)
@@ -2,7 +2,7 @@
  *   Copyright (C) 2008 digenius technology GmbH.                          *
  *   Michael Bruck                                                         *
  *                                                                         *
- *   Copyright (C) 2008 Oyvind Harboe oyvind.harboe@zylin.com              *
+ *   Copyright (C) 2008,2009 Oyvind Harboe oyvind.harboe@zylin.com         *
  *                                                                         *
  *   Copyright (C) 2008 Georg Acher <acher@in.tum.de>                      *
  *                                                                         *
@@ -374,6 +374,7 @@ int arm11_check_init(arm11_common_t * arm11, uint32_t * dscr)
   */
 static int arm11_on_enter_debug_state(arm11_common_t * arm11)
 {
+       int retval;
        FNC_INFO;
 
        for (size_t i = 0; i < asizeof(arm11->reg_values); i++)
@@ -459,7 +460,9 @@ static int arm11_on_enter_debug_state(arm11_common_t * arm11)
        for (size_t i = 0; i < 15; i++)
        {
                /* MCR p14,0,R?,c0,c5,0 */
-               arm11_run_instr_data_from_core(arm11, 0xEE000E15 | (i << 12), &R(RX + i), 1);
+               retval = arm11_run_instr_data_from_core(arm11, 0xEE000E15 | (i << 12), &R(RX + i), 1);
+               if (retval != ERROR_OK)
+                       return retval;
        }
 
        /* save rDTR */
@@ -484,7 +487,9 @@ static int arm11_on_enter_debug_state(arm11_common_t * arm11)
        /* save PC */
 
        /* MOV R0,PC (move PC -> r0 (-> wDTR -> local var)) */
-       arm11_run_instr_data_from_core_via_r0(arm11, 0xE1A0000F, &R(PC));
+       retval = arm11_run_instr_data_from_core_via_r0(arm11, 0xE1A0000F, &R(PC));
+       if (retval != ERROR_OK)
+               return retval;
 
        /* adjust PC depending on ARM state */
 
@@ -665,6 +670,7 @@ void arm11_record_register_history(arm11_common_t * arm11)
 int arm11_poll(struct target_s *target)
 {
        FNC_INFO;
+       int retval;
 
        arm11_common_t * arm11 = target->arch_info;
 
@@ -688,7 +694,9 @@ int arm11_poll(struct target_s *target)
                        LOG_DEBUG("enter TARGET_HALTED");
                        target->state                   = TARGET_HALTED;
                        target->debug_reason    = arm11_get_DSCR_debug_reason(dscr);
-                       arm11_on_enter_debug_state(arm11);
+                       retval = arm11_on_enter_debug_state(arm11);
+                       if (retval != ERROR_OK)
+                               return retval;
 
                        target_call_event_callbacks(target,
                                old_state == TARGET_DEBUG_RUNNING ? TARGET_EVENT_DEBUG_HALTED : TARGET_EVENT_HALTED);
@@ -1058,7 +1066,7 @@ int arm11_step(struct target_s *target, int current, uint32_t address, int handl
                        retval = arm11_simulate_step(target, &next_pc);
                        if (retval != ERROR_OK)
                                return retval;
-                               
+
                        brp[0].value    = next_pc;
                        brp[1].value    = 0x1 | (3 << 1) | (0x0F << 5) | (0 << 14) | (0 << 16) | (0 << 20) | (0 << 21);
                }

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)