GDB (xrefs)
|
#include "defs.h"
#include "value.h"
#include "python-internal.h"
#include "charset.h"
#include "gdbtypes.h"
#include "cp-support.h"
#include "demangle.h"
#include "objfiles.h"
#include "language.h"
#include "typeprint.h"
#include "ada-lang.h"
#include "type-codes.def"
Go to the source code of this file.
Classes | |
struct | type_object |
struct | field_object |
struct | typy_iterator_object |
struct | pyty_code |
struct | typy_deleter |
Macros | |
#define | OP(X) |
Functions | |
PyTypeObject type_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object") |
PyTypeObject field_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("field_object") |
PyTypeObject type_iterator_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("typy_iterator_object") |
static PyObject * | typy_make_iter (PyObject *self, enum gdbpy_iter_kind kind) |
static void | field_dealloc (PyObject *obj) |
static PyObject * | field_new (void) |
int | gdbpy_is_field (PyObject *obj) |
static PyObject * | typy_get_code (PyObject *self, void *closure) |
static gdbpy_ref | convert_field (struct type *type, int field) |
static gdbpy_ref | field_name (struct type *type, int field) |
static gdbpy_ref | make_fielditem (struct type *type, int i, enum gdbpy_iter_kind kind) |
static PyObject * | typy_fields_items (PyObject *self, enum gdbpy_iter_kind kind) |
static PyObject * | typy_values (PyObject *self, PyObject *args) |
static PyObject * | typy_fields (PyObject *self, PyObject *args) |
static PyObject * | typy_field_names (PyObject *self, PyObject *args) |
static PyObject * | typy_items (PyObject *self, PyObject *args) |
static PyObject * | typy_get_name (PyObject *self, void *closure) |
static PyObject * | typy_get_tag (PyObject *self, void *closure) |
static PyObject * | typy_get_objfile (PyObject *self, void *closure) |
static PyObject * | typy_is_scalar (PyObject *self, void *closure) |
static PyObject * | typy_is_signed (PyObject *self, void *closure) |
static PyObject * | typy_is_array_like (PyObject *self, void *closure) |
static PyObject * | typy_is_string_like (PyObject *self, void *closure) |
static PyObject * | typy_strip_typedefs (PyObject *self, PyObject *args) |
static struct type * | typy_get_composite (struct type *type) |
static PyObject * | typy_array_1 (PyObject *self, PyObject *args, int is_vector) |
static PyObject * | typy_array (PyObject *self, PyObject *args) |
static PyObject * | typy_vector (PyObject *self, PyObject *args) |
static PyObject * | typy_pointer (PyObject *self, PyObject *args) |
static PyObject * | typy_range (PyObject *self, PyObject *args) |
static PyObject * | typy_reference (PyObject *self, PyObject *args) |
static PyObject * | typy_target (PyObject *self, PyObject *args) |
static PyObject * | typy_const (PyObject *self, PyObject *args) |
static PyObject * | typy_volatile (PyObject *self, PyObject *args) |
static PyObject * | typy_unqualified (PyObject *self, PyObject *args) |
static PyObject * | typy_get_sizeof (PyObject *self, void *closure) |
static PyObject * | typy_get_alignof (PyObject *self, void *closure) |
static PyObject * | typy_get_dynamic (PyObject *self, void *closure) |
static struct type * | typy_lookup_typename (const char *type_name, const struct block *block) |
static struct type * | typy_lookup_type (struct demangle_component *demangled, const struct block *block) |
static PyObject * | typy_legacy_template_argument (struct type *type, const struct block *block, int argno) |
static PyObject * | typy_template_argument (PyObject *self, PyObject *args) |
static PyObject * | typy_repr (PyObject *self) |
static PyObject * | typy_str (PyObject *self) |
static PyObject * | typy_richcompare (PyObject *self, PyObject *other, int op) |
static void | set_type (type_object *obj, struct type *type) |
static void | typy_dealloc (PyObject *obj) |
static Py_ssize_t | typy_length (PyObject *self) |
static int | typy_nonzero (PyObject *self) |
static PyObject * | typy_optimized_out (PyObject *self, PyObject *args) |
static PyObject * | typy_getitem (PyObject *self, PyObject *key) |
static PyObject * | typy_get (PyObject *self, PyObject *args) |
static PyObject * | typy_has_key (PyObject *self, PyObject *args) |
static PyObject * | typy_iteritems (PyObject *self, PyObject *args) |
static PyObject * | typy_iterkeys (PyObject *self, PyObject *args) |
static PyObject * | typy_iter (PyObject *self) |
static PyObject * | typy_itervalues (PyObject *self, PyObject *args) |
static PyObject * | typy_iterator_iter (PyObject *self) |
static PyObject * | typy_iterator_iternext (PyObject *self) |
static void | typy_iterator_dealloc (PyObject *obj) |
PyObject * | type_to_type_object (struct type *type) |
struct type * | type_object_to_type (PyObject *obj) |
PyObject * | gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw) |
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION | gdbpy_initialize_types (void) |
GDBPY_INITIALIZE_FILE (gdbpy_initialize_types) | |
Variables | |
static struct pyty_code | pyty_codes [] |
static const registry< objfile >::key< type_object, typy_deleter > | typy_objfile_data_key |
static gdb_PyGetSetDef | type_object_getset [] |
static PyMethodDef | type_object_methods [] |
static PyNumberMethods | type_object_as_number |
static PyMappingMethods | typy_mapping |
PyTypeObject | type_object_type |
static gdb_PyGetSetDef | field_object_getset [] |
PyTypeObject | field_object_type |
PyTypeObject | type_iterator_object_type |
Definition at line 144 of file py-type.c.
References field::bitsize(), type::code(), type::field(), FIELD_LOC_KIND_DWARF_BLOCK, field_name(), field_new(), gdb_py_object_from_longest(), field::is_artificial(), field::is_static(), field::loc_bitpos(), field::loc_enumval(), field::loc_kind(), field::name(), field::type(), TYPE_N_BASECLASSES, and type_to_type_object().
Referenced by make_fielditem(), typy_fields(), and typy_getitem().
|
extern |
|
extern |
|
extern |
|
static |
Definition at line 234 of file py-type.c.
References type::field(), and field::name().
Referenced by ada_get_field_index(), ada_nget_field_index(), ada_varobj_describe_struct_child(), c_describe_child(), c_is_path_expr_parent(), call_function_by_hand_dummy(), compile_cplus_convert_struct_or_union_members(), convert_field(), cplus_describe_child(), expr::rust_structop::evaluate(), field_name_match(), gdb_mangle_name(), get_symbol_field_type(), make_fielditem(), output_cores(), output_thread_groups(), parse_amd_dbgapi_register_type_flags_fields(), serialize_mi_result_1(), tdesc_start_enum_value(), tdesc_start_field(), and f_language::value_print_inner().
|
static |
Definition at line 107 of file py-type.c.
References field_object_type.
Referenced by convert_field().
GDBPY_INITIALIZE_FILE | ( | gdbpy_initialize_types | ) |
|
static |
Definition at line 1525 of file py-type.c.
References field_object_type, gdb_module, gdb_pymodule_addobject(), pyty_codes, type_iterator_object_type, and type_object_type.
int gdbpy_is_field | ( | PyObject * | obj | ) |
Definition at line 126 of file py-type.c.
References field_object_type.
Referenced by valpy_getitem().
PyObject * gdbpy_lookup_type | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kw ) |
Definition at line 1494 of file py-type.c.
References block_object_to_block(), gdb_PyArg_ParseTupleAndKeywords(), type_to_type_object(), and typy_lookup_typename().
|
static |
Definition at line 253 of file py-type.c.
References convert_field(), field_name(), iter_items, iter_keys, and iter_values.
Referenced by typy_iterator_iternext().
|
static |
Definition at line 1201 of file py-type.c.
References registry< T >::get(), type_object::next, type::objfile_owner(), type_object::prev, registry< T >::set(), type, type_object::type, and typy_objfile_data_key.
Referenced by compact_minimal_symbols(), read_args(), read_set_type(), and type_to_type_object().
struct type * type_object_to_type | ( | PyObject * | obj | ) |
Definition at line 1483 of file py-type.c.
References type_object_type.
Referenced by python_xmethod_worker::do_get_arg_types(), python_xmethod_worker::do_get_result_type(), get_field_type(), python_xmethod_worker::invoke(), stpy_convert_to_value(), stpy_lazy_string_elt_type(), typy_repr(), typy_richcompare(), typy_str(), valpy_do_cast(), valpy_init(), and value_has_field().
PyObject * type_to_type_object | ( | struct type * | type | ) |
Definition at line 1460 of file py-type.c.
References check_typedef(), type::is_stub(), set_type(), and type_object_type.
Referenced by archpy_integer_type(), convert_field(), gdbpy_apply_type_printers(), gdbpy_create_lazy_string_object(), gdbpy_get_matching_xmethod_workers(), gdbpy_lookup_type(), sympy_get_type(), typy_array_1(), typy_const(), typy_fields_items(), typy_legacy_template_argument(), typy_pointer(), typy_reference(), typy_strip_typedefs(), typy_target(), typy_template_argument(), typy_unqualified(), typy_volatile(), valpy_get_dynamic_type(), and valpy_get_type().
|
static |
Definition at line 605 of file py-type.c.
References typy_array_1().
|
static |
Definition at line 553 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, gdb_py_int_as_long(), type::is_vector(), lookup_array_range_type(), make_vector_type(), n1, n2, and type_to_type_object().
Referenced by typy_array(), and typy_vector().
|
static |
Definition at line 726 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, make_cv_type(), and type_to_type_object().
|
static |
Definition at line 1219 of file py-type.c.
References type::objfile_owner(), registry< T >::set(), and typy_objfile_data_key.
|
static |
Definition at line 348 of file py-type.c.
References iter_keys, and typy_fields_items().
|
static |
Definition at line 328 of file py-type.c.
References type::code(), convert_field(), iter_values, and typy_fields_items().
|
static |
Definition at line 284 of file py-type.c.
References check_typedef(), GDB_PY_HANDLE_EXCEPTION, type, type_to_type_object(), and typy_make_iter().
Referenced by typy_field_names(), typy_fields(), typy_items(), and typy_values().
|
static |
Definition at line 1310 of file py-type.c.
References typy_getitem().
|
static |
Definition at line 804 of file py-type.c.
References gdb_py_object_from_ulongest(), and type_align().
|
static |
Definition at line 133 of file py-type.c.
References type::code(), and gdb_py_object_from_longest().
Definition at line 515 of file py-type.c.
References check_typedef(), type::code(), GDB_PY_HANDLE_EXCEPTION, type::is_pointer_or_reference(), type::target_type(), and type.
Referenced by typy_getitem(), typy_has_key(), typy_length(), and typy_make_iter().
|
static |
Definition at line 825 of file py-type.c.
References is_dynamic_type().
|
static |
Definition at line 365 of file py-type.c.
References ada_decode(), ADA_TYPE_P, name, and type::name().
|
static |
Definition at line 401 of file py-type.c.
References type::objfile_owner(), and objfile_to_objfile_object().
|
static |
Definition at line 780 of file py-type.c.
References check_typedef(), gdb_py_object_from_longest(), type::length(), and TYPE_HAS_DYNAMIC_LENGTH.
|
static |
Definition at line 384 of file py-type.c.
References type::code(), and type::name().
|
static |
Definition at line 1277 of file py-type.c.
References convert_field(), type::field(), field::name(), type::num_fields(), python_string_to_host_string(), strcmp_iw(), and typy_get_composite().
Referenced by typy_get().
|
static |
Definition at line 1335 of file py-type.c.
References type::field(), field::name(), type::num_fields(), strcmp_iw(), and typy_get_composite().
|
static |
Definition at line 448 of file py-type.c.
References check_typedef(), GDB_PY_HANDLE_EXCEPTION, and type::is_array_like().
|
static |
Definition at line 414 of file py-type.c.
References is_scalar_type().
|
static |
Definition at line 428 of file py-type.c.
References is_scalar_type(), and type::is_unsigned().
|
static |
Definition at line 472 of file py-type.c.
References check_typedef(), GDB_PY_HANDLE_EXCEPTION, and type::is_string_like().
|
static |
Definition at line 357 of file py-type.c.
References iter_items, and typy_fields_items().
|
static |
Definition at line 1406 of file py-type.c.
References iter_keys, and typy_make_iter().
|
static |
Definition at line 1450 of file py-type.c.
References typy_iterator_object::source.
|
static |
|
static |
Definition at line 1432 of file py-type.c.
References typy_iterator_object::field, typy_iterator_object::kind, make_fielditem(), type::num_fields(), typy_iterator_object::source, and type_object::type.
|
static |
Definition at line 1389 of file py-type.c.
References iter_items, and typy_make_iter().
|
static |
Definition at line 1397 of file py-type.c.
References iter_keys, and typy_make_iter().
|
static |
Definition at line 1414 of file py-type.c.
References iter_values, and typy_make_iter().
|
static |
Definition at line 937 of file py-type.c.
References cp_demangled_name_to_comp(), err, GDB_PY_HANDLE_EXCEPTION, type::name(), type_to_type_object(), and typy_lookup_type().
Referenced by typy_template_argument().
|
static |
Definition at line 1242 of file py-type.c.
References type::num_fields(), and typy_get_composite().
|
static |
Definition at line 870 of file py-type.c.
References cp_comp_to_string(), GDB_PY_HANDLE_EXCEPTION, lookup_lvalue_reference_type(), lookup_pointer_type(), lookup_rvalue_reference_type(), make_cv_type(), type, typy_lookup_type(), and typy_lookup_typename().
Referenced by typy_legacy_template_argument(), and typy_lookup_type().
|
static |
Definition at line 845 of file py-type.c.
References current_language, GDB_PY_HANDLE_EXCEPTION, lookup_enum(), lookup_struct(), lookup_typename(), lookup_union(), and type.
Referenced by gdbpy_lookup_type(), and typy_lookup_type().
|
static |
Definition at line 1365 of file py-type.c.
References typy_iterator_object::field, typy_iterator_object::kind, typy_iterator_object::source, type_iterator_object_type, and typy_get_composite().
Referenced by typy_fields_items(), typy_iter(), typy_iteritems(), typy_iterkeys(), and typy_itervalues().
|
static |
Definition at line 1266 of file py-type.c.
References value::allocate_optimized_out(), and value_to_value_object().
|
static |
Definition at line 620 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, lookup_pointer_type(), and type_to_type_object().
|
static |
Definition at line 640 of file py-type.c.
References type::bounds(), type::code(), dynamic_prop::const_val(), gdb_py_object_from_longest(), range_bounds::high, dynamic_prop::is_constant(), and range_bounds::low.
|
static |
Definition at line 692 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, lookup_lvalue_reference_type(), and type_to_type_object().
|
static |
Definition at line 1082 of file py-type.c.
References string_file::c_str(), code, type::code(), current_language, GDB_PY_HANDLE_EXCEPTION, host_charset(), pyty_code::name, language_defn::print_type(), pyty_codes, string_file::size(), type_object_to_type(), and type_print_raw_options.
|
static |
Definition at line 1130 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, type_object_to_type(), and types_deeply_equal().
|
static |
Definition at line 1108 of file py-type.c.
References string_file::c_str(), current_language, GDB_PY_HANDLE_EXCEPTION, host_charset(), language_defn::print_type(), string_file::size(), type_object_to_type(), and type_print_raw_options.
|
static |
Definition at line 495 of file py-type.c.
References check_typedef(), GDB_PY_HANDLE_EXCEPTION, and type_to_type_object().
|
static |
Definition at line 710 of file py-type.c.
References type::target_type(), and type_to_type_object().
|
static |
Definition at line 1001 of file py-type.c.
References symbol::aclass(), block_object_to_block(), check_typedef(), GDB_PY_HANDLE_EXCEPTION, LOC_OPTIMIZED_OUT, LOC_TYPEDEF, type::target_type(), symbol::type(), TYPE_IS_REFERENCE, TYPE_N_TEMPLATE_ARGUMENTS, TYPE_TEMPLATE_ARGUMENT, type_to_type_object(), typy_legacy_template_argument(), value_of_variable(), and value_to_value_object().
|
static |
Definition at line 762 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, make_cv_type(), and type_to_type_object().
|
static |
Definition at line 317 of file py-type.c.
References iter_values, and typy_fields_items().
|
static |
Definition at line 613 of file py-type.c.
References typy_array_1().
|
static |
Definition at line 744 of file py-type.c.
References GDB_PY_HANDLE_EXCEPTION, make_cv_type(), and type_to_type_object().
|
static |
PyTypeObject field_object_type |
Definition at line 1738 of file py-type.c.
Referenced by field_new(), gdbpy_initialize_types(), and gdbpy_is_field().
|
static |
Definition at line 85 of file py-type.c.
Referenced by gdbpy_initialize_types(), and typy_repr().
PyTypeObject type_iterator_object_type |
Definition at line 1780 of file py-type.c.
Referenced by gdbpy_initialize_types(), and typy_make_iter().
|
static |
|
static |
PyTypeObject type_object_type |
Definition at line 1689 of file py-type.c.
Referenced by gdbpy_initialize_types(), type_object_to_type(), and type_to_type_object().
|
static |
|
static |
Definition at line 1198 of file py-type.c.
Referenced by set_type(), and typy_dealloc().