aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/limits.c
blob: d9c02e74bacdae0b9b19b67310ddcc7ec06d42fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * Test program for tracing internal limits (number of tracepoints etc.)
 */

int n = 6;

int arr[64];

static void foo(int x)
{
}

static void bar(int y)
{
}

static void baz(int z)
{
}

static void begin ()	/* called before anything else */
{
}

static void end ()	/* called after everything else */
{
}

int
main (argc, argv, envp)
     int argc;
     char *argv[], **envp;
{
  int i;

#ifdef usestubs
  set_debug_traps ();
  breakpoint ();
#endif

  begin ();
  for (i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
    arr[i] = i + 1;

  foo (1);
  bar (2);
  baz (3);
  end ();
  return 0;
}