summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/thumb2-it.S
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2010-02-01 16:16:30 +0000
committerDaniel Jacobowitz <drow@false.org>2010-02-01 16:16:30 +0000
commitf9d67f435f5d5dc575f02697e03f19996fa5db6b (patch)
treed0b057e14eab611b95ad5d934e608bb704c9189c /gdb/testsuite/gdb.arch/thumb2-it.S
parent177321bd85d5a3d4ca05d320696d8af43bc0fc05 (diff)
downloadbinutils-gdb-f9d67f435f5d5dc575f02697e03f19996fa5db6b.tar.gz
* arm-tdep.c (arm_find_mapping_symbol): New function, from
arm_pc_is_thumb. (arm_pc_is_thumb): Use arm_find_mapping_symbol. (extend_buffer_earlier): New function. (MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants. (arm_adjust_breakpoint_address): New function. (arm_gdbarch_init): Register arm_adjust_breakpoint_address. testsuite/ * gdb.arch/thumb2-it.S (it_breakpoints): New function. * gdb.arch/thumb2-it.exp (test_it_break): New function. (Top level): Call it.
Diffstat (limited to 'gdb/testsuite/gdb.arch/thumb2-it.S')
-rw-r--r--gdb/testsuite/gdb.arch/thumb2-it.S43
1 files changed, 43 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/thumb2-it.S b/gdb/testsuite/gdb.arch/thumb2-it.S
index a5aab8cb1be..700c92ad73d 100644
--- a/gdb/testsuite/gdb.arch/thumb2-it.S
+++ b/gdb/testsuite/gdb.arch/thumb2-it.S
@@ -136,4 +136,47 @@ it_8:
addlt r0, #8 @ Not reached
bx lr @ Done, Check $r0 == 1
+ .type it_breakpoints,%function
+ .thumb_func
+it_breakpoints:
+ mov r0, #0
+ cmp r0, #0
+ it eq @ Location 1 @ Break 1
+ moveq r0, #0
+
+ it eq @ Location 2
+ moveq r0, #0 @ Break 2
+
+ it ne @ Location 3
+ movne r0, #0 @ Break 3
+
+ @ An IT block of maximum size.
+ itttt eq @ Location 4
+ moveq.w r0, #0
+ moveq.w r0, #0
+ moveq.w r0, #0
+ moveq.w r0, #0 @ Break 4
+
+ @ Just outside an IT block.
+ it eq
+ moveq r0, #0
+ mov r0, #0 @ Location 5 @ Break 5
+
+ @ After something that looks like an IT block, but
+ @ is the second half of an instruction.
+ .p2align 6
+ cmp r0, r0
+ b 1f
+ b.w .+0xe14 @ 0xf000 0xbf08 -> second half is IT EQ
+1: mov r0, #0 @ Location 6 @ Break 6
+
+ @ After something that looks like an IT block, but
+ @ is data.
+ .p2align 6
+ b 1f
+ .short 0xbf08
+1: mov r0, #0 @ Location 7 @ Break 7
+
+ bx lr
+
#endif /* __thumb2__ */