GDB (xrefs)

Classes | Functions | Variables
mi-cmd-var.c File Reference
`#include "defs.h"`
`#include "mi-cmds.h"`
`#include "mi-main.h"`
`#include "ui-out.h"`
`#include "mi-out.h"`
`#include "varobj.h"`
`#include "language.h"`
`#include "value.h"`
`#include <ctype.h>`
`#include "mi-getopt.h"`
`#include "gdbthread.h"`
`#include "mi-parse.h"`
`#include "common/gdb_optional.h"`

Go to the source code of this file.

## Classes
struct | mi_cmd_var_update

## Functions
static void | varobj_update_one (struct varobj *var, enum print_values print_values, bool is_explicit)
static int | mi_print_value_p (struct varobj *var, enum print_values print_values)
static void | print_varobj (struct varobj *var, enum print_values print_values, int print_expression)
void | mi_cmd_var_create (const char *command, char **argv, int argc)
void | mi_cmd_var_delete (const char *command, char **argv, int argc)
static enum varobj_display_formats | mi_parse_format (const char *arg)
void | mi_cmd_var_set_format (const char *command, char **argv, int argc)
void | mi_cmd_var_set_visualizer (const char *command, char **argv, int argc)
void | mi_cmd_var_set_frozen (const char *command, char **argv, int argc)
void | mi_cmd_var_show_format (const char *command, char **argv, int argc)
void | mi_cmd_var_info_num_children (const char *command, char **argv, int argc)
static int | mi_print_value_p (struct varobj *var, enum print_values print_values)
void | mi_cmd_var_list_children (const char *command, char **argv, int argc)
void | mi_cmd_var_info_type (const char *command, char **argv, int argc)
void | mi_cmd_var_info_path_expression (const char *command, char **argv, int argc)
void | mi_cmd_var_info_expression (const char *command, char **argv, int argc)
void | mi_cmd_var_show_attributes (const char *command, char **argv, int argc)
void | mi_cmd_var_evaluate_expression (const char *command, char **argv, int argc)
void | mi_cmd_var_assign (const char *command, char **argv, int argc)
static void | mi_cmd_var_update_iter (struct varobj *var, void *data_pointer)
void | mi_cmd_var_update (const char *command, char **argv, int argc)
static void | varobj_update_one (struct varobj *var, enum print_values print_values, bool is_explicit)
void | mi_cmd_enable_pretty_printing (const char *command, char **argv, int argc)
void | mi_cmd_var_set_update_range (const char *command, char **argv, int argc)

## Variables
unsigned int | varobjdebug

## Function Documentation

## ◆ mi_cmd_enable_pretty_printing()

void mi_cmd_enable_pretty_printing | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 763 of file mi-cmd-var.c.

References _, error(), and varobj_enable_pretty_printing().

## ◆ mi_cmd_var_assign()

void mi_cmd_var_assign | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 560 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), make_scoped_restore(), mi_suppress_notification::memory, string, varobj_editable_p(), varobj_get_handle(), varobj_get_value(), and varobj_set_value().

## ◆ mi_cmd_var_create()

void mi_cmd_var_create | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 93 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_int(), fprintf_unfiltered(), gdb_stdlog, hex_string(), name, PRINT_ALL_VALUES, print_varobj(), string, string_to_core_addr(), USE_CURRENT_FRAME, USE_SELECTED_FRAME, USE_SPECIFIED_FRAME, varobj_create(), varobj_gen_name(), varobj_has_more(), and varobjdebug.

## ◆ mi_cmd_var_delete()

void mi_cmd_var_delete | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 144 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_int(), name, varobj_delete(), and varobj_get_handle().

## ◆ mi_cmd_var_evaluate_expression()

void mi_cmd_var_evaluate_expression | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 493 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), varobj::format, FORMAT_NATURAL, mi_getopt(), mi_parse_format(), string, varobj_get_formatted_value(), varobj_get_handle(), and varobj_get_value().

## ◆ mi_cmd_var_info_expression()

void mi_cmd_var_info_expression | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 448 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), language_defn::la_natural_name, string, varobj_get_expression(), varobj_get_handle(), and varobj_get_language().

## ◆ mi_cmd_var_info_num_children()

void mi_cmd_var_info_num_children | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 304 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_int(), varobj_get_handle(), and varobj_get_num_children().

## ◆ mi_cmd_var_info_path_expression()

void mi_cmd_var_info_path_expression | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 431 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), varobj::path_expr, varobj_get_handle(), and varobj_get_path_expr().

## ◆ mi_cmd_var_info_type()

void mi_cmd_var_info_type | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 415 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), string, varobj_get_handle(), and varobj_get_type().

## ◆ mi_cmd_var_list_children()

void mi_cmd_var_list_children | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 351 of file mi-cmd-var.c.

References _, gdb::argv, varobj::children, current_uiout, gdb::optional< T >::emplace(), error(), ui_out::field_int(), ui_out::field_string(), varobj::from, mi_parse_print_values(), mi_version(), PRINT_NO_VALUES, print_varobj(), varobj::to, varobj_get_display_hint(), varobj_get_handle(), varobj_has_more(), and varobj_list_children().

## ◆ mi_cmd_var_set_format()

