2009-07-01 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / find.c
CommitLineData
08388c79
DE
1/* Testcase for the find command.
2 This testcase is part of GDB, the GNU debugger.
3
0fb0cc75 4 Copyright 2008, 2009 Free Software Foundation, Inc.
08388c79
DE
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 Please email any bugs, comments, and/or additions to this file to:
20 bug-gdb@gnu.org */
21
22#include <stdlib.h>
23#include <stdint.h>
24
25#define CHUNK_SIZE 16000 /* same as findcmd.c's */
26#define BUF_SIZE (2 * CHUNK_SIZE) /* at least two chunks */
27
28static int8_t int8_search_buf[100];
29static int16_t int16_search_buf[100];
30static int32_t int32_search_buf[100];
31static int64_t int64_search_buf[100];
32
33static char *search_buf;
34static int search_buf_size;
35
36static int x;
37
38static void
39stop_here ()
40{
41 x = 1; // stop here
42}
43
44static void
45init_bufs ()
46{
47 search_buf_size = BUF_SIZE;
48 search_buf = malloc (search_buf_size);
49 if (search_buf == NULL)
50 exit (1);
51 memset (search_buf, 'x', search_buf_size);
52}
53
54int
55main ()
56{
57 init_bufs ();
58
59 stop_here ();
60
61 return 0;
62}
This page took 0.132899 seconds and 4 git commands to generate.