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/arm7_9_common.c | |
parent | 6c573df11d1c1bc76c897d0688adfd00ec56ca8e (diff) | |
download | openocd+libswd-44ef0327dd97c1893afc63cd7fd8025cb1b57827.tar.gz openocd+libswd-44ef0327dd97c1893afc63cd7fd8025cb1b57827.tar.bz2 openocd+libswd-44ef0327dd97c1893afc63cd7fd8025cb1b57827.tar.xz openocd+libswd-44ef0327dd97c1893afc63cd7fd8025cb1b57827.zip |
debug: debug entry error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/arm7_9_common.c')
-rw-r--r-- | src/target/arm7_9_common.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index abe0c2f1..b742daeb 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -1470,7 +1470,11 @@ static int arm7_9_debug_entry(struct target *target) return retval; if (arm7_9->post_debug_entry) - arm7_9->post_debug_entry(target); + { + retval = arm7_9->post_debug_entry(target); + if (retval != ERROR_OK) + return retval; + } return ERROR_OK; } @@ -1878,7 +1882,9 @@ int arm7_9_resume(struct target *target, int current, uint32_t address, int hand return err; } - arm7_9_debug_entry(target); + retval = arm7_9_debug_entry(target); + if (retval != ERROR_OK) + return retval; LOG_DEBUG("new PC after step: 0x%8.8" PRIx32, buf_get_u32(armv4_5->pc->value, 0, 32)); @@ -2079,7 +2085,9 @@ int arm7_9_step(struct target *target, int current, uint32_t address, int handle { target->state = TARGET_UNKNOWN; } else { - arm7_9_debug_entry(target); + retval = arm7_9_debug_entry(target); + if (retval != ERROR_OK) + return retval; if ((retval = target_call_event_callbacks(target, TARGET_EVENT_HALTED)) != ERROR_OK) { return retval; |