gdb/f-lang.h - gdb

Data types defined

Source code

  1. /* Fortran language support definitions for GDB, the GNU debugger.

  2.    Copyright (C) 1992-2015 Free Software Foundation, Inc.

  3.    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
  4.    (fmbutt@engage.sps.mot.com).

  5.    This file is part of GDB.

  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 3 of the License, or
  9.    (at your option) any later version.

  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.

  14.    You should have received a copy of the GNU General Public License
  15.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  16. struct type_print_options;
  17. struct parser_state;

  18. extern int f_parse (struct parser_state *);

  19. extern void f_error (char *);        /* Defined in f-exp.y */

  20. extern void f_print_type (struct type *, const char *, struct ui_file *, int,
  21.                           int, const struct type_print_options *);

  22. extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
  23.                          struct ui_file *, int,
  24.                          const struct value *,
  25.                          const struct value_print_options *);

  26. /* Language-specific data structures */

  27. /* In F90 subrange expression, either bound could be empty, indicating that
  28.    its value is by default that of the corresponding bound of the array or
  29.    string.  So we have four sorts of subrange in F90.  This enumeration type
  30.    is to identify this.  */

  31. enum f90_range_type
  32.   {
  33.     BOTH_BOUND_DEFAULT,                /* "(:)"  */
  34.     LOW_BOUND_DEFAULT,                /* "(:high)"  */
  35.     HIGH_BOUND_DEFAULT,                /* "(low:)"  */
  36.     NONE_BOUND_DEFAULT                /* "(low:high)"  */
  37.   };

  38. /* A common block.  */

  39. struct common_block
  40. {
  41.   /* The number of entries in the block.  */
  42.   size_t n_entries;

  43.   /* The contents of the block, allocated using the struct hack.  All
  44.      pointers in the array are non-NULL.  */
  45.   struct symbol *contents[1];
  46. };

  47. extern int f77_get_upperbound (struct type *);

  48. extern int f77_get_lowerbound (struct type *);

  49. extern void f77_get_dynamic_array_length (struct type *);

  50. extern int calc_f77_array_dims (struct type *);


  51. /* Fortran (F77) types */

  52. struct builtin_f_type
  53. {
  54.   struct type *builtin_character;
  55.   struct type *builtin_integer;
  56.   struct type *builtin_integer_s2;
  57.   struct type *builtin_logical;
  58.   struct type *builtin_logical_s1;
  59.   struct type *builtin_logical_s2;
  60.   struct type *builtin_logical_s8;
  61.   struct type *builtin_real;
  62.   struct type *builtin_real_s8;
  63.   struct type *builtin_real_s16;
  64.   struct type *builtin_complex_s8;
  65.   struct type *builtin_complex_s16;
  66.   struct type *builtin_complex_s32;
  67.   struct type *builtin_void;
  68. };

  69. /* Return the Fortran type table for the specified architecture.  */
  70. extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);