New test case gdb.arch/disp-step-insn-reloc.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / thumb2-it.exp
index 5ef8475fde2ba5735e9afe9709c86896470598b8..8693e9a458db3182bd5b3c3ca0cd7c7541f80b88 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2010 Free Software Foundation, Inc.
+# Copyright 2010-2015 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -125,6 +125,23 @@ proc test_it_block { func } {
     return
 }
 
+proc test_it_break { ndx } {
+    global software_step
+
+    set line [gdb_get_line_number "@ Break ${ndx}"]
+
+    if { ! [gdb_breakpoint "${line}"] } {
+       unresolved "continue to breakpoint: test ${ndx}"
+       return
+    }
+
+    if { $software_step } {
+       gdb_continue_to_breakpoint "test ${ndx}" ".*@ Location ${ndx}.*"
+    } else {
+       gdb_continue_to_breakpoint "test ${ndx}" ".*@ Break ${ndx}.*"
+    }
+}
+
 # If we are using software single-stepping in GDB, then GDB will not
 # stop at conditional instructions with a false predicate during stepi.
 # If we are using a simulator or debug interface with hardware single
@@ -138,3 +155,9 @@ if { [istarget arm*-linux*] } {
 for { set i 1 } { $i <= 8 } { incr i } {
     test_it_block it_${i}
 }
+
+gdb_breakpoint "*it_breakpoints"
+gdb_test "call it_breakpoints()" "Breakpoint.*"
+for { set i 1 } { $i <= 7 } { incr i } {
+    test_it_break ${i}
+}
This page took 0.02369 seconds and 4 git commands to generate.