|
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 "vec.h"#include "typeprint.h"#include "py-ref.h"Go to the source code of this file.
Classes | |
| struct | pyty_type_object |
| struct | pyty_field_object |
| struct | typy_iterator_object |
| struct | pyty_code |
Macros | |
| #define | ENTRY(X) { X, #X } |
Typedefs | |
| typedef struct pyty_type_object | type_object |
| typedef struct pyty_field_object | field_object |
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 PyObject * | convert_field (struct type *type, int field) |
| static PyObject * | field_name (struct type *type, int field) |
| static PyObject * | 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_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 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_str (PyObject *self) |
| static PyObject * | typy_richcompare (PyObject *self, PyObject *other, int op) |
| static void | save_objfile_types (struct objfile *objfile, void *datum) |
| 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) |
| int | gdbpy_initialize_types (void) |
Variables | |
| static struct pyty_code | pyty_codes [] |
| static const struct objfile_data * | 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 |
| typedef struct pyty_field_object field_object |
| typedef struct pyty_type_object type_object |
|
static |
Definition at line 169 of file py-type.c.
References field_is_static(), field_name(), field_new(), gdb_py_long_from_longest, gdb::ref_ptr< T, Policy >::get(), gdb::ref_ptr< T, Policy >::release(), gdb::ref_ptr< T, Policy >::reset(), TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_FIELD, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_N_BASECLASSES, and type_to_type_object().
Referenced by make_fielditem(), typy_fields(), and typy_getitem().
| 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 |
Definition at line 123 of file py-type.c.
References pyty_field_object::dict, and Py_TYPE.
|
static |
Definition at line 267 of file py-type.c.
References TYPE_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(), convert_field(), cplus_describe_child(), f_val_print(), field_name_match(), gdb_mangle_name(), get_symbol_field_type(), make_fielditem(), output_cores(), output_thread_groups(), rust_evaluate_subexp(), rust_get_disr_info(), tdesc_add_bitfield(), tdesc_add_field(), tdesc_add_typed_bitfield(), tdesc_start_enum_value(), tdesc_start_field(), write_object_renaming(), and write_selectors().
|
static |
Definition at line 132 of file py-type.c.
References field_object_type, and gdb::ref_ptr< T, Policy >::release().
Referenced by convert_field().
| int gdbpy_initialize_types | ( | void | ) |
Definition at line 1374 of file py-type.c.
References code, field_object_type, gdb_module, gdb_pymodule_addobject(), name, pyty_code::name, pyty_codes, save_objfile_types(), type_iterator_object_type, type_object_type, and typy_objfile_data_key.
Referenced by do_start_initialization().
| int gdbpy_is_field | ( | PyObject * | obj | ) |
Definition at line 151 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 1343 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 288 of file py-type.c.
References convert_field(), field_name(), gdb_assert_not_reached, gdb::ref_ptr< T, Policy >::get(), iter_items, iter_keys, iter_values, and gdb::ref_ptr< T, Policy >::release().
Referenced by typy_iterator_iternext().
|
static |
Definition at line 1028 of file py-type.c.
References copy_type_recursive(), create_copied_types_hash(), current_language, gdb_python_initialized, get_objfile_arch(), pyty_type_object::next, pyty_type_object::prev, and pyty_type_object::type.
Referenced by gdbpy_initialize_types().
|
static |
Definition at line 1060 of file py-type.c.
References pyty_type_object::next, pyty_type_object::prev, pyty_type_object::type, type, TYPE_OBJFILE, and typy_objfile_data_key.
Referenced by read_set_type(), and type_to_type_object().
| struct type* type_object_to_type | ( | PyObject * | obj | ) |
Definition at line 1332 of file py-type.c.
References type_object_type.
Referenced by bpfinishpy_pre_stop_hook(), gdbpy_get_xmethod_arg_types(), gdbpy_get_xmethod_result_type(), gdbpy_invoke_xmethod(), get_field_type(), stpy_convert_to_value(), stpy_lazy_string_elt_type(), typy_richcompare(), typy_str(), valpy_do_cast(), and value_has_field().
| PyObject* type_to_type_object | ( | struct type * | type | ) |
Definition at line 1320 of file py-type.c.
References set_type(), and type_object_type.
Referenced by bpfinishpy_init(), 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 539 of file py-type.c.
References typy_array_1().
|
static |
Definition at line 486 of file py-type.c.
References _, CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, gdb_py_int_as_long(), lookup_array_range_type(), make_vector_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
Referenced by typy_array(), and typy_vector().
|
static |
Definition at line 658 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
Definition at line 1079 of file py-type.c.
References Py_TYPE, TYPE_OBJFILE, and typy_objfile_data_key.
|
static |
Definition at line 388 of file py-type.c.
References iter_keys, and typy_fields_items().
|
static |
Definition at line 368 of file py-type.c.
References convert_field(), gdb::ref_ptr< T, Policy >::get(), iter_values, TYPE_CODE, TYPE_CODE_ARRAY, and typy_fields_items().
|
static |
Definition at line 319 of file py-type.c.
References CATCH, check_typedef(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, Py_DECREF, RETURN_MASK_ALL, TRY, 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 1171 of file py-type.c.
References typy_getitem().
|
static |
Definition at line 448 of file py-type.c.
References CATCH, check_typedef(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, TRY, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_IS_REFERENCE, and TYPE_TARGET_TYPE.
Referenced by typy_getitem(), typy_has_key(), typy_length(), and typy_make_iter().
|
static |
|
static |
Definition at line 715 of file py-type.c.
References CATCH, check_typedef(), END_CATCH, gdb_py_long_from_longest, RETURN_MASK_ALL, TRY, and TYPE_LENGTH.
|
static |
Definition at line 416 of file py-type.c.
References TYPE_TAG_NAME.
|
static |
Definition at line 1136 of file py-type.c.
References convert_field(), python_string_to_host_string(), strcmp_iw(), TYPE_FIELD_NAME, TYPE_NFIELDS, and typy_get_composite().
Referenced by typy_get().
|
static |
Definition at line 1196 of file py-type.c.
References strcmp_iw(), TYPE_FIELD_NAME, TYPE_NFIELDS, and typy_get_composite().
|
static |
Definition at line 397 of file py-type.c.
References iter_items, and typy_fields_items().
|
static |
Definition at line 1267 of file py-type.c.
References iter_keys, and typy_make_iter().
|
static |
Definition at line 1311 of file py-type.c.
References Py_DECREF, and typy_iterator_object::source.
|
static |
|
static |
Definition at line 1293 of file py-type.c.
References typy_iterator_object::field, typy_iterator_object::kind, make_fielditem(), typy_iterator_object::source, pyty_type_object::type, and TYPE_NFIELDS.
|
static |
Definition at line 1250 of file py-type.c.
References iter_items, and typy_make_iter().
|
static |
Definition at line 1258 of file py-type.c.
References iter_keys, and typy_make_iter().
|
static |
Definition at line 1275 of file py-type.c.
References iter_values, and typy_make_iter().
|
static |
Definition at line 828 of file py-type.c.
References _, CATCH, cp_demangled_name_to_comp(), END_CATCH, err, GDB_PY_HANDLE_EXCEPTION, if(), RETURN_MASK_ALL, TRY, TYPE_NAME, type_to_type_object(), and typy_lookup_type().
Referenced by typy_template_argument().
|
static |
Definition at line 1102 of file py-type.c.
References TYPE_NFIELDS, and typy_get_composite().
|
static |
Definition at line 760 of file py-type.c.
References CATCH, cp_comp_to_string(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, lookup_lvalue_reference_type(), lookup_pointer_type(), lookup_rvalue_reference_type(), make_cv_type(), RETURN_MASK_ALL, TRY, type, and typy_lookup_typename().
Referenced by typy_legacy_template_argument().
|
static |
Definition at line 734 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, lookup_enum(), lookup_struct(), lookup_typename(), lookup_union(), python_gdbarch, python_language, RETURN_MASK_ALL, startswith(), TRY, and type.
Referenced by gdbpy_lookup_type(), and typy_lookup_type().
|
static |
Definition at line 1226 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 1126 of file py-type.c.
References allocate_optimized_out_value(), and value_to_value_object().
|
static |
Definition at line 554 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, lookup_pointer_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
Definition at line 575 of file py-type.c.
References _, gdb::ref_ptr< T, Policy >::get(), gdb::ref_ptr< T, Policy >::release(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_RANGE, TYPE_CODE_STRING, TYPE_HIGH_BOUND, TYPE_INDEX_TYPE, and TYPE_LOW_BOUND.
|
static |
Definition at line 623 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, lookup_lvalue_reference_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
Definition at line 987 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, TRY, type_object_to_type(), and types_deeply_equal().
|
static |
Definition at line 965 of file py-type.c.
References string_file::c_str(), CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, host_charset(), LA_PRINT_TYPE, RETURN_MASK_ALL, string_file::size(), TRY, type_object_to_type(), and type_print_raw_options.
|
static |
Definition at line 427 of file py-type.c.
References CATCH, check_typedef(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
Definition at line 642 of file py-type.c.
References _, TYPE_TARGET_TYPE, and type_to_type_object().
|
static |
Definition at line 893 of file py-type.c.
References _, block_object_to_block(), CATCH, check_typedef(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, LOC_OPTIMIZED_OUT, LOC_TYPEDEF, RETURN_MASK_ALL, SYMBOL_CLASS, SYMBOL_TYPE, TRY, TYPE_IS_REFERENCE, TYPE_N_TEMPLATE_ARGUMENTS, TYPE_TARGET_TYPE, TYPE_TEMPLATE_ARGUMENT, type_to_type_object(), typy_legacy_template_argument(), value_of_variable(), and value_to_value_object().
|
static |
Definition at line 696 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
Definition at line 357 of file py-type.c.
References iter_values, and typy_fields_items().
|
static |
Definition at line 547 of file py-type.c.
References typy_array_1().
|
static |
Definition at line 677 of file py-type.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, and type_to_type_object().
|
static |
| PyTypeObject field_object_type |
Definition at line 1592 of file py-type.c.
Referenced by field_new(), gdbpy_initialize_types(), and gdbpy_is_field().
|
static |
Definition at line 88 of file py-type.c.
Referenced by gdbpy_initialize_types().
| PyTypeObject type_iterator_object_type |
Definition at line 1634 of file py-type.c.
Referenced by gdbpy_initialize_types(), and typy_make_iter().
|
static |
| PyTypeObject type_object_type |
Definition at line 1543 of file py-type.c.
Referenced by gdbpy_initialize_types(), type_object_to_type(), and type_to_type_object().
|
static |
|
static |
Definition at line 1025 of file py-type.c.
Referenced by gdbpy_initialize_types(), set_type(), and typy_dealloc().
1.8.14