summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/return.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>1999-04-16 01:33:56 +0000
committerStan Shebs <shebs@apple.com>1999-04-16 01:33:56 +0000
commit838ae13dc4ab603f1efdf1da653e2ca1b7b009e1 (patch)
tree8d3c114b0ba9d2a1f0dcadd192ba2aaeeafe7175 /gdb/testsuite/gdb.base/return.c
downloadgdb-838ae13dc4ab603f1efdf1da653e2ca1b7b009e1.tar.gz
Initial revision
Diffstat (limited to 'gdb/testsuite/gdb.base/return.c')
-rw-r--r--gdb/testsuite/gdb.base/return.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/return.c b/gdb/testsuite/gdb.base/return.c
new file mode 100644
index 00000000000..e19d1a0b1f2
--- /dev/null
+++ b/gdb/testsuite/gdb.base/return.c
@@ -0,0 +1,35 @@
+#include <stdio.h>
+/* Test "return" command. */
+
+func1 ()
+{
+ printf("in func1\n");
+}
+
+int
+func2 ()
+{
+ return -5;
+}
+
+double
+func3 ()
+{
+ return -5.0;
+}
+
+int tmp2;
+double tmp3;
+
+main ()
+{
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+ func1 ();
+ printf("in main after func1\n");
+ tmp2 = func2 ();
+ tmp3 = func3 ();
+ printf("exiting\n");
+}