38#define builtin_type_pyint \
39 builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long
42#define builtin_type_pyfloat \
43 builtin_type (gdbpy_enter::get_gdbarch ())->builtin_double
46#define builtin_type_pylong \
47 builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long_long
50#define builtin_type_upylong builtin_type \
51 (gdbpy_enter::get_gdbarch ())->builtin_unsigned_long_long
53#define builtin_type_pybool \
54 language_bool_type (current_language, gdbpy_enter::get_gdbarch ())
56#define builtin_type_pychar \
57 language_string_char_type (current_language, gdbpy_enter::get_gdbarch ())
85 self->
value =
nullptr;
88 Py_CLEAR (self->
type);
100 if (self->
value !=
nullptr)
103 if (self->
prev !=
nullptr)
110 if (self->
next !=
nullptr)
117 Py_TYPE (self)->tp_free (self);
126 if (value_obj->
next ==
nullptr)
128 gdb_assert (value_obj->
prev ==
nullptr);
130 if (value_obj->
next !=
nullptr)
147 if (PyObject_CheckBuffer (obj)
148 && PyObject_GetBuffer (obj, &py_buf, PyBUF_SIMPLE) == 0)
152 buffer_up.reset (&py_buf);
156 PyErr_SetString (PyExc_TypeError,
157 _(
"Object must support the python buffer protocol."));
163 PyErr_SetString (PyExc_ValueError,
164 _(
"Size of type is larger than that of buffer object."));
176 static const char *keywords[] = {
"val",
"type", NULL };
177 PyObject *val_obj =
nullptr;
178 PyObject *type_obj =
nullptr;
181 &val_obj, &type_obj))
185 if (type_obj !=
nullptr && type_obj != Py_None)
190 PyErr_SetString (PyExc_TypeError,
191 _(
"type argument must be a gdb.Type."));
201 if (
value ==
nullptr)
203 gdb_assert (PyErr_Occurred ());
209 if (value_obj->
value !=
nullptr)
238 PyObject *result = NULL;
242 struct value *res_val;
248 catch (
const gdb_exception &except)
267 PyObject *result = NULL;
271 struct value *self_val, *res_val;
281 case TYPE_CODE_RVALUE_REF:
285 error(_(
"Trying to get the referenced value from a value which is "
286 "neither a pointer nor a reference."));
291 catch (
const gdb_exception &except)
304 PyObject *result = NULL;
308 struct value *self_val;
314 catch (
const gdb_exception &except)
339 PyObject *result = NULL;
343 struct value *self_val, *res_val;
350 catch (
const gdb_exception &except)
368 struct value *res_val;
374 catch (
const gdb_exception &except)
398 Py_INCREF (obj->
type);
427 struct value *target;
428 int was_pointer =
type->
code () == TYPE_CODE_PTR;
444 else if (
type->
code () == TYPE_CODE_STRUCT)
452 catch (
const gdb_exception &except)
489 const char *user_encoding = NULL;
490 static const char *keywords[] = {
"encoding",
"length", NULL };
491 PyObject *str_obj = NULL;
494 keywords, &user_encoding, &length))
499 PyErr_SetString (PyExc_ValueError, _(
"Invalid length."));
512 switch (realtype->
code ())
514 case TYPE_CODE_ARRAY:
516 LONGEST array_length = -1;
517 LONGEST low_bound, high_bound;
523 array_length = high_bound - low_bound + 1;
526 else if (array_length == -1)
531 else if (
length != array_length)
535 if (
length > array_length)
536 error (_(
"Length is larger than array size."));
558 catch (
const gdb_exception &except)
576 gdb::unique_xmalloc_ptr<gdb_byte> buffer;
578 const char *encoding = NULL;
579 const char *errors = NULL;
580 const char *user_encoding = NULL;
581 const char *la_encoding = NULL;
582 struct type *char_type;
583 static const char *keywords[] = {
"encoding",
"errors",
"length", NULL };
586 &user_encoding, &errors, &
length))
593 catch (
const gdb_exception &except)
598 encoding = (user_encoding && *user_encoding) ? user_encoding : la_encoding;
599 return PyUnicode_Decode ((
const char *) buffer.get (),
616 int cmp = PyObject_IsTrue (src_obj);
632 static const char *keywords[] =
662 Py_ssize_t positional_count = PyObject_Length (args);
663 if (positional_count < 0)
665 else if (positional_count > 0)
670 PyErr_Format (PyExc_TypeError,
671 "format_string() takes 0 positional arguments but %zu were given",
682 PyObject *raw_obj = NULL;
683 PyObject *pretty_arrays_obj = NULL;
684 PyObject *pretty_structs_obj = NULL;
685 PyObject *array_indexes_obj = NULL;
686 PyObject *symbols_obj = NULL;
687 PyObject *unions_obj = NULL;
688 PyObject *address_obj = NULL;
689 PyObject *styling_obj = Py_False;
690 PyObject *nibbles_obj = NULL;
691 PyObject *deref_refs_obj = NULL;
692 PyObject *actual_objects_obj = NULL;
693 PyObject *static_members_obj = NULL;
694 PyObject *summary_obj = NULL;
698 "|O!O!O!O!O!O!O!O!O!O!O!O!O!IIIs",
700 &PyBool_Type, &raw_obj,
701 &PyBool_Type, &pretty_arrays_obj,
702 &PyBool_Type, &pretty_structs_obj,
703 &PyBool_Type, &array_indexes_obj,
704 &PyBool_Type, &symbols_obj,
705 &PyBool_Type, &unions_obj,
706 &PyBool_Type, &address_obj,
707 &PyBool_Type, &styling_obj,
708 &PyBool_Type, &nibbles_obj,
709 &PyBool_Type, &summary_obj,
710 &PyBool_Type, &deref_refs_obj,
711 &PyBool_Type, &actual_objects_obj,
712 &PyBool_Type, &static_members_obj,
715 &opts.repeat_count_threshold,
748 if (opts.print_max == 0)
750 if (opts.repeat_count_threshold == 0)
751 opts.repeat_count_threshold =
UINT_MAX;
762 PyErr_SetString (PyExc_ValueError,
763 "a single character is required");
775 catch (
const gdb_exception &except)
788 PyObject *type_obj, *result = NULL;
791 if (! PyArg_ParseTuple (args,
"O", &type_obj))
797 PyErr_SetString (PyExc_RuntimeError,
798 _(
"Argument must be a type."));
805 struct value *res_val;
808 if (op == UNOP_DYNAMIC_CAST)
810 else if (op == UNOP_REINTERPRET_CAST)
814 gdb_assert (op == UNOP_CAST);
820 catch (
const gdb_exception &except)
856 PyErr_SetString (PyExc_NotImplementedError,
857 _(
"Invalid operation on gdb.Value."));
867 struct type *parent_type, *val_type;
876 if (parent_type == NULL)
878 PyErr_SetString (PyExc_TypeError,
879 _(
"'parent_type' attribute of gdb.Field object is not a"
880 "gdb.Type object."));
898 catch (
const gdb_exception &except)
915 if (flag_object == NULL)
918 return PyObject_IsTrue (flag_object.get ());
930 if (ftype_obj == NULL)
934 PyErr_SetString (PyExc_TypeError,
935 _(
"'type' attribute of gdb.Field object is not a "
936 "gdb.Type object."));
948 struct gdb_exception except;
950 gdb::unique_xmalloc_ptr<char>
field;
951 struct type *base_class_type = NULL, *field_type = NULL;
953 PyObject *result = NULL;
963 int is_base_class, valid_field;
968 else if (valid_field == 0)
970 PyErr_SetString (PyExc_TypeError,
971 _(
"Invalid lookup for a field not contained in "
978 if (is_base_class < 0)
980 else if (is_base_class > 0)
983 if (base_class_type == NULL)
988 gdbpy_ref<> name_obj (PyObject_GetAttrString (key,
"name"));
990 if (name_obj == NULL)
993 if (name_obj != Py_None)
1001 if (!PyObject_HasAttrString (key,
"bitpos"))
1003 PyErr_SetString (PyExc_AttributeError,
1004 _(
"gdb.Field object has no name and no "
1005 "'bitpos' attribute."));
1009 gdbpy_ref<> bitpos_obj (PyObject_GetAttrString (key,
"bitpos"));
1010 if (bitpos_obj == NULL)
1016 if (field_type == NULL)
1025 struct value *res_val = NULL;
1030 "struct/class/union");
1033 "struct/class/union");
1034 else if (base_class_type != NULL)
1036 struct type *val_type;
1039 if (val_type->
code () == TYPE_CODE_PTR)
1041 else if (val_type->
code () == TYPE_CODE_REF)
1044 else if (val_type->
code () == TYPE_CODE_RVALUE_REF)
1065 if (
type->
code () != TYPE_CODE_ARRAY
1067 error (_(
"Cannot subscript requested type."));
1076 catch (gdb_exception &ex)
1078 except = std::move (ex);
1089 PyErr_Format (PyExc_NotImplementedError,
1090 _(
"Setting of struct elements is not currently supported."));
1099 Py_ssize_t args_count;
1101 struct value **vargs = NULL;
1102 struct type *ftype = NULL;
1103 PyObject *result = NULL;
1109 catch (
const gdb_exception &except)
1114 if (ftype->
code () != TYPE_CODE_FUNC)
1116 PyErr_SetString (PyExc_RuntimeError,
1117 _(
"Value is not callable (not TYPE_CODE_FUNC)."));
1121 if (! PyTuple_Check (args))
1123 PyErr_SetString (PyExc_TypeError,
1124 _(
"Inferior arguments must be provided in a tuple."));
1128 args_count = PyTuple_Size (args);
1133 vargs = XALLOCAVEC (
struct value *, args_count);
1134 for (i = 0; i < args_count; i++)
1136 PyObject *item = PyTuple_GetItem (args, i);
1142 if (vargs[i] == NULL)
1153 gdb::make_array_view (vargs, args_count));
1156 catch (
const gdb_exception &except)
1181 catch (
const gdb_exception &except)
1200 catch (
const gdb_exception &except)
1222 catch (
const gdb_exception &except)
1244 catch (
const gdb_exception &except)
1257 return (intptr_t) self;
1276#define STRIP_REFERENCE(TYPE) \
1277 (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE))
1286 PyObject *result = NULL;
1288 struct value *arg1, *arg2;
1289 struct value *res_val = NULL;
1321 if (ltype->
code () == TYPE_CODE_PTR
1324 else if (rtype->
code () == TYPE_CODE_PTR
1345 if (ltype->
code () == TYPE_CODE_PTR
1346 && rtype->
code () == TYPE_CODE_PTR)
1350 else if (ltype->
code () == TYPE_CODE_PTR
1379 op = BINOP_BITWISE_AND;
1382 op = BINOP_BITWISE_IOR;
1385 op = BINOP_BITWISE_XOR;
1409 PyObject *result = NULL;
1415 catch (
const gdb_exception &except)
1459 if (unused != Py_None)
1461 PyErr_SetString (PyExc_NotImplementedError,
1462 "Invalid operation on gdb.Value.");
1472 PyObject *result = NULL;
1483 catch (
const gdb_exception &except)
1510 catch (
const gdb_exception &except)
1525 struct gdb_exception except;
1543 catch (gdb_exception &ex)
1545 except = std::move (ex);
1560 struct value *val = NULL;
1566 catch (
const gdb_exception &except)
1618 struct value *value_other;
1619 struct value *value_self;
1624 if (value_other == NULL)
1632 result =
value_less (value_self, value_other);
1635 result =
value_less (value_self, value_other)
1645 result =
value_less (value_other, value_self);
1648 result = (
value_less (value_other, value_self)
1653 PyErr_SetString (PyExc_NotImplementedError,
1654 _(
"Invalid operation on gdb.Value."));
1670 if (other == Py_None)
1684 PyErr_SetString (PyExc_NotImplementedError,
1685 _(
"Invalid operation on gdb.Value."));
1693 catch (
const gdb_exception &except)
1728 error (_(
"Cannot convert value to long."));
1732 catch (
const gdb_exception &except)
1757 else if (
type->
code () == TYPE_CODE_INT)
1765 error (_(
"Cannot convert value to float."));
1767 catch (
const gdb_exception &except)
1772 return PyFloat_FromDouble (d);
1783 if (val_obj != NULL)
1786 val_obj->
next =
nullptr;
1787 val_obj->
prev =
nullptr;
1789 val_obj->
type = NULL;
1794 return (PyObject *) val_obj;
1805 if (val_obj != NULL)
1808 val_obj->
value = val;
1809 val_obj->
next =
nullptr;
1810 val_obj->
prev =
nullptr;
1812 val_obj->
type = NULL;
1817 return (PyObject *) val_obj;
1843 gdb_assert (obj != NULL);
1847 if (PyBool_Check (obj))
1849 cmp = PyObject_IsTrue (obj);
1853 else if (PyLong_Check (obj))
1855 LONGEST l = PyLong_AsLongLong (obj);
1857 if (PyErr_Occurred ())
1861 if (PyErr_ExceptionMatches (PyExc_OverflowError))
1867 if (PyObject_RichCompareBool (obj, zero.get (), Py_GT) > 0)
1871 ul = PyLong_AsUnsignedLongLong (obj);
1872 if (! PyErr_Occurred ())
1885 else if (PyFloat_Check (obj))
1887 double d = PyFloat_AsDouble (obj);
1889 if (! PyErr_Occurred ())
1894 gdb::unique_xmalloc_ptr<char> s
1910 PyErr_Format (PyExc_TypeError,
1911 _(
"Could not convert Python object: %S."), obj);
1913 catch (
const gdb_exception &except)
1927 struct value *res_val = NULL;
1929 if (!PyArg_ParseTuple (args,
"i", &i))
1936 catch (
const gdb_exception &except)
1949 PyObject *value_obj;
1951 if (!PyArg_ParseTuple (args,
"O", &value_obj))
1955 if (
value ==
nullptr)
1963 catch (
const gdb_exception &except)
1983 const char *varname;
1984 struct value *res_val = NULL;
1986 if (!PyArg_ParseTuple (args,
"s", &varname))
2000 catch (
const gdb_exception &except)
2005 if (res_val == NULL)
2015 const char *varname;
2016 PyObject *value_obj;
2019 if (!PyArg_ParseTuple (args,
"sO", &varname, &value_obj))
2023 if (value_obj != Py_None)
2046 catch (
const gdb_exception &except)
2078 "Boolean telling whether the value is optimized "
2079 "out (i.e., not available).",
2083 "Dynamic type of the value.", NULL },
2085 "Boolean telling whether the value is lazy (not fetched yet\n\
2086from the inferior). A lazy value is fetched when needed, or when\n\
2087the \"fetch_lazy()\" method is called.", NULL },
2092 {
"cast",
valpy_cast, METH_VARARGS,
"Cast the value to the supplied type." },
2094 "dynamic_cast (gdb.Type) -> gdb.Value\n\
2095Cast the value to the supplied type, as if by the C++ dynamic_cast operator."
2098 "reinterpret_cast (gdb.Type) -> gdb.Value\n\
2099Cast the value to the supplied type, as if by the C++\n\
2100reinterpret_cast operator."
2104 "Return the value referenced by a TYPE_CODE_REF or TYPE_CODE_PTR value." },
2106 "Return a value of type TYPE_CODE_REF referencing this value." },
2108 "Return a value of type TYPE_CODE_RVALUE_REF referencing this value." },
2110 "Return a 'const' qualied version of the same value." },
2112 METH_VARARGS | METH_KEYWORDS,
2113 "lazy_string ([encoding] [, length]) -> lazy_string\n\
2114Return a lazy string representation of the value." },
2115 {
"string", (PyCFunction)
valpy_string, METH_VARARGS | METH_KEYWORDS,
2116 "string ([encoding] [, errors] [, length]) -> string\n\
2117Return Unicode string representation of the value." },
2119 "Fetches the value from the inferior, if it was lazy." },
2121 METH_VARARGS | METH_KEYWORDS,
2122 "format_string (...) -> string\n\
2123Return a string representation of the value using the specified\n\
2124formatting options" },
2172 PyVarObject_HEAD_INIT (NULL, 0)
2192 | Py_TPFLAGS_BASETYPE,
void c_get_string(struct value *value, gdb::unique_xmalloc_ptr< gdb_byte > *buffer, int *length, struct type **char_type, const char **charset)
const char * host_charset(void)
static struct gdbarch * get_gdbarch()
const char * c_str() const
struct type * value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
struct type * lookup_pointer_type(struct type *type)
struct type * lookup_lvalue_reference_type(struct type *type)
int is_integral_type(struct type *t)
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
struct type * lookup_rvalue_reference_type(struct type *type)
bool get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
bool types_equal(struct type *a, struct type *b)
struct type * check_typedef(struct type *type)
struct value * call_function_by_hand(struct value *function, type *default_return_type, gdb::array_view< value * > args)
const struct language_defn * current_language
int gdbpy_is_lazy_string(PyObject *result)
PyObject * gdbpy_create_lazy_string_object(CORE_ADDR address, long length, const char *encoding, struct type *type)
void gdbpy_get_print_options(value_print_options *opts)
gdb::ref_ptr< T, gdbpy_ref_policy< T > > gdbpy_ref
PyObject * type_to_type_object(struct type *type)
int gdbpy_is_field(PyObject *obj)
struct type * type_object_to_type(PyObject *obj)
gdb::unique_xmalloc_ptr< char > python_string_to_target_string(PyObject *obj)
gdbpy_ref gdb_py_object_from_longest(LONGEST l)
void gdbpy_convert_exception(const struct gdb_exception &exception)
int gdb_py_int_as_long(PyObject *obj, long *result)
int gdb_pymodule_addobject(PyObject *module, const char *name, PyObject *object)
gdb::unique_xmalloc_ptr< char > python_string_to_host_string(PyObject *obj)
int gdbpy_is_string(PyObject *obj)
gdbpy_ref gdb_py_object_from_ulongest(ULONGEST l)
static int get_field_flag(PyObject *field, const char *flag_name)
static int valpy_richcompare_throw(PyObject *self, PyObject *other, int op)
struct value * convert_value_from_python(PyObject *obj)
static PyObject * valpy_divide(PyObject *self, PyObject *other)
static void valpy_clear_value(value_object *self)
#define builtin_type_pylong
static PyObject * valpy_string(PyObject *self, PyObject *args, PyObject *kw)
static PyObject * valpy_richcompare(PyObject *self, PyObject *other, int op)
static int valpy_nonzero(PyObject *self)
#define builtin_type_pybool
static PyObject * valpy_lsh(PyObject *self, PyObject *other)
static PyObject * valpy_reference_value(PyObject *self, PyObject *args, enum type_code refcode)
int gdbpy_is_value_object(PyObject *obj)
static PyObject * valpy_do_cast(PyObject *self, PyObject *args, enum exp_opcode op)
static PyObject * valpy_add(PyObject *self, PyObject *other)
PyObject * value_to_value_object_no_release(struct value *val)
static int valpy_init(PyObject *self, PyObject *args, PyObject *kwds)
static int value_has_field(struct value *v, PyObject *field)
static Py_ssize_t valpy_length(PyObject *self)
static PyObject * valpy_rsh(PyObject *self, PyObject *other)
static struct type * get_field_type(PyObject *field)
static PyObject * valpy_lazy_string(PyObject *self, PyObject *args, PyObject *kw)
static PyObject * valpy_get_dynamic_type(PyObject *self, void *closure)
static PyMethodDef value_object_methods[]
PyObject * value_to_value_object(struct value *val)
struct value * value_object_to_value(PyObject *self)
static PyObject * valpy_invert(PyObject *self)
static PyObject * valpy_xor(PyObject *self, PyObject *other)
PyObject * gdbpy_add_history(PyObject *self, PyObject *args)
static PyObject * valpy_call(PyObject *self, PyObject *args, PyObject *keywords)
static PyObject * valpy_binop_throw(enum valpy_opcode opcode, PyObject *self, PyObject *other)
static PyObject * valpy_long(PyObject *self)
#define builtin_type_pychar
static PyObject * valpy_format_string(PyObject *self, PyObject *args, PyObject *kw)
static PyObject * valpy_get_address(PyObject *self, void *closure)
PyObject * gdbpy_history_count(PyObject *self, PyObject *args)
static void valpy_dealloc(PyObject *obj)
static PyObject * valpy_reinterpret_cast(PyObject *self, PyObject *args)
static int valpy_setitem(PyObject *self, PyObject *key, PyObject *value)
int gdbpy_initialize_values(void)
static PyObject * valpy_positive(PyObject *self)
static PyMappingMethods value_object_as_mapping
PyTypeObject value_object_type
static gdb_PyGetSetDef value_object_getset[]
PyObject * gdbpy_history(PyObject *self, PyObject *args)
static PyObject * valpy_rvalue_reference_value(PyObject *self, PyObject *args)
PyObject * gdbpy_set_convenience_variable(PyObject *self, PyObject *args)
static bool copy_py_bool_obj(bool *dest, PyObject *src_obj)
static PyObject * valpy_float(PyObject *self)
static PyObject * valpy_subtract(PyObject *self, PyObject *other)
static PyObject * valpy_or(PyObject *self, PyObject *other)
static PyObject * valpy_fetch_lazy(PyObject *self, PyObject *args)
static PyObject * valpy_binop(enum valpy_opcode opcode, PyObject *self, PyObject *other)
static PyObject * valpy_negative(PyObject *self)
#define STRIP_REFERENCE(TYPE)
static PyObject * valpy_power(PyObject *self, PyObject *other, PyObject *unused)
static PyObject * valpy_absolute(PyObject *self)
static PyObject * valpy_lvalue_reference_value(PyObject *self, PyObject *args)
#define builtin_type_pyint
static PyObject * valpy_dynamic_cast(PyObject *self, PyObject *args)
void gdbpy_preserve_values(const struct extension_language_defn *extlang, struct objfile *objfile, htab_t copied_types)
static PyObject * valpy_const_value(PyObject *self, PyObject *args)
static PyObject * valpy_remainder(PyObject *self, PyObject *other)
static PyObject * valpy_cast(PyObject *self, PyObject *args)
static PyNumberMethods value_object_as_number
static PyObject * valpy_get_type(PyObject *self, void *closure)
static PyObject * valpy_multiply(PyObject *self, PyObject *other)
static struct value * convert_buffer_and_type_to_value(PyObject *obj, struct type *type)
static PyObject * valpy_get_is_lazy(PyObject *self, void *closure)
PyObject * gdbpy_convenience_variable(PyObject *self, PyObject *args)
static PyObject * valpy_get_is_optimized_out(PyObject *self, void *closure)
static PyObject * valpy_dereference(PyObject *self, PyObject *args)
static Py_hash_t valpy_hash(PyObject *self)
static PyObject * valpy_referenced_value(PyObject *self, PyObject *args)
static PyObject * valpy_str(PyObject *self)
static PyObject * valpy_and(PyObject *self, PyObject *other)
#define builtin_type_pyfloat
static PyObject * valpy_getitem(PyObject *self, PyObject *key)
static value_object * values_in_python
static void note_value(value_object *value_obj)
#define builtin_type_upylong
std::unique_ptr< Py_buffer, Py_buffer_deleter > Py_buffer_up
#define Py_TPFLAGS_CHECKTYPES
#define GDB_PY_SET_HANDLE_EXCEPTION(Exception)
PyObject * gdbpy_value_cst
#define GDB_PY_HANDLE_EXCEPTION(Exception)
static int gdb_PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, const char **keywords,...)
struct type * target_type() const
bool is_pointer_or_reference() const
struct value_object * prev
PyObject_HEAD struct value_object * next
value(struct type *type_)
bool target_float_is_zero(const gdb_byte *addr, const struct type *type)
double target_float_to_host_double(const gdb_byte *addr, const struct type *type)
struct value * value_subscript(struct value *array, LONGEST index)
struct value * value_x_binop(struct value *arg1, struct value *arg2, enum exp_opcode op, enum exp_opcode otherop, enum noside noside)
struct value * value_neg(struct value *arg1)
struct value * value_complement(struct value *arg1)
int binop_user_defined_p(enum exp_opcode op, struct value *arg1, struct value *arg2)
int value_equal(struct value *arg1, struct value *arg2)
int value_less(struct value *arg1, struct value *arg2)
struct value * value_ptradd(struct value *arg1, LONGEST arg2)
LONGEST value_ptrdiff(struct value *arg1, struct value *arg2)
struct value * value_binop(struct value *arg1, struct value *arg2, enum exp_opcode op)
struct value * value_cstring(const char *ptr, ssize_t len, struct type *char_type)
struct value * value_struct_elt(struct value **argp, gdb::optional< gdb::array_view< value * > > args, const char *name, int *static_memfuncp, const char *err)
struct value * value_addr(struct value *arg1)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_ind(struct value *arg1)
struct value * value_struct_elt_bitpos(struct value **argp, int bitpos, struct type *ftype, const char *err)
struct value * value_ref(struct value *arg1, enum type_code refcode)
struct value * value_dynamic_cast(struct type *type, struct value *arg)
struct value * value_reinterpret_cast(struct type *type, struct value *arg)
void common_val_print(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
struct type * value_type(const struct value *value)
struct value * value_zero(struct type *type, enum lval_type lv)
struct value * value_of_internalvar(struct gdbarch *gdbarch, struct internalvar *var)
bool is_floating_value(struct value *val)
int value_lazy(const struct value *value)
void clear_internalvar(struct internalvar *var)
CORE_ADDR value_as_address(struct value *val)
void value_fetch_lazy(struct value *val)
struct value * value_from_ulongest(struct type *type, ULONGEST num)
void preserve_one_value(struct value *value, struct objfile *objfile, htab_t copied_types)
struct internalvar * lookup_only_internalvar(const char *name)
ULONGEST value_history_count()
CORE_ADDR value_address(const struct value *value)
int record_latest_value(struct value *val)
struct value * value_from_longest(struct type *type, LONGEST num)
struct value * coerce_ref(struct value *arg)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
void set_internalvar(struct internalvar *var, struct value *val)
gdb::array_view< const gdb_byte > value_contents(struct value *value)
void value_incref(struct value *val)
struct internalvar * lookup_internalvar(const char *name)
LONGEST value_as_long(struct value *val)
struct value * make_cv_value(int cnst, int voltl, struct value *v)
struct value * value_copy(const value *arg)
int value_optimized_out(struct value *value)
struct value * value_from_host_double(struct type *type, double d)
struct value * access_value_history(int num)
value_ref_ptr release_value(struct value *val)
void value_decref(struct value *val)