GDB (xrefs)
|
#include "defs.h"
#include "top.h"
#include "arch-utils.h"
#include "value.h"
#include "gdbtypes.h"
#include "objfiles.h"
#include "language.h"
#include "bcache.h"
#include "dwarf2/loc.h"
#include "typeprint.h"
#include "guile-internal.h"
#include "type-codes.def"
Go to the source code of this file.
Classes | |
struct | type_smob |
struct | field_smob |
struct | tyscm_deleter |
Macros | |
#define | OP(SYM) { #SYM, SYM }, |
Functions | |
static int | tyscm_copy_type_recursive (void **slot, void *info) |
static struct type * | tyscm_get_composite (struct type *type) |
struct type * | tyscm_type_smob_type (type_smob *t_smob) |
static std::string | tyscm_type_name (struct type *type) |
static hashval_t | tyscm_hash_type_smob (const void *p) |
static int | tyscm_eq_type_smob (const void *ap, const void *bp) |
static htab_t | tyscm_type_map (struct type *type) |
static size_t | tyscm_free_type_smob (SCM self) |
static int | tyscm_print_type_smob (SCM self, SCM port, scm_print_state *pstate) |
static SCM | tyscm_equal_p_type_smob (SCM type1_scm, SCM type2_scm) |
static SCM | tyscm_make_type_smob (void) |
int | tyscm_is_type (SCM self) |
static SCM | gdbscm_type_p (SCM self) |
SCM | tyscm_scm_from_type (struct type *type) |
static SCM | tyscm_get_type_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
type_smob * | tyscm_get_type_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
struct type * | tyscm_scm_to_type (SCM t_scm) |
static int | tyscm_print_field_smob (SCM self, SCM port, scm_print_state *pstate) |
static SCM | tyscm_make_field_smob (SCM type_scm, int field_num) |
static int | tyscm_is_field (SCM self) |
static SCM | gdbscm_field_p (SCM self) |
SCM | tyscm_scm_from_field (SCM type_scm, int field_num) |
static SCM | tyscm_get_field_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
static field_smob * | tyscm_get_field_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
static struct type * | tyscm_field_smob_containing_type (field_smob *f_smob) |
static struct field * | tyscm_field_smob_to_field (field_smob *f_smob) |
static SCM | gdbscm_type_code (SCM self) |
static SCM | gdbscm_type_fields (SCM self) |
static SCM | gdbscm_type_tag (SCM self) |
static SCM | gdbscm_type_name (SCM self) |
static SCM | gdbscm_type_print_name (SCM self) |
static SCM | gdbscm_type_sizeof (SCM self) |
static SCM | gdbscm_type_strip_typedefs (SCM self) |
static SCM | tyscm_array_1 (SCM self, SCM n1_scm, SCM n2_scm, int is_vector, const char *func_name) |
static SCM | gdbscm_type_array (SCM self, SCM n1, SCM n2) |
static SCM | gdbscm_type_vector (SCM self, SCM n1, SCM n2) |
static SCM | gdbscm_type_pointer (SCM self) |
static SCM | gdbscm_type_range (SCM self) |
static SCM | gdbscm_type_reference (SCM self) |
static SCM | gdbscm_type_target (SCM self) |
static SCM | gdbscm_type_const (SCM self) |
static SCM | gdbscm_type_volatile (SCM self) |
static SCM | gdbscm_type_unqualified (SCM self) |
static SCM | gdbscm_type_num_fields (SCM self) |
static SCM | gdbscm_type_field (SCM self, SCM field_scm) |
static SCM | gdbscm_type_has_field_p (SCM self, SCM field_scm) |
static SCM | gdbscm_make_field_iterator (SCM self) |
static SCM | gdbscm_type_next_field_x (SCM self) |
static SCM | gdbscm_field_name (SCM self) |
static SCM | gdbscm_field_type (SCM self) |
static SCM | gdbscm_field_enumval (SCM self) |
static SCM | gdbscm_field_bitpos (SCM self) |
static SCM | gdbscm_field_bitsize (SCM self) |
static SCM | gdbscm_field_artificial_p (SCM self) |
static SCM | gdbscm_field_baseclass_p (SCM self) |
static struct type * | tyscm_lookup_typename (const char *type_name, const struct block *block) |
static SCM | gdbscm_lookup_type (SCM name_scm, SCM rest) |
void | gdbscm_initialize_types (void) |
Variables | |
static const char | type_smob_name [] = "gdb:type" |
static const char | field_smob_name [] = "gdb:field" |
static const char | not_composite_error [] |
static scm_t_bits | type_smob_tag |
static scm_t_bits | field_smob_tag |
static SCM | tyscm_next_field_x_proc |
static SCM | block_keyword |
static const registry< objfile >::key< htab, tyscm_deleter > | tyscm_objfile_data_key |
static htab_t | global_types_map |
static const scheme_integer_constant | type_integer_constants [] |
static const scheme_function | type_functions [] |
#define OP | ( | SYM | ) | { #SYM, SYM }, |
|
static |
Definition at line 1210 of file scm-type.c.
References FUNC_NAME, field::is_artificial(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 1223 of file scm-type.c.
References type::code(), field_smob::field_num, FUNC_NAME, TYPE_N_BASECLASSES, tyscm_field_smob_containing_type(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 1180 of file scm-type.c.
References type::code(), FUNC_NAME, field::loc_bitpos(), tyscm_field_smob_containing_type(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 1197 of file scm-type.c.
References FUNC_NAME, field::loc_bitpos(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 1163 of file scm-type.c.
References type::code(), FUNC_NAME, field::loc_enumval(), tyscm_field_smob_containing_type(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 1132 of file scm-type.c.
References FUNC_NAME, gdbscm_scm_from_c_string(), field::name(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 455 of file scm-type.c.
References tyscm_is_field().
|
static |
Definition at line 1147 of file scm-type.c.
References FUNC_NAME, field::type(), tyscm_field_smob_to_field(), tyscm_get_field_smob_arg_unsafe(), and tyscm_scm_from_type().
void gdbscm_initialize_types | ( | void | ) |
Definition at line 1465 of file scm-type.c.
References as_a_scm_t_subr(), block_keyword, field_smob_name, field_smob_tag, gdbscm_create_eqable_gsmob_ptr_map(), gdbscm_define_functions(), gdbscm_define_integer_constants(), gdbscm_documentation_symbol, gdbscm_make_smob_type(), gdbscm_scm_from_c_string(), gdbscm_type_next_field_x(), global_types_map, type_functions, type_integer_constants, type_smob_name, type_smob_tag, tyscm_eq_type_smob(), tyscm_equal_p_type_smob(), tyscm_free_type_smob(), tyscm_hash_type_smob(), tyscm_next_field_x_proc, tyscm_print_field_smob(), and tyscm_print_type_smob().
|
static |
Definition at line 1267 of file scm-type.c.
References bkscm_scm_to_block(), block_keyword, FUNC_NAME, gdbscm_parse_function_args(), gdbscm_throw(), name, type, tyscm_lookup_typename(), tyscm_scm_from_type(), and xfree().
|
static |
Definition at line 1062 of file scm-type.c.
References FUNC_NAME, gdbscm_make_iterator(), gdbscm_out_of_range_error(), not_composite_error, type_smob::type, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), tyscm_next_field_x_proc, and tyscm_scm_from_type().
|
static |
Definition at line 760 of file scm-type.c.
References FUNC_NAME, n1, n2, and tyscm_array_1().
|
static |
Definition at line 526 of file scm-type.c.
References type::code(), FUNC_NAME, type_smob::type, and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 891 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 983 of file scm-type.c.
References type::field(), FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_scm_to_c_string(), field::name(), not_composite_error, type::num_fields(), strcmp_iw(), type_smob::type, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), and tyscm_make_field_smob().
|
static |
Definition at line 541 of file scm-type.c.
References FUNC_NAME, gdbscm_out_of_range_error(), not_composite_error, type::num_fields(), type_smob::type, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), tyscm_make_field_smob(), and tyscm_scm_from_type().
|
static |
Definition at line 1024 of file scm-type.c.
References type::field(), FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_scm_to_c_string(), field::name(), not_composite_error, type::num_fields(), strcmp_iw(), type_smob::type, tyscm_get_composite(), and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 594 of file scm-type.c.
References FUNC_NAME, gdbscm_scm_from_c_string(), type::name(), type_smob::type, and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 1093 of file scm-type.c.
References type::field(), FUNC_NAME, gdbscm_end_of_iteration(), itscm_get_iterator_arg_unsafe(), itscm_iterator_smob_object(), itscm_iterator_smob_progress(), itscm_set_iterator_smob_progress_x(), type::num_fields(), type, type_smob::type, type_smob_name, tyscm_is_type(), and tyscm_make_field_smob().
Referenced by gdbscm_initialize_types().
|
static |
Definition at line 965 of file scm-type.c.
References FUNC_NAME, gdbscm_out_of_range_error(), not_composite_error, type::num_fields(), type_smob::type, tyscm_get_composite(), and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 304 of file scm-type.c.
References tyscm_is_type().
|
static |
Definition at line 785 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, lookup_pointer_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 610 of file scm-type.c.
References FUNC_NAME, gdbscm_scm_from_c_string(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_type_name().
|
static |
Definition at line 811 of file scm-type.c.
References type::bounds(), type::code(), dynamic_prop::const_val(), FUNC_NAME, gdbscm_scm_from_longest(), range_bounds::high, dynamic_prop::is_constant(), range_bounds::low, type_smob::type, and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 852 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, lookup_lvalue_reference_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 625 of file scm-type.c.
References check_typedef(), FUNC_NAME, type::length(), type_smob::type, and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 648 of file scm-type.c.
References check_typedef(), FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 573 of file scm-type.c.
References type::code(), FUNC_NAME, gdbscm_scm_from_c_string(), type::name(), type_smob::type, and tyscm_get_type_smob_arg_unsafe().
|
static |
Definition at line 876 of file scm-type.c.
References FUNC_NAME, type::target_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().
|
static |
Definition at line 939 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 776 of file scm-type.c.
References FUNC_NAME, n1, n2, and tyscm_array_1().
|
static |
Definition at line 915 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
|
static |
Definition at line 707 of file scm-type.c.
References GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_out_of_range_error(), gdbscm_parse_function_args(), type::is_vector(), lookup_array_range_type(), make_vector_type(), n1, n2, type_smob::type, tyscm_get_type_smob_arg_unsafe(), tyscm_scm_from_type(), and unpack().
Referenced by gdbscm_type_array(), and gdbscm_type_vector().
|
static |
Definition at line 376 of file scm-type.c.
References type_smob::base, copy_type_recursive(), gdbscm_fill_eqable_gsmob_ptr_slot(), gdbscm_find_eqable_gsmob_ptr_slot(), type_smob::type, and tyscm_type_map().
Referenced by tyscm_deleter::operator()().
|
static |
Definition at line 163 of file scm-type.c.
References bp, and type_smob::type.
Referenced by gdbscm_initialize_types(), and tyscm_type_map().
|
static |
Definition at line 246 of file scm-type.c.
References FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, type_smob::type, type_smob_name, types_deeply_equal(), tyscm_is_type(), and unpack().
Referenced by gdbscm_initialize_types().
|
static |
Definition at line 497 of file scm-type.c.
References type_smob::type, field_smob::type_scm, and tyscm_is_type().
Referenced by gdbscm_field_baseclass_p(), gdbscm_field_bitpos(), gdbscm_field_enumval(), and tyscm_field_smob_to_field().
|
static |
Definition at line 510 of file scm-type.c.
References type::field(), field_smob::field_num, type::fields(), and tyscm_field_smob_containing_type().
Referenced by gdbscm_field_artificial_p(), gdbscm_field_bitpos(), gdbscm_field_bitsize(), gdbscm_field_enumval(), gdbscm_field_name(), and gdbscm_field_type().
|
static |
Definition at line 200 of file scm-type.c.
References type_smob::base, gdbscm_clear_eqable_gsmob_ptr_slot(), type_smob::type, and tyscm_type_map().
Referenced by gdbscm_initialize_types().
Definition at line 672 of file scm-type.c.
References check_typedef(), type::code(), GDBSCM_HANDLE_GDB_EXCEPTION, type::target_type(), type, and unpack().
Referenced by gdbscm_make_field_iterator(), gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_has_field_p(), and gdbscm_type_num_fields().
|
static |
Definition at line 473 of file scm-type.c.
References field_smob_name, and tyscm_is_field().
Referenced by tyscm_get_field_smob_arg_unsafe().
|
static |
Definition at line 485 of file scm-type.c.
References tyscm_get_field_arg_unsafe().
Referenced by gdbscm_field_artificial_p(), gdbscm_field_baseclass_p(), gdbscm_field_bitpos(), gdbscm_field_bitsize(), gdbscm_field_enumval(), gdbscm_field_name(), and gdbscm_field_type().
|
static |
Definition at line 340 of file scm-type.c.
References type_smob_name, and tyscm_is_type().
Referenced by tyscm_get_type_smob_arg_unsafe().
type_smob * tyscm_get_type_smob_arg_unsafe | ( | SCM | self, |
int | arg_pos, | ||
const char * | func_name ) |
Definition at line 352 of file scm-type.c.
References tyscm_get_type_arg_unsafe().
Referenced by gdbscm_make_field_iterator(), gdbscm_make_lazy_value(), gdbscm_make_value(), gdbscm_type_code(), gdbscm_type_const(), gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_has_field_p(), gdbscm_type_name(), gdbscm_type_num_fields(), gdbscm_type_pointer(), gdbscm_type_print_name(), gdbscm_type_range(), gdbscm_type_reference(), gdbscm_type_sizeof(), gdbscm_type_strip_typedefs(), gdbscm_type_tag(), gdbscm_type_target(), gdbscm_type_unqualified(), gdbscm_type_volatile(), tyscm_array_1(), and vlscm_do_cast().
|
static |
Definition at line 153 of file scm-type.c.
References type_smob::type.
Referenced by gdbscm_initialize_types(), and tyscm_type_map().
|
static |
Definition at line 447 of file scm-type.c.
References field_smob_tag.
Referenced by gdbscm_field_p(), and tyscm_get_field_arg_unsafe().
int tyscm_is_type | ( | SCM | self | ) |
Definition at line 296 of file scm-type.c.
References type_smob_tag.
Referenced by gdbscm_type_next_field_x(), gdbscm_type_p(), tyscm_equal_p_type_smob(), tyscm_field_smob_containing_type(), tyscm_get_type_arg_unsafe(), and tyscm_scm_to_type().
|
static |
Definition at line 1239 of file scm-type.c.
References current_language, lookup_enum(), lookup_struct(), lookup_typename(), lookup_union(), and type.
Referenced by gdbscm_lookup_type().
|
static |
Definition at line 430 of file scm-type.c.
References field_smob::base, field_smob::field_num, field_smob_name, field_smob_tag, gdbscm_init_gsmob(), scm_new_smob(), and field_smob::type_scm.
Referenced by gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_next_field_x(), and tyscm_scm_from_field().
|
static |
Definition at line 278 of file scm-type.c.
References type_smob::base, gdbscm_init_eqable_gsmob(), scm_new_smob(), type_smob::type, type_smob_name, and type_smob_tag.
Referenced by tyscm_scm_from_type().
|
static |
Definition at line 411 of file scm-type.c.
References field_smob::field_num, field_smob_name, gdbscm_printf(), and field_smob::type_scm.
Referenced by gdbscm_initialize_types().
|
static |
Definition at line 220 of file scm-type.c.
References gdbscm_printf(), name, pstate, type_smob::type, type_smob_name, and tyscm_type_name().
Referenced by gdbscm_initialize_types().
SCM tyscm_scm_from_field | ( | SCM | type_scm, |
int | field_num ) |
Definition at line 464 of file scm-type.c.
References tyscm_make_field_smob().
SCM tyscm_scm_from_type | ( | struct type * | type | ) |
Definition at line 313 of file scm-type.c.
References type_smob::base, gdbscm_fill_eqable_gsmob_ptr_slot(), gdbscm_find_eqable_gsmob_ptr_slot(), type, type_smob::type, tyscm_make_type_smob(), and tyscm_type_map().
Referenced by gdbscm_arch_bool_type(), gdbscm_arch_char_type(), gdbscm_arch_double_type(), gdbscm_arch_float_type(), gdbscm_arch_int16_type(), gdbscm_arch_int32_type(), gdbscm_arch_int64_type(), gdbscm_arch_int8_type(), gdbscm_arch_int_type(), gdbscm_arch_long_type(), gdbscm_arch_longdouble_type(), gdbscm_arch_longlong_type(), gdbscm_arch_schar_type(), gdbscm_arch_short_type(), gdbscm_arch_uchar_type(), gdbscm_arch_uint16_type(), gdbscm_arch_uint32_type(), gdbscm_arch_uint64_type(), gdbscm_arch_uint8_type(), gdbscm_arch_uint_type(), gdbscm_arch_ulong_type(), gdbscm_arch_ulonglong_type(), gdbscm_arch_ushort_type(), gdbscm_arch_void_type(), gdbscm_field_type(), gdbscm_lookup_type(), gdbscm_make_field_iterator(), gdbscm_symbol_type(), gdbscm_type_const(), gdbscm_type_fields(), gdbscm_type_pointer(), gdbscm_type_reference(), gdbscm_type_strip_typedefs(), gdbscm_type_target(), gdbscm_type_unqualified(), gdbscm_type_volatile(), gdbscm_value_dynamic_type(), gdbscm_value_type(), lsscm_make_lazy_string_smob(), and tyscm_array_1().
struct type * tyscm_scm_to_type | ( | SCM | t_scm | ) |
Definition at line 364 of file scm-type.c.
References type_smob::type, and tyscm_is_type().
Referenced by lsscm_elt_type(), and lsscm_safe_lazy_string_to_value().
|
static |
Definition at line 178 of file scm-type.c.
References gdbscm_create_eqable_gsmob_ptr_map(), registry< T >::get(), global_types_map, type::objfile_owner(), registry< T >::set(), tyscm_eq_type_smob(), tyscm_hash_type_smob(), and tyscm_objfile_data_key.
Referenced by tyscm_copy_type_recursive(), tyscm_free_type_smob(), and tyscm_scm_from_type().
|
static |
Definition at line 125 of file scm-type.c.
References current_language, gdbscm_scm_from_gdb_exception(), gdbscm_throw(), language_defn::print_type(), quit_force(), string_file::release(), type_print_raw_options, and unpack().
Referenced by gdbscm_type_print_name(), and tyscm_print_type_smob().
Definition at line 116 of file scm-type.c.
References type_smob::type.
Referenced by gdbscm_make_lazy_value(), gdbscm_make_value(), and vlscm_do_cast().
|
static |
Definition at line 83 of file scm-type.c.
Referenced by gdbscm_initialize_types(), and gdbscm_lookup_type().
|
static |
Definition at line 68 of file scm-type.c.
Referenced by gdbscm_initialize_types(), tyscm_get_field_arg_unsafe(), tyscm_make_field_smob(), and tyscm_print_field_smob().
|
static |
Definition at line 77 of file scm-type.c.
Referenced by gdbscm_initialize_types(), tyscm_is_field(), and tyscm_make_field_smob().
|
static |
Definition at line 108 of file scm-type.c.
Referenced by gdbscm_initialize_types(), and tyscm_type_map().
|
static |
Definition at line 70 of file scm-type.c.
Referenced by gdbscm_make_field_iterator(), gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_has_field_p(), and gdbscm_type_num_fields().
|
static |
Definition at line 1315 of file scm-type.c.
Referenced by gdbscm_initialize_types().
|
static |
Definition at line 1303 of file scm-type.c.
Referenced by gdbscm_initialize_types().
|
static |
Definition at line 67 of file scm-type.c.
Referenced by gdbscm_initialize_types(), gdbscm_type_next_field_x(), tyscm_equal_p_type_smob(), tyscm_get_type_arg_unsafe(), tyscm_make_type_smob(), and tyscm_print_type_smob().
|
static |
Definition at line 74 of file scm-type.c.
Referenced by gdbscm_initialize_types(), tyscm_is_type(), and tyscm_make_type_smob().
|
static |
Definition at line 80 of file scm-type.c.
Referenced by gdbscm_initialize_types(), and gdbscm_make_field_iterator().
|
static |
Definition at line 105 of file scm-type.c.
Referenced by tyscm_type_map().