GDB (xrefs)
|
#include "defs.h"
#include "top.h"
#include "charset.h"
#include "value.h"
#include "language.h"
#include "target-float.h"
#include "valprint.h"
#include "infcall.h"
#include "expression.h"
#include "cp-abi.h"
#include "python.h"
#include "ada-lang.h"
#include "python-internal.h"
Go to the source code of this file.
Classes | |
struct | value_object |
Macros | |
#define | builtin_type_pyint builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long |
#define | builtin_type_pyfloat builtin_type (gdbpy_enter::get_gdbarch ())->builtin_double |
#define | builtin_type_pylong builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long_long |
#define | builtin_type_upylong |
#define | builtin_type_pybool language_bool_type (current_language, gdbpy_enter::get_gdbarch ()) |
#define | STRIP_REFERENCE(TYPE) (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE)) |
Enumerations | |
enum | valpy_opcode { VALPY_ADD , VALPY_SUB , VALPY_MUL , VALPY_DIV , VALPY_REM , VALPY_POW , VALPY_LSH , VALPY_RSH , VALPY_BITAND , VALPY_BITOR , VALPY_BITXOR } |
Variables | |
static value_object * | values_in_python = NULL |
static gdb_PyGetSetDef | value_object_getset [] |
static PyMethodDef | value_object_methods [] |
static PyNumberMethods | value_object_as_number |
static PyMappingMethods | value_object_as_mapping |
PyTypeObject | value_object_type |
#define builtin_type_pybool language_bool_type (current_language, gdbpy_enter::get_gdbarch ()) |
Definition at line 55 of file py-value.c.
Referenced by convert_value_from_python().
#define builtin_type_pyfloat builtin_type (gdbpy_enter::get_gdbarch ())->builtin_double |
Definition at line 44 of file py-value.c.
Referenced by convert_value_from_python().
#define builtin_type_pyint builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long |
Definition at line 40 of file py-value.c.
Referenced by valpy_binop_throw().
#define builtin_type_pylong builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long_long |
Definition at line 48 of file py-value.c.
Referenced by convert_value_from_python(), and valpy_long().
#define builtin_type_upylong |
Definition at line 52 of file py-value.c.
Referenced by convert_value_from_python().
#define STRIP_REFERENCE | ( | TYPE | ) | (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE)) |
Definition at line 1350 of file py-value.c.
Referenced by valpy_binop_throw().
enum valpy_opcode |
Enumerator | |
---|---|
VALPY_ADD | |
VALPY_SUB | |
VALPY_MUL | |
VALPY_DIV | |
VALPY_REM | |
VALPY_POW | |
VALPY_LSH | |
VALPY_RSH | |
VALPY_BITAND | |
VALPY_BITOR | |
VALPY_BITXOR |
Definition at line 1334 of file py-value.c.
|
static |
Definition at line 141 of file py-value.c.
References type::length(), and value_from_contents().
Referenced by valpy_init().
Definition at line 1892 of file py-value.c.
References builtin_type_pybool, builtin_type_pyfloat, builtin_type_pylong, builtin_type_upylong, current_language, gdb_py_object_from_longest(), gdbpy_convert_exception(), gdbpy_is_lazy_string(), gdbpy_is_string(), gdbpy_value_cst, gdbpy_enter::get_gdbarch(), python_string_to_target_string(), gdbpy_err_fetch::restore(), value, value::value(), value_from_host_double(), value_from_longest(), value_from_ulongest(), value_object_type, language_defn::value_string(), and value::zero().
Referenced by extract_value(), fnpy_call(), gdbpy_add_history(), gdbpy_set_convenience_variable(), python_xmethod_worker::invoke(), py_varobj_iter::next(), pretty_print_one_value(), print_children(), valpy_assign(), valpy_binop_throw(), valpy_call(), valpy_getitem(), valpy_init(), and valpy_richcompare_throw().
|
static |
Definition at line 649 of file py-value.c.
Referenced by valpy_format_string().
Definition at line 2004 of file py-value.c.
References convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, gdb_py_object_from_longest(), and value::record_latest().
Definition at line 2038 of file py-value.c.
References type::code(), GDB_PY_HANDLE_EXCEPTION, gdbpy_enter::get_gdbarch(), lookup_only_internalvar(), value::type(), value_of_internalvar(), and value_to_value_object().
Definition at line 1979 of file py-value.c.
References access_value_history(), GDB_PY_HANDLE_EXCEPTION, and value_to_value_object().
Definition at line 2031 of file py-value.c.
References gdb_py_object_from_ulongest(), and value_history_count().
GDBPY_INITIALIZE_FILE | ( | gdbpy_initialize_values | ) |
|
static |
Definition at line 2128 of file py-value.c.
References gdb_module, gdb_pymodule_addobject(), and value_object_type.
int gdbpy_is_value_object | ( | PyObject * | obj | ) |
Definition at line 2122 of file py-value.c.
References value_object_type.
Referenced by get_addr_from_python(), and infpy_thread_from_thread_handle().
void gdbpy_preserve_values | ( | const struct extension_language_defn * | extlang, |
struct objfile * | objfile, | ||
htab_t | copied_types ) |
Definition at line 224 of file py-value.c.
References value_object::next, value::preserve(), value_object::value, and values_in_python.
Definition at line 2078 of file py-value.c.
References clear_internalvar(), convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, lookup_internalvar(), lookup_only_internalvar(), and set_internalvar().
|
static |
Definition at line 983 of file py-value.c.
Referenced by valpy_getitem().
Definition at line 997 of file py-value.c.
References type_object_to_type().
Referenced by valpy_getitem().
|
static |
Definition at line 123 of file py-value.c.
References value_object::next, value_object::prev, and values_in_python.
Referenced by valpy_init(), and value_to_value_object().
Definition at line 1572 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, not_lval, value::type(), valpy_negative(), valpy_positive(), value::value(), value_less(), and value::zero().
Definition at line 1498 of file py-value.c.
References VALPY_ADD, and valpy_binop().
Definition at line 1666 of file py-value.c.
References valpy_binop(), and VALPY_BITAND.
Definition at line 894 of file py-value.c.
References convert_value_from_python(), value::decref(), GDB_PY_HANDLE_EXCEPTION, value::incref(), value_object::value, and value_assign().
|
static |
Definition at line 1481 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, and valpy_binop_throw().
Referenced by valpy_add(), valpy_and(), valpy_divide(), valpy_lsh(), valpy_multiply(), valpy_or(), valpy_power(), valpy_remainder(), valpy_rsh(), valpy_subtract(), and valpy_xor().
|
static |
Definition at line 1358 of file py-value.c.
References binop_user_defined_p(), builtin_type_pyint, check_typedef(), type::code(), convert_value_from_python(), EVAL_NORMAL, is_integral_type(), STRIP_REFERENCE, value::type(), VALPY_ADD, VALPY_BITAND, VALPY_BITOR, VALPY_BITXOR, VALPY_DIV, VALPY_LSH, VALPY_MUL, VALPY_POW, VALPY_REM, VALPY_RSH, VALPY_SUB, value_as_long(), value_binop(), value_from_longest(), value_ptradd(), value_ptrdiff(), value_to_value_object(), and value_x_binop().
Referenced by valpy_binop().
Definition at line 1171 of file py-value.c.
References call_function_by_hand(), check_typedef(), type::code(), convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, value::type(), value::value(), and value_to_value_object().
Definition at line 870 of file py-value.c.
References valpy_do_cast().
|
static |
Definition at line 80 of file py-value.c.
References value_object::address, value::decref(), value_object::dynamic_type, value_object::type, and value_object::value.
Referenced by valpy_dealloc(), and valpy_init().
Definition at line 370 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, make_cv_value(), value::value(), and value_to_value_object().
|
static |
Definition at line 93 of file py-value.c.
References value_object::next, value_object::prev, valpy_clear_value(), value_object::value, and values_in_python.
Definition at line 235 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value_ind(), and value_to_value_object().
Definition at line 1516 of file py-value.c.
References valpy_binop(), and VALPY_DIV.
|
static |
Definition at line 825 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, type, type_object_to_type(), value::value(), value_cast(), value_dynamic_cast(), value_reinterpret_cast(), and value_to_value_object().
Referenced by valpy_cast(), valpy_dynamic_cast(), and valpy_reinterpret_cast().
Definition at line 878 of file py-value.c.
References valpy_do_cast().
Definition at line 1309 of file py-value.c.
References value::fetch_lazy(), GDB_PY_HANDLE_EXCEPTION, value::lazy(), and value::value().
Definition at line 1821 of file py-value.c.
References check_typedef(), type::code(), value::contents(), GDB_PY_HANDLE_EXCEPTION, is_floating_value(), target_float_to_host_double(), value::type(), value::value(), and value_as_long().
Definition at line 667 of file py-value.c.
References string_file::c_str(), common_val_print(), copy_py_bool_obj(), current_language, value_print_options::format, GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), gdbpy_get_print_options(), host_charset(), and string_file::size().
Definition at line 393 of file py-value.c.
References value_object::address, quit_force(), value_object::value, value_addr(), and value_to_value_object().
Definition at line 442 of file py-value.c.
References check_typedef(), type::code(), coerce_ref(), value_object::dynamic_type, GDB_PY_HANDLE_EXCEPTION, type::is_pointer_or_reference(), lookup_lvalue_reference_type(), lookup_pointer_type(), type::target_type(), value::type(), type_to_type_object(), valpy_get_type(), value_object::value, value_ind(), and value_rtti_type().
Definition at line 1287 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::lazy(), and value::value().
Definition at line 1265 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::optimized_out(), and value::value().
Definition at line 425 of file py-value.c.
References value_object::type, value::type(), type_to_type_object(), and value_object::value.
Referenced by valpy_get_dynamic_type().
Definition at line 1018 of file py-value.c.
References ADA_TYPE_P, ada_value_subscript(), value::bitpos(), check_typedef(), type::code(), coerce_ref(), convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, gdb_py_int_as_long(), gdbpy_is_field(), gdbpy_is_string(), get_field_flag(), get_field_type(), lookup_lvalue_reference_type(), lookup_pointer_type(), lookup_rvalue_reference_type(), python_string_to_host_string(), type, value::type(), value::value(), value_as_long(), value_cast(), value_has_field(), value_struct_elt(), value_struct_elt_bitpos(), value_subscript(), and value_to_value_object().
Definition at line 1329 of file py-value.c.
Definition at line 173 of file py-value.c.
References convert_buffer_and_type_to_value(), convert_value_from_python(), gdb_PyArg_ParseTupleAndKeywords(), note_value(), release_value(), type_object_to_type(), valpy_clear_value(), value, and value_object::value.
Definition at line 1632 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value_complement(), and value_to_value_object().
Definition at line 522 of file py-value.c.
References value::address, check_typedef(), type::code(), GDB_PY_HANDLE_EXCEPTION, GDB_PY_LL_ARG, gdb_PyArg_ParseTupleAndKeywords(), gdbpy_create_lazy_string_object(), get_array_bounds(), type::length(), lookup_array_range_type(), type::target_type(), type, value::type(), value::value(), and value_as_address().
|
static |
Definition at line 925 of file py-value.c.
Definition at line 1786 of file py-value.c.
References builtin_type_pylong, check_typedef(), type::code(), GDB_PY_HANDLE_EXCEPTION, gdb_py_object_from_longest(), gdb_py_object_from_ulongest(), is_floating_value(), is_integral_type(), type::is_unsigned(), value::type(), value::value(), value_as_long(), and value_cast().
Definition at line 1652 of file py-value.c.
References valpy_binop(), and VALPY_LSH.
Definition at line 322 of file py-value.c.
References valpy_reference_value().
Definition at line 1510 of file py-value.c.
References valpy_binop(), and VALPY_MUL.
Definition at line 1544 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value_neg(), and value_to_value_object().
Referenced by valpy_absolute().
|
static |
Definition at line 1597 of file py-value.c.
References check_typedef(), type::code(), GDB_PY_SET_HANDLE_EXCEPTION, is_floating_value(), is_integral_type(), target_float_is_zero(), type, and value_as_long().
Definition at line 1673 of file py-value.c.
References valpy_binop(), and VALPY_BITOR.
Definition at line 1566 of file py-value.c.
References value_to_value_object().
Referenced by valpy_absolute().
Definition at line 1528 of file py-value.c.
References valpy_binop(), and VALPY_POW.
|
static |
Definition at line 301 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::value(), value_ref(), and value_to_value_object().
Referenced by valpy_lvalue_reference_value(), and valpy_rvalue_reference_value().
Definition at line 264 of file py-value.c.
References check_typedef(), code, coerce_ref(), GDB_PY_HANDLE_EXCEPTION, value::type(), value::value(), value_ind(), and value_to_value_object().
Definition at line 886 of file py-value.c.
References valpy_do_cast().
Definition at line 1522 of file py-value.c.
References valpy_binop(), and VALPY_REM.
Definition at line 1742 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, and valpy_richcompare_throw().
Definition at line 1691 of file py-value.c.
References convert_value_from_python(), value::value(), value_equal(), and value_less().
Referenced by valpy_richcompare().
Definition at line 1659 of file py-value.c.
References valpy_binop(), and VALPY_RSH.
Definition at line 328 of file py-value.c.
References valpy_reference_value().
Definition at line 1161 of file py-value.c.
Definition at line 1241 of file py-value.c.
References string_file::c_str(), common_val_print(), current_language, GDB_PY_HANDLE_EXCEPTION, gdbpy_get_print_options(), host_charset(), and string_file::size().
Definition at line 610 of file py-value.c.
References c_get_string(), GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), type::length(), and value::value().
Definition at line 1504 of file py-value.c.
References valpy_binop(), and VALPY_SUB.
Definition at line 336 of file py-value.c.
References check_typedef(), type::code(), GDB_PY_HANDLE_EXCEPTION, value::type(), value::value(), value_to_array(), and value_to_value_object().
Definition at line 1680 of file py-value.c.
References valpy_binop(), and VALPY_BITXOR.
Definition at line 937 of file py-value.c.
References check_typedef(), type::code(), GDB_PY_SET_HANDLE_EXCEPTION, type::is_pointer_or_reference(), type::target_type(), value::type(), type_object_to_type(), and types_equal().
Referenced by valpy_getitem().
Definition at line 1877 of file py-value.c.
References value_object::value, and value_object_type.
Referenced by bpfinishpy_pre_stop_hook(), gdbpy_default_visualizer(), get_addr_from_python(), infpy_thread_from_thread_handle(), pyuw_sniffer(), unwind_infopy_add_saved_register(), and unwind_infopy_str().
Definition at line 1854 of file py-value.c.
References value_object::address, value_object::dynamic_type, value::incref(), value_object::next, note_value(), value_object::prev, value_object::type, value_object::value, and value_object_type.
Referenced by bpfinishpy_init(), bpfinishpy_pre_stop_hook(), convert_values_to_python(), python_xmethod_worker::do_get_result_type(), frapy_read_register(), frapy_read_var(), gdbpy_apply_val_pretty_printer(), gdbpy_convenience_variable(), gdbpy_get_varobj_pretty_printer(), gdbpy_history(), python_xmethod_worker::invoke(), pending_framepy_read_register(), stpy_convert_to_value(), sympy_value(), typy_optimized_out(), typy_template_argument(), valpy_binop_throw(), valpy_call(), valpy_const_value(), valpy_dereference(), valpy_do_cast(), valpy_get_address(), valpy_getitem(), valpy_invert(), valpy_negative(), valpy_positive(), valpy_reference_value(), valpy_referenced_value(), and valpy_to_array().
|
static |
Definition at line 2238 of file py-value.c.
|
static |
Definition at line 2201 of file py-value.c.
|
static |
Definition at line 2141 of file py-value.c.
|
static |
Definition at line 2158 of file py-value.c.
PyTypeObject value_object_type |
Definition at line 2244 of file py-value.c.
Referenced by convert_value_from_python(), gdbpy_initialize_values(), gdbpy_is_value_object(), unwind_infopy_add_saved_register(), value_object_to_value(), and value_to_value_object().
|
static |
Definition at line 73 of file py-value.c.
Referenced by gdbpy_preserve_values(), note_value(), and valpy_dealloc().