GDB (xrefs)
|
#include "defs.h"
#include "exceptions.h"
#include "value.h"
#include "expression.h"
#include "frame.h"
#include "language.h"
#include "gdbcmd.h"
#include "block.h"
#include "valprint.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdb_regex.h"
#include "varobj.h"
#include "vec.h"
#include "gdbthread.h"
#include "inferior.h"
#include "ada-varobj.h"
#include "ada-lang.h"
Go to the source code of this file.
Classes | |
struct | varobj_root |
struct | varobj |
struct | cpstack |
struct | vlist |
struct | language_specific |
Defines | |
#define | ANONYMOUS_STRUCT_NAME _("<anonymous struct>") |
#define | ANONYMOUS_UNION_NAME _("<anonymous union>") |
#define | VAROBJ_TABLE_SIZE 227 |
#define | CPLUS_FAKE_CHILD(x) ((x) != NULL && (x)->type == NULL && (x)->value == NULL) |
Typedefs | |
typedef int | PyObject |
Enumerations | |
enum | vsections { v_public = 0, v_private, v_protected } |
enum | accessibility { private_field, protected_field, public_field } |
Functions | |
static void | show_varobjdebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
void | varobj_enable_pretty_printing (void) |
static int | delete_variable (struct cpstack **, struct varobj *, int) |
static void | delete_variable_1 (struct cpstack **, int *, struct varobj *, int, int) |
static int | install_variable (struct varobj *) |
static void | uninstall_variable (struct varobj *) |
static struct varobj * | create_child (struct varobj *, int, char *) |
static struct varobj * | create_child_with_value (struct varobj *parent, int index, char *name, struct value *value) |
static struct varobj * | new_variable (void) |
static struct varobj * | new_root_variable (void) |
static void | free_variable (struct varobj *var) |
static struct cleanup * | make_cleanup_free_variable (struct varobj *var) |
static struct type * | get_type (struct varobj *var) |
static struct type * | get_value_type (struct varobj *var) |
static struct type * | get_target_type (struct type *) |
static enum varobj_display_formats | variable_default_display (struct varobj *) |
static void | cppush (struct cpstack **pstack, char *name) |
static char * | cppop (struct cpstack **pstack) |
static int | update_type_if_necessary (struct varobj *var, struct value *new_value) |
static int | install_new_value (struct varobj *var, struct value *value, int initial) |
static enum varobj_languages | variable_language (struct varobj *var) |
static int | number_of_children (struct varobj *) |
static char * | name_of_variable (struct varobj *) |
static char * | name_of_child (struct varobj *, int) |
static struct value * | value_of_root (struct varobj **var_handle, int *) |
static struct value * | value_of_child (struct varobj *parent, int index) |
static char * | my_value_of_variable (struct varobj *var, enum varobj_display_formats format) |
static char * | value_get_print_value (struct value *value, enum varobj_display_formats format, struct varobj *var) |
static int | varobj_value_is_changeable_p (struct varobj *var) |
static int | is_root_p (struct varobj *var) |
static int | default_value_is_changeable_p (struct varobj *var) |
static int | c_number_of_children (struct varobj *var) |
static char * | c_name_of_variable (struct varobj *parent) |
static char * | c_name_of_child (struct varobj *parent, int index) |
static char * | c_path_expr_of_child (struct varobj *child) |
static struct value * | c_value_of_child (struct varobj *parent, int index) |
static struct type * | c_type_of_child (struct varobj *parent, int index) |
static char * | c_value_of_variable (struct varobj *var, enum varobj_display_formats format) |
static int | cplus_number_of_children (struct varobj *var) |
static void | cplus_class_num_children (struct type *type, int children[3]) |
static char * | cplus_name_of_variable (struct varobj *parent) |
static char * | cplus_name_of_child (struct varobj *parent, int index) |
static char * | cplus_path_expr_of_child (struct varobj *child) |
static struct value * | cplus_value_of_child (struct varobj *parent, int index) |
static struct type * | cplus_type_of_child (struct varobj *parent, int index) |
static char * | cplus_value_of_variable (struct varobj *var, enum varobj_display_formats format) |
static int | java_number_of_children (struct varobj *var) |
static char * | java_name_of_variable (struct varobj *parent) |
static char * | java_name_of_child (struct varobj *parent, int index) |
static char * | java_path_expr_of_child (struct varobj *child) |
static struct value * | java_value_of_child (struct varobj *parent, int index) |
static struct type * | java_type_of_child (struct varobj *parent, int index) |
static char * | java_value_of_variable (struct varobj *var, enum varobj_display_formats format) |
static int | ada_number_of_children (struct varobj *var) |
static char * | ada_name_of_variable (struct varobj *parent) |
static char * | ada_name_of_child (struct varobj *parent, int index) |
static char * | ada_path_expr_of_child (struct varobj *child) |
static struct value * | ada_value_of_child (struct varobj *parent, int index) |
static struct type * | ada_type_of_child (struct varobj *parent, int index) |
static char * | ada_value_of_variable (struct varobj *var, enum varobj_display_formats format) |
static int | ada_value_is_changeable_p (struct varobj *var) |
static int | ada_value_has_mutated (struct varobj *var, struct value *new_val, struct type *new_type) |
static struct frame_info * | find_frame_addr_in_frame_chain (CORE_ADDR frame_addr) |
struct varobj * | varobj_create (char *objname, char *expression, CORE_ADDR frame, enum varobj_type type) |
char * | varobj_gen_name (void) |
struct varobj * | varobj_get_handle (char *objname) |
char * | varobj_get_objname (struct varobj *var) |
char * | varobj_get_expression (struct varobj *var) |
int | varobj_delete (struct varobj *var, char ***dellist, int only_children) |
enum varobj_display_formats | varobj_set_display_format (struct varobj *var, enum varobj_display_formats format) |
enum varobj_display_formats | varobj_get_display_format (struct varobj *var) |
char * | varobj_get_display_hint (struct varobj *var) |
int | varobj_has_more (struct varobj *var, int to) |
int | varobj_get_thread_id (struct varobj *var) |
void | varobj_set_frozen (struct varobj *var, int frozen) |
int | varobj_get_frozen (struct varobj *var) |
static void | restrict_range (VEC(varobj_p)*children, int *from, int *to) |
static int | update_dynamic_varobj_children (struct varobj *var, VEC(varobj_p)**changed, VEC(varobj_p)**type_changed, VEC(varobj_p)**new, VEC(varobj_p)**unchanged, int *cchanged, int update_children, int from, int to) |
int | varobj_get_num_children (struct varobj *var) |
VEC (varobj_p) | |
char * | varobj_get_type (struct varobj *var) |
struct type * | varobj_get_gdb_type (struct varobj *var) |
static int | is_path_expr_parent (struct varobj *var) |
static struct varobj * | get_path_expr_parent (struct varobj *var) |
char * | varobj_get_path_expr (struct varobj *var) |
enum varobj_languages | varobj_get_language (struct varobj *var) |
int | varobj_get_attributes (struct varobj *var) |
int | varobj_pretty_printed_p (struct varobj *var) |
char * | varobj_get_formatted_value (struct varobj *var, enum varobj_display_formats format) |
char * | varobj_get_value (struct varobj *var) |
int | varobj_set_value (struct varobj *var, char *expression) |
static void | install_new_value_visualizer (struct varobj *var) |
void | varobj_get_child_range (struct varobj *var, int *from, int *to) |
void | varobj_set_child_range (struct varobj *var, int from, int to) |
void | varobj_set_visualizer (struct varobj *var, const char *visualizer) |
static int | varobj_value_has_mutated (struct varobj *var, struct value *new_value, struct type *new_type) |
VEC (varobj_update_result) | |
static int | is_anonymous_child (struct varobj *child) |
static void | do_free_variable_cleanup (void *var) |
static int | check_scope (struct varobj *var) |
static struct value * | value_of_root_1 (struct varobj **var_handle) |
int | varobj_editable_p (struct varobj *var) |
int | varobj_floating_p (struct varobj *var) |
static void | adjust_value_for_child_access (struct value **value, struct type **type, int *was_ptr, int lookup_actual_type) |
static struct value * | value_struct_element_index (struct value *value, int type_index) |
static void | c_describe_child (struct varobj *parent, int index, char **cname, struct value **cvalue, struct type **ctype, char **cfull_expression) |
static int | match_accessibility (struct type *type, int index, enum accessibility acc) |
static void | cplus_describe_child (struct varobj *parent, int index, char **cname, struct value **cvalue, struct type **ctype, char **cfull_expression) |
void | all_root_varobjs (void(*func)(struct varobj *var, void *data), void *data) |
void | _initialize_varobj (void) |
static void | varobj_invalidate_iter (struct varobj *var, void *unused) |
void | varobj_invalidate (void) |
Variables | |
unsigned int | varobjdebug = 0 |
char * | varobj_format_string [] |
char * | varobj_language_string [] = { "C", "C++", "Java" } |
static int | pretty_printing = 0 |
static struct language_specific | languages [vlang_end] |
static int | format_code [] = { 0, 't', 'd', 'x', 'o' } |
static struct varobj_root * | rootlist |
static struct vlist ** | varobj_table |
#define ANONYMOUS_STRUCT_NAME _("<anonymous struct>") |
Definition at line 47 of file varobj.c.
Referenced by c_describe_child(), cplus_describe_child(), and is_anonymous_child().
#define ANONYMOUS_UNION_NAME _("<anonymous union>") |
Definition at line 48 of file varobj.c.
Referenced by c_describe_child(), cplus_describe_child(), and is_anonymous_child().
#define CPLUS_FAKE_CHILD | ( | x | ) | ((x) != NULL && (x)->type == NULL && (x)->value == NULL) |
Definition at line 514 of file varobj.c.
Referenced by cplus_describe_child(), cplus_number_of_children(), cplus_value_of_variable(), default_value_is_changeable_p(), install_new_value(), is_path_expr_parent(), and varobj_get_type().
#define VAROBJ_TABLE_SIZE 227 |
Definition at line 508 of file varobj.c.
Referenced by install_variable(), uninstall_variable(), and varobj_get_handle().
enum accessibility |
void _initialize_varobj | ( | void | ) |
static char * ada_name_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static] |
Definition at line 4000 of file varobj.c.
References ada_varobj_get_name_of_child(), varobj::name, varobj::type, and varobj::value.
static char * ada_name_of_variable | ( | struct varobj * | parent | ) | [static] |
Definition at line 3994 of file varobj.c.
References c_name_of_variable().
static int ada_number_of_children | ( | struct varobj * | var | ) | [static] |
Definition at line 3988 of file varobj.c.
References ada_varobj_get_number_of_children(), varobj::type, and varobj::value.
static char * ada_path_expr_of_child | ( | struct varobj * | child | ) | [static] |
Definition at line 4007 of file varobj.c.
References ada_varobj_get_path_expr_of_child(), varobj::index, varobj::name, varobj::parent, varobj::type, varobj::value, and varobj_get_path_expr().
static struct type * ada_type_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 4027 of file varobj.c.
References ada_varobj_get_type_of_child(), varobj::type, and varobj::value.
static int ada_value_has_mutated | ( | struct varobj * | var, |
struct value * | new_val, | ||
struct type * | new_type | ||
) | [static] |
Definition at line 4074 of file varobj.c.
References ada_varobj_get_name_of_child(), ada_varobj_get_number_of_children(), from, varobj::name, varobj::num_children, restrict_range(), to, and VEC_index.
static int ada_value_is_changeable_p | ( | struct varobj * | var | ) | [static] |
Definition at line 4048 of file varobj.c.
References ada_is_array_descriptor_type(), ada_is_string_type(), default_value_is_changeable_p(), varobj::type, TYPE_CODE, TYPE_CODE_TYPEDEF, varobj::value, and value_type().
static struct value * ada_value_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 4020 of file varobj.c.
References ada_varobj_get_value_of_child(), varobj::name, varobj::type, and varobj::value.
static char * ada_value_of_variable | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) | [static] |
Definition at line 4034 of file varobj.c.
References ada_varobj_get_value_of_variable(), value_print_options::deref_ref, format_code, get_formatted_print_options(), value_print_options::raw, varobj::type, and varobj::value.
static void adjust_value_for_child_access | ( | struct value ** | value, |
struct type ** | type, | ||
int * | was_ptr, | ||
int | lookup_actual_type | ||
) | [static] |
Definition at line 3098 of file varobj.c.
References check_typedef(), gdb_assert, get_target_type(), gdb_exception::reason, RETURN_MASK_ERROR, TRY_CATCH, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, value_actual_type(), value_cast(), and value_ind().
Referenced by c_describe_child(), c_number_of_children(), cplus_describe_child(), and cplus_number_of_children().
void all_root_varobjs | ( | void(*)(struct varobj *var, void *data) | func, |
void * | data | ||
) |
Definition at line 4114 of file varobj.c.
References varobj_root::next, and varobj_root::rootvar.
Referenced by mi_cmd_var_update(), and varobj_invalidate().
static void c_describe_child | ( | struct varobj * | parent, |
int | index, | ||
char ** | cname, | ||
struct value ** | cvalue, | ||
struct type ** | ctype, | ||
char ** | cfull_expression | ||
) | [static] |
Definition at line 3295 of file varobj.c.
References adjust_value_for_child_access(), ANONYMOUS_STRUCT_NAME, ANONYMOUS_UNION_NAME, field_name(), get_path_expr_parent(), get_target_type(), get_value_type(), int_string(), varobj::name, gdb_exception::reason, RETURN_MASK_ERROR, TRY_CATCH, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_TARGET_TYPE, varobj::value, value_ind(), value_struct_element_index(), value_subscript(), varobj_get_path_expr(), and xstrprintf().
Referenced by c_name_of_child(), c_path_expr_of_child(), c_type_of_child(), c_value_of_child(), and cplus_describe_child().
static char * c_name_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static] |
Definition at line 3434 of file varobj.c.
References c_describe_child(), and name.
static char * c_name_of_variable | ( | struct varobj * | parent | ) | [static] |
Definition at line 3245 of file varobj.c.
References varobj::name.
Referenced by ada_name_of_variable(), and cplus_name_of_variable().
static int c_number_of_children | ( | struct varobj * | var | ) | [static] |
Definition at line 3194 of file varobj.c.
References adjust_value_for_child_access(), get_target_type(), get_value_type(), TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_LENGTH, and TYPE_NFIELDS.
Referenced by cplus_number_of_children().
static char * c_path_expr_of_child | ( | struct varobj * | child | ) | [static] |
Definition at line 3443 of file varobj.c.
References c_describe_child(), varobj::index, varobj::parent, and varobj::path_expr.
static struct type * c_type_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3460 of file varobj.c.
References c_describe_child(), and type.
static struct value * c_value_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3451 of file varobj.c.
References c_describe_child().
static char * c_value_of_variable | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) | [static] |
Definition at line 3469 of file varobj.c.
References check_typedef(), gdb_assert, get_type(), varobj::num_children, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_TARGET_TYPE, varobj::value, value_get_print_value(), value_lazy(), varobj_value_is_changeable_p(), and xstrprintf().
Referenced by cplus_value_of_variable().
static int check_scope | ( | struct varobj * | var | ) | [static] |
Definition at line 2702 of file varobj.c.
References BLOCK_END, BLOCK_START, frame_find_by_id(), get_frame_pc(), and select_frame().
Referenced by value_of_root_1().
static void cplus_class_num_children | ( | struct type * | type, |
int | children[3] | ||
) | [static] |
Definition at line 3614 of file varobj.c.
References get_vptr_fieldno(), TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_PRIVATE, TYPE_FIELD_PROTECTED, TYPE_N_BASECLASSES, TYPE_NFIELDS, v_private, v_protected, and v_public.
Referenced by cplus_describe_child(), and cplus_number_of_children().
static void cplus_describe_child | ( | struct varobj * | parent, |
int | index, | ||
char ** | cname, | ||
struct value ** | cvalue, | ||
struct type ** | ctype, | ||
char ** | cfull_expression | ||
) | [static] |
Definition at line 3667 of file varobj.c.
References adjust_value_for_child_access(), ANONYMOUS_STRUCT_NAME, ANONYMOUS_UNION_NAME, c_describe_child(), cplus_class_num_children(), CPLUS_FAKE_CHILD, field_name(), gdb_assert, get_path_expr_parent(), get_user_print_options(), get_value_type(), get_vptr_fieldno(), match_accessibility(), varobj::name, value_print_options::objectprint, varobj::parent, private_field, protected_field, public_field, type, varobj::type, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_N_BASECLASSES, v_private, v_public, varobj::value, value_cast(), value_struct_element_index(), varobj_get_path_expr(), and xstrprintf().
Referenced by cplus_name_of_child(), cplus_path_expr_of_child(), cplus_type_of_child(), and cplus_value_of_child().
static char * cplus_name_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static] |
Definition at line 3867 of file varobj.c.
References cplus_describe_child(), and name.
Referenced by java_name_of_child().
static char * cplus_name_of_variable | ( | struct varobj * | parent | ) | [static] |
Definition at line 3643 of file varobj.c.
References c_name_of_variable().
Referenced by java_name_of_variable().
static int cplus_number_of_children | ( | struct varobj * | var | ) | [static] |
Definition at line 3531 of file varobj.c.
References adjust_value_for_child_access(), c_number_of_children(), cplus_class_num_children(), CPLUS_FAKE_CHILD, get_user_print_options(), get_value_type(), varobj::name, value_print_options::objectprint, varobj::parent, type, varobj::type, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_N_BASECLASSES, v_private, v_protected, v_public, and varobj::value.
Referenced by java_number_of_children().
static char * cplus_path_expr_of_child | ( | struct varobj * | child | ) | [static] |
Definition at line 3876 of file varobj.c.
References cplus_describe_child(), varobj::index, varobj::parent, and varobj::path_expr.
static struct type * cplus_type_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3893 of file varobj.c.
References cplus_describe_child(), and type.
Referenced by java_type_of_child().
static struct value * cplus_value_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3884 of file varobj.c.
References cplus_describe_child().
Referenced by java_value_of_child().
static char * cplus_value_of_variable | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) | [static] |
Definition at line 3902 of file varobj.c.
References c_value_of_variable(), and CPLUS_FAKE_CHILD.
Referenced by java_value_of_variable().
Definition at line 2623 of file varobj.c.
References cpstack::name, cpstack::next, and xfree().
Referenced by varobj_delete().
Definition at line 2611 of file varobj.c.
References name, cpstack::name, cpstack::next, and xmalloc().
Referenced by delete_variable_1(), and varobj_delete().
static struct varobj * create_child | ( | struct varobj * | parent, |
int | index, | ||
char * | name | ||
) | [static, read] |
Definition at line 2377 of file varobj.c.
References create_child_with_value(), and value_of_child().
Referenced by VEC().
static struct varobj * create_child_with_value | ( | struct varobj * | parent, |
int | index, | ||
char * | name, | ||
struct value * | value | ||
) | [static, read] |
Definition at line 2398 of file varobj.c.
References varobj::index, install_new_value(), install_variable(), is_anonymous_child(), name, varobj::name, new_variable(), varobj::obj_name, varobj::parent, varobj::type, value_actual_type(), and xstrprintf().
Referenced by create_child().
static int default_value_is_changeable_p | ( | struct varobj * | var | ) | [static] |
Definition at line 3166 of file varobj.c.
References CPLUS_FAKE_CHILD, get_value_type(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, and TYPE_CODE_UNION.
Referenced by ada_value_is_changeable_p().
static int delete_variable | ( | struct cpstack ** | resultp, |
struct varobj * | var, | ||
int | only_children_p | ||
) | [static] |
Definition at line 2193 of file varobj.c.
References delete_variable_1().
Referenced by varobj_delete().
static void delete_variable_1 | ( | struct cpstack ** | resultp, |
int * | delcountp, | ||
struct varobj * | var, | ||
int | only_children_p, | ||
int | remove_from_parent_p | ||
) | [static] |
Definition at line 2209 of file varobj.c.
References cppush(), free_variable(), varobj::index, varobj::obj_name, varobj::parent, uninstall_variable(), VEC_free, VEC_index, VEC_length, and VEC_replace.
Referenced by delete_variable().
static void do_free_variable_cleanup | ( | void * | var | ) | [static] |
Definition at line 2524 of file varobj.c.
References free_variable().
Referenced by make_cleanup_free_variable().
static struct frame_info* find_frame_addr_in_frame_chain | ( | CORE_ADDR | frame_addr | ) | [static, read] |
Definition at line 542 of file varobj.c.
References gdbarch_addr_bit(), get_current_frame(), get_frame_arch(), get_frame_base_address(), get_prev_frame(), and HOST_CHAR_BIT.
Referenced by varobj_create().
static void free_variable | ( | struct varobj * | var | ) | [static] |
Definition at line 2493 of file varobj.c.
References do_cleanups(), is_root_p(), varobj::name, varobj::obj_name, varobj::path_expr, varobj::value, value_free(), and xfree().
Referenced by delete_variable_1(), and do_free_variable_cleanup().
static struct varobj* get_path_expr_parent | ( | struct varobj * | var | ) | [static, read] |
Definition at line 1369 of file varobj.c.
References is_path_expr_parent(), is_root_p(), and varobj::parent.
Referenced by c_describe_child(), and cplus_describe_child().
static struct type * get_target_type | ( | struct type * | type | ) | [static, read] |
Definition at line 2589 of file varobj.c.
References check_typedef(), type, and TYPE_TARGET_TYPE.
Referenced by adjust_value_for_child_access(), c_describe_child(), c_number_of_children(), and get_value_type().
Definition at line 2541 of file varobj.c.
References check_typedef(), type, and varobj::type.
Referenced by c_value_of_variable().
static struct type * get_value_type | ( | struct varobj * | var | ) | [static, read] |
Definition at line 2564 of file varobj.c.
References check_typedef(), get_target_type(), type, varobj::type, TYPE_CODE, TYPE_CODE_REF, varobj::value, and value_type().
Referenced by c_describe_child(), c_number_of_children(), cplus_describe_child(), cplus_number_of_children(), default_value_is_changeable_p(), is_path_expr_parent(), and varobj_editable_p().
static int install_new_value | ( | struct varobj * | var, |
struct value * | value, | ||
int | initial | ||
) | [static] |
Definition at line 1673 of file varobj.c.
References coerce_ref(), CPLUS_FAKE_CHILD, gdb_assert, install_new_value_visualizer(), varobj::parent, gdb_exception::reason, RETURN_MASK_ERROR, TRY_CATCH, varobj::type, TYPE_CODE, TYPE_CODE_UNION, varobj::value, value_fetch_lazy(), value_free(), value_get_print_value(), value_incref(), value_lazy(), value_type(), varobj_value_is_changeable_p(), and xfree().
Referenced by create_child_with_value(), varobj_create(), varobj_set_value(), and VEC().
static void install_new_value_visualizer | ( | struct varobj * | var | ) | [static] |
Definition at line 1596 of file varobj.c.
References do_cleanups(), gdb_python_initialized, and varobj::value.
Referenced by install_new_value().
static int install_variable | ( | struct varobj * | var | ) | [static] |
Definition at line 2260 of file varobj.c.
References _, error(), int, is_root_p(), vlist::next, varobj::obj_name, rootlist, vlist::var, VAROBJ_TABLE_SIZE, and xmalloc().
Referenced by create_child_with_value(), value_of_root(), varobj_create(), and varobj_invalidate_iter().
static int is_anonymous_child | ( | struct varobj * | child | ) | [static] |
Definition at line 2391 of file varobj.c.
References ANONYMOUS_STRUCT_NAME, ANONYMOUS_UNION_NAME, and varobj::name.
Referenced by create_child_with_value().
static int is_path_expr_parent | ( | struct varobj * | var | ) | [static] |
Definition at line 1350 of file varobj.c.
References CPLUS_FAKE_CHILD, get_value_type(), type, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_NAME.
Referenced by get_path_expr_parent().
Definition at line 520 of file varobj.c.
Referenced by free_variable(), get_path_expr_parent(), install_variable(), uninstall_variable(), value_of_root(), value_of_root_1(), and varobj_get_path_expr().
static char * java_name_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static] |
Definition at line 3943 of file varobj.c.
References cplus_name_of_child(), name, and p.
static char * java_name_of_variable | ( | struct varobj * | parent | ) | [static] |
Definition at line 3923 of file varobj.c.
References cplus_name_of_variable(), name, and p.
static int java_number_of_children | ( | struct varobj * | var | ) | [static] |
Definition at line 3917 of file varobj.c.
References cplus_number_of_children().
static char * java_path_expr_of_child | ( | struct varobj * | child | ) | [static] |
static struct type * java_type_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3974 of file varobj.c.
References cplus_type_of_child().
static struct value * java_value_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 3968 of file varobj.c.
References cplus_value_of_child().
static char * java_value_of_variable | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) | [static] |
Definition at line 3980 of file varobj.c.
References cplus_value_of_variable().
static struct cleanup * make_cleanup_free_variable | ( | struct varobj * | var | ) | [static, read] |
Definition at line 2530 of file varobj.c.
References do_free_variable_cleanup(), and make_cleanup().
Referenced by varobj_create().
static int match_accessibility | ( | struct type * | type, |
int | index, | ||
enum accessibility | acc | ||
) | [static] |
Definition at line 3653 of file varobj.c.
References private_field, protected_field, public_field, TYPE_FIELD_PRIVATE, and TYPE_FIELD_PROTECTED.
Referenced by cplus_describe_child().
static char * my_value_of_variable | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) | [static] |
Definition at line 2889 of file varobj.c.
References varobj::value, and value_get_print_value().
Referenced by varobj_get_formatted_value(), and varobj_get_value().
static char * name_of_child | ( | struct varobj * | var, |
int | index | ||
) | [static] |
static char * name_of_variable | ( | struct varobj * | var | ) | [static] |
Definition at line 2685 of file varobj.c.
Referenced by varobj_get_expression().
static struct varobj * new_root_variable | ( | void | ) | [static, read] |
Definition at line 2475 of file varobj.c.
References new_variable(), null_frame_id, and xmalloc().
Referenced by varobj_create().
static struct varobj * new_variable | ( | void | ) | [static, read] |
Definition at line 2442 of file varobj.c.
References varobj::index, varobj::name, varobj::num_children, varobj::obj_name, varobj::parent, varobj::path_expr, varobj::type, varobj::value, and xmalloc().
Referenced by create_child_with_value(), and new_root_variable().
static int number_of_children | ( | struct varobj * | var | ) | [static] |
Definition at line 2677 of file varobj.c.
Referenced by varobj_get_num_children(), and VEC().
static void restrict_range | ( | VEC(varobj_p)* | children, |
int * | from, | ||
int * | to | ||
) | [static] |
Definition at line 966 of file varobj.c.
References to, and VEC_length.
Referenced by ada_value_has_mutated(), and VEC().
static void show_varobjdebug | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 54 of file varobj.c.
References _, and fprintf_filtered().
static void uninstall_variable | ( | struct varobj * | var | ) | [static] |
Definition at line 2302 of file varobj.c.
References _, fprintf_unfiltered(), gdb_stdlog, int, is_root_p(), varobj_root::next, vlist::next, varobj::obj_name, rootlist, varobj_root::rootvar, vlist::var, VAROBJ_TABLE_SIZE, varobjdebug, warning(), and xfree().
Referenced by delete_variable_1().
static int update_dynamic_varobj_children | ( | struct varobj * | var, |
VEC(varobj_p)** | changed, | ||
VEC(varobj_p)** | type_changed, | ||
VEC(varobj_p)** | new, | ||
VEC(varobj_p)** | unchanged, | ||
int * | cchanged, | ||
int | update_children, | ||
int | from, | ||
int | to | ||
) | [static] |
Definition at line 1050 of file varobj.c.
References _, convert_value_from_python(), do_cleanups(), error(), from, gdb_assert_not_reached, gdb_python_initialized, gdbpy_children_cst, gdbpy_exception_to_string(), gdbpy_gdb_memory_error, gdbpy_print_stack(), make_cleanup_py_decref(), name, varobj::num_children, type, varobj_delete(), VEC_index, VEC_length, VEC_truncate, xfree(), and xstrprintf().
Referenced by varobj_get_num_children(), and VEC().
static int update_type_if_necessary | ( | struct varobj * | var, |
struct value * | new_value | ||
) | [static] |
Definition at line 1628 of file varobj.c.
References get_user_print_options(), new_type(), varobj::num_children, value_print_options::objectprint, varobj::type, type_to_string(), value_actual_type(), varobj_delete(), varobj_get_type(), and VEC_free.
Referenced by VEC().
static char * value_get_print_value | ( | struct value * | value, |
enum varobj_display_formats | format, | ||
struct varobj * | var | ||
) | [static] |
Definition at line 2902 of file varobj.c.
References apply_varobj_pretty_printer(), builtin_type::builtin_char, builtin_type(), common_val_print(), current_language, value_print_options::deref_ref, do_cleanups(), encoding, format_code, free_current_contents(), gdb_python_initialized, gdbpy_extract_lazy_string(), gdbpy_get_display_hint(), gdbpy_is_lazy_string(), gdbpy_print_stack(), gdbpy_to_string_cst, get_formatted_print_options(), get_type_arch(), LA_PRINT_STRING, len, make_cleanup(), make_cleanup_py_decref(), make_cleanup_ui_file_delete(), mem_fileopen(), python_string_to_target_string(), value_print_options::raw, ui_file_xstrdup(), val_print_string(), value_type(), and xfree().
Referenced by c_value_of_variable(), install_new_value(), my_value_of_variable(), and varobj_set_display_format().
static struct value * value_of_child | ( | struct varobj * | parent, |
int | index | ||
) | [static, read] |
Definition at line 2878 of file varobj.c.
Referenced by create_child(), and VEC().
static struct value * value_of_root | ( | struct varobj ** | var_handle, |
int * | type_changed | ||
) | [static, read] |
Definition at line 2788 of file varobj.c.
References install_variable(), is_root_p(), varobj::name, new_type(), varobj::num_children, varobj::obj_name, USE_SELECTED_FRAME, varobj::value, value_of_root_1(), value_type(), varobj_create(), varobj_delete(), varobj_get_type(), varobj_value_has_mutated(), and xfree().
Referenced by VEC().
static struct value* value_of_root_1 | ( | struct varobj ** | var_handle | ) | [static, read] |
Definition at line 2726 of file varobj.c.
References check_scope(), do_cleanups(), evaluate_expression(), in_thread_list(), is_root_p(), make_cleanup_restore_current_thread(), RETURN_MASK_ERROR, switch_to_thread(), thread_id_to_pid(), and TRY_CATCH.
Referenced by value_of_root().
static struct value* value_struct_element_index | ( | struct value * | value, |
int | type_index | ||
) | [static, read] |
Definition at line 3256 of file varobj.c.
References check_typedef(), field_is_static(), gdb_assert, gdb_exception::reason, RETURN_MASK_ERROR, TRY_CATCH, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD, value_primitive_field(), value_static_field(), and value_type().
Referenced by c_describe_child(), and cplus_describe_child().
static enum varobj_display_formats variable_default_display | ( | struct varobj * | var | ) | [static] |
Definition at line 2604 of file varobj.c.
References FORMAT_NATURAL.
Referenced by varobj_create(), and varobj_set_display_format().
static enum varobj_languages variable_language | ( | struct varobj * | var | ) | [static] |
Definition at line 2647 of file varobj.c.
References language_ada, language_c, language_cplus, language_java, vlang_ada, vlang_c, vlang_cplus, and vlang_java.
Referenced by varobj_create(), and varobj_get_language().
struct varobj* varobj_create | ( | char * | objname, |
char * | expression, | ||
CORE_ADDR | frame, | ||
enum varobj_type | type | ||
) | [read] |
Definition at line 571 of file varobj.c.
References _, discard_cleanups(), do_cleanups(), error(), evaluate_expression(), evaluate_type(), find_frame_addr_in_frame_chain(), fprintf_unfiltered(), frame_find_by_id(), frame_id_p(), gdb_stderr, get_frame_block(), get_frame_id(), get_frame_pc(), get_selected_frame(), has_stack_frames(), inferior_ptid, innermost_block, install_new_value(), install_variable(), make_cleanup_free_variable(), varobj::name, new_root_variable(), null_frame_id, varobj::obj_name, p, parse_exp_1(), varobj::path_expr, pid_to_thread_id(), gdb_exception::reason, RETURN_MASK_ERROR, select_frame(), TRY_CATCH, varobj::type, USE_CURRENT_FRAME, USE_SELECTED_FRAME, value_actual_type(), value_cast(), value_type(), variable_default_display(), and variable_language().
Referenced by mi_cmd_var_create(), value_of_root(), variable_create(), and varobj_invalidate_iter().
int varobj_delete | ( | struct varobj * | var, |
char *** | dellist, | ||
int | only_children | ||
) |
Definition at line 798 of file varobj.c.
References _, cppop(), cppush(), delete_variable(), warning(), and xmalloc().
Referenced by mi_cmd_var_delete(), update_dynamic_varobj_children(), update_type_if_necessary(), value_of_root(), variable_delete(), varobj_invalidate_iter(), varobj_set_visualizer(), and VEC().
int varobj_editable_p | ( | struct varobj * | var | ) |
Definition at line 3036 of file varobj.c.
References get_value_type(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_STRUCT, TYPE_CODE_UNION, varobj::value, and VALUE_LVAL.
Referenced by mi_cmd_var_assign(), varobj_get_attributes(), and varobj_set_value().
void varobj_enable_pretty_printing | ( | void | ) |
Definition at line 71 of file varobj.c.
References pretty_printing.
Referenced by mi_cmd_enable_pretty_printing().
int varobj_floating_p | ( | struct varobj * | var | ) |
Definition at line 3073 of file varobj.c.
Referenced by mi_cmd_var_update_iter().
char* varobj_gen_name | ( | void | ) |
Definition at line 738 of file varobj.c.
References xstrprintf().
Referenced by mi_cmd_var_create(), and variable_create().
int varobj_get_attributes | ( | struct varobj * | var | ) |
Definition at line 1403 of file varobj.c.
References attributes, and varobj_editable_p().
Referenced by mi_cmd_var_show_attributes(), variable_obj_command(), and variable_value().
void varobj_get_child_range | ( | struct varobj * | var, |
int * | from, | ||
int * | to | ||
) |
Definition at line 1857 of file varobj.c.
Referenced by varobj_update_one().
enum varobj_display_formats varobj_get_display_format | ( | struct varobj * | var | ) |
Definition at line 890 of file varobj.c.
Referenced by mi_cmd_var_show_format(), and variable_format().
char* varobj_get_display_hint | ( | struct varobj * | var | ) |
Definition at line 896 of file varobj.c.
References do_cleanups(), gdb_python_initialized, and gdbpy_get_display_hint().
Referenced by mi_cmd_var_list_children(), print_varobj(), and varobj_update_one().
char* varobj_get_expression | ( | struct varobj * | var | ) |
Definition at line 787 of file varobj.c.
References name_of_variable().
Referenced by mi_cmd_var_info_expression(), print_varobj(), and variable_obj_command().
char* varobj_get_formatted_value | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) |
Definition at line 1421 of file varobj.c.
References my_value_of_variable().
Referenced by mi_cmd_var_evaluate_expression().
int varobj_get_frozen | ( | struct varobj * | var | ) |
Definition at line 955 of file varobj.c.
Referenced by print_varobj().
struct type* varobj_get_gdb_type | ( | struct varobj * | var | ) | [read] |
Definition at line 1341 of file varobj.c.
References varobj::type.
Referenced by mi_print_value_p().
struct varobj* varobj_get_handle | ( | char * | objname | ) | [read] |
Definition at line 754 of file varobj.c.
References _, error(), int, vlist::next, varobj::obj_name, vlist::var, and VAROBJ_TABLE_SIZE.
Referenced by mi_cmd_var_assign(), mi_cmd_var_delete(), mi_cmd_var_evaluate_expression(), mi_cmd_var_info_expression(), mi_cmd_var_info_num_children(), mi_cmd_var_info_path_expression(), mi_cmd_var_info_type(), mi_cmd_var_list_children(), mi_cmd_var_set_format(), mi_cmd_var_set_frozen(), mi_cmd_var_set_update_range(), mi_cmd_var_set_visualizer(), mi_cmd_var_show_attributes(), mi_cmd_var_show_format(), mi_cmd_var_update(), and variable_obj_command().
enum varobj_languages varobj_get_language | ( | struct varobj * | var | ) |
Definition at line 1397 of file varobj.c.
References variable_language().
Referenced by mi_cmd_var_info_expression().
int varobj_get_num_children | ( | struct varobj * | var | ) |
Definition at line 1235 of file varobj.c.
References dummy, varobj::num_children, number_of_children(), and update_dynamic_varobj_children().
Referenced by mi_cmd_var_info_num_children(), print_varobj(), variable_obj_command(), and varobj_update_one().
char* varobj_get_objname | ( | struct varobj * | var | ) |
Definition at line 779 of file varobj.c.
References varobj::obj_name.
Referenced by print_varobj(), variable_children(), variable_update(), and varobj_update_one().
char* varobj_get_path_expr | ( | struct varobj * | var | ) |
Definition at line 1382 of file varobj.c.
References gdb_assert, is_root_p(), and varobj::path_expr.
Referenced by ada_path_expr_of_child(), c_describe_child(), cplus_describe_child(), and mi_cmd_var_info_path_expression().
int varobj_get_thread_id | ( | struct varobj * | var | ) |
Definition at line 933 of file varobj.c.
Referenced by mi_cmd_var_update_iter(), and print_varobj().
char* varobj_get_type | ( | struct varobj * | var | ) |
Definition at line 1327 of file varobj.c.
References CPLUS_FAKE_CHILD, varobj::type, and type_to_string().
Referenced by mi_cmd_var_info_type(), print_varobj(), update_type_if_necessary(), value_of_root(), variable_type(), and varobj_update_one().
char* varobj_get_value | ( | struct varobj * | var | ) |
Definition at line 1428 of file varobj.c.
References my_value_of_variable().
Referenced by mi_cmd_var_assign(), mi_cmd_var_evaluate_expression(), mi_cmd_var_set_format(), print_varobj(), variable_value(), and varobj_update_one().
int varobj_has_more | ( | struct varobj * | var, |
int | to | ||
) |
Definition at line 920 of file varobj.c.
References VEC_length.
Referenced by mi_cmd_var_create(), mi_cmd_var_list_children(), varobj_update_one(), and VEC().
void varobj_invalidate | ( | void | ) |
Definition at line 4183 of file varobj.c.
References all_root_varobjs(), and varobj_invalidate_iter().
Referenced by clear_symtab_users().
static void varobj_invalidate_iter | ( | struct varobj * | var, |
void * | unused | ||
) | [static] |
Definition at line 4154 of file varobj.c.
References install_variable(), varobj::name, varobj::obj_name, USE_CURRENT_FRAME, varobj_create(), and varobj_delete().
Referenced by varobj_invalidate().
int varobj_pretty_printed_p | ( | struct varobj * | var | ) |
Definition at line 1415 of file varobj.c.
Referenced by mi_print_value_p(), print_varobj(), and varobj_update_one().
void varobj_set_child_range | ( | struct varobj * | var, |
int | from, | ||
int | to | ||
) |
Definition at line 1867 of file varobj.c.
Referenced by mi_cmd_var_set_update_range().
enum varobj_display_formats varobj_set_display_format | ( | struct varobj * | var, |
enum varobj_display_formats | format | ||
) |
Definition at line 862 of file varobj.c.
References FORMAT_BINARY, FORMAT_DECIMAL, FORMAT_HEXADECIMAL, FORMAT_NATURAL, FORMAT_OCTAL, varobj::value, value_get_print_value(), value_lazy(), variable_default_display(), varobj_value_is_changeable_p(), and xfree().
Referenced by mi_cmd_var_set_format(), and variable_format().
void varobj_set_frozen | ( | struct varobj * | var, |
int | frozen | ||
) |
Definition at line 942 of file varobj.c.
Referenced by mi_cmd_var_set_frozen().
int varobj_set_value | ( | struct varobj * | var, |
char * | expression | ||
) |
Definition at line 1438 of file varobj.c.
References coerce_array(), evaluate_expression(), gdb_assert, input_radix, install_new_value(), parse_exp_1(), gdb_exception::reason, RETURN_MASK_ERROR, TRY_CATCH, varobj::value, value_assign(), value_lazy(), varobj_editable_p(), varobj_value_is_changeable_p(), and xfree().
Referenced by mi_cmd_var_assign(), and variable_value().
void varobj_set_visualizer | ( | struct varobj * | var, |
const char * | visualizer | ||
) |
Definition at line 1874 of file varobj.c.
References _, do_cleanups(), error(), gdb_python_initialized, gdbpy_print_stack(), make_cleanup_py_decref(), varobj::num_children, and varobj_delete().
Referenced by mi_cmd_var_set_visualizer().
static int varobj_value_has_mutated | ( | struct varobj * | var, |
struct value * | new_value, | ||
struct type * | new_type | ||
) | [static] |
Definition at line 1919 of file varobj.c.
References varobj::num_children.
Referenced by value_of_root(), and VEC().
static int varobj_value_is_changeable_p | ( | struct varobj * | var | ) | [static] |
Definition at line 3064 of file varobj.c.
Referenced by c_value_of_variable(), install_new_value(), varobj_set_display_format(), and varobj_set_value().
Definition at line 1258 of file varobj.c.
References create_child(), name, name_of_child(), varobj::num_children, number_of_children(), restrict_range(), update_dynamic_varobj_children(), VEC_index, VEC_length, VEC_replace, and VEC_safe_push.
Definition at line 1950 of file varobj.c.
References varobj_update_result_t::changed, varobj_update_result_t::children_changed, dummy, varobj::index, install_new_value(), new_type(), varobj::num_children, varobj::parent, value::stack, varobj_update_result_t::status, varobj::type, varobj_update_result_t::type_changed, update_dynamic_varobj_children(), update_type_if_necessary(), varobj_update_result_t::value_installed, value_of_child(), value_of_root(), value_type(), varobj_update_result_t::varobj, varobj_delete(), varobj_has_more(), VAROBJ_IN_SCOPE, VAROBJ_INVALID, VAROBJ_NOT_IN_SCOPE, varobj_value_has_mutated(), VEC, VEC_empty, VEC_free, VEC_index, VEC_last, VEC_length, VEC_pop, and VEC_safe_push.
int format_code[] = { 0, 't', 'd', 'x', 'o' } [static] |
Definition at line 501 of file varobj.c.
Referenced by ada_value_of_variable(), and value_get_print_value().
struct language_specific languages[vlang_end] [static] |
int pretty_printing = 0 [static] |
Definition at line 68 of file varobj.c.
Referenced by varobj_enable_pretty_printing().
struct varobj_root* rootlist [static] |
Definition at line 504 of file varobj.c.
Referenced by install_variable(), and uninstall_variable().
char* varobj_format_string[] |
{ "natural", "binary", "decimal", "hexadecimal", "octal" }
Definition at line 61 of file varobj.c.
Referenced by mi_cmd_var_set_format(), and mi_cmd_var_show_format().
char* varobj_language_string[] = { "C", "C++", "Java" } |
Definition at line 65 of file varobj.c.
Referenced by mi_cmd_var_info_expression().
struct vlist** varobj_table [static] |
unsigned int varobjdebug = 0 |
Definition at line 52 of file varobj.c.
Referenced by mi_cmd_var_create(), and uninstall_variable().