1 /* Copyright 2014-2021 Free Software Foundation, Inc.
3 This file is part of GDB.
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 3 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, see <http://www.gnu.org/licenses/>. */
18 /* This C file provides some global variables laid out in a way
19 that mimicks what the GNAT Ada compiler calls "fat pointers".
20 These fat pointers are the memory representation used by
21 the compiler to handle dynamic arrays.
23 Debugging information on how to decode that data into an array
24 will be generated separately by the testcase using that file. */
32 int table_1_data
[] = {1, 2, 3};
33 int table_1_bounds
[] = {1, 3};
34 struct fat_pointer table_1
= {table_1_data
, table_1_bounds
};
36 int table_2_data
[] = {5, 8, 13, 21, 34};
37 int table_2_bounds
[] = {2, 6};
38 struct fat_pointer table_2
= {table_2_data
, table_2_bounds
};
43 table_1
.bounds
[1] = 2;
44 table_2
.bounds
[1] = 3;