1 |
578 |
markom |
/* Fortran language support definitions for GDB, the GNU debugger.
|
2 |
|
|
Copyright 1992, 1993, 1994, 1995, 1998, 2000
|
3 |
|
|
Free Software Foundation, Inc.
|
4 |
|
|
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
|
5 |
|
|
(fmbutt@engage.sps.mot.com).
|
6 |
|
|
|
7 |
|
|
This file is part of GDB.
|
8 |
|
|
|
9 |
|
|
This program is free software; you can redistribute it and/or modify
|
10 |
|
|
it under the terms of the GNU General Public License as published by
|
11 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
12 |
|
|
(at your option) any later version.
|
13 |
|
|
|
14 |
|
|
This program is distributed in the hope that it will be useful,
|
15 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
GNU General Public License for more details.
|
18 |
|
|
|
19 |
|
|
You should have received a copy of the GNU General Public License
|
20 |
|
|
along with this program; if not, write to the Free Software
|
21 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
22 |
|
|
Boston, MA 02111-1307, USA. */
|
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 *, char *, struct ui_file *, int,
|
29 |
|
|
int);
|
30 |
|
|
|
31 |
|
|
extern int f_val_print (struct type *, char *, int, CORE_ADDR,
|
32 |
|
|
struct ui_file *, int, int, int,
|
33 |
|
|
enum val_prettyprint);
|
34 |
|
|
|
35 |
|
|
/* Language-specific data structures */
|
36 |
|
|
|
37 |
|
|
struct common_entry
|
38 |
|
|
{
|
39 |
|
|
struct symbol *symbol; /* The symbol node corresponding
|
40 |
|
|
to this component */
|
41 |
|
|
struct common_entry *next; /* The next component */
|
42 |
|
|
};
|
43 |
|
|
|
44 |
|
|
struct saved_f77_common
|
45 |
|
|
{
|
46 |
|
|
char *name; /* Name of COMMON */
|
47 |
|
|
char *owning_function; /* Name of parent function */
|
48 |
|
|
int secnum; /* Section # of .bss */
|
49 |
|
|
CORE_ADDR offset; /* Offset from .bss for
|
50 |
|
|
this block */
|
51 |
|
|
struct common_entry *entries; /* List of block's components */
|
52 |
|
|
struct common_entry *end_of_entries; /* ptr. to end of components */
|
53 |
|
|
struct saved_f77_common *next; /* Next saved COMMON block */
|
54 |
|
|
};
|
55 |
|
|
|
56 |
|
|
typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
|
57 |
|
|
|
58 |
|
|
typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
|
59 |
|
|
|
60 |
|
|
extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
|
61 |
|
|
extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */
|
62 |
|
|
extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */
|
63 |
|
|
|
64 |
|
|
extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
|
65 |
|
|
|
66 |
|
|
#define UNINITIALIZED_SECNUM -1
|
67 |
|
|
#define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM)
|
68 |
|
|
|
69 |
|
|
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
|
70 |
|
|
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
|
71 |
|
|
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
|
72 |
|
|
|
73 |
|
|
#define BOUND_FETCH_OK 1
|
74 |
|
|
#define BOUND_FETCH_ERROR -999
|
75 |
|
|
|
76 |
|
|
/* When reasonable array bounds cannot be fetched, such as when
|
77 |
|
|
you ask to 'mt print symbols' and there is no stack frame and
|
78 |
|
|
therefore no way of knowing the bounds of stack-based arrays,
|
79 |
|
|
we have to assign default bounds, these are as good as any... */
|
80 |
|
|
|
81 |
|
|
#define DEFAULT_UPPER_BOUND 999999
|
82 |
|
|
#define DEFAULT_LOWER_BOUND -999999
|
83 |
|
|
|
84 |
|
|
extern char *real_main_name; /* Name of main function */
|
85 |
|
|
extern int real_main_c_value; /* C_value field of main function */
|
86 |
|
|
|
87 |
|
|
extern int f77_get_dynamic_upperbound (struct type *, int *);
|
88 |
|
|
|
89 |
|
|
extern int f77_get_dynamic_lowerbound (struct type *, int *);
|
90 |
|
|
|
91 |
|
|
extern void f77_get_dynamic_array_length (struct type *);
|
92 |
|
|
|
93 |
|
|
extern int calc_f77_array_dims (struct type *);
|
94 |
|
|
|
95 |
|
|
#define DEFAULT_DOTMAIN_NAME_IN_MF77 ".MAIN_"
|
96 |
|
|
#define DEFAULT_MAIN_NAME_IN_MF77 "MAIN_"
|
97 |
|
|
#define DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY ".main "
|
98 |
|
|
#define DEFAULT_DOTMAIN_NAME_IN_XLF ".main"
|