GDB (xrefs)
|
#include "defs.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 "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 | builtin_type_pychar language_string_char_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 53 of file py-value.c.
#define builtin_type_pychar language_string_char_type (current_language, gdbpy_enter::get_gdbarch ()) |
Definition at line 56 of file py-value.c.
#define builtin_type_pyfloat builtin_type (gdbpy_enter::get_gdbarch ())->builtin_double |
Definition at line 42 of file py-value.c.
#define builtin_type_pyint builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long |
Definition at line 38 of file py-value.c.
#define builtin_type_pylong builtin_type (gdbpy_enter::get_gdbarch ())->builtin_long_long |
Definition at line 46 of file py-value.c.
#define builtin_type_upylong |
Definition at line 50 of file py-value.c.
#define STRIP_REFERENCE | ( | TYPE | ) | (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE)) |
Definition at line 1276 of file py-value.c.
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 1260 of file py-value.c.
|
static |
Definition at line 142 of file py-value.c.
References type::length(), and value_from_contents().
Referenced by valpy_init().
Definition at line 1838 of file py-value.c.
References builtin_type_pybool, builtin_type_pychar, builtin_type_pyfloat, builtin_type_pylong, builtin_type_upylong, gdb_py_object_from_longest(), gdbpy_convert_exception(), gdbpy_is_lazy_string(), gdbpy_is_string(), gdbpy_value_cst, python_string_to_target_string(), gdbpy_err_fetch::restore(), value_copy(), value_cstring(), value_from_host_double(), value_from_longest(), value_from_ulongest(), and value_object_type.
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_binop_throw(), valpy_call(), valpy_getitem(), valpy_init(), and valpy_richcompare_throw().
|
static |
Definition at line 612 of file py-value.c.
Referenced by valpy_format_string().
Definition at line 1947 of file py-value.c.
References convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, gdb_py_object_from_longest(), and record_latest_value().
Definition at line 1981 of file py-value.c.
References code, GDB_PY_HANDLE_EXCEPTION, gdbpy_enter::get_gdbarch(), lookup_only_internalvar(), value_of_internalvar(), value_to_value_object(), and value_type().
Definition at line 1924 of file py-value.c.
References access_value_history(), GDB_PY_HANDLE_EXCEPTION, and value_to_value_object().
Definition at line 1974 of file py-value.c.
References gdb_py_object_from_ulongest(), and value_history_count().
int gdbpy_initialize_values | ( | void | ) |
Definition at line 2063 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 2057 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 225 of file py-value.c.
References value_object::next, preserve_one_value(), value_object::value, and values_in_python.
Definition at line 2013 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 911 of file py-value.c.
Referenced by valpy_getitem().
Definition at line 925 of file py-value.c.
References type_object_to_type().
Referenced by valpy_getitem().
|
static |
Definition at line 124 of file py-value.c.
References value_object::next, value_object::prev, and values_in_python.
Referenced by valpy_init(), value_to_value_object(), and value_to_value_object_no_release().
Definition at line 1498 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, not_lval, valpy_negative(), valpy_positive(), value::value(), value_less(), value_type(), and value_zero().
Definition at line 1424 of file py-value.c.
References VALPY_ADD, and valpy_binop().
Definition at line 1590 of file py-value.c.
References valpy_binop(), and VALPY_BITAND.
|
static |
Definition at line 1407 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 1284 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, 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(), value_type(), and value_x_binop().
Referenced by valpy_binop().
Definition at line 1097 of file py-value.c.
References call_function_by_hand(), check_typedef(), type::code(), convert_value_from_python(), GDB_PY_HANDLE_EXCEPTION, value::value(), value_to_value_object(), and value_type().
Definition at line 831 of file py-value.c.
References valpy_do_cast().
|
static |
Definition at line 81 of file py-value.c.
References value_object::address, value_object::dynamic_type, value_object::type, value_object::value, and value_decref().
Referenced by valpy_dealloc(), and valpy_init().
Definition at line 337 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, make_cv_value(), value::value(), and value_to_value_object().
|
static |
Definition at line 94 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 236 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value_ind(), and value_to_value_object().
Definition at line 1442 of file py-value.c.
References valpy_binop(), and VALPY_DIV.
|
static |
Definition at line 786 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, 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 839 of file py-value.c.
References valpy_do_cast().
Definition at line 1235 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::value(), value_fetch_lazy(), and value_lazy().
Definition at line 1745 of file py-value.c.
References check_typedef(), type::code(), GDB_PY_HANDLE_EXCEPTION, is_floating_value(), target_float_to_host_double(), value::value(), value_as_long(), value_contents(), and value_type().
Definition at line 630 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(), string_file::size(), and UINT_MAX.
Definition at line 360 of file py-value.c.
References value_object::address, value_object::value, value_addr(), and value_to_value_object().
Definition at line 405 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(), type_to_type_object(), valpy_get_type(), value_object::value, value_ind(), value_rtti_type(), and value_type().
Definition at line 1213 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::value(), and value_lazy().
Definition at line 1191 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value::value(), and value_optimized_out().
Definition at line 388 of file py-value.c.
References value_object::type, type_to_type_object(), value_object::value, and value_type().
Referenced by valpy_get_dynamic_type().
Definition at line 946 of file py-value.c.
References 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(), value::value(), value_as_long(), value_cast(), value_has_field(), value_struct_elt(), value_struct_elt_bitpos(), value_subscript(), value_to_value_object(), and value_type().
Definition at line 1255 of file py-value.c.
Definition at line 174 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(), and value_object::value.
Definition at line 1558 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, value_complement(), and value_to_value_object().
Definition at line 485 of file py-value.c.
References 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(), value::value(), value_address(), value_as_address(), and value_type().
|
static |
Definition at line 853 of file py-value.c.
Definition at line 1710 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::value(), value_as_long(), value_cast(), and value_type().
Definition at line 1576 of file py-value.c.
References valpy_binop(), and VALPY_LSH.
Definition at line 323 of file py-value.c.
References valpy_reference_value().
Definition at line 1436 of file py-value.c.
References valpy_binop(), and VALPY_MUL.
Definition at line 1470 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 1523 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(), value_as_long(), value_contents(), and value_type().
Definition at line 1597 of file py-value.c.
References valpy_binop(), and VALPY_BITOR.
Definition at line 1492 of file py-value.c.
References value_to_value_object().
Referenced by valpy_absolute().
Definition at line 1454 of file py-value.c.
References valpy_binop(), and VALPY_POW.
|
static |
Definition at line 302 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 265 of file py-value.c.
References check_typedef(), code, coerce_ref(), GDB_PY_HANDLE_EXCEPTION, value::value(), value_ind(), value_to_value_object(), and value_type().
Definition at line 847 of file py-value.c.
References valpy_do_cast().
Definition at line 1448 of file py-value.c.
References valpy_binop(), and VALPY_REM.
Definition at line 1666 of file py-value.c.
References GDB_PY_HANDLE_EXCEPTION, and valpy_richcompare_throw().
Definition at line 1615 of file py-value.c.
References convert_value_from_python(), value::value(), value_equal(), and value_less().
Referenced by valpy_richcompare().
Definition at line 1583 of file py-value.c.
References valpy_binop(), and VALPY_RSH.
Definition at line 329 of file py-value.c.
References valpy_reference_value().
Definition at line 1087 of file py-value.c.
Definition at line 1167 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 573 of file py-value.c.
References c_get_string(), GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), type::length(), and value::value().
Definition at line 1430 of file py-value.c.
References valpy_binop(), and VALPY_SUB.
Definition at line 1604 of file py-value.c.
References valpy_binop(), and VALPY_BITXOR.
Definition at line 865 of file py-value.c.
References check_typedef(), type::code(), GDB_PY_SET_HANDLE_EXCEPTION, type::is_pointer_or_reference(), type::target_type(), type_object_to_type(), types_equal(), and value_type().
Referenced by valpy_getitem().
Definition at line 1823 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(), pyuw_value_obj_to_pointer(), unwind_infopy_add_saved_register(), and unwind_infopy_str().
Definition at line 1778 of file py-value.c.
References value_object::address, value_object::dynamic_type, value_object::next, note_value(), value_object::prev, release_value(), 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_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(), and valpy_referenced_value().
Definition at line 1800 of file py-value.c.
References value_object::address, value_object::dynamic_type, value_object::next, note_value(), value_object::prev, value_object::type, value_object::value, value_incref(), and value_object_type.
Referenced by gdbpy_apply_val_pretty_printer().
|
static |
Definition at line 2165 of file py-value.c.
|
static |
Definition at line 2128 of file py-value.c.
|
static |
Definition at line 2074 of file py-value.c.
|
static |
Definition at line 2091 of file py-value.c.
PyTypeObject value_object_type |
Definition at line 2171 of file py-value.c.
Referenced by convert_value_from_python(), gdbpy_initialize_values(), gdbpy_is_value_object(), value_object_to_value(), value_to_value_object(), and value_to_value_object_no_release().
|
static |
Definition at line 74 of file py-value.c.
Referenced by gdbpy_preserve_values(), note_value(), and valpy_dealloc().