Fix crash when exiting TUI with gdb -tui
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / advance.c
1
2 static int x;
3
4 int foo (int a)
5 {
6 int b = a + 10;
7 return b;
8 }
9
10 int bar (int y)
11 {
12 int z = y + 20;
13 return z;
14 }
15
16 int func2 ()
17 {
18 x = 6;
19 return x;
20 }
21
22 void func(int c)
23 {
24 x = x + 5;
25 func2 ();
26 }
27
28 int func3 ()
29 {
30 x = 4;
31 return x;
32 }
33
34 void marker1 ()
35 {
36 }
37
38 int
39 main ()
40 {
41 int result;
42 int b, c;
43 c = 5;
44 b = 3; /* advance this location */
45
46 func (c); /* stop here after leaving current frame */
47 marker1 (); /* stop here after leaving current frame */
48 func3 (); /* break here */
49 result = bar (b + foo (c));
50 return 0; /* advance malformed */
51 }
52
This page took 0.034472 seconds and 4 git commands to generate.