From a91a61923d82c39ebeb9971635b76c7da494cab4 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 19 Aug 1994 21:59:05 +0000 Subject: Initial Fortran language support, adapted from work by Farooq Butt (fmbutt@engage.sps.mot.com). * Makefile.in: Add Fortran-related files and dependencies. * defs.h (language_fortran): New language enum. * language.h (_LANG_fortran): Define. (MAX_FORTRAN_DIMS): Define. * expression.h: Reformat to standard. (MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST, OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes. * gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX, TYPE_CODE_LITERAL_STRING): New type codes. (type): New fields upper_bound_type and lower_bound_type. (TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE, TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New macros. (builtin_type_f_character, etc): Declare. * value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define. * f-exp.y: New file, Fortran expression grammar. * f-lang.c: New file, Fortran language support functions. * f-lang.h: New file, Fortran language support declarations. * f-typeprint.c: New file, Fortran type printing. * f-valprint.c: New file, Fortran value printing. * eval.c (evaluate_subexp): Add code for new expression opcodes, fix wording of error message. * gdbtypes.c (f77_create_literal_complex_type, f77_create_literal_string_type): New functions. * language.c (set_language_command): Add Fortran info. (calc_f77_array_dims): New function. * parse.c (length_of_subexp, prefixify_subexp): Add cases for new expression opcodes. * symfile.c (deduce_language_from_filename): Recognize .f and .F as Fortran source files. * valops.c (f77_value_literal_string, f77_value_substring, f77_value_literal_complex): New functions. --- gdb/language.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/language.c') diff --git a/gdb/language.c b/gdb/language.c index c06decb..f27512c 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -166,6 +166,7 @@ set_language_command (ignore, from_tty) printf_unfiltered ("c Use the C language\n"); printf_unfiltered ("c++ Use the C++ language\n"); printf_unfiltered ("chill Use the Chill language\n"); + printf_unfiltered ("fortran Use the Fortran language\n"); printf_unfiltered ("modula-2 Use the Modula-2 language\n"); /* Restore the silly string. */ set_language(current_language->la_language); -- cgit v1.1