Skip to content

Commit

Permalink
xtensa: allow single-stepping through unaligned load/store
Browse files Browse the repository at this point in the history
Update icount when icountlevel is non-zero but not greater than EXCM level
when load/store instruction is successfully emulated. This allows
single-stepping over such instruction in userspace debugger.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
Max Filippov committed Aug 14, 2014
1 parent 2157046 commit a83b02e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/xtensa/kernel/align.S
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,14 @@ ENTRY(fast_unaligned)

1: wsr a7, epc1 # skip emulated instruction

/* Update icount if we're single-stepping in userspace. */
rsr a4, icountlevel
beqz a4, 1f
bgeui a4, LOCKLEVEL + 1, 1f
rsr a4, icount
addi a4, a4, 1
wsr a4, icount
1:
movi a4, 0
rsr a3, excsave1
s32i a4, a3, EXC_TABLE_FIXUP
Expand Down

0 comments on commit a83b02e

Please sign in to comment.