summaryrefslogtreecommitdiff
path: root/Debugger
diff options
context:
space:
mode:
Diffstat (limited to 'Debugger')
-rw-r--r--Debugger/debug_stub.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index 19645a5..6dfb333 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -1412,8 +1412,9 @@ _dbg__install_one_breakpoint:
/* Check for Thumb bit */
tst r1, #BKPT_STATE_THUMB_FLAG /* 1: Thumb instruction */
/* Assume that the address entry is valid, otherwise we should sanitize it (mask out b1) */
- ldreq r2, [r1] /* if 0: load ARM instruction from address location */
- ldrneh r2, [r1] /* else load Thumb instruction */
+ bic r2, r1, #BKPT_STATE_THUMB_FLAG /* R2: Instruction Address; clear Thumb Flag for accessing to Memory */
+ ldreq r2, [r2] /* if 0: load ARM instruction from address location */
+ ldrneh r2, [r2] /* else load Thumb instruction */
_index2bkptindex_addr r0, r3 /* Calculate Breakpoint Entry Address */
stm r3, {r1, r2}
bx lr