GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/varobj.c File Reference
`#include "defs.h"`
`#include "value.h"`
`#include "expression.h"`
`#include "frame.h"`
`#include "language.h"`
`#include "gdbcmd.h"`
`#include "block.h"`
`#include "valprint.h"`
`#include "gdb_regex.h"`
`#include "varobj.h"`
`#include "vec.h"`
`#include "gdbthread.h"`
`#include "inferior.h"`
`#include "varobj-iter.h"`
`#include "python/python.h"`
`#include "python/python-internal.h"`
`#include "python/py-ref.h"`

Go to the source code of this file.

## Classes
struct | varobj_root
struct | varobj_dynamic
struct | vlist

## Macros
#define | VAROBJ_TABLE_SIZE 227

## 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 varobj *, bool)
static void | delete_variable_1 (int *, struct varobj *, bool, bool)
static bool | install_variable (struct varobj *)
static void | uninstall_variable (struct varobj *)
static struct varobj * | create_child (struct varobj *, int, std::string &)
static struct varobj * | create_child_with_value (struct varobj *parent, int index, struct varobj_item *item)
static enum varobj_display_formats | variable_default_display (struct varobj *)
static bool | update_type_if_necessary (struct varobj *var, struct value *new_value)
static bool | install_new_value (struct varobj *var, struct value *value, bool initial)
static int | number_of_children (const struct varobj *)
static std::string | name_of_variable (const struct varobj *)
static std::string | name_of_child (struct varobj *, int)
static struct value * | value_of_root (struct varobj **var_handle, bool *)
static struct value * | value_of_child (const struct varobj *parent, int index)
static std::string | my_value_of_variable (struct varobj *var, enum varobj_display_formats format)
static bool | is_root_p (const struct varobj *var)
static struct varobj * | varobj_add_child (struct varobj *var, struct varobj_item *item)
static struct frame_info * | find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
struct varobj * | varobj_create (const char *objname, const char *expression, CORE_ADDR frame, enum varobj_type type)
std::string | varobj_gen_name (void)
struct varobj * | varobj_get_handle (const char *objname)
const char * | varobj_get_objname (const struct varobj *var)
std::string | varobj_get_expression (const struct varobj *var)
int | varobj_delete (struct varobj *var, bool only_children)
static PyObject * | instantiate_pretty_printer (PyObject *constructor, struct value *value)
enum varobj_display_formats | varobj_set_display_format (struct varobj *var, enum varobj_display_formats format)
enum varobj_display_formats | varobj_get_display_format (const struct varobj *var)
gdb::unique_xmalloc_ptr< char > | varobj_get_display_hint (const struct varobj *var)
bool | varobj_has_more (const struct varobj *var, int to)
int | varobj_get_thread_id (const struct varobj *var)
void | varobj_set_frozen (struct varobj *var, bool frozen)
bool | varobj_get_frozen (const struct varobj *var)
void | varobj_restrict_range (const std::vector< varobj *> &children, int *from, int *to)
static void | install_dynamic_child (struct varobj *var, std::vector< varobj *> *changed, std::vector< varobj *> *type_changed, std::vector< varobj *> *newobj, std::vector< varobj *> *unchanged, bool *cchanged, int index, struct varobj_item *item)
static bool | dynamic_varobj_has_child_method (const struct varobj *var)
static struct varobj_iter * | varobj_get_iterator (struct varobj *var)
static void | varobj_clear_saved_item (struct varobj_dynamic *var)
static bool | update_dynamic_varobj_children (struct varobj *var, std::vector< varobj *> *changed, std::vector< varobj *> *type_changed, std::vector< varobj *> *newobj, std::vector< varobj *> *unchanged, bool *cchanged, bool update_children, int from, int to)
int | varobj_get_num_children (struct varobj *var)
const std::vector< varobj * > & | varobj_list_children (struct varobj *var, int *from, int *to)
std::string | varobj_get_type (struct varobj *var)
struct type * | varobj_get_gdb_type (const struct varobj *var)
static bool | is_path_expr_parent (const struct varobj *var)
bool | varobj_default_is_path_expr_parent (const struct varobj *var)
const struct varobj * | varobj_get_path_expr_parent (const struct varobj *var)
const char * | varobj_get_path_expr (const struct varobj *var)
const struct language_defn * | varobj_get_language (const struct varobj *var)
int | varobj_get_attributes (const struct varobj *var)
bool | varobj_is_dynamic_p (const struct varobj *var)
std::string | varobj_get_formatted_value (struct varobj *var, enum varobj_display_formats format)
std::string | varobj_get_value (struct varobj *var)
bool | varobj_set_value (struct varobj *var, const char *expression)
static void | install_visualizer (struct varobj_dynamic *var, PyObject *constructor, PyObject *visualizer)
static void | install_default_visualizer (struct varobj *var)
static void | construct_visualizer (struct varobj *var, PyObject *constructor)
static void | install_new_value_visualizer (struct varobj *var)
void | varobj_get_child_range (const 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 bool | varobj_value_has_mutated (const struct varobj *var, struct value *new_value, struct type *new_type)
std::vector< varobj_update_result > | varobj_update (struct varobj **varp, bool is_explicit)
struct type * | varobj_get_value_type (const struct varobj *var)
static bool | check_scope (const struct varobj *var)
static struct value * | value_of_root_1 (struct varobj **var_handle)
void | varobj_formatted_print_options (struct value_print_options *opts, enum varobj_display_formats format)
std::string | varobj_value_get_print_value (struct value *value, enum varobj_display_formats format, const struct varobj *var)
bool | varobj_editable_p (const struct varobj *var)
bool | varobj_value_is_changeable_p (const struct varobj *var)
bool | varobj_floating_p (const struct varobj *var)
bool | varobj_default_value_is_changeable_p (const struct varobj *var)
void | all_root_varobjs (void(*func)(struct varobj *var, void *data), void *data)
static void | varobj_invalidate_iter (struct varobj *var, void *unused)
void | varobj_invalidate (void)
void | _initialize_varobj (void)

## Variables
unsigned int | varobjdebug = 0
const char * | varobj_format_string []
static bool | pretty_printing = false
static int | format_code [] = { 0, 't', 'd', 'x', 'o', 'z' }
static struct varobj_root * | rootlist
static struct vlist ** | varobj_table

## Macro Definition Documentation

## ◆ VAROBJ_TABLE_SIZE

#define VAROBJ_TABLE_SIZE 227

Definition at line 205 of file varobj.c.

Referenced by _initialize_varobj(), install_variable(), uninstall_variable(), and varobj_get_handle().

## Function Documentation

## ◆ _initialize_varobj()

void _initialize_varobj | ( | void |  | ) |

Definition at line 2526 of file varobj.c.

References _, add_setshow_zuinteger_cmd(), class_maintenance, setdebuglist, show_varobjdebug(), showdebuglist, varobj_table, VAROBJ_TABLE_SIZE, varobjdebug, and XCNEWVEC.

## ◆ all_root_varobjs()

void all_root_varobjs | ( | void(*)(struct varobj *var, void *data) | func,
|  | void * | data
| ) |  |

Definition at line 2469 of file varobj.c.

References varobj_root::next, rootlist, and varobj_root::rootvar.

Referenced by mi_cmd_var_update(), and varobj_invalidate().

## ◆ check_scope()

static bool check_scope | ( | const struct varobj * | var | ) |
| static

Definition at line 2075 of file varobj.c.

References BLOCK_END, BLOCK_START, varobj_root::frame, frame_find_by_id(), get_frame_pc(), varobj::root, select_frame(), and varobj_root::valid_block.

Referenced by value_of_root_1().

## ◆ construct_visualizer()

static void construct_visualizer | ( | struct varobj * | var,
|  | PyObject * | constructor
| ) |  |
| static

Definition at line 1137 of file varobj.c.

References CPLUS_FAKE_CHILD, varobj::dynamic, gdbpy_print_stack(), install_visualizer(), instantiate_pretty_printer(), Py_DECREF, and varobj::value.

Referenced by install_new_value_visualizer(), and varobj_set_visualizer().

## ◆ create_child()

static struct varobj * create_child | ( | struct varobj * | parent,
|  | int | index,
|  | std::string & | name
| ) |  |
| static

Definition at line 1916 of file varobj.c.

References create_child_with_value(), varobj_item::name, name, varobj_item::value, and value_of_child().

Referenced by varobj_list_children().

## ◆ create_child_with_value()

static struct varobj * create_child_with_value | ( | struct varobj * | parent,
|  | int | index,
|  | struct varobj_item * | item
| ) |  |
| static

Definition at line 1927 of file varobj.c.

References varobj::index, install_new_value(), install_variable(), varobj_root::lang_ops, varobj_item::name, varobj::name, varobj::obj_name, varobj::parent, varobj::root, string_printf(), varobj::type, lang_varobj_ops::type_of_child, varobj_item::value, value_actual_type(), varobj::varobj(), and varobj_is_anonymous_child().

Referenced by create_child(), and varobj_add_child().

## ◆ delete_variable()

static int delete_variable | ( | struct varobj * | var,
|  | bool | only_children_p
| ) |  |
| static

Definition at line 1736 of file varobj.c.

References delete_variable_1().

Referenced by varobj_delete().

## ◆ delete_variable_1()

static void delete_variable_1 | ( | int * | delcountp,
|  | struct varobj * | var,
|  | bool | only_children_p,
|  | bool | remove_from_parent_p
| ) |  |
| static

Definition at line 1751 of file varobj.c.

References varobj::children, varobj::index, varobj::obj_name, varobj::parent, and uninstall_variable().

Referenced by delete_variable().

## ◆ dynamic_varobj_has_child_method()

static bool dynamic_varobj_has_child_method | ( | const struct varobj * | var | ) |
| static

Definition at line 674 of file varobj.c.

References varobj::dynamic, gdb_python_initialized, gdbpy_children_cst, and varobj_dynamic::pretty_printer.

Referenced by varobj_value_get_print_value().

## ◆ find_frame_addr_in_frame_chain()

static struct frame_info* find_frame_addr_in_frame_chain | ( | CORE_ADDR | frame_addr | ) |
| static

Definition at line 233 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().

## ◆ install_default_visualizer()

static void install_default_visualizer | ( | struct varobj * | var | ) |
| static

Definition at line 1103 of file varobj.c.

References _, CPLUS_FAKE_CHILD, varobj::dynamic, error(), gdbpy_get_varobj_pretty_printer(), gdbpy_print_stack(), install_visualizer(), pretty_printing, Py_DECREF, and varobj::value.

Referenced by install_new_value_visualizer().

## ◆ install_dynamic_child()

static void install_dynamic_child | ( | struct varobj * | var,
|  | std::vector< varobj *> * | changed,
|  | std::vector< varobj *> * | type_changed,
|  | std::vector< varobj *> * | newobj,
|  | std::vector< varobj *> * | unchanged,
|  | bool * | cchanged,
|  | int | index,
|  | struct varobj_item * | item
| ) |  |
| static

Definition at line 631 of file varobj.c.

References varobj::children, varobj::index, install_new_value(), update_type_if_necessary(), varobj_item::value, vlist::var, and varobj_add_child().

Referenced by update_dynamic_varobj_children().

## ◆ install_new_value()

static bool install_new_value | ( | struct varobj * | var,
|  | struct value * | value,
|  | bool | initial
| ) |  |
| static

Definition at line 1247 of file varobj.c.

References CATCH, coerce_ref(), CPLUS_FAKE_CHILD, varobj::dynamic, END_CATCH, varobj::format, varobj::frozen, gdb_assert, if(), install_new_value_visualizer(), varobj::not_fetched, varobj::parent, varobj_dynamic::pretty_printer, varobj::print_value, print_value(), RETURN_MASK_ERROR, string, TRY, varobj::type, TYPE_CODE, TYPE_CODE_UNION, varobj::updated, varobj::value, value_fetch_lazy(), value_free(), value_incref(), value_lazy(), value_type(), varobj_value_get_print_value(), and varobj_value_is_changeable_p().

Referenced by create_child_with_value(), install_dynamic_child(), varobj_create(), varobj_set_value(), and varobj_update().

## ◆ install_new_value_visualizer()

static void install_new_value_visualizer | ( | struct varobj * | var | ) |
| static

Definition at line 1175 of file varobj.c.

References construct_visualizer(), varobj_dynamic::constructor, varobj::dynamic, gdb_python_initialized, install_default_visualizer(), and varobj::value.

Referenced by install_new_value().

## ◆ install_variable()

static bool install_variable | ( | struct varobj * | var | ) |
| static

Definition at line 1796 of file varobj.c.

References _, error(), is_root_p(), varobj_root::next, vlist::next, varobj::obj_name, varobj::root, rootlist, vlist::var, varobj_table, VAROBJ_TABLE_SIZE, and XNEW.

Referenced by create_child_with_value(), value_of_root(), varobj_create(), and varobj_invalidate_iter().

## ◆ install_visualizer()

static void install_visualizer | ( | struct varobj_dynamic * | var,
|  | PyObject * | constructor,
|  | PyObject * | visualizer
| ) |  |
| static

Definition at line 1087 of file varobj.c.

References varobj_dynamic::child_iter, varobj_dynamic::constructor, varobj_dynamic::pretty_printer, and varobj_iter_delete.

Referenced by construct_visualizer(), and install_default_visualizer().

## ◆ instantiate_pretty_printer()

static PyObject* instantiate_pretty_printer | ( | PyObject * | constructor,
|  | struct value * | value
| ) |  |
| static

Definition at line 485 of file varobj.c.

References Py_DECREF, and value_to_value_object().

Referenced by construct_visualizer().

## ◆ is_path_expr_parent()

static bool is_path_expr_parent | ( | const struct varobj * | var | ) |
| static

Definition at line 923 of file varobj.c.

References gdb_assert, lang_varobj_ops::is_path_expr_parent, varobj_root::lang_ops, and varobj::root.

Referenced by varobj_get_path_expr_parent().

## ◆ is_root_p()

static bool is_root_p | ( | const struct varobj * | var | ) |
| static

Definition at line 214 of file varobj.c.

References varobj::root, varobj_root::rootvar, and vlist::var.

Referenced by install_variable(), uninstall_variable(), value_of_root(), value_of_root_1(), varobj_get_path_expr(), varobj_get_path_expr_parent(), and varobj::~varobj().

## ◆ my_value_of_variable()

static std::string my_value_of_variable | ( | struct varobj * | var,
|  | enum varobj_display_formats | format
| ) |  |
| static

Definition at line 2257 of file varobj.c.

References varobj::dynamic, varobj::format, varobj_root::is_valid, varobj_root::lang_ops, varobj_dynamic::pretty_printer, varobj::root, string, varobj::value, lang_varobj_ops::value_of_variable, and varobj_value_get_print_value().

Referenced by varobj_get_formatted_value(), and varobj_get_value().

## ◆ name_of_child()

static std::string name_of_child | ( | struct varobj * | var,
|  | int | index
| ) |  |
| static

Definition at line 2066 of file varobj.c.

References varobj_root::lang_ops, lang_varobj_ops::name_of_child, and varobj::root.

Referenced by varobj_list_children().

## ◆ name_of_variable()

static std::string name_of_variable | ( | const struct varobj * | var | ) |
| static

Definition at line 2058 of file varobj.c.

References varobj_root::lang_ops, lang_varobj_ops::name_of_variable, and varobj::root.

Referenced by varobj_get_expression().

## ◆ number_of_children()

static int number_of_children | ( | const struct varobj * | var | ) |
| static

Definition at line 2050 of file varobj.c.

References varobj_root::lang_ops, lang_varobj_ops::number_of_children, and varobj::root.

Referenced by varobj_get_num_children(), and varobj_list_children().

## ◆ show_varobjdebug()

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

Definition at line 46 of file varobj.c.

References _, and fprintf_filtered().

Referenced by _initialize_varobj().

## ◆ uninstall_variable()

static void uninstall_variable | ( | struct varobj * | var | ) |
| static

Definition at line 1838 of file varobj.c.

References _, fprintf_unfiltered(), gdb_stdlog, is_root_p(), varobj_root::next, vlist::next, varobj::obj_name, varobj::root, rootlist, varobj_root::rootvar, vlist::var, varobj_table, VAROBJ_TABLE_SIZE, varobjdebug, warning(), and xfree().

Referenced by delete_variable_1().

## ◆ update_dynamic_varobj_children()

static bool update_dynamic_varobj_children | ( | struct varobj * | var,
|  | std::vector< varobj *> * | changed,
|  | std::vector< varobj *> * | type_changed,
|  | std::vector< varobj *> * | newobj,
|  | std::vector< varobj *> * | unchanged,
|  | bool * | cchanged,
|  | bool | update_children,
|  | int | from,
|  | int | to
| ) |  |
| static

Definition at line 715 of file varobj.c.

References varobj_dynamic::child_iter, varobj::children, varobj::dynamic, install_dynamic_child(), varobj::num_children, release_value_or_incref(), varobj_dynamic::saved_item, varobj_item::value, varobj_iter::var, varobj_clear_saved_item(), varobj_delete(), varobj_get_iterator(), varobj_iter_delete, and varobj_iter_next.

Referenced by varobj_get_num_children(), varobj_list_children(), and varobj_update().

## ◆ update_type_if_necessary()

static bool update_type_if_necessary | ( | struct varobj * | var,
|  | struct value * | new_value
| ) |  |
| static

Definition at line 1203 of file varobj.c.

References varobj::children, get_user_print_options(), new_type(), varobj::num_children, value_print_options::objectprint, string, varobj::type, type_to_string(), value_actual_type(), varobj_delete(), and varobj_get_type().

Referenced by install_dynamic_child(), and varobj_update().

## ◆ value_of_child()

static struct value * value_of_child | ( | const struct varobj * | parent,
|  | int | index
| ) |  |
| static

Definition at line 2246 of file varobj.c.

References value::parent.

Referenced by create_child(), and varobj_update().

## ◆ value_of_root()

static struct value * value_of_root | ( | struct varobj ** | var_handle,
|  | bool * | type_changed
| ) |  |
| static

Definition at line 2162 of file varobj.c.

References varobj_root::exp, varobj_root::floating, varobj::from, install_variable(), is_root_p(), varobj::name, new_type(), varobj::num_children, varobj::obj_name, varobj::root, string, varobj::to, USE_SELECTED_FRAME, varobj::value, value_of_root_1(), value_type(), varobj_create(), varobj_delete(), varobj_get_type(), and varobj_value_has_mutated().

Referenced by varobj_update().

## ◆ value_of_root_1()

static struct value* value_of_root_1 | ( | struct varobj ** | var_handle | ) |
| static

Definition at line 2099 of file varobj.c.

References CATCH, check_scope(), END_CATCH, evaluate_expression(), varobj_root::exp, varobj_root::floating, global_thread_id_to_ptid(), is_root_p(), minus_one_ptid, ptid_equal(), RETURN_MASK_ERROR, varobj::root, switch_to_thread(), varobj_root::thread_id, TRY, and varobj_root::valid_block.

Referenced by value_of_root().

## ◆ variable_default_display()

static enum varobj_display_formats variable_default_display | ( | struct varobj * | var | ) |
| static

Definition at line 2033 of file varobj.c.

References FORMAT_NATURAL.

Referenced by varobj_create(), and varobj_set_display_format().

## ◆ varobj_add_child()

static struct varobj * varobj_add_child | ( | struct varobj * | var,
|  | struct varobj_item * | item
| ) |  |
| static

Definition at line 886 of file varobj.c.

References varobj::children, and create_child_with_value().

Referenced by install_dynamic_child().

## ◆ varobj_clear_saved_item()

static void varobj_clear_saved_item | ( | struct varobj_dynamic * | var | ) |
| static

Definition at line 704 of file varobj.c.

References varobj::value, value_free(), and varobj_iter::var.

Referenced by update_dynamic_varobj_children(), and varobj::~varobj().

## ◆ varobj_create()

struct varobj* varobj_create | ( | const char * | objname,
|  | const char * | expression,
|  | CORE_ADDR | frame,
|  | enum varobj_type | type
| ) |  |

Definition at line 264 of file varobj.c.

References _, CATCH, END_CATCH, 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(), null_frame_id, parse_exp_1(), ptid_to_global_thread_id(), RETURN_MASK_ERROR, select_frame(), TRY, value::type, USE_CURRENT_FRAME, USE_SELECTED_FRAME, value_actual_type(), value_cast(), value_type(), and variable_default_display().

Referenced by mi_cmd_var_create(), value_of_root(), and varobj_invalidate_iter().

## ◆ varobj_default_is_path_expr_parent()

bool varobj_default_is_path_expr_parent | ( | const struct varobj * | var | ) |

Definition at line 934 of file varobj.c.

## ◆ varobj_default_value_is_changeable_p()

bool varobj_default_value_is_changeable_p | ( | const struct varobj * | var | ) |

Definition at line 2440 of file varobj.c.

References CPLUS_FAKE_CHILD, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and varobj_get_value_type().

Referenced by ada_value_is_changeable_p().

## ◆ varobj_delete()

int varobj_delete | ( | struct varobj * | var,
|  | bool | only_children
| ) |  |

Definition at line 475 of file varobj.c.

References delete_variable(), and vlist::var.

Referenced by mi_cmd_var_delete(), update_dynamic_varobj_children(), update_type_if_necessary(), value_of_root(), varobj_invalidate_iter(), varobj_set_visualizer(), and varobj_update().

## ◆ varobj_editable_p()

bool varobj_editable_p | ( | const struct varobj * | var | ) |

Definition at line 2394 of file varobj.c.

References varobj_root::is_valid, varobj::root, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_STRUCT, TYPE_CODE_UNION, varobj::value, VALUE_LVAL, and varobj_get_value_type().

Referenced by mi_cmd_var_assign(), varobj_get_attributes(), and varobj_set_value().

## ◆ varobj_enable_pretty_printing()

void varobj_enable_pretty_printing | ( | void |  | ) |

Definition at line 60 of file varobj.c.

References pretty_printing.

Referenced by mi_cmd_enable_pretty_printing().

## ◆ varobj_floating_p()

bool varobj_floating_p | ( | const struct varobj * | var | ) |

Definition at line 2431 of file varobj.c.

References varobj_root::floating, and varobj::root.

Referenced by mi_cmd_var_update_iter().

## ◆ varobj_formatted_print_options()

void varobj_formatted_print_options | ( | struct value_print_options * | opts,
|  | enum varobj_display_formats | format
| ) |  |

Definition at line 2270 of file varobj.c.

References value_print_options::deref_ref, format_code, get_formatted_print_options(), and value_print_options::raw.

Referenced by ada_value_of_variable(), and varobj_value_get_print_value().

## ◆ varobj_gen_name()

std::string varobj_gen_name | ( | void |  | ) |

Definition at line 420 of file varobj.c.

References string_printf().

Referenced by mi_cmd_var_create().

## ◆ varobj_get_attributes()

int varobj_get_attributes | ( | const struct varobj * | var | ) |

Definition at line 979 of file varobj.c.

References varobj_editable_p().

Referenced by mi_cmd_var_show_attributes().

## ◆ varobj_get_child_range()

void varobj_get_child_range | ( | const struct varobj * | var,
|  | int * | from,
|  | int * | to
| ) |  |

Definition at line 1428 of file varobj.c.

References varobj::from, and varobj::to.

Referenced by varobj_update_one().

## ◆ varobj_get_display_format()

enum varobj_display_formats varobj_get_display_format | ( | const struct varobj * | var | ) |

Definition at line 533 of file varobj.c.

References varobj::format, and vlist::var.

Referenced by mi_cmd_var_show_format().

## ◆ varobj_get_display_hint()

gdb::unique_xmalloc_ptr<char> varobj_get_display_hint | ( | const struct varobj * | var | ) |

Definition at line 539 of file varobj.c.

References varobj::dynamic, gdb_python_initialized, gdbpy_get_display_hint(), varobj_dynamic::pretty_printer, and vlist::var.

Referenced by mi_cmd_var_list_children(), print_varobj(), and varobj_update_one().

## ◆ varobj_get_expression()

std::string varobj_get_expression | ( | const struct varobj * | var | ) |

Definition at line 467 of file varobj.c.

References name_of_variable(), and vlist::var.

Referenced by mi_cmd_var_info_expression(), and print_varobj().

## ◆ varobj_get_formatted_value()

std::string varobj_get_formatted_value | ( | struct varobj * | var,
|  | enum varobj_display_formats | format
| ) |  |

Definition at line 999 of file varobj.c.

References my_value_of_variable().

Referenced by mi_cmd_var_evaluate_expression().

## ◆ varobj_get_frozen()

bool varobj_get_frozen | ( | const struct varobj * | var | ) |

Definition at line 595 of file varobj.c.

References varobj::frozen, and vlist::var.

Referenced by print_varobj().

## ◆ varobj_get_gdb_type()

struct type* varobj_get_gdb_type | ( | const struct varobj * | var | ) |

Definition at line 914 of file varobj.c.

References varobj::type.

Referenced by c_is_path_expr_parent(), and mi_print_value_p().

## ◆ varobj_get_handle()

struct varobj* varobj_get_handle | ( | const char * | objname | ) |

Definition at line 433 of file varobj.c.

References _, error(), vlist::next, varobj::obj_name, vlist::var, varobj_table, 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(), and mi_cmd_var_update().

## ◆ varobj_get_iterator()

static struct varobj_iter* varobj_get_iterator | ( | struct varobj * | var | ) |
| static

Definition at line 690 of file varobj.c.

References _, varobj::dynamic, gdb_assert_not_reached, varobj_dynamic::pretty_printer, py_varobj_get_iterator(), and varobj_iter::var.

Referenced by update_dynamic_varobj_children().

## ◆ varobj_get_language()

const struct language_defn* varobj_get_language | ( | const struct varobj * | var | ) |

Definition at line 973 of file varobj.c.

References varobj_root::exp, and varobj::root.

Referenced by mi_cmd_var_info_expression().

## ◆ varobj_get_num_children()

int varobj_get_num_children | ( | struct varobj * | var | ) |

Definition at line 816 of file varobj.c.

References dummy, varobj::num_children, number_of_children(), update_dynamic_varobj_children(), varobj_iter::var, and varobj_is_dynamic_p().

Referenced by mi_cmd_var_info_num_children(), print_varobj(), and varobj_update_one().

## ◆ varobj_get_objname()

const char* varobj_get_objname | ( | const struct varobj * | var | ) |

Definition at line 458 of file varobj.c.

References varobj::obj_name, and vlist::var.

Referenced by print_varobj(), and varobj_update_one().

## ◆ varobj_get_path_expr()

const char* varobj_get_path_expr | ( | const struct varobj * | var | ) |

Definition at line 956 of file varobj.c.

References gdb_assert, is_root_p(), varobj_root::lang_ops, varobj::path_expr, lang_varobj_ops::path_expr_of_child, and varobj::root.

Referenced by ada_path_expr_of_child(), c_describe_child(), cplus_describe_child(), and mi_cmd_var_info_path_expression().

## ◆ varobj_get_path_expr_parent()

const struct varobj* varobj_get_path_expr_parent | ( | const struct varobj * | var | ) |

Definition at line 942 of file varobj.c.

References is_path_expr_parent(), is_root_p(), and varobj::parent.

Referenced by c_describe_child(), and cplus_describe_child().

## ◆ varobj_get_thread_id()

int varobj_get_thread_id | ( | const struct varobj * | var | ) |

Definition at line 573 of file varobj.c.

References varobj::root, varobj_root::thread_id, varobj_root::valid_block, and vlist::var.

Referenced by mi_cmd_var_update_iter(), and print_varobj().

## ◆ varobj_get_type()

std::string varobj_get_type | ( | struct varobj * | var | ) |

Definition at line 900 of file varobj.c.

References CPLUS_FAKE_CHILD, varobj_root::is_valid, varobj::root, string, varobj::type, and type_to_string().

Referenced by mi_cmd_var_info_type(), print_varobj(), update_type_if_necessary(), value_of_root(), and varobj_update_one().

## ◆ varobj_get_value()

std::string varobj_get_value | ( | struct varobj * | var | ) |

Definition at line 1006 of file varobj.c.

References varobj::format, and my_value_of_variable().

Referenced by mi_cmd_var_assign(), mi_cmd_var_evaluate_expression(), mi_cmd_var_set_format(), print_varobj(), and varobj_update_one().

## ◆ varobj_get_value_type()

struct type* varobj_get_value_type | ( | const struct varobj * | var | ) |

Definition at line 2011 of file varobj.c.

References check_typedef(), get_target_type(), type, varobj::type, TYPE_IS_REFERENCE, varobj::value, and value_type().

Referenced by c_describe_child(), c_is_path_expr_parent(), c_number_of_children(), cplus_describe_child(), cplus_number_of_children(), varobj_default_value_is_changeable_p(), and varobj_editable_p().

## ◆ varobj_has_more()

bool varobj_has_more | ( | const struct varobj * | var,
|  | int | to
| ) |  |

Definition at line 559 of file varobj.c.

References varobj::children, varobj::dynamic, varobj_dynamic::saved_item, and vlist::var.

Referenced by mi_cmd_var_create(), mi_cmd_var_list_children(), varobj_update(), and varobj_update_one().

## ◆ varobj_invalidate()

void varobj_invalidate | ( | void |  | ) |

Definition at line 2520 of file varobj.c.

References all_root_varobjs(), and varobj_invalidate_iter().

Referenced by clear_symtab_users().

## ◆ varobj_invalidate_iter()

static void varobj_invalidate_iter | ( | struct varobj * | var,
|  | void * | unused
| ) |  |
| static

Definition at line 2491 of file varobj.c.

References varobj_root::floating, install_variable(), varobj_root::is_valid, varobj::name, varobj::obj_name, varobj::root, USE_CURRENT_FRAME, varobj_root::valid_block, varobj_create(), and varobj_delete().

Referenced by varobj_invalidate().

## ◆ varobj_is_dynamic_p()

bool varobj_is_dynamic_p | ( | const struct varobj * | var | ) |

Definition at line 993 of file varobj.c.

References varobj::dynamic, and varobj_dynamic::pretty_printer.

Referenced by mi_print_value_p(), print_varobj(), varobj_get_num_children(), varobj_list_children(), varobj_update(), and varobj_update_one().

## ◆ varobj_list_children()

const std::vector<varobj *>& varobj_list_children | ( | struct varobj * | var,
|  | int * | from,
|  | int * | to
| ) |  |

Definition at line 840 of file varobj.c.

References varobj::children, varobj_dynamic::children_requested, create_child(), varobj::dynamic, name, name_of_child(), varobj::num_children, number_of_children(), string, update_dynamic_varobj_children(), varobj_iter::var, varobj_is_dynamic_p(), and varobj_restrict_range().

Referenced by mi_cmd_var_list_children().

## ◆ varobj_restrict_range()

void varobj_restrict_range | ( | const std::vector< varobj *> & | children,
|  | int * | from,
|  | int * | to
| ) |  |

Definition at line 606 of file varobj.c.

Referenced by ada_value_has_mutated(), and varobj_list_children().

## ◆ varobj_set_child_range()

void varobj_set_child_range | ( | struct varobj * | var,
|  | int | from,
|  | int | to
| ) |  |

Definition at line 1438 of file varobj.c.

References varobj::from, and varobj::to.

Referenced by mi_cmd_var_set_update_range().

## ◆ varobj_set_display_format()

enum varobj_display_formats varobj_set_display_format | ( | struct varobj * | var,
|  | enum varobj_display_formats | format
| ) |  |

Definition at line 504 of file varobj.c.

References varobj::format, FORMAT_BINARY, FORMAT_DECIMAL, FORMAT_HEXADECIMAL, FORMAT_NATURAL, FORMAT_OCTAL, FORMAT_ZHEXADECIMAL, varobj::print_value, varobj::value, value_lazy(), vlist::var, variable_default_display(), varobj_value_get_print_value(), and varobj_value_is_changeable_p().

Referenced by mi_cmd_var_set_format().

## ◆ varobj_set_frozen()

void varobj_set_frozen | ( | struct varobj * | var,
|  | bool | frozen
| ) |  |

Definition at line 582 of file varobj.c.

References varobj::frozen, and vlist::var.

Referenced by mi_cmd_var_set_frozen().

## ◆ varobj_set_value()

bool varobj_set_value | ( | struct varobj * | var,
|  | const char * | expression
| ) |  |

Definition at line 1016 of file varobj.c.

References CATCH, coerce_array(), END_CATCH, evaluate_expression(), gdb_assert, input_radix, install_new_value(), parse_exp_1(), RETURN_MASK_ERROR, TRY, varobj::updated, varobj::value, value_assign(), value_lazy(), varobj_editable_p(), and varobj_value_is_changeable_p().

Referenced by mi_cmd_var_assign().

## ◆ varobj_set_visualizer()

void varobj_set_visualizer | ( | struct varobj * | var,
|  | const char * | visualizer
| ) |  |

Definition at line 1445 of file varobj.c.

References _, construct_visualizer(), error(), gdb_python_initialized, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), varobj::num_children, and varobj_delete().

