summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/consecutive.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-07-25 23:16:40 +0000
committerMichael Snyder <msnyder@vmware.com>2001-07-25 23:16:40 +0000
commitc2b8fa57f7eaa1617085e73f1e717fe17366247f (patch)
treee23af4c537fe674d7350d4c894f9620efd228322 /gdb/testsuite/gdb.base/consecutive.c
parentc70819faea567d04a914abf171e43e0b2d447198 (diff)
downloadbinutils-gdb-c2b8fa57f7eaa1617085e73f1e717fe17366247f.tar.gz
2001-07-25 Michael Snyder <msnyder@redhat.com>
* gdb.base/consecutive.exp: New file. Test stepping over breakpoints on consecutive instructions. * gdb.base/consecutive.c: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/consecutive.c')
-rw-r--r--gdb/testsuite/gdb.base/consecutive.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/consecutive.c b/gdb/testsuite/gdb.base/consecutive.c
new file mode 100644
index 00000000000..bfea4296aec
--- /dev/null
+++ b/gdb/testsuite/gdb.base/consecutive.c
@@ -0,0 +1,20 @@
+/*
+ Purpose of this test: to test breakpoints on consecutive instructions.
+*/
+
+int a[7] = {1, 2, 3, 4, 5, 6, 7};
+
+/* assert: first line of foo has more than one instruction. */
+int foo ()
+{
+ return a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6];
+}
+
+main()
+{
+#ifdef usestubs
+ set_debug_traps ();
+ breakpoint ();
+#endif
+ foo ();
+}