xref: /openbsd-src/gnu/usr.bin/binutils/gdb/testsuite/gdb.base/break1.c (revision b725ae7711052a2233e31a66fefb8a752c388d7a)
1*b725ae77Skettenis /* This testcase is part of GDB, the GNU debugger.
2*b725ae77Skettenis 
3*b725ae77Skettenis    Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 Free Software
4*b725ae77Skettenis    Foundation, Inc.
5*b725ae77Skettenis 
6*b725ae77Skettenis    This program is free software; you can redistribute it and/or modify
7*b725ae77Skettenis    it under the terms of the GNU General Public License as published by
8*b725ae77Skettenis    the Free Software Foundation; either version 2 of the License, or
9*b725ae77Skettenis    (at your option) any later version.
10*b725ae77Skettenis 
11*b725ae77Skettenis    This program is distributed in the hope that it will be useful,
12*b725ae77Skettenis    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*b725ae77Skettenis    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*b725ae77Skettenis    GNU General Public License for more details.
15*b725ae77Skettenis 
16*b725ae77Skettenis    You should have received a copy of the GNU General Public License
17*b725ae77Skettenis    along with this program; if not, write to the Free Software
18*b725ae77Skettenis    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19*b725ae77Skettenis 
20*b725ae77Skettenis    Please email any bugs, comments, and/or additions to this file to:
21*b725ae77Skettenis    bug-gdb@prep.ai.mit.edu  */
22*b725ae77Skettenis 
23*b725ae77Skettenis /* The code for this file was extracted from the gdb testsuite
24*b725ae77Skettenis    testcase "break.c". */
25*b725ae77Skettenis 
26*b725ae77Skettenis /* The following functions do nothing useful.  They are included
27*b725ae77Skettenis    simply as places to try setting breakpoints at.  They are
28*b725ae77Skettenis    explicitly "one-line functions" to verify that this case works
29*b725ae77Skettenis    (some versions of gcc have or have had problems with this).
30*b725ae77Skettenis 
31*b725ae77Skettenis    These functions are in a separate source file to prevent an
32*b725ae77Skettenis    optimizing compiler from inlining them and optimizing them away. */
33*b725ae77Skettenis 
34*b725ae77Skettenis #ifdef PROTOTYPES
marker1(void)35*b725ae77Skettenis int marker1 (void) { return (0); }	/* set breakpoint 15 here */
marker2(int a)36*b725ae77Skettenis int marker2 (int a) { return (1); }	/* set breakpoint 8 here */
marker3(char * a,char * b)37*b725ae77Skettenis void marker3 (char *a, char *b) {}	/* set breakpoint 17 here */
marker4(long d)38*b725ae77Skettenis void marker4 (long d) {}		/* set breakpoint 14 here */
39*b725ae77Skettenis #else
marker1()40*b725ae77Skettenis int marker1 () { return (0); }		/* set breakpoint 16 here */
marker2(a)41*b725ae77Skettenis int marker2 (a) int a; { return (1); }	/* set breakpoint 9 here */
marker3(a,b)42*b725ae77Skettenis void marker3 (a, b) char *a, *b; {}	/* set breakpoint 18 here */
marker4(d)43*b725ae77Skettenis void marker4 (d) long d; {}		/* set breakpoint 13 here */
44*b725ae77Skettenis #endif
45