summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/overlays.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/overlays.c
downloadgdb-838ae13dc4ab603f1efdf1da653e2ca1b7b009e1.tar.gz
Initial revision
Diffstat (limited to 'gdb/testsuite/gdb.base/overlays.c')
-rw-r--r--gdb/testsuite/gdb.base/overlays.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/overlays.c b/gdb/testsuite/gdb.base/overlays.c
new file mode 100644
index 00000000000..d02ed707cd1
--- /dev/null
+++ b/gdb/testsuite/gdb.base/overlays.c
@@ -0,0 +1,34 @@
+/* Support program for testing gdb's ability to debug overlays
+ in the inferior. */
+
+#include "ovlymgr.h"
+
+extern int foo PARAMS((int));
+extern int bar PARAMS((int));
+extern int baz PARAMS((int));
+extern int grbx PARAMS((int));
+
+int main ()
+{
+ int a, b, c, d, e;
+
+ OverlayLoad (0);
+ OverlayLoad (4);
+ a = foo (1);
+ OverlayLoad (1);
+ OverlayLoad (5);
+ b = bar (1);
+ OverlayLoad (2);
+ OverlayLoad (6);
+ c = baz (1);
+ OverlayLoad (3);
+ OverlayLoad (7);
+ d = grbx (1);
+ e = a + b + c + d;
+ return (e != ('f' + 'o' +'o'
+ + 'b' + 'a' + 'r'
+ + 'b' + 'a' + 'z'
+ + 'g' + 'r' + 'b' + 'x'));
+
+}
+