* gdb.arch/i386-prologue.exp (skip_breakpoint): New function. Use
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / gdb1250.c
CommitLineData
98a23b3f
MC
1/* Test program for stack trace through noreturn function.
2
3 Copyright 2003 Free Software Foundation, Inc.
4
5 This file is part of the gdb testsuite.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
21
22 This file was written by Michael Elizabeth Chastain (mec@shout.net). */
23
24#include <stdlib.h>
25
26int global = 0;
27
04ed252f
MC
28/* Foo, gcc thinks 'gamma' is a reserved identifier.
29 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213
30 I am not interested in testing that point so just avoid the word.
31 -- chastain 2003-09-08. */
32void my_gamma (int *parray)
98a23b3f
MC
33{
34 return;
35}
36
37void beta ()
38{
39 int array [4];
40 array [0] = global++;
41 array [1] = global++;
42 array [2] = global++;
43 array [3] = global++;
04ed252f 44 my_gamma (array);
98a23b3f
MC
45 abort ();
46}
47
48int alpha ()
49{
50 global++;
51 beta ();
52 return 0;
53}
54
55int main ()
56{
57 int i;
58 global++;
59 i = alpha ();
60 return i;
61}
This page took 0.151832 seconds and 4 git commands to generate.