52 struct type *parent_type);
68 if (*value_ptr !=
nullptr)
94 struct type *parent_type,
96 struct value **child_value,
97 struct type **child_type)
111 *child_value =
value;
122 struct type *parent_type,
123 struct value **child_value,
124 struct type **child_type)
134 gdb_assert (parent_value == NULL);
135 gdb_assert (parent_type->
code () == TYPE_CODE_TYPEDEF);
139 while (parent_type->
code () == TYPE_CODE_TYPEDEF)
159 *child_value =
value;
170 struct type *parent_type,
172 struct value **child_value,
173 struct type **child_type)
180 struct value *index_value =
190 *child_value =
value;
209 if ((*type)->code () == TYPE_CODE_PTR
210 && ((*type)->target_type ()->code () == TYPE_CODE_STRUCT
211 || (*type)->target_type ()->code () == TYPE_CODE_UNION)
224 *
type = (*value)->type ();
234 struct type *parent_type)
238 if (parent_value == NULL
253 warning (_(
"unable to get bounds of array, assuming null array"));
270 struct type *parent_type)
275 gdb_assert (parent_type->
code () == TYPE_CODE_STRUCT
276 || parent_type->
code () == TYPE_CODE_UNION);
278 for (i = 0; i < parent_type->
num_fields (); i++)
285 struct value *elt_value;
286 struct type *elt_type;
289 &elt_value, &elt_type);
301 (elt_value, elt_type);
328 struct type *parent_type)
334 if (child_type->
code () == TYPE_CODE_FUNC
335 || child_type->
code () == TYPE_CODE_VOID)
351 struct type *parent_type)
362 if (parent_type->
code () == TYPE_CODE_ARRAY)
366 if (parent_type->
code () == TYPE_CODE_STRUCT
367 || parent_type->
code () == TYPE_CODE_UNION)
371 if (parent_type->
code () == TYPE_CODE_PTR)
401 struct type *parent_type,
402 const char *parent_name,
403 const char *parent_path_expr,
405 std::string *child_name,
406 struct value **child_value,
407 struct type **child_type,
408 std::string *child_path_expr);
415 struct type *parent_type,
416 const char *parent_name,
417 const char *parent_path_expr,
419 std::string *child_name,
420 struct value **child_value,
421 struct type **child_type,
422 std::string *child_path_expr)
427 gdb_assert (parent_type->
code () == TYPE_CODE_STRUCT
428 || parent_type->
code () == TYPE_CODE_UNION);
430 for (fieldno = 0; fieldno < parent_type->
num_fields (); fieldno++)
437 struct value *elt_value;
438 struct type *elt_type;
442 &elt_value, &elt_type);
450 (elt_value, elt_type);
458 if (child_index - childno < elt_n_children)
467 (elt_value, elt_type, parent_name, parent_path_expr,
468 child_index - childno, child_name, child_value,
469 child_type, child_path_expr);
473 parent_name, parent_path_expr,
474 child_index - childno,
475 child_name, child_value,
476 child_type, child_path_expr);
482 childno += elt_n_children;
497 if (childno == child_index)
508 *child_name = string_printf (
"%.*s", child_name_len,
field_name);
511 if (child_value && parent_value)
529 string_printf (
"(%s).%.*s", parent_path_expr,
543 gdb_assert_not_reached (
"unexpected code path");
554 struct type *parent_type,
555 const char *parent_name,
556 const char *parent_path_expr,
558 std::string *child_name,
559 struct value **child_value,
560 struct type **child_type,
561 std::string *child_path_expr)
564 *child_name = string_printf (
"%s.all", parent_name);
566 if (child_value && parent_value)
573 *child_path_expr = string_printf (
"(%s).all", parent_path_expr);
584 struct type *parent_type,
585 const char *parent_name,
586 const char *parent_path_expr,
588 std::string *child_name,
589 struct value **child_value,
590 struct type **child_type,
591 std::string *child_path_expr)
596 gdb_assert (parent_type->
code () == TYPE_CODE_ARRAY);
604 if (child_value && parent_value)
632 const char *index_type_name = NULL;
646 index_type_name = decoded.c_str ();
650 if (index_type_name != NULL)
652 string_printf (
"(%s)(%.*s'(%s))", parent_path_expr,
654 index_type_name, index_img.c_str ());
657 string_printf (
"(%s)(%s)", parent_path_expr, index_img.c_str ());
665 struct type *parent_type,
666 const char *parent_name,
667 const char *parent_path_expr,
669 std::string *child_name,
670 struct value **child_value,
671 struct type **child_type,
672 std::string *child_path_expr)
678 gdb_assert (parent_path_expr != NULL);
684 *child_name = std::string ();
690 *child_path_expr = std::string ();
695 parent_name, parent_path_expr,
696 child_index, child_name,
697 child_value, child_type,
702 if (parent_type->
code () == TYPE_CODE_ARRAY)
705 (parent_value, parent_type, parent_name, parent_path_expr,
706 child_index, child_name, child_value, child_type,
711 if (parent_type->
code () == TYPE_CODE_STRUCT
712 || parent_type->
code () == TYPE_CODE_UNION)
715 parent_name, parent_path_expr,
716 child_index, child_name,
717 child_value, child_type,
722 if (parent_type->
code () == TYPE_CODE_PTR)
725 parent_name, parent_path_expr,
726 child_index, child_name,
727 child_value, child_type,
743 struct type *parent_type,
744 const char *parent_name,
int child_index)
746 std::string child_name;
749 NULL, child_index, &child_name, NULL,
761 struct type *parent_type,
762 const char *parent_name,
763 const char *parent_path_expr,
766 std::string child_path_expr;
769 parent_path_expr, child_index, NULL,
770 NULL, NULL, &child_path_expr);
772 return child_path_expr;
780 struct type *parent_type,
781 const char *parent_name,
int child_index)
783 struct value *child_value;
786 NULL, child_index, NULL, &child_value,
797 struct type *parent_type,
800 struct type *child_type;
803 child_index, NULL, NULL, &child_type, NULL);
846 && (opts->format == 0 || opts->format ==
's'))
849 return string_printf (
"[%d] %s", numchild, str.c_str ());
852 return string_printf (
"[%d]", numchild);
867 case TYPE_CODE_STRUCT:
868 case TYPE_CODE_UNION:
870 case TYPE_CODE_ARRAY:
898 parent->
name.c_str (), index);
918 parent->name.c_str (), index);
998 for (
int i = from; i < to; i++)
1000 var->
name.c_str (), i)
std::string ada_decode(const char *encoded, bool wrap, bool operators)
struct value * ada_get_decoded_value(struct value *value)
int ada_is_variant_part(struct type *type, int field_num)
struct type * ada_coerce_to_simple_array_type(struct type *type)
bool ada_is_access_to_unconstrained_array(struct type *type)
struct value * ada_value_subscript(struct value *arr, int arity, struct value **ind)
bool ada_is_string_type(struct type *type)
int ada_is_array_descriptor_type(struct type *type)
const char * ada_type_name(struct type *type)
struct type * ada_get_decoded_type(struct type *type)
int ada_is_constrained_packed_array_type(struct type *type)
int ada_name_prefix_len(const char *name)
struct value * ada_tag_value_at_base_address(struct value *obj)
struct type * ada_check_typedef(struct type *type)
int ada_is_wrapper_field(struct type *type, int field_num)
int ada_is_tagged_type(struct type *type, int refok)
struct value * ada_value_ind(struct value *val0)
LONGEST ada_discrete_type_low_bound(struct type *type)
int ada_is_ignored_field(struct type *type, int field_num)
void ada_print_scalar(struct type *, LONGEST, struct ui_file *)
static bool ada_value_is_changeable_p(const struct varobj *var)
static struct value * ada_value_of_child(const struct varobj *parent, int index)
static int ada_varobj_get_number_of_children(struct value *parent_value, struct type *parent_type)
static bool ada_value_has_mutated(const struct varobj *var, struct value *new_val, struct type *new_type)
static void ada_varobj_ind(struct value *parent_value, struct type *parent_type, struct value **child_value, struct type **child_type)
static int ada_varobj_get_array_number_of_children(struct value *parent_value, struct type *parent_type)
static std::string ada_name_of_variable(const struct varobj *parent)
const struct lang_varobj_ops ada_varobj_ops
static void ada_varobj_adjust_for_child_access(struct value **value, struct type **type)
static std::string ada_varobj_get_value_of_array_variable(struct value *value, struct type *type, struct value_print_options *opts)
static void ada_varobj_decode_var(struct value **value_ptr, struct type **type_ptr)
static int ada_varobj_get_ptr_number_of_children(struct value *parent_value, struct type *parent_type)
static std::string ada_varobj_get_name_of_child(struct value *parent_value, struct type *parent_type, const char *parent_name, int child_index)
static struct type * ada_varobj_get_type_of_child(struct value *parent_value, struct type *parent_type, int child_index)
static void ada_varobj_simple_array_elt(struct value *parent_value, struct type *parent_type, int elt_index, struct value **child_value, struct type **child_type)
static void ada_varobj_describe_child(struct value *parent_value, struct type *parent_type, const char *parent_name, const char *parent_path_expr, int child_index, std::string *child_name, struct value **child_value, struct type **child_type, std::string *child_path_expr)
static int ada_varobj_get_struct_number_of_children(struct value *parent_value, struct type *parent_type)
static void ada_varobj_struct_elt(struct value *parent_value, struct type *parent_type, int fieldno, struct value **child_value, struct type **child_type)
static void ada_varobj_describe_simple_array_child(struct value *parent_value, struct type *parent_type, const char *parent_name, const char *parent_path_expr, int child_index, std::string *child_name, struct value **child_value, struct type **child_type, std::string *child_path_expr)
static std::string ada_value_of_variable(const struct varobj *var, enum varobj_display_formats format)
static void ada_varobj_describe_struct_child(struct value *parent_value, struct type *parent_type, const char *parent_name, const char *parent_path_expr, int child_index, std::string *child_name, struct value **child_value, struct type **child_type, std::string *child_path_expr)
static struct value * ada_varobj_get_value_of_child(struct value *parent_value, struct type *parent_type, const char *parent_name, int child_index)
static int ada_number_of_children(const struct varobj *var)
static std::string ada_varobj_get_path_expr_of_child(struct value *parent_value, struct type *parent_type, const char *parent_name, const char *parent_path_expr, int child_index)
static void ada_varobj_describe_ptr_child(struct value *parent_value, struct type *parent_type, const char *parent_name, const char *parent_path_expr, int child_index, std::string *child_name, struct value **child_value, struct type **child_type, std::string *child_path_expr)
static std::string ada_varobj_scalar_image(struct type *type, LONGEST val)
static struct type * ada_type_of_child(const struct varobj *parent, int index)
static std::string ada_path_expr_of_child(const struct varobj *child)
static std::string ada_varobj_get_value_of_variable(struct value *value, struct type *type, struct value_print_options *opts)
static std::string ada_name_of_child(const struct varobj *parent, int index)
static std::string ada_varobj_get_value_image(struct value *value, struct value_print_options *opts)
const struct lang_varobj_ops c_varobj_ops
struct type * lookup_pointer_type(struct type *type)
int is_dynamic_type(struct type *type)
bool get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
const struct language_defn * current_language
static struct type * new_type(char *)
static gdbpy_ref field_name(struct type *type, int field)
const char * name() const
struct type * type() const
std::string(* name_of_variable)(const struct varobj *parent)
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
type * index_type() const
struct type * type() const
value(struct type *type_)
std::vector< varobj * > children
void common_val_print(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
struct value * value_field(struct value *arg1, int fieldno)
CORE_ADDR value_as_address(struct value *val)
struct value * value_from_longest(struct type *type, LONGEST num)
const char * varobj_get_path_expr(const struct varobj *var)
bool varobj_default_value_is_changeable_p(const struct varobj *var)
bool varobj_default_is_path_expr_parent(const struct varobj *var)
void varobj_formatted_print_options(struct value_print_options *opts, enum varobj_display_formats format)
void varobj_restrict_range(const std::vector< varobj * > &children, int *from, int *to)