RISC-V: Handle vector type alignment.
[external/binutils.git] / gdb / f-lang.h
1 /* Fortran language support definitions for GDB, the GNU debugger.
2
3    Copyright (C) 1992-2018 Free Software Foundation, Inc.
4
5    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
6    (fmbutt@engage.sps.mot.com).
7
8    This file is part of GDB.
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 3 of the License, or
13    (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22
23 struct type_print_options;
24 struct parser_state;
25
26 extern int f_parse (struct parser_state *);
27
28 extern void f_print_type (struct type *, const char *, struct ui_file *, int,
29                           int, const struct type_print_options *);
30
31 extern void f_val_print (struct type *, int, CORE_ADDR,
32                          struct ui_file *, int,
33                          struct value *,
34                          const struct value_print_options *);
35
36 /* Language-specific data structures */
37
38 /* A common block.  */
39
40 struct common_block
41 {
42   /* The number of entries in the block.  */
43   size_t n_entries;
44
45   /* The contents of the block, allocated using the struct hack.  All
46      pointers in the array are non-NULL.  */
47   struct symbol *contents[1];
48 };
49
50 extern int f77_get_upperbound (struct type *);
51
52 extern int f77_get_lowerbound (struct type *);
53
54 extern void f77_get_dynamic_array_length (struct type *);
55
56 extern int calc_f77_array_dims (struct type *);
57
58
59 /* Fortran (F77) types */
60
61 struct builtin_f_type
62 {
63   struct type *builtin_character;
64   struct type *builtin_integer;
65   struct type *builtin_integer_s2;
66   struct type *builtin_logical;
67   struct type *builtin_logical_s1;
68   struct type *builtin_logical_s2;
69   struct type *builtin_logical_s8;
70   struct type *builtin_real;
71   struct type *builtin_real_s8;
72   struct type *builtin_real_s16;
73   struct type *builtin_complex_s8;
74   struct type *builtin_complex_s16;
75   struct type *builtin_complex_s32;
76   struct type *builtin_void;
77 };
78
79 /* Return the Fortran type table for the specified architecture.  */
80 extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
81