1999-04-16 03:35:26 +02:00
|
|
|
/* Fortran language support definitions for GDB, the GNU debugger.
|
2005-01-28 Andrew Cagney <cagney@gnu.org>
* language.h (struct language_defn): Make la_val_print's buffer
parameter a const bfd_byte.
* cp-valprint.c (cp_print_value_fields, cp_print_value): Update.
* ada-lang.c (ada_aligned_value_addr)
(ada_value_primitive_packed_val, ada_which_variant_applies): Update.
* valprint.c (val_print_array_elements): Update.
* valprint.h (val_print_array_elements): Update.
* ada-lang.h (ada_val_print, ada_aligned_value_addr)
(ada_value_primitive_packed_val, ada_which_variant_applies): Update.
* ada-valprint.c (ada_val_print, struct ada_val_print_args)
(ada_val_print_1, ada_print_floating, printable_val_type)
(print_record, val_print_packed_array_elements)
(print_field_values, print_variant_part): Update.
* c-lang.h (c_val_print, cp_print_value_fields): Update.
* c-valprint.c (c_val_print): Update.
* f-lang.h (f_val_print): Update.
* f-valprint.c (f_val_print, f77_print_array_1)
(f77_print_array): Update.
* jv-lang.h (java_val_print): Update.
* jv-valprint.c (java_print_value_fields, java_val_print): Update.
* language.c (unk_lang_val_print): Update.
* m2-lang.h (m2_val_print): Update.
* m2-valprint.c (m2_val_print): Update.
* p-lang.h (pascal_val_print): Update.
(pascal_object_print_value_fields): Update.
* p-valprint.c (pascal_val_print)
(pascal_object_print_value_fields, pascal_object_print_value)
(pascal_object_print_value): Update.
* scm-lang.h (scm_val_print): Update.
* scm-valprint.c (scm_val_print): Update.
* value.h (val_print): Update.
2005-01-29 02:59:31 +01:00
|
|
|
|
2005-12-17 23:34:03 +01:00
|
|
|
Copyright (C) 1992, 1993, 1994, 1995, 1998, 2000, 2005 Free Software
|
2005-01-28 Andrew Cagney <cagney@gnu.org>
* language.h (struct language_defn): Make la_val_print's buffer
parameter a const bfd_byte.
* cp-valprint.c (cp_print_value_fields, cp_print_value): Update.
* ada-lang.c (ada_aligned_value_addr)
(ada_value_primitive_packed_val, ada_which_variant_applies): Update.
* valprint.c (val_print_array_elements): Update.
* valprint.h (val_print_array_elements): Update.
* ada-lang.h (ada_val_print, ada_aligned_value_addr)
(ada_value_primitive_packed_val, ada_which_variant_applies): Update.
* ada-valprint.c (ada_val_print, struct ada_val_print_args)
(ada_val_print_1, ada_print_floating, printable_val_type)
(print_record, val_print_packed_array_elements)
(print_field_values, print_variant_part): Update.
* c-lang.h (c_val_print, cp_print_value_fields): Update.
* c-valprint.c (c_val_print): Update.
* f-lang.h (f_val_print): Update.
* f-valprint.c (f_val_print, f77_print_array_1)
(f77_print_array): Update.
* jv-lang.h (java_val_print): Update.
* jv-valprint.c (java_print_value_fields, java_val_print): Update.
* language.c (unk_lang_val_print): Update.
* m2-lang.h (m2_val_print): Update.
* m2-valprint.c (m2_val_print): Update.
* p-lang.h (pascal_val_print): Update.
(pascal_object_print_value_fields): Update.
* p-valprint.c (pascal_val_print)
(pascal_object_print_value_fields, pascal_object_print_value)
(pascal_object_print_value): Update.
* scm-lang.h (scm_val_print): Update.
* scm-valprint.c (scm_val_print): Update.
* value.h (val_print): Update.
2005-01-29 02:59:31 +01:00
|
|
|
Foundation, Inc.
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
|
|
|
|
(fmbutt@engage.sps.mot.com).
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
This file is part of GDB.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-12-17 23:34:03 +01:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern int f_parse (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern void f_error (char *); /* Defined in f-exp.y */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-02-02 01:21:19 +01:00
|
|
|
extern void f_print_type (struct type *, char *, struct ui_file *, int,
|
|
|
|
int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2005-05-09 Andrew Cagney <cagney@gnu.org>
Use gdb_byte in preference to bfd_byte.
* gdbarch.sh: Update.
* gdbarch.h, gdbarch.c: Re-generate.
* ada-lang.c, ada-lang.h, ada-valprint.c, arch-utils.c: Update.
* c-lang.c, c-lang.h, c-valprint.c, cp-valprint.c: Update.
* f-lang.c, f-lang.h, f-valprint.c, gdbcore.h, jv-lang.h: Update.
* jv-valprint.c, language.c, language.h, m2-lang.c: Update.
* m2-lang.h, m2-valprint.c, objc-lang.c, p-lang.c: Update.
* p-lang.h, p-valprint.c, regcache.c, scm-lang.c: Update.
* scm-lang.h, scm-valprint.c, target.c, target.h: Update.
* tramp-frame.c, valarith.c, valops.c, valprint.c: Update.
* valprint.h, value.c, value.h: Update.
2005-05-09 23:20:35 +02:00
|
|
|
extern int f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
|
2000-02-02 01:21:19 +01:00
|
|
|
struct ui_file *, int, int, int,
|
|
|
|
enum val_prettyprint);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
/* Language-specific data structures */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2005-09-20 08:25:34 +02:00
|
|
|
/* In F90 subrange expression, either bound could be empty, indicating that
|
|
|
|
its value is by default that of the corresponding bound of the array or
|
|
|
|
string. So we have four sorts of subrange in F90. This enumeration type
|
|
|
|
is to identify this. */
|
|
|
|
|
|
|
|
enum f90_range_type
|
|
|
|
{
|
|
|
|
BOTH_BOUND_DEFAULT, /* "(:)" */
|
|
|
|
LOW_BOUND_DEFAULT, /* "(:high)" */
|
|
|
|
HIGH_BOUND_DEFAULT, /* "(low:)" */
|
|
|
|
NONE_BOUND_DEFAULT /* "(low:high)" */
|
|
|
|
};
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
struct common_entry
|
1999-07-07 22:19:36 +02:00
|
|
|
{
|
|
|
|
struct symbol *symbol; /* The symbol node corresponding
|
|
|
|
to this component */
|
|
|
|
struct common_entry *next; /* The next component */
|
|
|
|
};
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
struct saved_f77_common
|
1999-07-07 22:19:36 +02:00
|
|
|
{
|
|
|
|
char *name; /* Name of COMMON */
|
|
|
|
char *owning_function; /* Name of parent function */
|
|
|
|
int secnum; /* Section # of .bss */
|
|
|
|
CORE_ADDR offset; /* Offset from .bss for
|
|
|
|
this block */
|
|
|
|
struct common_entry *entries; /* List of block's components */
|
|
|
|
struct common_entry *end_of_entries; /* ptr. to end of components */
|
|
|
|
struct saved_f77_common *next; /* Next saved COMMON block */
|
|
|
|
};
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
|
|
|
|
extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */
|
|
|
|
extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
#define UNINITIALIZED_SECNUM -1
|
1999-04-16 03:35:26 +02:00
|
|
|
#define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM)
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
|
|
|
|
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
|
|
|
|
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
#define BOUND_FETCH_OK 1
|
|
|
|
#define BOUND_FETCH_ERROR -999
|
|
|
|
|
|
|
|
/* When reasonable array bounds cannot be fetched, such as when
|
1999-07-07 22:19:36 +02:00
|
|
|
you ask to 'mt print symbols' and there is no stack frame and
|
|
|
|
therefore no way of knowing the bounds of stack-based arrays,
|
|
|
|
we have to assign default bounds, these are as good as any... */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
#define DEFAULT_UPPER_BOUND 999999
|
|
|
|
#define DEFAULT_LOWER_BOUND -999999
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
extern char *real_main_name; /* Name of main function */
|
|
|
|
extern int real_main_c_value; /* C_value field of main function */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern int f77_get_dynamic_upperbound (struct type *, int *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern int f77_get_dynamic_lowerbound (struct type *, int *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern void f77_get_dynamic_array_length (struct type *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
extern int calc_f77_array_dims (struct type *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
#define DEFAULT_DOTMAIN_NAME_IN_MF77 ".MAIN_"
|
|
|
|
#define DEFAULT_MAIN_NAME_IN_MF77 "MAIN_"
|
|
|
|
#define DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY ".main "
|
|
|
|
#define DEFAULT_DOTMAIN_NAME_IN_XLF ".main"
|