diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 12:34:54 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 22:13:49 +0200 |
commit | 44ef0327dd97c1893afc63cd7fd8025cb1b57827 (patch) | |
tree | 1801b2330958dbfffea61eb2c8cfff033682761a /src/target/cortex_m3.c | |
parent | 6c573df11d1c1bc76c897d0688adfd00ec56ca8e (diff) |
debug: debug entry error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/cortex_m3.c')
-rw-r--r-- | src/target/cortex_m3.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 7f6cbafa..4f3560f7 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -442,7 +442,11 @@ static int cortex_m3_debug_entry(struct target *target) target_state_name(target)); if (armv7m->post_debug_entry) - armv7m->post_debug_entry(target); + { + retval = armv7m->post_debug_entry(target); + if (retval != ERROR_OK) + return retval; + } return ERROR_OK; } @@ -813,7 +817,10 @@ static int cortex_m3_step(struct target *target, int current, " nvic_icsr = 0x%" PRIx32, cortex_m3->dcb_dhcsr, cortex_m3->nvic_icsr); - cortex_m3_debug_entry(target); + int retval; + retval = cortex_m3_debug_entry(target); + if (retval != ERROR_OK) + return retval; target_call_event_callbacks(target, TARGET_EVENT_HALTED); LOG_DEBUG("target stepped dcb_dhcsr = 0x%" PRIx32 |