GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
f-lang.c File Reference
#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 valuefortran_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 valuefortran_bounds_all_dims (bool lbound_p, struct gdbarch *gdbarch, struct value *array)
 
static valuefortran_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 valuefortran_associated (struct gdbarch *gdbarch, const language_defn *lang, struct value *pointer, struct value *target=nullptr)
 
struct valueeval_op_f_associated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_associated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
 
static valuefortran_array_size (value *array, value *dim_val, type *result_type)
 
struct valueeval_op_f_array_size (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_array_size (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
 
valueeval_op_f_array_size (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, value *arg2, type *kind_arg)
 
static struct valuefortran_array_shape (struct gdbarch *gdbarch, const language_defn *lang, struct value *val)
 
struct valueeval_op_f_array_shape (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_abs (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_mod (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
 
static valuefortran_ceil_operation (value *arg1, type *result_type)
 
struct valueeval_op_f_ceil (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
valueeval_op_f_ceil (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, type *kind_arg)
 
static valuefortran_floor_operation (value *arg1, type *result_type)
 
struct valueeval_op_f_floor (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_floor (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, type *kind_arg)
 
struct valueeval_op_f_modulo (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
 
valueeval_op_f_cmplx (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1)
 
struct valueeval_op_f_cmplx (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
 
valueeval_op_f_cmplx (type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1, value *arg2, type *kind_arg)
 
struct valueeval_op_f_kind (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
 
struct valueeval_op_f_allocated (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
 
struct valueeval_op_f_rank (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
 
struct valueeval_op_f_loc (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
 
static struct builtin_f_typebuild_fortran_types (struct gdbarch *gdbarch)
 
const struct builtin_f_type * builtin_f_type (struct gdbarch *gdbarch)
 
void _initialize_f_language ()
 
static struct valuefortran_argument_convert (struct value *value, bool is_artificial)
 
static valuefortran_prepare_argument (struct expression *exp, expr::operation *subexp, int arg_num, bool is_internal_call_p, struct type *func_type, enum noside noside)
 
struct typefortran_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_typef_type_data
 
static struct cmd_list_elementset_fortran_list
 
static struct cmd_list_elementshow_fortran_list
 

Function Documentation

◆ _initialize_f_language()

void _initialize_f_language ( )

Definition at line 1831 of file f-lang.c.

Referenced by initialize_all_files().

◆ build_fortran_types()

static struct builtin_f_type * build_fortran_types ( struct gdbarch * gdbarch)
static

◆ builtin_f_type()

const struct builtin_f_type * builtin_f_type ( struct gdbarch * gdbarch)

◆ calc_f77_array_dims()

int calc_f77_array_dims ( struct type * array_type)

◆ eval_op_f_abs()

struct value * eval_op_f_abs ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode opcode,
struct value * arg1 )

◆ eval_op_f_allocated()

struct value * eval_op_f_allocated ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg1 )

◆ eval_op_f_array_shape()

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.

◆ eval_op_f_array_size() [1/3]

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 )

◆ eval_op_f_array_size() [2/3]

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 )

◆ eval_op_f_array_size() [3/3]

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().

◆ eval_op_f_associated() [1/2]

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.

◆ eval_op_f_associated() [2/2]

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.

◆ eval_op_f_ceil() [1/2]

struct value * eval_op_f_ceil ( struct type * expect_type,
struct expression * exp,
enum noside noside noside,
enum exp_opcode opcode,
struct value * arg1 )

◆ eval_op_f_ceil() [2/2]

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().

◆ eval_op_f_cmplx() [1/3]

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 )

◆ eval_op_f_cmplx() [2/3]

value * eval_op_f_cmplx ( type * expect_type,
expression * exp,
noside noside,
exp_opcode opcode,
value * arg1 )

◆ eval_op_f_cmplx() [3/3]

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().

◆ eval_op_f_floor() [1/2]

struct value * eval_op_f_floor ( struct type * expect_type,
struct expression * exp,
enum noside noside noside,
enum exp_opcode opcode,
struct value * arg1 )

◆ eval_op_f_floor() [2/2]

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().

◆ eval_op_f_kind()

struct value * eval_op_f_kind ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode opcode,
struct value * arg1 )

◆ eval_op_f_loc()

struct value * eval_op_f_loc ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg1 )

◆ eval_op_f_mod()

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 )

◆ eval_op_f_modulo()

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 )

◆ eval_op_f_rank()

struct value * eval_op_f_rank ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg1 )

◆ fortran_adjust_dynamic_array_base_address_hack()

CORE_ADDR fortran_adjust_dynamic_array_base_address_hack ( struct type * type,
CORE_ADDR address )

◆ fortran_argument_convert()

static struct value * fortran_argument_convert ( struct value * value,
bool is_artificial )
static

◆ fortran_array_shape()

static struct value * fortran_array_shape ( struct gdbarch * gdbarch,
const language_defn * lang,
struct value * val )
static

◆ fortran_array_size()

static value * fortran_array_size ( value * array,
value * dim_val,
type * result_type )
static

◆ fortran_associated()

static struct value * fortran_associated ( struct gdbarch * gdbarch,
const language_defn * lang,
struct value * pointer,
struct value * target = nullptr )
static

◆ fortran_bounds_all_dims()

static struct value * fortran_bounds_all_dims ( bool lbound_p,
struct gdbarch * gdbarch,
struct value * array )
static

◆ fortran_bounds_for_dimension()

static value * fortran_bounds_for_dimension ( bool lbound_p,
value * array,
value * dim_val,
type * result_type )
static

◆ fortran_ceil_operation()

static value * fortran_ceil_operation ( value * arg1,
type * result_type )
static

◆ fortran_floor_operation()

static value * fortran_floor_operation ( value * arg1,
type * result_type )
static

◆ fortran_prepare_argument() [1/2]

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

◆ fortran_prepare_argument() [2/2]

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

◆ fortran_preserve_arg_pointer()

struct type * fortran_preserve_arg_pointer ( struct value * arg,
struct type * type )

Definition at line 1968 of file f-lang.c.

References type::code(), type, and value::type().

Referenced by value_arg_coerce().

◆ fortran_require_array()

static void fortran_require_array ( struct type * type,
bool lbound_p )
static

◆ show_fortran_array_slicing_debug()

static void show_fortran_array_slicing_debug ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 62 of file f-lang.c.

References gdb_printf().

◆ show_repack_array_slices()

static void show_repack_array_slices ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 50 of file f-lang.c.

References gdb_printf().

Variable Documentation

◆ f_language_defn

f_language f_language_defn
static

Definition at line 1734 of file f-lang.c.

◆ f_type_data

const registry<gdbarch>::key<struct builtin_f_type> f_type_data
static

Definition at line 1810 of file f-lang.c.

Referenced by builtin_f_type().

◆ fortran_array_slicing_debug

bool fortran_array_slicing_debug = false
static

Definition at line 58 of file f-lang.c.

Referenced by expr::fortran_undetermined::value_subarray().

◆ repack_array_slices

bool repack_array_slices = false
static

Definition at line 46 of file f-lang.c.

Referenced by expr::fortran_undetermined::value_subarray().

◆ set_fortran_list

struct cmd_list_element* set_fortran_list
static

Definition at line 1826 of file f-lang.c.

◆ show_fortran_list

struct cmd_list_element* show_fortran_list
static

Definition at line 1827 of file f-lang.c.