/* Fortran language support routines for GDB, the GNU debugger.
- Copyright (C) 1993-2013 Free Software Foundation, Inc.
+ Copyright (C) 1993-2016 Free Software Foundation, Inc.
Contributed by Motorola. Adapted from the C parser by Farooq Butt
(fmbutt@engage.sps.mot.com).
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include <string.h>
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
{".LT.", BINOP_LESS, PREC_ORDER, 0},
{"**", UNOP_IND, PREC_PREFIX, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0},
- {NULL, 0, 0, 0}
+ {NULL, OP_NULL, PREC_REPEAT, 0}
};
\f
enum f_primitive_types {
return default_make_symbol_completion_list_break_on (text, word, ":", code);
}
+static const char *f_extensions[] =
+{
+ ".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
+ ".f90", ".F90", ".f95", ".F95", ".f03", ".F03", ".f08", ".F08",
+ NULL
+};
+
const struct language_defn f_language_defn =
{
"fortran",
case_sensitive_off,
array_column_major,
macro_expansion_no,
+ f_extensions,
&exp_descriptor_standard,
f_parse, /* parser */
- f_error, /* parser error function */
+ f_yyerror, /* parser error function */
null_post_parser,
f_printchar, /* Print character constant */
f_printstr, /* function to print string constant */
NULL, /* name_of_this */
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
+
+ /* We could support demangling here to provide module namespaces
+ also for inferiors with only minimal symbol table (ELF symbols).
+ Just the mangling standard is not standardized across compilers
+ and there is no DW_AT_producer available for inferiors with only
+ the ELF symbols to check the mangling kind. */
NULL, /* Language specific symbol demangler */
+ NULL,
NULL, /* Language specific
class_name_from_physname */
f_op_print_tab, /* expression operators for printing */
NULL, /* la_get_symbol_name_cmp */
iterate_over_symbols,
&default_varobj_ops,
+ NULL,
+ NULL,
LANG_MAGIC
};
builtin_f_type->builtin_real
= arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
- "real", NULL);
+ "real", gdbarch_float_format (gdbarch));
builtin_f_type->builtin_real_s8
= arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
- "real*8", NULL);
+ "real*8", gdbarch_double_format (gdbarch));
builtin_f_type->builtin_real_s16
= arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
- "real*16", NULL);
+ "real*16", gdbarch_long_double_format (gdbarch));
builtin_f_type->builtin_complex_s8
= arch_complex_type (gdbarch, "complex*8",
const struct builtin_f_type *
builtin_f_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, f_type_data);
+ return (const struct builtin_f_type *) gdbarch_data (gdbarch, f_type_data);
}
void