]>
Commit | Line | Data |
---|---|---|
c906108c | 1 | /* Fortran language support definitions for GDB, the GNU debugger. |
a2bd3dcd AC |
2 | |
3 | Copyright 1992, 1993, 1994, 1995, 1998, 2000, 2005 Free Software | |
4 | Foundation, Inc. | |
5 | ||
c906108c SS |
6 | Contributed by Motorola. Adapted from the C definitions by Farooq Butt |
7 | ([email protected]). | |
8 | ||
c5aa993b | 9 | This file is part of GDB. |
c906108c | 10 | |
c5aa993b JM |
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 2 of the License, or | |
14 | (at your option) any later version. | |
c906108c | 15 | |
c5aa993b JM |
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. | |
c906108c | 20 | |
c5aa993b JM |
21 | You should have received a copy of the GNU General Public License |
22 | along with this program; if not, write to the Free Software | |
23 | Foundation, Inc., 59 Temple Place - Suite 330, | |
24 | Boston, MA 02111-1307, USA. */ | |
c906108c | 25 | |
a14ed312 | 26 | extern int f_parse (void); |
c906108c | 27 | |
a14ed312 | 28 | extern void f_error (char *); /* Defined in f-exp.y */ |
c906108c | 29 | |
d9fcf2fb JM |
30 | extern void f_print_type (struct type *, char *, struct ui_file *, int, |
31 | int); | |
c906108c | 32 | |
fc1a4b47 | 33 | extern int f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, |
d9fcf2fb JM |
34 | struct ui_file *, int, int, int, |
35 | enum val_prettyprint); | |
c906108c | 36 | |
c5aa993b | 37 | /* Language-specific data structures */ |
c906108c SS |
38 | |
39 | struct common_entry | |
c5aa993b JM |
40 | { |
41 | struct symbol *symbol; /* The symbol node corresponding | |
42 | to this component */ | |
43 | struct common_entry *next; /* The next component */ | |
44 | }; | |
c906108c SS |
45 | |
46 | struct saved_f77_common | |
c5aa993b JM |
47 | { |
48 | char *name; /* Name of COMMON */ | |
49 | char *owning_function; /* Name of parent function */ | |
50 | int secnum; /* Section # of .bss */ | |
51 | CORE_ADDR offset; /* Offset from .bss for | |
52 | this block */ | |
53 | struct common_entry *entries; /* List of block's components */ | |
54 | struct common_entry *end_of_entries; /* ptr. to end of components */ | |
55 | struct saved_f77_common *next; /* Next saved COMMON block */ | |
56 | }; | |
c906108c | 57 | |
c5aa993b | 58 | typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR; |
c906108c | 59 | |
c5aa993b | 60 | typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR; |
c906108c | 61 | |
c5aa993b JM |
62 | extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */ |
63 | extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */ | |
64 | extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */ | |
c906108c | 65 | |
a14ed312 | 66 | extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *); |
c906108c | 67 | |
c5aa993b | 68 | #define UNINITIALIZED_SECNUM -1 |
c906108c SS |
69 | #define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM) |
70 | ||
c5aa993b JM |
71 | #define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */ |
72 | #define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */ | |
73 | #define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */ | |
c906108c SS |
74 | |
75 | #define BOUND_FETCH_OK 1 | |
76 | #define BOUND_FETCH_ERROR -999 | |
77 | ||
78 | /* When reasonable array bounds cannot be fetched, such as when | |
c5aa993b JM |
79 | you ask to 'mt print symbols' and there is no stack frame and |
80 | therefore no way of knowing the bounds of stack-based arrays, | |
81 | we have to assign default bounds, these are as good as any... */ | |
c906108c SS |
82 | |
83 | #define DEFAULT_UPPER_BOUND 999999 | |
84 | #define DEFAULT_LOWER_BOUND -999999 | |
85 | ||
c5aa993b JM |
86 | extern char *real_main_name; /* Name of main function */ |
87 | extern int real_main_c_value; /* C_value field of main function */ | |
c906108c | 88 | |
a14ed312 | 89 | extern int f77_get_dynamic_upperbound (struct type *, int *); |
c906108c | 90 | |
a14ed312 | 91 | extern int f77_get_dynamic_lowerbound (struct type *, int *); |
c906108c | 92 | |
a14ed312 | 93 | extern void f77_get_dynamic_array_length (struct type *); |
c906108c | 94 | |
a14ed312 | 95 | extern int calc_f77_array_dims (struct type *); |
c906108c SS |
96 | |
97 | #define DEFAULT_DOTMAIN_NAME_IN_MF77 ".MAIN_" | |
98 | #define DEFAULT_MAIN_NAME_IN_MF77 "MAIN_" | |
99 | #define DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY ".main " | |
100 | #define DEFAULT_DOTMAIN_NAME_IN_XLF ".main" |