| 1 | /* Fortran language support definitions for GDB, the GNU debugger. |
| 2 | |
| 3 | Copyright (C) 1992-2014 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 | |
| 25 | extern int f_parse (void); |
| 26 | |
| 27 | extern void f_error (char *); /* Defined in f-exp.y */ |
| 28 | |
| 29 | extern void f_print_type (struct type *, const char *, struct ui_file *, int, |
| 30 | int, const struct type_print_options *); |
| 31 | |
| 32 | extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, |
| 33 | struct ui_file *, int, |
| 34 | const struct value *, |
| 35 | const struct value_print_options *); |
| 36 | |
| 37 | /* Language-specific data structures */ |
| 38 | |
| 39 | /* In F90 subrange expression, either bound could be empty, indicating that |
| 40 | its value is by default that of the corresponding bound of the array or |
| 41 | string. So we have four sorts of subrange in F90. This enumeration type |
| 42 | is to identify this. */ |
| 43 | |
| 44 | enum f90_range_type |
| 45 | { |
| 46 | BOTH_BOUND_DEFAULT, /* "(:)" */ |
| 47 | LOW_BOUND_DEFAULT, /* "(:high)" */ |
| 48 | HIGH_BOUND_DEFAULT, /* "(low:)" */ |
| 49 | NONE_BOUND_DEFAULT /* "(low:high)" */ |
| 50 | }; |
| 51 | |
| 52 | /* A common block. */ |
| 53 | |
| 54 | struct common_block |
| 55 | { |
| 56 | /* The number of entries in the block. */ |
| 57 | size_t n_entries; |
| 58 | |
| 59 | /* The contents of the block, allocated using the struct hack. All |
| 60 | pointers in the array are non-NULL. */ |
| 61 | struct symbol *contents[1]; |
| 62 | }; |
| 63 | |
| 64 | extern int f77_get_upperbound (struct type *); |
| 65 | |
| 66 | extern int f77_get_lowerbound (struct type *); |
| 67 | |
| 68 | extern void f77_get_dynamic_array_length (struct type *); |
| 69 | |
| 70 | extern int calc_f77_array_dims (struct type *); |
| 71 | |
| 72 | |
| 73 | /* Fortran (F77) types */ |
| 74 | |
| 75 | struct builtin_f_type |
| 76 | { |
| 77 | struct type *builtin_character; |
| 78 | struct type *builtin_integer; |
| 79 | struct type *builtin_integer_s2; |
| 80 | struct type *builtin_logical; |
| 81 | struct type *builtin_logical_s1; |
| 82 | struct type *builtin_logical_s2; |
| 83 | struct type *builtin_logical_s8; |
| 84 | struct type *builtin_real; |
| 85 | struct type *builtin_real_s8; |
| 86 | struct type *builtin_real_s16; |
| 87 | struct type *builtin_complex_s8; |
| 88 | struct type *builtin_complex_s16; |
| 89 | struct type *builtin_complex_s32; |
| 90 | struct type *builtin_void; |
| 91 | }; |
| 92 | |
| 93 | /* Return the Fortran type table for the specified architecture. */ |
| 94 | extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch); |
| 95 | |