Referenced by mi_cmd_var_set_visualizer().

## ◆ varobj_update()

std::vector<varobj_update_result> varobj_update | ( | struct varobj ** | varp,
|  | bool | is_explicit
| ) |  |

Definition at line 1527 of file varobj.c.

References varobj_update_result::changed, varobj::children, varobj_update_result::children_changed, varobj_dynamic::children_requested, dummy, varobj::dynamic, varobj::from, varobj::frozen, varobj::index, install_new_value(), varobj_root::lang_ops, new_type(), varobj_update_result::newobj, varobj::num_children, varobj::parent, varobj::root, value::stack, varobj_update_result::status, varobj::to, varobj::type, varobj_update_result::type_changed, lang_varobj_ops::type_of_child, update_dynamic_varobj_children(), update_type_if_necessary(), varobj::updated, varobj_update_result::value_installed, value_of_child(), value_of_root(), value_type(), varobj_update_result::varobj, varobj_delete(), varobj_has_more(), VAROBJ_INVALID, varobj_is_dynamic_p(), VAROBJ_NOT_IN_SCOPE, and varobj_value_has_mutated().

Referenced by varobj_update_one().

## ◆ varobj_value_get_print_value()

std::string varobj_value_get_print_value | ( | struct value * | value,
|  | enum varobj_display_formats | format,
|  | const struct varobj * | var
| ) |  |

