53 gdb_printf (file, _(
"Repacking of Fortran array slices is %s.\n"),
66 gdb_printf (file, _(
"Debugging of Fortran array slicing is %s.\n"),
74 int arg_num,
bool is_internal_call_p,
92 encoding =
"UTF-32BE";
94 encoding =
"UTF-32LE";
98 error (_(
"unrecognized character type"));
108 const char *ptr, ssize_t len)
const
111 return ::value_string (ptr, len,
type);
122 if (
type->
code () != TYPE_CODE_ARRAY)
125 error (_(
"LBOUND can only be applied to arrays"));
127 error (_(
"UBOUND can only be applied to arrays"));
155 LONGEST elm_len = elm_type->
length ();
156 for (LONGEST dst_offset = elm_len * (ndimensions - 1);
158 dst_offset -= elm_len)
170 gdb_assert (dst_offset + v->
type ()->
length ()
172 gdb_assert (v->
type ()->
length () == elm_len);
195 if (dim < 1 || dim > ndimensions)
198 error (_(
"LBOUND dimension must be from 1 to %d"), ndimensions);
200 error (_(
"UBOUND dimension must be from 1 to %d"), ndimensions);
205 for (
int i = ndimensions - 1; i >= 0; --i)
225 gdb_assert_not_reached (
"failed to find matching dimension");
234 struct type *tmp_type;
236 if ((array_type->
code () == TYPE_CODE_STRING))
239 if ((array_type->
code () != TYPE_CODE_ARRAY))
240 error (_(
"Can't get dimensions for a non-array type"));
242 tmp_type = array_type;
246 if (tmp_type->
code () == TYPE_CODE_ARRAY)
274 gdb_assert (!
m_mark.has_value ());
285 gdb_assert (
m_mark.has_value ());
337 LONGEST index,
bool last_p)
369 gdb_assert (!val->
lazy ());
376 LONGEST index,
bool last_p)
401 struct value *pointer,
struct value *target =
nullptr)
410 error (_(
"ASSOCIATED can only be applied to pointers"));
417 CORE_ADDR pointer_addr;
421 pointer_addr = pointer->
address ();
424 if (target ==
nullptr)
426 bool is_associated =
false;
436 is_associated = (pointer_addr != 0);
446 struct type *pointer_target_type;
452 struct type *target_target_type;
458 if (pointer_target_type->
code () != target_target_type->
code ()
459 || (pointer_target_type->
code () != TYPE_CODE_ARRAY
460 && (pointer_target_type->
length ()
461 != target_target_type->
length ())))
462 error (_(
"arguments to associated must be of same type and kind"));
475 && pointer_addr == 0))
479 CORE_ADDR target_addr;
483 target_addr = target->address ();
487 bool is_associated =
false;
492 if (pointer_addr != target_addr)
500 is_associated =
true;
507 if (pointer_dims != target_dims)
513 while (dim < pointer_dims)
515 LONGEST pointer_lowerbound, pointer_upperbound, pointer_stride;
516 LONGEST target_lowerbound, target_upperbound, target_stride;
525 &pointer_upperbound))
532 if (pointer_lowerbound != target_lowerbound
533 || pointer_upperbound != target_upperbound)
540 if (pointer_stride == 0)
545 if (target_stride == 0)
549 if (pointer_stride != target_stride)
555 if (dim < pointer_dims)
558 is_associated =
true;
602 if (array_type->
code () != TYPE_CODE_ARRAY)
603 error (_(
"SIZE can only be applied to arrays"));
605 error (_(
"SIZE can only be used on allocated/associated arrays"));
611 if (dim_val !=
nullptr)
614 error (_(
"DIM argument to SIZE must be an integer"));
617 if (dim < 1 || dim > ndimensions)
618 error (_(
"DIM argument to SIZE must be between 1 and %d"),
624 for (
int i = ndimensions - 1; i >= 0; --i)
628 if (i == dim - 1 || dim == -1)
630 LONGEST lbound, ubound;
634 error (_(
"failed to find array bounds"));
636 LONGEST dim_size = (ubound - lbound + 1);
662 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
678 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
690 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
691 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
714 if (val_type->
code () == TYPE_CODE_ARRAY
716 error (_(
"The array passed to SHAPE must be allocated or associated"));
723 if (val_type->
code () == TYPE_CODE_ARRAY)
735 LONGEST elm_len = elm_type->
length ();
742 for (LONGEST dst_offset = elm_len * (ndimensions - 1);
744 dst_offset -= elm_len)
746 LONGEST lbound, ubound;
749 error (_(
"failed to find array bounds"));
751 LONGEST dim_size = (ubound - lbound + 1);
755 gdb_assert (dst_offset + v->
type ()->
length ()
757 gdb_assert (v->
type ()->
length () == elm_len);
774 gdb_assert (opcode == UNOP_FORTRAN_SHAPE);
816 error (_(
"non-matching types for parameters to MOD ()"));
827 double d3 = fmod (d1, d2);
835 error (_(
"calling MOD (N, 0) is undefined"));
836 LONGEST v3 = v1 - (v1 / v2) * v2;
850 if (arg1->
type ()->
code () != TYPE_CODE_FLT)
851 error (_(
"argument to CEILING must be of type float"));
866 gdb_assert (opcode == FORTRAN_CEILING);
877 gdb_assert (opcode == FORTRAN_CEILING);
878 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
889 if (arg1->
type ()->
code () != TYPE_CODE_FLT)
890 error (_(
"argument to FLOOR must be of type float"));
905 gdb_assert (opcode == FORTRAN_FLOOR);
916 gdb_assert (opcode == FORTRAN_FLOOR);
917 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
931 error (_(
"non-matching types for parameters to MODULO ()"));
939 LONGEST result = a - (a / p) * p;
940 if (result != 0 && (a < 0) != (p < 0))
952 double result = fmod (a, p);
953 if (result != 0 && (a < 0.0) != (p < 0.0))
967 gdb_assert (opcode == FORTRAN_CMPLX);
971 if (arg1->
type ()->
code () == TYPE_CODE_COMPLEX)
987 if (arg1->
type ()->
code () == TYPE_CODE_COMPLEX
988 || arg2->
type ()->
code () == TYPE_CODE_COMPLEX)
989 error (_(
"Types of arguments for CMPLX called with more then one argument "
990 "must be REAL or INTEGER"));
1002 gdb_assert (kind_arg->
code () == TYPE_CODE_COMPLEX);
1003 if (arg1->
type ()->
code () == TYPE_CODE_COMPLEX
1004 || arg2->
type ()->
code () == TYPE_CODE_COMPLEX)
1005 error (_(
"Types of arguments for CMPLX called with more then one argument "
1006 "must be REAL or INTEGER"));
1023 case TYPE_CODE_STRUCT:
1024 case TYPE_CODE_UNION:
1025 case TYPE_CODE_MODULE:
1026 case TYPE_CODE_FUNC:
1027 error (_(
"argument to kind must be an intrinsic type"));
1045 if (
type->
code () != TYPE_CODE_ARRAY)
1046 error (_(
"ALLOCATED can only be applied to arrays"));
1047 struct type *result_type
1062 gdb_assert (op == UNOP_FORTRAN_RANK);
1064 struct type *result_type
1067 if (
type->
code () != TYPE_CODE_ARRAY)
1080 struct type *result_type;
1088 LONGEST result_value = arg1->
address ();
1107 bool is_string_p = original_array_type->
code () == TYPE_CODE_STRING;
1108 const std::vector<operation_up> &ops = std::get<1> (
m_storage);
1109 int nargs = ops.size ();
1116 if (ops[0]->
opcode () != OP_RANGE)
1119 error (_(
"no such vector element (vector not associated)"));
1121 error (_(
"no such vector element (vector not allocated)"));
1126 error (_(
"array not associated"));
1128 error (_(
"array not allocated"));
1134 if (nargs != ndimensions)
1135 error (_(
"Wrong number of subscripts"));
1139 struct type *inner_element_type;
1146 std::vector<struct type *> dim_types;
1148 dim_types.reserve (ndimensions);
1149 struct type *
type = original_array_type;
1150 for (
int i = 0; i < ndimensions; ++i)
1152 dim_types.push_back (
type);
1159 inner_element_type =
type;
1167 LONGEST slice_element_size = inner_element_type->
length ();
1171 bool is_all_contiguous =
true;
1176 LONGEST total_offset = 0;
1183 slice_dim (LONGEST l, LONGEST h, LONGEST s,
struct type *idx)
1203 std::vector<slice_dim> slice_dims;
1209 debug_printf (
"Processing array access:\n");
1210 for (
int i = 0; i < nargs; ++i)
1215 struct type *dim_type = dim_types[ndimensions - (i + 1)];
1218 if (range_op !=
nullptr)
1222 LONGEST low, high, stride;
1223 low = high = stride = 0;
1239 error (_(
"stride must not be 0"));
1248 sd = target_type->
length () * 8;
1252 debug_printf (
"|-> Range access\n");
1254 debug_printf (
"| |-> Type: %s\n", str.c_str ());
1255 debug_printf (
"| |-> Array:\n");
1256 debug_printf (
"| | |-> Low bound: %s\n", plongest (lb));
1257 debug_printf (
"| | |-> High bound: %s\n", plongest (ub));
1258 debug_printf (
"| | |-> Bit stride: %s\n", plongest (sd));
1259 debug_printf (
"| | |-> Byte stride: %s\n", plongest (sd / 8));
1260 debug_printf (
"| | |-> Type size: %s\n",
1261 pulongest (dim_type->
length ()));
1262 debug_printf (
"| | '-> Target type size: %s\n",
1263 pulongest (target_type->
length ()));
1264 debug_printf (
"| |-> Accessing:\n");
1265 debug_printf (
"| | |-> Low bound: %s\n",
1267 debug_printf (
"| | |-> High bound: %s\n",
1269 debug_printf (
"| | '-> Element stride: %s\n",
1274 if (high > ub || low < lb)
1275 error (_(
"array subscript out of bounds"));
1285 LONGEST lowest = std::min (low, high);
1286 LONGEST offset = (sd / 8) * (lowest - lb);
1287 LONGEST e_count = std::abs (high - low) + 1;
1288 e_count = (e_count + (std::abs (stride) - 1)) / std::abs (stride);
1289 LONGEST new_low = 1;
1290 LONGEST new_high = new_low + e_count - 1;
1291 LONGEST new_stride = (sd * stride) / 8;
1292 LONGEST last_elem = low + ((e_count - 1) * stride);
1293 LONGEST remainder = high - last_elem;
1296 offset += std::abs (remainder) * target_type->
length ();
1298 error (_(
"incorrect stride and boundary combination"));
1300 else if (stride < 0)
1301 error (_(
"incorrect stride and boundary combination"));
1306 bool is_dim_contiguous = (new_stride == slice_element_size);
1307 is_all_contiguous &= is_dim_contiguous;
1311 debug_printf (
"| '-> Results:\n");
1312 debug_printf (
"| |-> Offset = %s\n", plongest (offset));
1313 debug_printf (
"| |-> Elements = %s\n", plongest (e_count));
1314 debug_printf (
"| |-> Low bound = %s\n", plongest (new_low));
1315 debug_printf (
"| |-> High bound = %s\n",
1316 plongest (new_high));
1317 debug_printf (
"| |-> Byte stride = %s\n",
1318 plongest (new_stride));
1319 debug_printf (
"| |-> Last element = %s\n",
1320 plongest (last_elem));
1321 debug_printf (
"| |-> Remainder = %s\n",
1322 plongest (remainder));
1323 debug_printf (
"| '-> Contiguous = %s\n",
1324 (is_dim_contiguous ?
"Yes" :
"No"));
1329 slice_element_size = std::abs (new_stride * e_count);
1331 slice_dims.emplace_back (new_low, new_high, new_stride,
1335 total_offset += offset;
1350 sd = target_type->
length ();
1354 debug_printf (
"|-> Index access\n");
1356 debug_printf (
"| |-> Type: %s\n", str.c_str ());
1357 debug_printf (
"| |-> Array:\n");
1358 debug_printf (
"| | |-> Low bound: %s\n", plongest (lb));
1359 debug_printf (
"| | |-> High bound: %s\n", plongest (ub));
1360 debug_printf (
"| | |-> Byte stride: %s\n", plongest (sd));
1361 debug_printf (
"| | |-> Type size: %s\n",
1362 pulongest (dim_type->
length ()));
1363 debug_printf (
"| | '-> Target type size: %s\n",
1364 pulongest (target_type->
length ()));
1365 debug_printf (
"| '-> Accessing:\n");
1366 debug_printf (
"| '-> Index: %s\n",
1381 error (_(
"no such vector element (vector not associated)"));
1383 error (_(
"no such vector element (vector not allocated)"));
1385 error (_(
"no such vector element"));
1389 LONGEST offset = sd * (index - lb);
1390 total_offset += offset;
1397 struct type *array_slice_type = inner_element_type;
1398 for (
const auto &d : slice_dims)
1408 struct type *new_range
1410 d.index->target_type (),
1411 &p_low, &p_high, 0, &p_stride,
1419 debug_printf (
"'-> Final result:\n");
1420 debug_printf (
" |-> Type: %s\n",
1422 debug_printf (
" |-> Total offset: %s\n",
1423 plongest (total_offset));
1424 debug_printf (
" |-> Base address: %s\n",
1425 core_addr_to_string (array->
address ()));
1426 debug_printf (
" '-> Contiguous = %s\n",
1427 (is_all_contiguous ?
"Yes" :
"No"));
1434 struct type *repacked_array_type = inner_element_type;
1435 for (
const auto &d : slice_dims)
1445 struct type *new_range
1447 d.index->target_type (),
1448 &p_low, &p_high, 0, &p_stride,
1458 || (total_offset + array_slice_type->
length ()
1462 (array_slice_type, array->
address () + total_offset, dest);
1468 (array_slice_type, array->
address () + total_offset,
1469 total_offset, array, dest);
1483 || (total_offset + array_slice_type->
length ()
1486 array->
address () + total_offset);
1489 (array_slice_type, array->
contents ().data () + total_offset,
1490 array->
address () + total_offset);
1492 else if (!array->
lazy ())
1495 error (_(
"cannot subscript arrays that are not in memory"));
1513 if (
code == TYPE_CODE_PTR)
1521 if (target_type->
code () == TYPE_CODE_ARRAY
1522 || target_type->
code () == TYPE_CODE_STRING
1523 || target_type->
code () == TYPE_CODE_FUNC)
1533 case TYPE_CODE_ARRAY:
1534 case TYPE_CODE_STRING:
1538 case TYPE_CODE_FUNC:
1539 case TYPE_CODE_INTERNAL_FUNCTION:
1544 const std::vector<operation_up> &actual (std::get<1> (
m_storage));
1545 std::vector<value *> argvec (actual.size ());
1546 bool is_internal_func = (
code == TYPE_CODE_INTERNAL_FUNCTION);
1547 for (
int tem = 0; tem < argvec.size (); tem++)
1549 tem, is_internal_func,
1553 nullptr, expect_type);
1557 error (_(
"Cannot perform substring on this type"));
1566 bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1577 bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1584 if (type_arg2->
code () != TYPE_CODE_INT)
1587 error (_(
"LBOUND second argument should be an integer"));
1589 error (_(
"UBOUND second argument should be an integer"));
1601 const bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1608 if (type_arg2->
code () != TYPE_CODE_INT)
1611 error (_(
"LBOUND second argument should be an integer"));
1613 error (_(
"UBOUND second argument should be an integer"));
1617 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
1631 const char *str = std::get<1> (
m_storage).c_str ();
1644 struct type *elt_type = elt->
type ();
1648 CORE_ADDR address = elt->
address ();
1649 gdb::array_view<const gdb_byte> view
1650 = gdb::make_array_view (valaddr, elt_type->
length ());
1684 auto add = [&] (
struct type * t)
1717 const struct block *block,
1718 const domain_enum domain) const
1746 = alloc.
new_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT,
"character");
1792 = alloc.
new_type (TYPE_CODE_ERROR, 128,
"real*16");
1802 = alloc.
new_type (TYPE_CODE_ERROR, 256,
"complex*16");
1816 if (result ==
nullptr)
1835 _(
"Prefix command for changing Fortran-specific settings."),
1836 _(
"Generic command for showing Fortran-specific settings."),
1842Enable or disable repacking of non-contiguous array slices."), _(
"\
1843Show whether non-contiguous array slices are repacked."), _(
"\
1844When the user requests a slice of a Fortran array then we can either return\n\
1845a descriptor that describes the array in place (using the original array data\n\
1846in its existing location) or the original data can be repacked (copied) to a\n\
1849When the content of the array slice is contiguous within the original array\n\
1850then the result will never be repacked, but when the data for the new array\n\
1851is non-contiguous within the original array repacking will only be performed\n\
1852when this setting is on."),
1860Set debugging of Fortran array slicing."), _(
"\
1861Show debugging of Fortran array slicing."), _(
"\
1862When on, debugging of Fortran array slicing is enabled."),
1882static struct value *
1893 const CORE_ADDR addr
1927 int arg_num,
bool is_internal_call_p,
1930 if (is_internal_call_p)
1933 bool is_artificial = ((arg_num >=
func_type->num_fields ())
1935 :
func_type->field (arg_num).is_artificial ());
1954 if (addrop !=
nullptr)
1957 is_artificial =
false;
1970 if (arg->
type ()->
code () == TYPE_CODE_PTR)
1971 return arg->
type ();
1981 gdb_assert (
type->
code () == TYPE_CODE_ARRAY);
1988 LONGEST total_offset = 0;
1995 for (
int i = 0 ; i < ndimensions; ++i)
2001 LONGEST lowerbound, upperbound, stride;
2003 error (
"failed to get range bounds");
2014 stride /= (unit_size * 8);
2021 if (stride < 0 && lowerbound < upperbound)
2022 offset = (upperbound - lowerbound) * stride;
2023 total_offset += offset;
2028 address += total_offset;
constexpr string_view get()
const char * target_charset(struct gdbarch *gdbarch)
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(type *expect_type, expression *exp, noside noside) override
range_flag get_flags() const
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * value_subarray(value *array, struct expression *exp, enum noside noside)
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
enum exp_opcode opcode() const override
virtual value * evaluate_with_coercion(struct expression *exp, enum noside noside)
std::tuple< Arg... > m_storage
const operation_up & get_expression() const
void print_array_index(struct type *index_type, LONGEST index, struct ui_file *stream, const value_print_options *options) const override
struct value * value_string(struct gdbarch *gdbarch, const char *ptr, ssize_t len) const override
void language_arch_info(struct gdbarch *gdbarch, struct language_arch_info *lai) const override
symbol_name_matcher_ftype * get_symbol_name_matcher_inner(const lookup_name_info &lookup_name) const override
unsigned int search_name_hash(const char *name) const override
static const char * get_encoding(struct type *type)
const char * name() const override
void copy_element_to_dest(struct value *elt)
fortran_array_repacker_base_impl(struct value *dest)
void finish_dimension(bool inner_p, bool last_p)
void start_dimension(struct type *index_type, LONGEST nelts, bool inner_p)
gdb::optional< scoped_value_mark > m_mark
fortran_array_repacker_impl(struct type *type, CORE_ADDR address, LONGEST base_offset, struct value *val, struct value *dest)
void process_element(struct type *elt_type, LONGEST elt_off, LONGEST index, bool last_p)
void process_element(struct type *elt_type, LONGEST elt_off, LONGEST index, bool last_p)
fortran_lazy_array_repacker_impl(struct type *type, CORE_ADDR address, struct value *dest)
void set(unsigned key, void *datum)
struct cmd_list_element * showlist
struct cmd_list_element * setlist
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
struct block_symbol cp_lookup_symbol_nonlocal(const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain)
symbol_name_matcher_ftype * cp_get_symbol_name_matcher(const lookup_name_info &lookup_name)
unsigned int cp_search_name_hash(const char *search_name)
value * evaluate_subexp_do_call(expression *exp, enum noside noside, value *callee, gdb::array_view< value * > argvec, const char *function_name, type *default_return_type)
@ EVAL_AVOID_SIDE_EFFECTS
@ RANGE_LOW_BOUND_DEFAULT
@ RANGE_HIGH_BOUND_DEFAULT
struct value * eval_op_f_kind(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
void _initialize_f_language()
static struct value * fortran_associated(struct gdbarch *gdbarch, const language_defn *lang, struct value *pointer, struct value *target=nullptr)
static const registry< gdbarch >::key< struct builtin_f_type > f_type_data
static bool repack_array_slices
static struct cmd_list_element * show_fortran_list
static struct value * fortran_bounds_all_dims(bool lbound_p, struct gdbarch *gdbarch, struct value *array)
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_modulo(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1, struct value *arg2)
static void show_fortran_array_slicing_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
const struct builtin_f_type * builtin_f_type(struct gdbarch *gdbarch)
struct type * fortran_preserve_arg_pointer(struct value *arg, struct type *type)
static value * fortran_ceil_operation(value *arg1, type *result_type)
static value * fortran_floor_operation(value *arg1, type *result_type)
static value * fortran_array_size(value *array, value *dim_val, type *result_type)
struct value * eval_op_f_loc(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, 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)
static struct cmd_list_element * set_fortran_list
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_associated(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
static value * fortran_bounds_for_dimension(bool lbound_p, value *array, value *dim_val, type *result_type)
static struct builtin_f_type * build_fortran_types(struct gdbarch *gdbarch)
struct value * eval_op_f_rank(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
static f_language f_language_defn
value * eval_op_f_cmplx(type *expect_type, expression *exp, noside noside, exp_opcode opcode, value *arg1)
static void fortran_require_array(struct type *type, bool lbound_p)
struct value * eval_op_f_ceil(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
static struct value * fortran_array_shape(struct gdbarch *gdbarch, const language_defn *lang, struct value *val)
static bool fortran_array_slicing_debug
int calc_f77_array_dims(struct type *array_type)
struct value * eval_op_f_array_shape(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *arg1)
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 struct value * fortran_argument_convert(struct value *value, bool is_artificial)
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)
CORE_ADDR fortran_adjust_dynamic_array_base_address_hack(struct type *type, CORE_ADDR address)
static void show_repack_array_slices(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct value * eval_op_f_allocated(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
const struct builtin_f_type * builtin_f_type(struct gdbarch *gdbarch)
LONGEST f77_get_lowerbound(struct type *)
LONGEST f77_get_upperbound(struct type *)
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
int gdbarch_short_bit(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_floatformat_for_type(struct gdbarch *gdbarch, const char *name, int length)
int gdbarch_int_bit(struct gdbarch *gdbarch)
int gdbarch_float_bit(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_double_format(struct gdbarch *gdbarch)
int gdbarch_long_double_bit(struct gdbarch *gdbarch)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_float_format(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_long_double_format(struct gdbarch *gdbarch)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
int gdbarch_double_bit(struct gdbarch *gdbarch)
enum bfd_endian type_byte_order(const struct type *type)
struct type * init_integer_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * create_static_range_type(type_allocator &alloc, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct type * lookup_struct_elt_type(struct type *type, const char *name, int noerr)
int is_dynamic_type(struct type *type)
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
struct type * create_range_type_with_stride(type_allocator &alloc, struct type *index_type, const struct dynamic_prop *low_bound, const struct dynamic_prop *high_bound, LONGEST bias, const struct dynamic_prop *stride, bool byte_stride_p)
struct type * resolve_dynamic_type(struct type *type, gdb::array_view< const gdb_byte > valaddr, CORE_ADDR addr, const frame_info_ptr *in_frame)
struct type * init_float_type(type_allocator &alloc, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
struct type * create_array_type(type_allocator &alloc, struct type *element_type, struct type *range_type)
int type_not_associated(const struct type *type)
unsigned int type_length_units(struct type *type)
struct type * init_complex_type(const char *name, struct type *target_type)
struct type * init_boolean_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
int type_not_allocated(const struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_ASSOCIATED_PROP(thistype)
#define TYPE_SAFE_NAME(type)
struct type * language_bool_type(const struct language_defn *la, struct gdbarch *gdbarch)
struct type * language_string_char_type(const struct language_defn *la, struct gdbarch *gdbarch)
struct type * builtin_logical_s2
struct type * builtin_logical_s8
struct type * builtin_logical_s1
struct type * builtin_void
struct type * builtin_real
struct type * builtin_real_s8
struct type * builtin_complex_s8
struct type * builtin_integer
struct type * builtin_logical
struct type * builtin_real_s16
struct type * builtin_complex
struct type * builtin_integer_s1
struct type * builtin_integer_s2
struct type * builtin_character
struct type * builtin_integer_s8
struct type * builtin_complex_s16
struct type * builtin_int
struct type * builtin_void
dynamic_prop_kind kind() const
void set_const_val(LONGEST const_val)
const struct language_defn * language_defn
void set_string_char_type(struct type *type)
void add_primitive_type(struct type *type)
void set_bool_type(struct type *type, const char *name=nullptr)
virtual void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options) const
ULONGEST bit_stride() const
struct type * target_type() const
struct type * pointer_type
ULONGEST bit_stride() const
range_bounds * bounds() const
type * index_type() const
static struct value * zero(struct type *type, enum lval_type lv)
void contents_copy(struct value *dst, LONGEST dst_offset, LONGEST src_offset, LONGEST length)
static struct value * allocate(struct type *type)
gdb::array_view< const gdb_byte > contents()
struct type * type() const
enum lval_type lval() const
gdb::array_view< const gdb_byte > contents_for_printing()
bool symbol_name_matcher_ftype(const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res)
double target_float_to_host_double(const gdb_byte *addr, const struct type *type)
std::string type_to_string(struct type *type)
void gdb_printf(struct ui_file *stream, const char *format,...)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr, frame_info_ptr frame)
struct value * value_allocate_space_in_inferior(int len)
struct value * value_struct_elt(struct value **argp, gdb::optional< gdb::array_view< value * > > args, const char *name, int *static_memfuncp, const char *err)
struct value * value_addr(struct value *arg1)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_ind(struct value *arg1)
struct value * value_literal_complex(struct value *arg1, struct value *arg2, struct type *type)
struct value * value_from_component(struct value *whole, struct type *type, LONGEST offset)
CORE_ADDR value_as_address(struct value *val)
struct value * value_from_longest(struct type *type, LONGEST num)
LONGEST value_as_long(struct value *val)
struct value * value_from_host_double(struct type *type, double d)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address, frame_info_ptr frame)