2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
[deliverable/binutils-gdb.git] / gdb / f-lang.h
1 /* Fortran language support definitions for GDB, the GNU debugger.
2
3 Copyright (C) 1992-1995, 1998, 2000, 2005, 2007-2012 Free Software
4 Foundation, Inc.
5
6 Contributed by Motorola. Adapted from the C definitions by Farooq Butt
7 (fmbutt@engage.sps.mot.com).
8
9 This file is part of GDB.
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23
24 extern int f_parse (void);
25
26 extern void f_error (char *); /* Defined in f-exp.y */
27
28 extern void f_print_type (struct type *, const char *, struct ui_file *, int,
29 int);
30
31 extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
32 struct ui_file *, int,
33 const struct value *,
34 const struct value_print_options *);
35
36 /* Language-specific data structures */
37
38 /* In F90 subrange expression, either bound could be empty, indicating that
39 its value is by default that of the corresponding bound of the array or
40 string. So we have four sorts of subrange in F90. This enumeration type
41 is to identify this. */
42
43 enum f90_range_type
44 {
45 BOTH_BOUND_DEFAULT, /* "(:)" */
46 LOW_BOUND_DEFAULT, /* "(:high)" */
47 HIGH_BOUND_DEFAULT, /* "(low:)" */
48 NONE_BOUND_DEFAULT /* "(low:high)" */
49 };
50
51 struct common_entry
52 {
53 struct symbol *symbol; /* The symbol node corresponding
54 to this component */
55 struct common_entry *next; /* The next component */
56 };
57
58 struct saved_f77_common
59 {
60 char *name; /* Name of COMMON */
61 char *owning_function; /* Name of parent function */
62 int secnum; /* Section # of .bss */
63 CORE_ADDR offset; /* Offset from .bss for
64 this block */
65 struct common_entry *entries; /* List of block's components */
66 struct common_entry *end_of_entries; /* ptr. to end of components */
67 struct saved_f77_common *next; /* Next saved COMMON block */
68 };
69
70 typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
71
72 typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
73
74 extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
75
76 extern SAVED_F77_COMMON_PTR find_common_for_function (const char *,
77 const char *);
78
79 #define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
80
81 extern int f77_get_upperbound (struct type *);
82
83 extern int f77_get_lowerbound (struct type *);
84
85 extern void f77_get_dynamic_array_length (struct type *);
86
87 extern int calc_f77_array_dims (struct type *);
88
89
90 /* Fortran (F77) types */
91
92 struct builtin_f_type
93 {
94 struct type *builtin_character;
95 struct type *builtin_integer;
96 struct type *builtin_integer_s2;
97 struct type *builtin_logical;
98 struct type *builtin_logical_s1;
99 struct type *builtin_logical_s2;
100 struct type *builtin_logical_s8;
101 struct type *builtin_real;
102 struct type *builtin_real_s8;
103 struct type *builtin_real_s16;
104 struct type *builtin_complex_s8;
105 struct type *builtin_complex_s16;
106 struct type *builtin_complex_s32;
107 struct type *builtin_void;
108 };
109
110 /* Return the Fortran type table for the specified architecture. */
111 extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
112
This page took 0.063452 seconds and 5 git commands to generate.