Definition at line 2279 of file varobj.c.

References apply_varobj_pretty_printer(), builtin_type::builtin_char, builtin_type(), common_val_print(), current_language, varobj::dynamic, dynamic_varobj_has_child_method(), gdb_python_initialized, gdbpy_extract_lazy_string(), gdbpy_get_display_hint(), gdbpy_is_lazy_string(), gdbpy_print_stack(), gdbpy_to_string_cst, gdb::ref_ptr< T, Policy >::get(), get_type_arch(), LA_PRINT_STRING, varobj_dynamic::pretty_printer, python_string_to_target_string(), string, type, val_print_string(), value_type(), and varobj_formatted_print_options().

Referenced by c_value_of_variable(), install_new_value(), my_value_of_variable(), and varobj_set_display_format().

## ◆ varobj_value_has_mutated()

static bool varobj_value_has_mutated | ( | const struct varobj * | var,
|  | struct value * | new_value,
|  | struct type * | new_type
| ) |  |
| static

Definition at line 1486 of file varobj.c.

References coerce_ref(), varobj_root::lang_ops, new_type(), varobj::num_children, varobj::root, and lang_varobj_ops::value_has_mutated.

Referenced by value_of_root(), and varobj_update().

## ◆ varobj_value_is_changeable_p()

bool varobj_value_is_changeable_p | ( | const struct varobj * | var | ) |

