dd77bbdec08b4f0964e75053d592e1622924e313
1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 1996, 1999, 2003 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 2 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, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 code_entry_point
, code_descriptor
, data_pointer
28 static volatile enum tests test
;
30 /* Some basic types and zero buffers. */
33 typedef long code_t (void);
34 static volatile data_t
*data
[10];
35 static volatile code_t
*code
[10];
52 case code_entry_point
:
55 return ((code_t
*) &code
) ();
62 static volatile int i
;
65 memset (&act
, 0, sizeof act
);
66 act
.sa_handler
= keeper
;
67 sigaction (SIGSEGV
, &act
, NULL
);
69 for (i
= 0; i
< 10; i
++)