gdb: add .flake8 file
[deliverable/binutils-gdb.git] / gdb / f-lang.h
index e59fdef1b19c8286a03931e191511e182dd1c363..1ccdd3978eadc9df80e632a29bd1c6fc05860725 100644 (file)
@@ -1,6 +1,6 @@
 /* Fortran language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2020 Free Software Foundation, Inc.
+   Copyright (C) 1992-2021 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -155,7 +155,7 @@ public:
                  struct ui_file *stream) const override
   {
     fputs_filtered ("'", stream);
-    LA_EMIT_CHAR (ch, chtype, stream, '\'');
+    emitchar (ch, chtype, stream, '\'');
     fputs_filtered ("'", stream);
   }
 
@@ -218,16 +218,6 @@ public:
   enum array_ordering array_ordering () const override
   { return array_column_major; }
 
-  /* See language.h.  */
-
-  const struct exp_descriptor *expression_ops () const override
-  { return &exp_descriptor_tab; }
-
-  /* See language.h.  */
-
-  const struct op_print *opcode_print_table () const override
-  { return op_print_tab; }
-
 protected:
 
   /* See language.h.  */
@@ -236,15 +226,6 @@ protected:
        (const lookup_name_info &lookup_name) const override;
 
 private:
-  /* Table of expression handling functions for use by EXPRESSION_OPS
-     member function.  */
-
-  static const struct exp_descriptor exp_descriptor_tab;
-
-  /* Table of opcode data for use by OPCODE_PRINT_TABLE member function.  */
-
-  static const struct op_print op_print_tab[];
-
   /* Return the encoding that should be used for the character type
      TYPE.  */
 
@@ -312,11 +293,8 @@ extern LONGEST f77_get_upperbound (struct type *);
 
 extern LONGEST f77_get_lowerbound (struct type *);
 
-extern void f77_get_dynamic_array_length (struct type *);
-
 extern int calc_f77_array_dims (struct type *);
 
-
 /* Fortran (F77) types */
 
 struct builtin_f_type
@@ -341,23 +319,6 @@ struct builtin_f_type
 /* Return the Fortran type table for the specified architecture.  */
 extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
 
-/* Ensures that function argument VALUE is in the appropriate form to
-   pass to a Fortran function.  Returns a possibly new value that should
-   be used instead of VALUE.
-
-   When IS_ARTIFICIAL is true this indicates an artificial argument,
-   e.g. hidden string lengths which the GNU Fortran argument passing
-   convention specifies as being passed by value.
-
-   When IS_ARTIFICIAL is false, the argument is passed by pointer.  If the
-   value is already in target memory then return a value that is a pointer
-   to VALUE.  If VALUE is not in memory (e.g. an integer literal), allocate
-   space in the target, copy VALUE in, and return a pointer to the in
-   memory copy.  */
-
-extern struct value *fortran_argument_convert (struct value *value,
-                                              bool is_artificial);
-
 /* Ensures that function argument TYPE is appropriate to inform the debugger
    that ARG should be passed as a pointer.  Returns the potentially updated
    argument type.
@@ -374,4 +335,22 @@ extern struct value *fortran_argument_convert (struct value *value,
 extern struct type *fortran_preserve_arg_pointer (struct value *arg,
                                                  struct type *type);
 
+/* Fortran arrays can have a negative stride.  When this happens it is
+   often the case that the base address for an object is not the lowest
+   address occupied by that object.  For example, an array slice (10:1:-1)
+   will be encoded with lower bound 1, upper bound 10, a stride of
+   -ELEMENT_SIZE, and have a base address pointer that points at the
+   element with the highest address in memory.
+
+   This really doesn't play well with our current model of value contents,
+   but could easily require a significant update in order to be supported
+   "correctly".
+
+   For now, we manually force the base address to be the lowest addressed
+   element here.  Yes, this will break some things, but it fixes other
+   things.  The hope is that it fixes more than it breaks.  */
+
+extern CORE_ADDR fortran_adjust_dynamic_array_base_address_hack
+       (struct type *type, CORE_ADDR address);
+
 #endif /* F_LANG_H */
This page took 0.026948 seconds and 4 git commands to generate.