aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/f-lang.h')
-rw-r--r--gdb/f-lang.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
index 8e693eb..351f219 100644
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -314,7 +314,6 @@ extern LONGEST f77_get_lowerbound (struct type *);
extern int calc_f77_array_dims (struct type *);
-
/* Fortran (F77) types */
struct builtin_f_type
@@ -355,4 +354,22 @@ extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
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 */