GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Enumerations | Functions | Variables
c-varobj.c File Reference
#include "defs.h"
#include "value.h"
#include "varobj.h"
#include "gdbthread.h"
#include "valprint.h"

Go to the source code of this file.

Macros

#define ANONYMOUS_STRUCT_NAME   _("<anonymous struct>")
 
#define ANONYMOUS_UNION_NAME   _("<anonymous union>")
 

Enumerations

enum  vsections { v_public = 0 , v_private , v_protected }
 
enum  accessibility { private_field , protected_field , public_field }
 

Functions

static void cplus_class_num_children (struct type *type, int children[3])
 
bool varobj_is_anonymous_child (const struct varobj *child)
 
static void adjust_value_for_child_access (struct value **value, struct type **type, int *was_ptr, int lookup_actual_type)
 
static bool c_is_path_expr_parent (const struct varobj *var)
 
static int c_number_of_children (const struct varobj *var)
 
static std::string c_name_of_variable (const struct varobj *parent)
 
static struct valuevalue_struct_element_index (struct value *value, int type_index)
 
static void c_describe_child (const struct varobj *parent, int index, std::string *cname, struct value **cvalue, struct type **ctype, std::string *cfull_expression)
 
static std::string c_name_of_child (const struct varobj *parent, int index)
 
static std::string c_path_expr_of_child (const struct varobj *child)
 
static struct valuec_value_of_child (const struct varobj *parent, int index)
 
static struct typec_type_of_child (const struct varobj *parent, int index)
 
static struct typeget_type (const struct varobj *var)
 
static std::string c_value_of_variable (const struct varobj *var, enum varobj_display_formats format)
 
static int cplus_number_of_children (const struct varobj *var)
 
static std::string cplus_name_of_variable (const struct varobj *parent)
 
static int match_accessibility (struct type *type, int index, enum accessibility acc)
 
static void cplus_describe_child (const struct varobj *parent, int index, std::string *cname, struct value **cvalue, struct type **ctype, std::string *cfull_expression)
 
static std::string cplus_name_of_child (const struct varobj *parent, int index)
 
static std::string cplus_path_expr_of_child (const struct varobj *child)
 
static struct valuecplus_value_of_child (const struct varobj *parent, int index)
 
static struct typecplus_type_of_child (const struct varobj *parent, int index)
 
static std::string cplus_value_of_variable (const struct varobj *var, enum varobj_display_formats format)
 

Variables

const struct lang_varobj_ops c_varobj_ops
 
const struct lang_varobj_ops cplus_varobj_ops
 

Macro Definition Documentation

◆ ANONYMOUS_STRUCT_NAME

#define ANONYMOUS_STRUCT_NAME   _("<anonymous struct>")

Definition at line 27 of file c-varobj.c.

Referenced by c_describe_child(), cplus_describe_child(), and varobj_is_anonymous_child().

◆ ANONYMOUS_UNION_NAME

#define ANONYMOUS_UNION_NAME   _("<anonymous union>")

Definition at line 28 of file c-varobj.c.

Referenced by c_describe_child(), cplus_describe_child(), and varobj_is_anonymous_child().

Enumeration Type Documentation

◆ accessibility

Enumerator
private_field 
protected_field 
public_field 

Definition at line 672 of file c-varobj.c.

◆ vsections

enum vsections
Enumerator
v_public 
v_private 
v_protected 

Definition at line 548 of file c-varobj.c.

Function Documentation

◆ adjust_value_for_child_access()

static void adjust_value_for_child_access ( struct value ** value,
struct type ** type,
int * was_ptr,
int lookup_actual_type )
static

◆ c_describe_child()

static void c_describe_child ( const struct varobj * parent,
int index,
std::string * cname,
struct value ** cvalue,
struct type ** ctype,
std::string * cfull_expression )
static

◆ c_is_path_expr_parent()

static bool c_is_path_expr_parent ( const struct varobj * var)
static

◆ c_name_of_child()

static std::string c_name_of_child ( const struct varobj * parent,
int index )
static

Definition at line 423 of file c-varobj.c.

References c_describe_child(), and name.

◆ c_name_of_variable()

static std::string c_name_of_variable ( const struct varobj * parent)
static

Definition at line 233 of file c-varobj.c.

References varobj::name.

Referenced by cplus_name_of_variable().

◆ c_number_of_children()

static int c_number_of_children ( const struct varobj * var)
static

◆ c_path_expr_of_child()

static std::string c_path_expr_of_child ( const struct varobj * child)
static

Definition at line 432 of file c-varobj.c.

References c_describe_child(), varobj::index, and varobj::parent.

