ignore invalid DOF provider sections
[binutils-gdb.git] / gdb / testsuite / gdb.python / py-framefilter.c
blobdb3b3607d91362741506817072746063a6f3694b
1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2013-2015 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 #include <stdlib.h>
20 void funca(void);
21 int count = 0;
23 typedef struct
25 char *nothing;
26 int f;
27 short s;
28 } foobar;
30 void end_func (int foo, char *bar, foobar *fb, foobar bf)
32 const char *str = "The End";
33 const char *st2 = "Is Near";
34 int b = 12;
35 short c = 5;
38 int d = 15;
39 int e = 14;
40 const char *foo = "Inside block";
42 int f = 42;
43 int g = 19;
44 const char *bar = "Inside block x2";
46 short h = 9;
47 h = h +1; /* Inner test breakpoint */
52 return; /* Backtrace end breakpoint */
55 void funcb(int j)
57 struct foo
59 int a;
60 int b;
63 struct foo bar;
65 bar.a = 42;
66 bar.b = 84;
68 funca();
69 return;
72 void funca(void)
74 foobar fb;
75 foobar *bf = NULL;
77 if (count < 10)
79 count++;
80 funcb(count);
83 fb.nothing = "Foo Bar";
84 fb.f = 42;
85 fb.s = 19;
87 bf = alloca (sizeof (foobar));
88 bf->nothing = alloca (128);
89 bf->nothing = "Bar Foo";
90 bf->f = 24;
91 bf->s = 91;
93 end_func(21, "Param", bf, fb);
94 return;
98 void func1(void)
100 funca();
101 return;
104 int func2(int f)
106 int c;
107 const char *elided = "Elided frame";
108 foobar fb;
109 foobar *bf = NULL;
111 fb.nothing = "Elided Foo Bar";
112 fb.f = 84;
113 fb.s = 38;
115 bf = alloca (sizeof (foobar));
116 bf->nothing = alloca (128);
117 bf->nothing = "Elided Bar Foo";
118 bf->f = 48;
119 bf->s = 182;
121 func1();
122 return 1;
125 void func3(int i)
127 func2(i);
129 return;
132 int func4(int j)
134 func3(j);
136 return 2;
139 int func5(int f, int d)
141 int i = 0;
142 char *random = "random";
143 i=i+f;
145 func4(i);
146 return i;
150 main()
152 int z = 32;
153 int y = 44;
154 const char *foo1 = "Test";
155 func5(3,5);
156 return 0;