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 1831 of file f-lang.c.
Referenced by initialize_all_files().
|
static |
Definition at line 1737 of file f-lang.c.
References 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_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_type(), builtin_f_type::builtin_void, builtin_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(), init_boolean_type(), init_complex_type(), init_float_type(), init_integer_type(), and type_allocator::new_type().
Referenced by builtin_f_type().
const struct builtin_f_type * builtin_f_type | ( | struct gdbarch * | gdbarch | ) |
Definition at line 1813 of file f-lang.c.
References build_fortran_types(), f_type_data, registry< T >::get(), and registry< T >::set().
Referenced by build_fortran_types(), dwarf2_init_complex_target_type(), eval_op_f_allocated(), eval_op_f_array_size(), eval_op_f_array_size(), eval_op_f_ceil(), eval_op_f_cmplx(), eval_op_f_cmplx(), eval_op_f_floor(), eval_op_f_loc(), eval_op_f_rank(), expr::fortran_bound_2arg::evaluate(), f_language::f_type_print_base(), fortran_array_shape(), fortran_bounds_all_dims(), and f_language::language_arch_info().
int calc_f77_array_dims | ( | struct type * | array_type | ) |
Definition at line 231 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 781 of file f-lang.c.
References type::code(), value::contents(), target_float_to_host_double(), value::type(), TYPE_SAFE_NAME, value_as_long(), value_from_host_double(), and value_from_longest().
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 1040 of file f-lang.c.
References builtin_f_type(), builtin_f_type::builtin_logical, check_typedef(), type::code(), expression::gdbarch, value::type(), type_not_allocated(), and value_from_longest().
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 770 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 656 of file f-lang.c.
References builtin_f_type(), 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 671 of file f-lang.c.
References builtin_f_type(), 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 686 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 566 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 576 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 861 of file f-lang.c.
References builtin_f_type(), 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 874 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 982 of file f-lang.c.
References builtin_f_type::builtin_complex, builtin_f_type(), type::code(), expression::gdbarch, value::type(), and value_literal_complex().
value * eval_op_f_cmplx | ( | type * | expect_type, |
expression * | exp, | ||
noside | noside, | ||
exp_opcode | opcode, | ||
value * | arg1 ) |
Definition at line 964 of file f-lang.c.
References builtin_f_type::builtin_complex, builtin_f_type(), type::code(), expression::gdbarch, not_lval, value::type(), value_cast(), value_literal_complex(), 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 999 of file f-lang.c.
References type::code(), value::type(), and value_literal_complex().
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 900 of file f-lang.c.
References builtin_f_type(), 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 913 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 1014 of file f-lang.c.
References builtin_type::builtin_int, type::code(), expression::gdbarch, type::length(), type::target_type(), value::type(), and value_from_longest().
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 1076 of file f-lang.c.
References value::address, builtin_f_type(), builtin_f_type::builtin_integer, builtin_f_type::builtin_integer_s2, builtin_f_type::builtin_integer_s8, expression::gdbarch, gdbarch_ptr_bit(), 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 809 of file f-lang.c.
References type::code(), value::contents(), target_float_to_host_double(), value::type(), TYPE_SAFE_NAME, value_as_long(), value_from_host_double(), and value_from_longest().
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 924 of file f-lang.c.
References type::code(), value::contents(), target_float_to_host_double(), value::type(), TYPE_SAFE_NAME, value_as_long(), value_from_host_double(), and value_from_longest().
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 1056 of file f-lang.c.
References builtin_f_type(), builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), type::code(), expression::gdbarch, value::type(), and value_from_longest().
CORE_ADDR fortran_adjust_dynamic_array_base_address_hack | ( | struct type * | type, |
CORE_ADDR | address ) |
Definition at line 1978 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, type_length_units(), type_not_allocated(), and type_not_associated().
Referenced by resolve_dynamic_type_internal().
Definition at line 1883 of file f-lang.c.
References value::contents(), type::length(), value::lval(), lval_memory, value::type(), value, value_addr(), value_allocate_space_in_inferior(), value_as_long(), value_from_contents_and_address(), and write_memory().
Referenced by fortran_prepare_argument().
|
static |
Definition at line 706 of file f-lang.c.
References value::allocate(), builtin_f_type(), builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), type::code(), value::contents_copy(), create_array_type(), create_static_range_type(), get_discrete_bounds(), type::index_type(), type::length(), type::target_type(), value::type(), type_not_allocated(), type_not_associated(), and value_from_longest().
Referenced by eval_op_f_array_shape().
Definition at line 598 of file f-lang.c.
References calc_f77_array_dims(), check_typedef(), type::code(), get_discrete_bounds(), type::index_type(), type::target_type(), value::type(), type_not_allocated(), type_not_associated(), value_as_long(), and value_from_longest().
Referenced by eval_op_f_array_size(), eval_op_f_array_size(), and eval_op_f_array_size().
|
static |
Definition at line 400 of file f-lang.c.
References value::address, 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(), value::type(), TYPE_ASSOCIATED_PROP, type_length_units(), type_not_associated(), value_as_address(), and value_from_longest().
Referenced by eval_op_f_associated(), and eval_op_f_associated().
|
static |
Definition at line 136 of file f-lang.c.
References value::allocate(), builtin_f_type(), builtin_f_type::builtin_integer, calc_f77_array_dims(), check_typedef(), value::contents_copy(), create_array_type(), create_static_range_type(), f77_get_lowerbound(), f77_get_upperbound(), type::length(), type::target_type(), value::type(), and value_from_longest().
Referenced by expr::fortran_bound_1arg::evaluate().
|
static |
Definition at line 188 of file f-lang.c.
References calc_f77_array_dims(), check_typedef(), f77_get_lowerbound(), f77_get_upperbound(), type::target_type(), value::type(), value_as_long(), and value_from_longest().
Referenced by expr::fortran_bound_2arg::evaluate(), and expr::fortran_bound_3arg::evaluate().
Definition at line 848 of file f-lang.c.
References type::code(), value::contents(), target_float_to_host_double(), value::type(), and value_from_longest().
Referenced by eval_op_f_ceil(), and eval_op_f_ceil().
Definition at line 887 of file f-lang.c.
References type::code(), value::contents(), target_float_to_host_double(), value::type(), and value_from_longest().
Referenced by eval_op_f_floor(), and eval_op_f_floor().
|
static |
Referenced by expr::fortran_undetermined::evaluate().
|
static |
Definition at line 1925 of file f-lang.c.
References expr::operation::evaluate_with_coercion(), fortran_argument_convert(), and expr::unop_addr_operation::get_expression().
Definition at line 1968 of file f-lang.c.
References type::code(), type, and value::type().
Referenced by value_arg_coerce().
|
static |
Definition at line 119 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 1810 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 |