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"));
112 if (
type->
code () != TYPE_CODE_ARRAY)
115 error (_(
"LBOUND can only be applied to arrays"));
117 error (_(
"UBOUND can only be applied to arrays"));
144 LONGEST elm_len = elm_type->
length ();
145 for (LONGEST dst_offset = elm_len * (ndimensions - 1);
147 dst_offset -= elm_len)
159 gdb_assert (dst_offset +
value_type (v)->length ()
161 gdb_assert (
value_type (v)->length () == elm_len);
184 if (dim < 1 || dim > ndimensions)
187 error (_(
"LBOUND dimension must be from 1 to %d"), ndimensions);
189 error (_(
"UBOUND dimension must be from 1 to %d"), ndimensions);
194 for (
int i = ndimensions - 1; i >= 0; --i)
214 gdb_assert_not_reached (
"failed to find matching dimension");
223 struct type *tmp_type;
225 if ((array_type->
code () == TYPE_CODE_STRING))
228 if ((array_type->
code () != TYPE_CODE_ARRAY))
229 error (_(
"Can't get dimensions for a non-array type"));
231 tmp_type = array_type;
235 if (tmp_type->
code () == TYPE_CODE_ARRAY)
263 gdb_assert (
m_mark ==
nullptr);
274 gdb_assert (
m_mark !=
nullptr);
327 LONGEST index,
bool last_p)
366 LONGEST index,
bool last_p)
391 struct value *pointer,
struct value *target =
nullptr)
400 error (_(
"ASSOCIATED can only be applied to pointers"));
407 CORE_ADDR pointer_addr;
414 if (target ==
nullptr)
416 bool is_associated =
false;
426 is_associated = (pointer_addr != 0);
436 struct type *pointer_target_type;
442 struct type *target_target_type;
448 if (pointer_target_type->
code () != target_target_type->
code ()
449 || (pointer_target_type->
code () != TYPE_CODE_ARRAY
450 && (pointer_target_type->
length ()
451 != target_target_type->
length ())))
452 error (_(
"arguments to associated must be of same type and kind"));
465 && pointer_addr == 0))
469 CORE_ADDR target_addr;
477 bool is_associated =
false;
482 if (pointer_addr != target_addr)
490 is_associated =
true;
497 if (pointer_dims != target_dims)
503 while (dim < pointer_dims)
505 LONGEST pointer_lowerbound, pointer_upperbound, pointer_stride;
506 LONGEST target_lowerbound, target_upperbound, target_stride;
515 &pointer_upperbound))
522 if (pointer_lowerbound != target_lowerbound
523 || pointer_upperbound != target_upperbound)
530 if (pointer_stride == 0)
535 if (target_stride == 0)
539 if (pointer_stride != target_stride)
545 if (dim < pointer_dims)
548 is_associated =
true;
592 if (array_type->
code () != TYPE_CODE_ARRAY)
593 error (_(
"SIZE can only be applied to arrays"));
595 error (_(
"SIZE can only be used on allocated/associated arrays"));
601 if (dim_val !=
nullptr)
604 error (_(
"DIM argument to SIZE must be an integer"));
607 if (dim < 1 || dim > ndimensions)
608 error (_(
"DIM argument to SIZE must be between 1 and %d"),
614 for (
int i = ndimensions - 1; i >= 0; --i)
618 if (i == dim - 1 || dim == -1)
620 LONGEST lbound, ubound;
624 error (_(
"failed to find array bounds"));
626 LONGEST dim_size = (ubound - lbound + 1);
652 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
668 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
680 gdb_assert (opcode == FORTRAN_ARRAY_SIZE);
681 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
704 if (val_type->
code () == TYPE_CODE_ARRAY
706 error (_(
"The array passed to SHAPE must be allocated or associated"));
713 if (val_type->
code () == TYPE_CODE_ARRAY)
724 LONGEST elm_len = elm_type->
length ();
731 for (LONGEST dst_offset = elm_len * (ndimensions - 1);
733 dst_offset -= elm_len)
735 LONGEST lbound, ubound;
738 error (_(
"failed to find array bounds"));
740 LONGEST dim_size = (ubound - lbound + 1);
744 gdb_assert (dst_offset +
value_type (v)->length ()
746 gdb_assert (
value_type (v)->length () == elm_len);
763 gdb_assert (opcode == UNOP_FORTRAN_SHAPE);
805 error (_(
"non-matching types for parameters to MOD ()"));
816 double d3 = fmod (d1, d2);
824 error (_(
"calling MOD (N, 0) is undefined"));
825 LONGEST v3 = v1 - (v1 / v2) * v2;
840 error (_(
"argument to CEILING must be of type float"));
855 gdb_assert (opcode == FORTRAN_CEILING);
866 gdb_assert (opcode == FORTRAN_CEILING);
867 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
879 error (_(
"argument to FLOOR must be of type float"));
894 gdb_assert (opcode == FORTRAN_FLOOR);
905 gdb_assert (opcode == FORTRAN_FLOOR);
906 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
920 error (_(
"non-matching types for parameters to MODULO ()"));
928 LONGEST result = a - (a / p) * p;
929 if (result != 0 && (a < 0) != (p < 0))
941 double result = fmod (a, p);
942 if (result != 0 && (a < 0.0) != (p < 0.0))
956 gdb_assert (opcode == FORTRAN_CMPLX);
978 error (_(
"Types of arguments for CMPLX called with more then one argument "
979 "must be REAL or INTEGER"));
991 gdb_assert (kind_arg->
code () == TYPE_CODE_COMPLEX);
994 error (_(
"Types of arguments for CMPLX called with more then one argument "
995 "must be REAL or INTEGER"));
1012 case TYPE_CODE_STRUCT:
1013 case TYPE_CODE_UNION:
1014 case TYPE_CODE_MODULE:
1015 case TYPE_CODE_FUNC:
1016 error (_(
"argument to kind must be an intrinsic type"));
1034 if (
type->
code () != TYPE_CODE_ARRAY)
1035 error (_(
"ALLOCATED can only be applied to arrays"));
1036 struct type *result_type
1051 gdb_assert (op == UNOP_FORTRAN_RANK);
1053 struct type *result_type
1056 if (
type->
code () != TYPE_CODE_ARRAY)
1069 struct type *result_type;
1096 bool is_string_p = original_array_type->
code () == TYPE_CODE_STRING;
1097 const std::vector<operation_up> &ops = std::get<1> (
m_storage);
1098 int nargs = ops.size ();
1105 if (ops[0]->
opcode () != OP_RANGE)
1108 error (_(
"no such vector element (vector not associated)"));
1110 error (_(
"no such vector element (vector not allocated)"));
1115 error (_(
"array not associated"));
1117 error (_(
"array not allocated"));
1123 if (nargs != ndimensions)
1124 error (_(
"Wrong number of subscripts"));
1128 struct type *inner_element_type;
1135 std::vector<struct type *> dim_types;
1137 dim_types.reserve (ndimensions);
1138 struct type *
type = original_array_type;
1139 for (
int i = 0; i < ndimensions; ++i)
1141 dim_types.push_back (
type);
1148 inner_element_type =
type;
1156 LONGEST slice_element_size = inner_element_type->
length ();
1160 bool is_all_contiguous =
true;
1165 LONGEST total_offset = 0;
1172 slice_dim (LONGEST l, LONGEST h, LONGEST s,
struct type *idx)
1192 std::vector<slice_dim> slice_dims;
1198 debug_printf (
"Processing array access:\n");
1199 for (
int i = 0; i < nargs; ++i)
1204 struct type *dim_type = dim_types[ndimensions - (i + 1)];
1207 if (range_op !=
nullptr)
1211 LONGEST low, high, stride;
1212 low = high = stride = 0;
1228 error (_(
"stride must not be 0"));
1237 sd = target_type->
length () * 8;
1241 debug_printf (
"|-> Range access\n");
1243 debug_printf (
"| |-> Type: %s\n", str.c_str ());
1244 debug_printf (
"| |-> Array:\n");
1245 debug_printf (
"| | |-> Low bound: %s\n", plongest (lb));
1246 debug_printf (
"| | |-> High bound: %s\n", plongest (ub));
1247 debug_printf (
"| | |-> Bit stride: %s\n", plongest (sd));
1248 debug_printf (
"| | |-> Byte stride: %s\n", plongest (sd / 8));
1249 debug_printf (
"| | |-> Type size: %s\n",
1250 pulongest (dim_type->
length ()));
1251 debug_printf (
"| | '-> Target type size: %s\n",
1252 pulongest (target_type->
length ()));
1253 debug_printf (
"| |-> Accessing:\n");
1254 debug_printf (
"| | |-> Low bound: %s\n",
1256 debug_printf (
"| | |-> High bound: %s\n",
1258 debug_printf (
"| | '-> Element stride: %s\n",
1263 if (high > ub || low < lb)
1264 error (_(
"array subscript out of bounds"));
1274 LONGEST lowest = std::min (low, high);
1275 LONGEST offset = (sd / 8) * (lowest - lb);
1276 LONGEST e_count = std::abs (high - low) + 1;
1277 e_count = (e_count + (std::abs (stride) - 1)) / std::abs (stride);
1278 LONGEST new_low = 1;
1279 LONGEST new_high = new_low + e_count - 1;
1280 LONGEST new_stride = (sd * stride) / 8;
1281 LONGEST last_elem = low + ((e_count - 1) * stride);
1282 LONGEST remainder = high - last_elem;
1285 offset += std::abs (remainder) * target_type->
length ();
1287 error (_(
"incorrect stride and boundary combination"));
1289 else if (stride < 0)
1290 error (_(
"incorrect stride and boundary combination"));
1295 bool is_dim_contiguous = (new_stride == slice_element_size);
1296 is_all_contiguous &= is_dim_contiguous;
1300 debug_printf (
"| '-> Results:\n");
1301 debug_printf (
"| |-> Offset = %s\n", plongest (offset));
1302 debug_printf (
"| |-> Elements = %s\n", plongest (e_count));
1303 debug_printf (
"| |-> Low bound = %s\n", plongest (new_low));
1304 debug_printf (
"| |-> High bound = %s\n",
1305 plongest (new_high));
1306 debug_printf (
"| |-> Byte stride = %s\n",
1307 plongest (new_stride));
1308 debug_printf (
"| |-> Last element = %s\n",
1309 plongest (last_elem));
1310 debug_printf (
"| |-> Remainder = %s\n",
1311 plongest (remainder));
1312 debug_printf (
"| '-> Contiguous = %s\n",
1313 (is_dim_contiguous ?
"Yes" :
"No"));
1318 slice_element_size = std::abs (new_stride * e_count);
1320 slice_dims.emplace_back (new_low, new_high, new_stride,
1324 total_offset += offset;
1339 sd = target_type->
length ();
1343 debug_printf (
"|-> Index access\n");
1345 debug_printf (
"| |-> Type: %s\n", str.c_str ());
1346 debug_printf (
"| |-> Array:\n");
1347 debug_printf (
"| | |-> Low bound: %s\n", plongest (lb));
1348 debug_printf (
"| | |-> High bound: %s\n", plongest (ub));
1349 debug_printf (
"| | |-> Byte stride: %s\n", plongest (sd));
1350 debug_printf (
"| | |-> Type size: %s\n",
1351 pulongest (dim_type->
length ()));
1352 debug_printf (
"| | '-> Target type size: %s\n",
1353 pulongest (target_type->
length ()));
1354 debug_printf (
"| '-> Accessing:\n");
1355 debug_printf (
"| '-> Index: %s\n",
1370 error (_(
"no such vector element (vector not associated)"));
1372 error (_(
"no such vector element (vector not allocated)"));
1374 error (_(
"no such vector element"));
1378 LONGEST offset = sd * (index - lb);
1379 total_offset += offset;
1386 struct type *array_slice_type = inner_element_type;
1387 for (
const auto &d : slice_dims)
1396 struct type *new_range
1398 d.index->target_type (),
1399 &p_low, &p_high, 0, &p_stride,
1407 debug_printf (
"'-> Final result:\n");
1408 debug_printf (
" |-> Type: %s\n",
1410 debug_printf (
" |-> Total offset: %s\n",
1411 plongest (total_offset));
1412 debug_printf (
" |-> Base address: %s\n",
1414 debug_printf (
" '-> Contiguous = %s\n",
1415 (is_all_contiguous ?
"Yes" :
"No"));
1422 struct type *repacked_array_type = inner_element_type;
1423 for (
const auto &d : slice_dims)
1432 struct type *new_range
1434 d.index->target_type (),
1435 &p_low, &p_high, 0, &p_stride,
1445 || (total_offset + array_slice_type->
length ()
1449 (array_slice_type,
value_address (array) + total_offset, dest);
1456 total_offset, array, dest);
1470 || (total_offset + array_slice_type->
length ()
1476 (array_slice_type,
value_contents (array).data () + total_offset,
1482 error (_(
"cannot subscript arrays that are not in memory"));
1500 if (
code == TYPE_CODE_PTR)
1508 if (target_type->
code () == TYPE_CODE_ARRAY
1509 || target_type->
code () == TYPE_CODE_STRING
1510 || target_type->
code () == TYPE_CODE_FUNC)
1520 case TYPE_CODE_ARRAY:
1521 case TYPE_CODE_STRING:
1525 case TYPE_CODE_FUNC:
1526 case TYPE_CODE_INTERNAL_FUNCTION:
1531 const std::vector<operation_up> &actual (std::get<1> (
m_storage));
1532 std::vector<value *> argvec (actual.size ());
1533 bool is_internal_func = (
code == TYPE_CODE_INTERNAL_FUNCTION);
1534 for (
int tem = 0; tem < argvec.size (); tem++)
1536 tem, is_internal_func,
1540 nullptr, expect_type);
1544 error (_(
"Cannot perform substring on this type"));
1553 bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1564 bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1571 if (type_arg2->
code () != TYPE_CODE_INT)
1574 error (_(
"LBOUND second argument should be an integer"));
1576 error (_(
"UBOUND second argument should be an integer"));
1588 const bool lbound_p = std::get<0> (
m_storage) == FORTRAN_LBOUND;
1595 if (type_arg2->
code () != TYPE_CODE_INT)
1598 error (_(
"LBOUND second argument should be an integer"));
1600 error (_(
"UBOUND second argument should be an integer"));
1604 gdb_assert (kind_arg->
code () == TYPE_CODE_INT);
1618 const char *str = std::get<1> (
m_storage).c_str ();
1636 gdb::array_view<const gdb_byte> view
1637 = gdb::make_array_view (valaddr, elt_type->
length ());
1671 auto add = [&] (
struct type * t)
1704 const struct block *block,
1705 const domain_enum domain) const
1802 if (result ==
nullptr)
1821 _(
"Prefix command for changing Fortran-specific settings."),
1822 _(
"Generic command for showing Fortran-specific settings."),
1828Enable or disable repacking of non-contiguous array slices."), _(
"\
1829Show whether non-contiguous array slices are repacked."), _(
"\
1830When the user requests a slice of a Fortran array then we can either return\n\
1831a descriptor that describes the array in place (using the original array data\n\
1832in its existing location) or the original data can be repacked (copied) to a\n\
1835When the content of the array slice is contiguous within the original array\n\
1836then the result will never be repacked, but when the data for the new array\n\
1837is non-contiguous within the original array repacking will only be performed\n\
1838when this setting is on."),
1846Set debugging of Fortran array slicing."), _(
"\
1847Show debugging of Fortran array slicing."), _(
"\
1848When on, debugging of Fortran array slicing is enabled."),
1868static struct value *
1879 const CORE_ADDR addr
1913 int arg_num,
bool is_internal_call_p,
1916 if (is_internal_call_p)
1919 bool is_artificial = ((arg_num >=
func_type->num_fields ())
1940 if (addrop !=
nullptr)
1943 is_artificial =
false;
1967 gdb_assert (
type->
code () == TYPE_CODE_ARRAY);
1974 LONGEST total_offset = 0;
1981 for (
int i = 0 ; i < ndimensions; ++i)
1987 LONGEST lowerbound, upperbound, stride;
1989 error (
"failed to get range bounds");
2000 stride /= (unit_size * 8);
2007 if (stride < 0 && lowerbound < upperbound)
2008 offset = (upperbound - lowerbound) * stride;
2009 total_offset += offset;
2014 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
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)
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)
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)
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)
struct type * resolve_dynamic_type(struct type *type, gdb::array_view< const gdb_byte > valaddr, CORE_ADDR addr)
enum bfd_endian type_byte_order(const struct type *type)
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 * arch_type(struct gdbarch *gdbarch, enum type_code code, int bit, const char *name)
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
struct type * arch_boolean_type(struct gdbarch *gdbarch, int bit, int unsigned_p, const char *name)
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, const char *name, const struct floatformat **floatformats)
int type_not_associated(const struct type *type)
unsigned int type_length_units(struct type *type)
struct type * create_range_type_with_stride(struct type *result_type, 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 * init_complex_type(const char *name, struct type *target_type)
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct type * arch_integer_type(struct gdbarch *gdbarch, 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)
#define TYPE_FIELD_ARTIFICIAL(thistype, n)
struct type * language_bool_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
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
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_allocate_space_in_inferior(int len)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
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 type * value_type(const struct value *value)
struct value * value_from_component(struct value *whole, struct type *type, LONGEST offset)
struct value * value_zero(struct type *type, enum lval_type lv)
int value_lazy(const struct value *value)
void value_contents_copy(struct value *dst, LONGEST dst_offset, struct value *src, LONGEST src_offset, LONGEST length)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
CORE_ADDR value_address(const struct value *value)
struct value * value_from_longest(struct type *type, LONGEST num)
gdb::array_view< const gdb_byte > value_contents(struct value *value)
LONGEST value_as_long(struct value *val)
enum lval_type value_lval_const(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_for_printing(struct value *value)
struct value * value_from_host_double(struct type *type, double d)
struct value * value_mark(void)
void value_free_to_mark(const struct value *mark)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)