summaryrefslogtreecommitdiff
path: root/src/target/arm11.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-27 12:02:07 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-27 12:02:07 +0000
commitbd7d019b56a17c133f2696ae0e16f280f01236a8 (patch)
tree8c119045b07399c8c6d57f07c3318e2a48226671 /src/target/arm11.c
parent4866c8ed25ebc915db51824046589547f1f8585d (diff)
downloadopenocd+libswd-bd7d019b56a17c133f2696ae0e16f280f01236a8.tar.gz
openocd+libswd-bd7d019b56a17c133f2696ae0e16f280f01236a8.tar.bz2
openocd+libswd-bd7d019b56a17c133f2696ae0e16f280f01236a8.tar.xz
openocd+libswd-bd7d019b56a17c133f2696ae0e16f280f01236a8.zip
more error handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1543 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/arm11.c')
-rw-r--r--src/target/arm11.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index de9aecdd..0013db55 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -932,7 +932,8 @@ int arm11_step(struct target_s *target, int current, u32 address, int handle_bre
u32 next_instruction;
- arm11_read_memory_word(arm11, R(PC), &next_instruction);
+ if ((arm11_read_memory_word(arm11, R(PC), &next_instruction))!=ERROR_OK)
+ return retval;
/* skip over BKPT */
if ((next_instruction & 0xFFF00070) == 0xe1200070)
@@ -976,7 +977,8 @@ int arm11_step(struct target_s *target, int current, u32 address, int handle_bre
brp[1].address = ARM11_SC7_BCR0;
brp[1].value = 0x1 | (3 << 1) | (0x0F << 5) | (0 << 14) | (0 << 16) | (0 << 20) | (2 << 21);
- arm11_sc7_run(arm11, brp, asizeof(brp));
+ if ((retval=arm11_sc7_run(arm11, brp, asizeof(brp)))!=ERROR_OK)
+ return retval;
/* resume */
@@ -987,7 +989,8 @@ int arm11_step(struct target_s *target, int current, u32 address, int handle_bre
R(DSCR) |= ARM11_DSCR_INTERRUPTS_DISABLE;
- arm11_leave_debug_state(arm11);
+ if ((retval=arm11_leave_debug_state(arm11))!=ERROR_OK)
+ return retval;
arm11_add_IR(arm11, ARM11_RESTART, TAP_IDLE);
@@ -1018,7 +1021,8 @@ int arm11_step(struct target_s *target, int current, u32 address, int handle_bre
arm11_sc7_clear_vbw(arm11);
/* save state */
- arm11_on_enter_debug_state(arm11);
+ if((retval = arm11_on_enter_debug_state(arm11))!=ERROR_OK)
+ return retval;
/* restore default state */
R(DSCR) &= ~ARM11_DSCR_INTERRUPTS_DISABLE;