GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "varobj.h"
#include "gdbcore.h"
#include "f-lang.h"
#include "valprint.h"
#include "value.h"
#include "cp-support.h"
#include "charset.h"
#include "c-lang.h"
#include "target-float.h"
#include "gdbarch.h"
#include "gdbcmd.h"
#include "f-array-walker.h"
#include "f-exp.h"
#include <math.h>
Go to the source code of this file.
Classes | |
class | fortran_array_repacker_base_impl |
class | fortran_lazy_array_repacker_impl |
class | fortran_array_repacker_impl |
Namespaces | |
namespace | expr |
Functions | |
static void | show_repack_array_slices (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_fortran_array_slicing_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static value * | fortran_prepare_argument (struct expression *exp, expr::operation *subexp, int arg_num, bool is_internal_call_p, struct type *func_type, enum noside noside) |
static void | fortran_require_array (struct type *type, bool lbound_p) |
static struct value * | fortran_bounds_all_dims (bool lbound_p, struct gdbarch *gdbarch, struct value *array) |
static value * | fortran_bounds_for_dimension (bool lbound_p, value *array, value *dim_val, type *result_type) |
int | calc_f77_array_dims (struct type *array_type) |
static struct value * | fortran_associated (struct gdbarch *gdbarch, const language_defn *lang, struct value *pointer, struct value *target=nullptr) |
struct value * | eval_op_f_associated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_associated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2) |
static value * | fortran_array_size (value *array, value *dim_val, type *result_type) |
struct value * | eval_op_f_array_size (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_array_size (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2) |
value * | eval_op_f_array_size (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, value *arg2, type *kind_arg) |
static struct value * | fortran_array_shape (struct gdbarch *gdbarch, const language_defn *lang, struct value *val) |
struct value * | eval_op_f_array_shape (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_abs (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_mod (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2) |
static value * | fortran_ceil_operation (value *arg1, type *result_type) |
struct value * | eval_op_f_ceil (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
value * | eval_op_f_ceil (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, type *kind_arg) |
static value * | fortran_floor_operation (value *arg1, type *result_type) |
struct value * | eval_op_f_floor (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_floor (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, type *kind_arg) |
struct value * | eval_op_f_modulo (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2) |
value * | eval_op_f_cmplx (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1) |
struct value * | eval_op_f_cmplx (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2) |
value * | eval_op_f_cmplx (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, value *arg2, type *kind_arg) |
struct value * | eval_op_f_kind (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1) |
struct value * | eval_op_f_allocated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_f_rank (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_f_loc (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
static struct builtin_f_type * | build_fortran_types (struct gdbarch *gdbarch) |
const struct builtin_f_type * | builtin_f_type (struct gdbarch *gdbarch) |
void | _initialize_f_language () |
static struct value * | fortran_argument_convert (struct value *value, bool is_artificial) |
static value * | fortran_prepare_argument (struct expression *exp, expr::operation *subexp, int arg_num, bool is_internal_call_p, struct type *func_type, enum noside noside) |
struct type * | fortran_preserve_arg_pointer (struct value *arg, struct type *type) |
CORE_ADDR | fortran_adjust_dynamic_array_base_address_hack (struct type *type, CORE_ADDR address) |
Variables | |
static bool | repack_array_slices = false |
static bool | fortran_array_slicing_debug = false |
static f_language | f_language_defn |
static const registry< gdbarch >::key< struct builtin_f_type > | f_type_data |
static struct cmd_list_element * | set_fortran_list |
static struct cmd_list_element * | show_fortran_list |
void _initialize_f_language | ( | ) |
Definition at line 1817 of file f-lang.c.
Referenced by initialize_all_files().
|
static |
Definition at line 1724 of file f-lang.c.
References arch_boolean_type(), arch_float_type(), arch_integer_type(), arch_type(), builtin_f_type::builtin_character, builtin_f_type::builtin_complex, builtin_f_type::builtin_complex_s16, builtin_f_type::builtin_complex_s8, builtin_f_type::builtin_integer, builtin_f_type::builtin_integer_s1, builtin_f_type::builtin_integer_s2, builtin_f_type::builtin_integer_s8, builtin_f_type::builtin_logical, builtin_f_type::builtin_logical_s1, builtin_f_type::builtin_logical_s2, builtin_f_type::builtin_logical_s8, builtin_f_type::builtin_real, builtin_f_type::builtin_real_s16, builtin_f_type::builtin_real_s8, builtin_f_type::builtin_void, type::code(), gdbarch_double_bit(), gdbarch_double_format(), gdbarch_float_bit(), gdbarch_float_format(), gdbarch_floatformat_for_type(), gdbarch_int_bit(), gdbarch_long_double_bit(), gdbarch_long_double_format(), gdbarch_long_long_bit(), gdbarch_short_bit(), and init_complex_type().
Referenced by builtin_f_type().
const struct builtin_f_type * builtin_f_type | ( | struct gdbarch * | gdbarch | ) |
Definition at line 1799 of file f-lang.c.
References build_fortran_types(), f_type_data, registry< T >::get(), and registry< T >::set().
int calc_f77_array_dims | ( | struct type * | array_type | ) |
Definition at line 220 of file f-lang.c.
References type::code(), and type::target_type().
Referenced by eval_op_f_rank(), fortran_adjust_dynamic_array_base_address_hack(), fortran_array_shape(), fortran_array_size(), fortran_associated(), fortran_bounds_all_dims(), fortran_bounds_for_dimension(), and expr::fortran_undetermined::value_subarray().
struct value * eval_op_f_abs | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 770 of file f-lang.c.
References type::code(), target_float_to_host_double(), TYPE_SAFE_NAME, value_as_long(), value_contents(), value_from_host_double(), value_from_longest(), and value_type().
struct value * eval_op_f_allocated | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1029 of file f-lang.c.
References builtin_f_type::builtin_logical, check_typedef(), type::code(), expression::gdbarch, type_not_allocated(), value_from_longest(), and value_type().
struct value * eval_op_f_array_shape | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 759 of file f-lang.c.
References fortran_array_shape(), expression::gdbarch, and expression::language_defn.
struct value * eval_op_f_array_size | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 646 of file f-lang.c.
References builtin_f_type::builtin_integer, fortran_array_size(), and expression::gdbarch.
struct value * eval_op_f_array_size | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 661 of file f-lang.c.
References builtin_f_type::builtin_integer, fortran_array_size(), and expression::gdbarch.
value * eval_op_f_array_size | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1, | ||
value * | arg2, | ||
type * | kind_arg | ||
) |
Definition at line 676 of file f-lang.c.
References type::code(), and fortran_array_size().
struct value * eval_op_f_associated | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 556 of file f-lang.c.
References fortran_associated(), expression::gdbarch, and expression::language_defn.
struct value * eval_op_f_associated | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 566 of file f-lang.c.
References fortran_associated(), expression::gdbarch, and expression::language_defn.
struct value * eval_op_f_ceil | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 850 of file f-lang.c.
References builtin_f_type::builtin_integer, fortran_ceil_operation(), and expression::gdbarch.
value * eval_op_f_ceil | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1, | ||
type * | kind_arg | ||
) |
Definition at line 863 of file f-lang.c.
References type::code(), and fortran_ceil_operation().
struct value * eval_op_f_cmplx | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 971 of file f-lang.c.
References builtin_f_type::builtin_complex, code, expression::gdbarch, value_literal_complex(), and value_type().
value * eval_op_f_cmplx | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1 | ||
) |
Definition at line 953 of file f-lang.c.
References builtin_f_type::builtin_complex, code, expression::gdbarch, not_lval, value_cast(), value_literal_complex(), value_type(), and value_zero().
value * eval_op_f_cmplx | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1, | ||
value * | arg2, | ||
type * | kind_arg | ||
) |
Definition at line 988 of file f-lang.c.
References code, type::code(), value_literal_complex(), and value_type().
struct value * eval_op_f_floor | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside | noside, | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 889 of file f-lang.c.
References builtin_f_type::builtin_integer, fortran_floor_operation(), and expression::gdbarch.
struct value * eval_op_f_floor | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1, | ||
type * | kind_arg | ||
) |
Definition at line 902 of file f-lang.c.
References type::code(), and fortran_floor_operation().
struct value * eval_op_f_kind | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | opcode, | ||
struct value * | arg1 | ||
) |
Definition at line 1003 of file f-lang.c.
References builtin_type::builtin_int, type::code(), expression::gdbarch, type::length(), type::target_type(), value_from_longest(), and value_type().
struct value * eval_op_f_loc | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1065 of file f-lang.c.
References builtin_f_type::builtin_integer, builtin_f_type::builtin_integer_s2, builtin_f_type::builtin_integer_s8, expression::gdbarch, gdbarch_ptr_bit(), value_address(), and value_from_longest().
struct value * eval_op_f_mod | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | opcode, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 798 of file f-lang.c.
References code, type::code(), target_float_to_host_double(), TYPE_SAFE_NAME, value_as_long(), value_contents(), value_from_host_double(), value_from_longest(), and value_type().
struct value * eval_op_f_modulo | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | opcode, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 913 of file f-lang.c.
References code, type::code(), target_float_to_host_double(), TYPE_SAFE_NAME, value_as_long(), value_contents(), value_from_host_double(), value_from_longest(), and value_type().
struct value * eval_op_f_rank | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1045 of file f-lang.c.
References builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), type::code(), expression::gdbarch, value_from_longest(), and value_type().
CORE_ADDR fortran_adjust_dynamic_array_base_address_hack | ( | struct type * | type, |
CORE_ADDR | address | ||
) |
Definition at line 1964 of file f-lang.c.
References type::arch(), range_bounds::bit_stride(), type::bounds(), calc_f77_array_dims(), check_typedef(), type::code(), gdbarch_addressable_memory_unit_size(), get_discrete_bounds(), type::index_type(), type::target_type(), type_length_units(), type_not_allocated(), and type_not_associated().
Referenced by resolve_dynamic_type_internal().
Definition at line 1869 of file f-lang.c.
References type::length(), lval_memory, value_addr(), value_allocate_space_in_inferior(), value_as_long(), value_contents(), value_from_contents_and_address(), VALUE_LVAL, value_type(), and write_memory().
Referenced by fortran_prepare_argument().
|
static |
Definition at line 696 of file f-lang.c.
References allocate_value(), builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), type::code(), create_array_type(), create_static_range_type(), get_discrete_bounds(), type::index_type(), type::length(), type::target_type(), type_not_allocated(), type_not_associated(), value_contents_copy(), value_from_longest(), and value_type().
Referenced by eval_op_f_array_shape().
Definition at line 588 of file f-lang.c.
References calc_f77_array_dims(), check_typedef(), code, type::code(), get_discrete_bounds(), type::index_type(), type::target_type(), type_not_allocated(), type_not_associated(), value_as_long(), value_from_longest(), and value_type().
Referenced by eval_op_f_array_size().
|
static |
Definition at line 390 of file f-lang.c.
References range_bounds::bit_stride(), type::bounds(), calc_f77_array_dims(), check_typedef(), type::code(), get_discrete_bounds(), type::index_type(), language_bool_type(), type::length(), lval_memory, type::pointer_type, type::target_type(), TYPE_ASSOCIATED_PROP, type_length_units(), type_not_associated(), value_address(), value_as_address(), value_from_longest(), value_lval_const(), and value_type().
Referenced by eval_op_f_associated().
|
static |
Definition at line 126 of file f-lang.c.
References allocate_value(), builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), create_array_type(), create_static_range_type(), f77_get_lowerbound(), f77_get_upperbound(), type::length(), type::target_type(), value_contents_copy(), value_from_longest(), and value_type().
Referenced by expr::fortran_bound_1arg::evaluate().
|
static |
Definition at line 177 of file f-lang.c.
References calc_f77_array_dims(), check_typedef(), f77_get_lowerbound(), f77_get_upperbound(), type::target_type(), value_as_long(), value_from_longest(), and value_type().
Referenced by expr::fortran_bound_2arg::evaluate(), and expr::fortran_bound_3arg::evaluate().
Definition at line 837 of file f-lang.c.
References code, target_float_to_host_double(), value_contents(), value_from_longest(), and value_type().
Referenced by eval_op_f_ceil().
Definition at line 876 of file f-lang.c.
References code, target_float_to_host_double(), value_contents(), value_from_longest(), and value_type().
Referenced by eval_op_f_floor().
|
static |
Referenced by expr::fortran_undetermined::evaluate().
|
static |
Definition at line 1911 of file f-lang.c.
References expr::operation::evaluate_with_coercion(), fortran_argument_convert(), expr::unop_addr_operation::get_expression(), and TYPE_FIELD_ARTIFICIAL.
Definition at line 1954 of file f-lang.c.
References code, and value_type().
Referenced by value_arg_coerce().
|
static |
Definition at line 109 of file f-lang.c.
References check_typedef(), and type::code().
Referenced by expr::fortran_bound_1arg::evaluate(), expr::fortran_bound_2arg::evaluate(), and expr::fortran_bound_3arg::evaluate().
|
static |
Definition at line 62 of file f-lang.c.
References gdb_printf().
|
static |
Definition at line 50 of file f-lang.c.
References gdb_printf().
|
static |
|
static |
Definition at line 1796 of file f-lang.c.
Referenced by builtin_f_type().
|
static |
Definition at line 58 of file f-lang.c.
Referenced by expr::fortran_undetermined::value_subarray().
|
static |
Definition at line 46 of file f-lang.c.
Referenced by expr::fortran_undetermined::value_subarray().
|
static |
|
static |