◆ c_type_of_child()

static struct type * c_type_of_child ( const struct varobj * parent,
int index )
static

Definition at line 451 of file c-varobj.c.

References c_describe_child(), and type.

◆ c_value_of_child()

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

Definition at line 442 of file c-varobj.c.

References c_describe_child(), value::parent(), and value.

◆ c_value_of_variable()

static std::string c_value_of_variable ( const struct varobj * var,
enum varobj_display_formats format )
static

◆ cplus_class_num_children()

static void cplus_class_num_children ( struct type * type,
int children[3] )
static

◆ cplus_describe_child()

static void cplus_describe_child ( const struct varobj * parent,
int index,
std::string * cname,
struct value ** cvalue,
struct type ** ctype,
std::string * cfull_expression )
static

◆ cplus_name_of_child()

static std::string cplus_name_of_child ( const struct varobj * parent,
int index )
static

Definition at line 892 of file c-varobj.c.

References cplus_describe_child(), and name.

◆ cplus_name_of_variable()

static std::string cplus_name_of_variable ( const struct varobj * parent)
static

Definition at line 667 of file c-varobj.c.

References c_name_of_variable().

◆ cplus_number_of_children()

static int cplus_number_of_children ( const struct varobj * var)
static

◆ cplus_path_expr_of_child()

static std::string cplus_path_expr_of_child ( const struct varobj * child)
static

Definition at line 901 of file c-varobj.c.

References cplus_describe_child(), varobj::index, and varobj::parent.

◆ cplus_type_of_child()

static struct type * cplus_type_of_child ( const struct varobj * parent,
int index )
static

Definition at line 920 of file c-varobj.c.

References cplus_describe_child(), and type.

◆ cplus_value_of_child()

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

Definition at line 911 of file c-varobj.c.

References cplus_describe_child(), value::parent(), and value.

◆ cplus_value_of_variable()

static std::string cplus_value_of_variable ( const struct varobj * var,
enum varobj_display_formats format )
static

Definition at line 929 of file c-varobj.c.

References c_value_of_variable(), and CPLUS_FAKE_CHILD.

◆ get_type()

static struct type * get_type ( const struct varobj * var)
static

Definition at line 463 of file c-varobj.c.

References check_typedef(), type, and varobj::type.

Referenced by c_value_of_variable(), and make_gdb_type().

◆ match_accessibility()

static int match_accessibility ( struct type * type,
int index,
enum accessibility acc )
static

◆ value_struct_element_index()

static struct value * value_struct_element_index ( struct value * value,
int type_index )
static

◆ varobj_is_anonymous_child()

bool varobj_is_anonymous_child ( const struct varobj * child)

Definition at line 38 of file c-varobj.c.

References ANONYMOUS_STRUCT_NAME, ANONYMOUS_UNION_NAME, and varobj::name.

Referenced by create_child_with_value().

Variable Documentation

◆ c_varobj_ops

const struct lang_varobj_ops c_varobj_ops
Initial value:
=
{
NULL,
}
static int c_number_of_children(const struct varobj *var)
Definition c-varobj.c:182
static bool c_is_path_expr_parent(const struct varobj *var)
Definition c-varobj.c:134
static struct value * c_value_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:442
static std::string c_name_of_variable(const struct varobj *parent)
Definition c-varobj.c:233
static std::string c_name_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:423
static std::string c_path_expr_of_child(const struct varobj *child)
Definition c-varobj.c:432
static struct type * c_type_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:451
static std::string c_value_of_variable(const struct varobj *var, enum varobj_display_formats format)
Definition c-varobj.c:475
bool varobj_default_value_is_changeable_p(const struct varobj *var)
Definition varobj.c:2290

Definition at line 533 of file c-varobj.c.

Referenced by ada_name_of_variable(), and language_defn::varobj_ops().

◆ cplus_varobj_ops

const struct lang_varobj_ops cplus_varobj_ops
Initial value:
=
{
NULL,
}
static int cplus_number_of_children(const struct varobj *var)
Definition c-varobj.c:556
static std::string cplus_name_of_variable(const struct varobj *parent)
Definition c-varobj.c:667
static std::string cplus_value_of_variable(const struct varobj *var, enum varobj_display_formats format)
Definition c-varobj.c:929
static struct value * cplus_value_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:911
static std::string cplus_name_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:892
static std::string cplus_path_expr_of_child(const struct varobj *child)
Definition c-varobj.c:901
static struct type * cplus_type_of_child(const struct varobj *parent, int index)
Definition c-varobj.c:920

Definition at line 944 of file c-varobj.c.

Referenced by cplus_language::varobj_ops().