]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/smoke.c
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / smoke.c
1 /* Test various kinds of stepping.
2 */
3 int glob = 0;
4
5 int callee() {
6 glob++;
7 return (0);
8 }
9
10 int main () {
11 int w,x,y,z;
12 int a[10], b[10];
13
14 /* Test "next" and "step" */
15 w = 0;
16 x = 1;
17 y = 2;
18 z = 3;
19 w = w + 2;
20 x = x + 3;
21 y = y + 4;
22 z = z + 5;
23
24 /* Test that "next" goes over a call */
25 callee(); /* OVER */
26
27 /* Test that "step" doesn't */
28 callee(); /* INTO */
29
30 /* Test "stepi" */
31 a[5] = a[3] - a[4];
32 callee(); /* STEPI */
33
34 /* Test "nexti" */
35 callee(); /* NEXTI */
36
37 y = w + z;
38
39 return (0);
40 }