Definition at line 2422 of file varobj.c.

References varobj_root::lang_ops, varobj::root, and lang_varobj_ops::value_is_changeable_p.

Referenced by c_value_of_variable(), install_new_value(), varobj_set_display_format(), and varobj_set_value().

## Variable Documentation

## ◆ format_code

int format_code[] = { 0, 't', 'd', 'x', 'o', 'z' }
| static

Definition at line 198 of file varobj.c.

Referenced by varobj_formatted_print_options().

## ◆ pretty_printing

bool pretty_printing = false
| static

Definition at line 57 of file varobj.c.

Referenced by install_default_visualizer(), and varobj_enable_pretty_printing().

## ◆ rootlist

struct varobj_root* rootlist
| static

Definition at line 201 of file varobj.c.

Referenced by all_root_varobjs(), install_variable(), and uninstall_variable().

## ◆ varobj_format_string

const char* varobj_format_string[]

Initial value:
=
{ "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" }

Definition at line 53 of file varobj.c.

Referenced by mi_cmd_var_set_format(), and mi_cmd_var_show_format().

## ◆ varobj_table

struct vlist** varobj_table
| static

Definition at line 208 of file varobj.c.

Referenced by _initialize_varobj(), install_variable(), uninstall_variable(), and varobj_get_handle().

## ◆ varobjdebug

unsigned int varobjdebug = 0

Definition at line 44 of file varobj.c.

Referenced by _initialize_varobj(), mi_cmd_var_create(), and uninstall_variable().