void mi_cmd_var_set_format | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 218 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), mi_parse_format(), string, varobj_format_string, varobj_get_handle(), varobj_get_value(), and varobj_set_display_format().

## ◆ mi_cmd_var_set_frozen()

void mi_cmd_var_set_frozen | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 260 of file mi-cmd-var.c.

References _, gdb::argv, error(), varobj::frozen, varobj_get_handle(), and varobj_set_frozen().

## ◆ mi_cmd_var_set_update_range()

void mi_cmd_var_set_update_range | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 772 of file mi-cmd-var.c.

References _, gdb::argv, error(), varobj::from, varobj::to, varobj_get_handle(), and varobj_set_child_range().

## ◆ mi_cmd_var_set_visualizer()

void mi_cmd_var_set_visualizer | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 244 of file mi-cmd-var.c.

References _, gdb::argv, error(), varobj_get_handle(), and varobj_set_visualizer().

## ◆ mi_cmd_var_show_attributes()

void mi_cmd_var_show_attributes | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 469 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), varobj_get_attributes(), and varobj_get_handle().

## ◆ mi_cmd_var_show_format()

void mi_cmd_var_show_format | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 285 of file mi-cmd-var.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), varobj::format, varobj_format_string, varobj_get_display_format(), and varobj_get_handle().

## ◆ mi_cmd_var_update()

void mi_cmd_var_update | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 627 of file mi-cmd-var.c.

References _, all_root_varobjs(), gdb::argv, current_uiout, gdb::optional< T >::emplace(), error(), mi_cmd_var_update_iter(), mi_parse_print_values(), mi_version(), name, mi_cmd_var_update::only_floating, PRINT_NO_VALUES, mi_cmd_var_update::print_values, varobj_get_handle(), and varobj_update_one().

## ◆ mi_cmd_var_update_iter()

static void mi_cmd_var_update_iter | ( | struct varobj * | var,
|  | void * | data_pointer
| ) |  |
| static

Definition at line 600 of file mi-cmd-var.c.

References find_thread_global_id(), inferior_ptid, is_stopped(), null_ptid, mi_cmd_var_update::only_floating, mi_cmd_var_update::print_values, thread_info::ptid, ptid_equal(), varobj_floating_p(), varobj_get_thread_id(), and varobj_update_one().

Referenced by mi_cmd_var_update().

## ◆ mi_parse_format()

static enum varobj_display_formats mi_parse_format | ( | const char * | arg | ) |
| static

Definition at line 191 of file mi-cmd-var.c.

References _, error(), FORMAT_BINARY, FORMAT_DECIMAL, FORMAT_HEXADECIMAL, FORMAT_NATURAL, FORMAT_OCTAL, and FORMAT_ZHEXADECIMAL.

Referenced by mi_cmd_var_evaluate_expression(), and mi_cmd_var_set_format().

## ◆ mi_print_value_p() [1/2]

static int mi_print_value_p | ( | struct varobj * | var,
|  | enum print_values | print_values
| ) |  |
| static

Referenced by print_varobj(), and varobj_update_one().

## ◆ mi_print_value_p() [2/2]

static int mi_print_value_p | ( | struct varobj * | var,
|  | enum print_values | print_values
| ) |  |
| static

Definition at line 322 of file mi-cmd-var.c.

References check_typedef(), PRINT_ALL_VALUES, PRINT_NO_VALUES, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, varobj_get_gdb_type(), and varobj_is_dynamic_p().

## ◆ print_varobj()

static void print_varobj | ( | struct varobj * | var,
|  | enum print_values | print_values,
|  | int | print_expression
| ) |  |
| static

Definition at line 49 of file mi-cmd-var.c.

References current_uiout, ui_out::field_int(), ui_out::field_string(), mi_print_value_p(), print_expression(), string, varobj_get_display_hint(), varobj_get_expression(), varobj_get_frozen(), varobj_get_num_children(), varobj_get_objname(), varobj_get_thread_id(), varobj_get_type(), varobj_get_value(), and varobj_is_dynamic_p().

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

## ◆ varobj_update_one() [1/2]

static void varobj_update_one | ( | struct varobj * | var,
|  | enum print_values | print_values,
|  | bool | is_explicit
| ) |  |
| static

Referenced by mi_cmd_var_update(), and mi_cmd_var_update_iter().

## ◆ varobj_update_one() [2/2]

static void varobj_update_one | ( | struct varobj * | var,
|  | enum print_values | print_values,
|  | bool | is_explicit
| ) |  |
| static

Definition at line 684 of file mi-cmd-var.c.

References current_uiout, gdb::optional< T >::emplace(), ui_out::field_int(), ui_out::field_string(), mi_print_value_p(), mi_version(), print_varobj(), string, varobj_get_child_range(), varobj_get_display_hint(), varobj_get_num_children(), varobj_get_objname(), varobj_get_type(), varobj_get_value(), varobj_has_more(), VAROBJ_IN_SCOPE, VAROBJ_INVALID, varobj_is_dynamic_p(), VAROBJ_NOT_IN_SCOPE, and varobj_update().

## Variable Documentation

## ◆ varobjdebug

unsigned int varobjdebug

Definition at line 44 of file varobj.c.

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