GDB (xrefs)

Classes | Macros | Functions | Variables
scm-type.c File Reference
`#include "defs.h"`
`#include "arch-utils.h"`
`#include "value.h"`
`#include "gdbtypes.h"`
`#include "objfiles.h"`
`#include "language.h"`
`#include "vec.h"`
`#include "bcache.h"`
`#include "dwarf2loc.h"`
`#include "typeprint.h"`
`#include "guile-internal.h"`

Go to the source code of this file.

## Classes
struct | _type_smob
struct | field_smob

## Macros
#define | X(SYM) { #SYM, SYM }

## Functions
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_copy_type_recursive (void **slot, void *info)
static void | save_objfile_types (struct objfile *objfile, void *datum)
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 struct objfile_data * | tyscm_objfile_data_key
static htab_t | global_types_map
static const scheme_integer_constant | type_integer_constants []
static const scheme_function | type_functions []

## Macro Definition Documentation

## ◆ X

#define X | ( |  | SYM | ) | { #SYM, SYM }

## Function Documentation

## ◆ gdbscm_field_artificial_p()

static SCM gdbscm_field_artificial_p | ( | SCM | self | ) |
| static

Definition at line 1204 of file scm-type.c.

References FIELD_ARTIFICIAL, FUNC_NAME, tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_baseclass_p()

static SCM gdbscm_field_baseclass_p | ( | SCM | self | ) |
| static

Definition at line 1217 of file scm-type.c.

References field_smob::field_num, FUNC_NAME, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_N_BASECLASSES, tyscm_field_smob_containing_type(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_bitpos()

static SCM gdbscm_field_bitpos | ( | SCM | self | ) |
| static

Definition at line 1174 of file scm-type.c.

References _, FIELD_BITPOS, FUNC_NAME, TYPE_CODE, TYPE_CODE_ENUM, tyscm_field_smob_containing_type(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_bitsize()

static SCM gdbscm_field_bitsize | ( | SCM | self | ) |
| static

Definition at line 1191 of file scm-type.c.

References FIELD_BITPOS, FUNC_NAME, tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_enumval()

static SCM gdbscm_field_enumval | ( | SCM | self | ) |
| static

Definition at line 1157 of file scm-type.c.

References _, FIELD_ENUMVAL, FUNC_NAME, TYPE_CODE, TYPE_CODE_ENUM, tyscm_field_smob_containing_type(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_name()

static SCM gdbscm_field_name | ( | SCM | self | ) |
| static

Definition at line 1126 of file scm-type.c.

References FIELD_NAME, FUNC_NAME, gdbscm_scm_from_c_string(), tyscm_field_smob_to_field(), and tyscm_get_field_smob_arg_unsafe().

## ◆ gdbscm_field_p()

static SCM gdbscm_field_p | ( | SCM | self | ) |
| static

Definition at line 456 of file scm-type.c.

References tyscm_is_field().

## ◆ gdbscm_field_type()

static SCM gdbscm_field_type | ( | SCM | self | ) |
| static

Definition at line 1141 of file scm-type.c.

References FIELD_TYPE, FUNC_NAME, tyscm_field_smob_to_field(), tyscm_get_field_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_initialize_types()

void gdbscm_initialize_types | ( | void |  | ) |

Definition at line 1483 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, save_objfile_types(), 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_objfile_data_key, tyscm_print_field_smob(), and tyscm_print_type_smob().

## ◆ gdbscm_lookup_type()

static SCM gdbscm_lookup_type | ( | SCM | name_scm,
|  | SCM | rest
| ) |  |
| static

Definition at line 1263 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().

## ◆ gdbscm_make_field_iterator()

static SCM gdbscm_make_field_iterator | ( | SCM | self | ) |
| static

Definition at line 1056 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().

## ◆ gdbscm_type_array()

static SCM gdbscm_type_array | ( | SCM | self,
|  | SCM | n1,
|  | SCM | n2
| ) |  |
| static

Definition at line 753 of file scm-type.c.

References FUNC_NAME, and tyscm_array_1().

## ◆ gdbscm_type_code()

static SCM gdbscm_type_code | ( | SCM | self | ) |
| static

Definition at line 527 of file scm-type.c.

References FUNC_NAME, _type_smob::type, TYPE_CODE, and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_const()

static SCM gdbscm_type_const | ( | SCM | self | ) |
| static

Definition at line 878 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_field()

static SCM gdbscm_type_field | ( | SCM | self,
|  | SCM | field_scm
| ) |  |
| static

Definition at line 967 of file scm-type.c.

References _, do_cleanups(), FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_scm_to_c_string(), make_cleanup(), not_composite_error, strcmp_iw(), _type_smob::type, TYPE_FIELD_NAME, TYPE_NFIELDS, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), tyscm_make_field_smob(), and xfree().

## ◆ gdbscm_type_fields()

static SCM gdbscm_type_fields | ( | SCM | self | ) |
| static

Definition at line 542 of file scm-type.c.

References _, FUNC_NAME, gdbscm_out_of_range_error(), not_composite_error, _type_smob::type, TYPE_NFIELDS, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), tyscm_make_field_smob(), and tyscm_scm_from_type().

## ◆ gdbscm_type_has_field_p()

static SCM gdbscm_type_has_field_p | ( | SCM | self,
|  | SCM | field_scm
| ) |  |
| static

Definition at line 1012 of file scm-type.c.

References _, do_cleanups(), FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_scm_to_c_string(), make_cleanup(), not_composite_error, strcmp_iw(), _type_smob::type, TYPE_FIELD_NAME, TYPE_NFIELDS, tyscm_get_composite(), tyscm_get_type_smob_arg_unsafe(), and xfree().

## ◆ gdbscm_type_name()

static SCM gdbscm_type_name | ( | SCM | self | ) |
| static

Definition at line 589 of file scm-type.c.

References FUNC_NAME, gdbscm_scm_from_c_string(), _type_smob::type, TYPE_NAME, and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_next_field_x()

static SCM gdbscm_type_next_field_x | ( | SCM | self | ) |
| static

Definition at line 1087 of file scm-type.c.

References _, 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_smob::type, type, TYPE_NFIELDS, type_smob_name, tyscm_is_type(), and tyscm_make_field_smob().

Referenced by gdbscm_initialize_types().

## ◆ gdbscm_type_num_fields()

static SCM gdbscm_type_num_fields | ( | SCM | self | ) |
| static

Definition at line 949 of file scm-type.c.

References _, FUNC_NAME, gdbscm_out_of_range_error(), not_composite_error, _type_smob::type, TYPE_NFIELDS, tyscm_get_composite(), and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_p()

static SCM gdbscm_type_p | ( | SCM | self | ) |
| static

Definition at line 280 of file scm-type.c.

References tyscm_is_type().

## ◆ gdbscm_type_pointer()

static SCM gdbscm_type_pointer | ( | SCM | self | ) |
| static

Definition at line 778 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, lookup_pointer_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_print_name()

static SCM gdbscm_type_print_name | ( | SCM | self | ) |
| static

Definition at line 605 of file scm-type.c.

References FUNC_NAME, gdbscm_scm_from_c_string(), string, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_type_name().

## ◆ gdbscm_type_range()

static SCM gdbscm_type_range | ( | SCM | self | ) |
| static

Definition at line 803 of file scm-type.c.

References _, FUNC_NAME, gdbscm_scm_from_longest(), _type_smob::type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_RANGE, TYPE_CODE_STRING, TYPE_HIGH_BOUND, TYPE_INDEX_TYPE, TYPE_LOW_BOUND, and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_reference()

static SCM gdbscm_type_reference | ( | SCM | self | ) |
| static

Definition at line 840 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, lookup_lvalue_reference_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_sizeof()

static SCM gdbscm_type_sizeof | ( | SCM | self | ) |
| static

Definition at line 620 of file scm-type.c.

References CATCH, check_typedef(), END_CATCH, FUNC_NAME, RETURN_MASK_ALL, TRY, _type_smob::type, TYPE_LENGTH, and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_strip_typedefs()

static SCM gdbscm_type_strip_typedefs | ( | SCM | self | ) |
| static

Definition at line 644 of file scm-type.c.

References CATCH, check_typedef(), END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_tag()

static SCM gdbscm_type_tag | ( | SCM | self | ) |
| static

Definition at line 574 of file scm-type.c.

References FUNC_NAME, gdbscm_scm_from_c_string(), _type_smob::type, TYPE_TAG_NAME, and tyscm_get_type_smob_arg_unsafe().

## ◆ gdbscm_type_target()

static SCM gdbscm_type_target | ( | SCM | self | ) |
| static

Definition at line 863 of file scm-type.c.

References FUNC_NAME, _type_smob::type, TYPE_TARGET_TYPE, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_unqualified()

static SCM gdbscm_type_unqualified | ( | SCM | self | ) |
| static

Definition at line 924 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ gdbscm_type_vector()

static SCM gdbscm_type_vector | ( | SCM | self,
|  | SCM | n1,
|  | SCM | n2
| ) |  |
| static

Definition at line 769 of file scm-type.c.

References FUNC_NAME, and tyscm_array_1().

## ◆ gdbscm_type_volatile()

static SCM gdbscm_type_volatile | ( | SCM | self | ) |
| static

Definition at line 901 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, make_cv_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

## ◆ save_objfile_types()

static void save_objfile_types | ( | struct objfile * | objfile,
|  | void * | datum
| ) |  |
| static

Definition at line 388 of file scm-type.c.

References create_copied_types_hash(), gdb_scheme_initialized, and tyscm_copy_type_recursive().

Referenced by gdbscm_initialize_types().

## ◆ tyscm_array_1()

static SCM tyscm_array_1 | ( | SCM | self,
|  | SCM | n1_scm,
|  | SCM | n2_scm,
|  | int | is_vector,
|  | const char * | func_name
| ) |  |
| static

Definition at line 701 of file scm-type.c.

References _, CATCH, END_CATCH, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_out_of_range_error(), gdbscm_parse_function_args(), lookup_array_range_type(), make_vector_type(), RETURN_MASK_ALL, TRY, _type_smob::type, tyscm_get_type_smob_arg_unsafe(), and tyscm_scm_from_type().

Referenced by gdbscm_type_array(), and gdbscm_type_vector().

## ◆ tyscm_copy_type_recursive()

static int tyscm_copy_type_recursive | ( | void ** | slot,
|  | void * | info
| ) |  |
| static

Definition at line 352 of file scm-type.c.

References _type_smob::base, copy_type_recursive(), gdb_assert, gdbscm_fill_eqable_gsmob_ptr_slot(), gdbscm_find_eqable_gsmob_ptr_slot(), _type_smob::type, TYPE_OBJFILE, and tyscm_type_map().

Referenced by save_objfile_types().

## ◆ tyscm_eq_type_smob()

static int tyscm_eq_type_smob | ( | const void * | ap,
|  | const void * | bp
| ) |  |
| static

Definition at line 140 of file scm-type.c.

References bp, and _type_smob::type.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

## ◆ tyscm_equal_p_type_smob()

static SCM tyscm_equal_p_type_smob | ( | SCM | type1_scm,
|  | SCM | type2_scm
| ) |  |
| static

Definition at line 223 of file scm-type.c.

References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, _type_smob::type, type_smob_name, types_deeply_equal(), and tyscm_is_type().

Referenced by gdbscm_initialize_types().

## ◆ tyscm_field_smob_containing_type()

static struct type* tyscm_field_smob_containing_type | ( | field_smob * | f_smob | ) |
| static

Definition at line 498 of file scm-type.c.

References gdb_assert, _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().

## ◆ tyscm_field_smob_to_field()

static struct field* tyscm_field_smob_to_field | ( | field_smob * | f_smob | ) |
| static

Definition at line 511 of file scm-type.c.

References field_smob::field_num, gdb_assert, TYPE_FIELD, TYPE_FIELDS, and tyscm_field_smob_containing_type().

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().

## ◆ tyscm_free_type_smob()

static size_t tyscm_free_type_smob | ( | SCM | self | ) |
| static

Definition at line 177 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().

## ◆ tyscm_get_composite()

static struct type * tyscm_get_composite | ( | struct type * | type | ) |
| static

Definition at line 667 of file scm-type.c.

References CATCH, check_typedef(), END_CATCH, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_TARGET_TYPE.

Referenced by gdbscm_make_field_iterator(), gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_has_field_p(), and gdbscm_type_num_fields().

## ◆ tyscm_get_field_arg_unsafe()

static SCM tyscm_get_field_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 474 of file scm-type.c.

References field_smob_name, and tyscm_is_field().

Referenced by tyscm_get_field_smob_arg_unsafe().

## ◆ tyscm_get_field_smob_arg_unsafe()

static field_smob* tyscm_get_field_smob_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 486 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().

## ◆ tyscm_get_type_arg_unsafe()

static SCM tyscm_get_type_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 316 of file scm-type.c.

References type_smob_name, and tyscm_is_type().

Referenced by tyscm_get_type_smob_arg_unsafe().

## ◆ 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 328 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().

## ◆ tyscm_hash_type_smob()

static hashval_t tyscm_hash_type_smob | ( | const void * | p | ) |
| static

Definition at line 130 of file scm-type.c.

References _type_smob::type.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

## ◆ tyscm_is_field()

static int tyscm_is_field | ( | SCM | self | ) |
| static

Definition at line 448 of file scm-type.c.

References field_smob_tag.

Referenced by gdbscm_field_p(), and tyscm_get_field_arg_unsafe().

## ◆ tyscm_is_type()

int tyscm_is_type | ( | SCM | self | ) |

Definition at line 272 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().

## ◆ tyscm_lookup_typename()

static struct type* tyscm_lookup_typename | ( | const char * | type_name,
|  | const struct block * | block
| ) |  |
| static

Definition at line 1234 of file scm-type.c.

References CATCH, current_language, END_CATCH, get_current_arch(), lookup_enum(), lookup_struct(), lookup_typename(), lookup_union(), RETURN_MASK_ALL, startswith(), TRY, and type.

Referenced by gdbscm_lookup_type().

## ◆ tyscm_make_field_smob()

static SCM tyscm_make_field_smob | ( | SCM | type_scm,
|  | int | field_num
| ) |  |
| static

Definition at line 431 of file scm-type.c.

References 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().

## ◆ tyscm_make_type_smob()

static SCM tyscm_make_type_smob | ( | void |  | ) |
| static

Definition at line 254 of file scm-type.c.

References gdbscm_init_eqable_gsmob(), scm_new_smob(), _type_smob::type, type_smob_name, and type_smob_tag.

Referenced by tyscm_scm_from_type().

## ◆ tyscm_print_field_smob()

static int tyscm_print_field_smob | ( | SCM | self,
|  | SCM | port,
|  | scm_print_state * | pstate
| ) |  |
| static

Definition at line 412 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().

## ◆ tyscm_print_type_smob()

static int tyscm_print_type_smob | ( | SCM | self,
|  | SCM | port,
|  | scm_print_state * | pstate
| ) |  |
| static

Definition at line 197 of file scm-type.c.

References gdbscm_printf(), name, pstate, string, _type_smob::type, type_smob_name, and tyscm_type_name().

Referenced by gdbscm_initialize_types().

## ◆ tyscm_scm_from_field()

SCM tyscm_scm_from_field | ( | SCM | type_scm,
|  | int | field_num
| ) |  |

Definition at line 465 of file scm-type.c.

References tyscm_make_field_smob().

## ◆ tyscm_scm_from_type()

SCM tyscm_scm_from_type | ( | struct type * | type | ) |

Definition at line 289 of file scm-type.c.

References _type_smob::base, gdbscm_fill_eqable_gsmob_ptr_slot(), gdbscm_find_eqable_gsmob_ptr_slot(), _type_smob::type, 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().

## ◆ tyscm_scm_to_type()

struct type* tyscm_scm_to_type | ( | SCM | t_scm | ) |

Definition at line 340 of file scm-type.c.

References gdb_assert, _type_smob::type, and tyscm_is_type().

Referenced by lsscm_elt_type(), and lsscm_safe_lazy_string_to_value().

## ◆ tyscm_type_map()

static htab_t tyscm_type_map | ( | struct type * | type | ) |
| static

Definition at line 155 of file scm-type.c.

References gdbscm_create_eqable_gsmob_ptr_map(), global_types_map, TYPE_OBJFILE, 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().

## ◆ tyscm_type_name()

static std::string tyscm_type_name | ( | struct type * | type | ) |
| static

Definition at line 106 of file scm-type.c.

References CATCH, END_CATCH, gdb_assert_not_reached, gdbscm_scm_from_gdb_exception(), gdbscm_throw(), LA_PRINT_TYPE, RETURN_MASK_ALL, string_file::string(), TRY, and type_print_raw_options.

Referenced by gdbscm_type_print_name(), and tyscm_print_type_smob().

## ◆ tyscm_type_smob_type()

struct type* tyscm_type_smob_type | ( | type_smob * | t_smob | ) |

Definition at line 97 of file scm-type.c.

References _type_smob::type.

Referenced by gdbscm_make_lazy_value(), gdbscm_make_value(), and vlscm_do_cast().

## Variable Documentation

## ◆ block_keyword

SCM block_keyword
| static

Definition at line 84 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and gdbscm_lookup_type().

## ◆ field_smob_name

const char field_smob_name[] = "gdb:field"
| static

Definition at line 69 of file scm-type.c.

Referenced by gdbscm_initialize_types(), tyscm_get_field_arg_unsafe(), tyscm_make_field_smob(), and tyscm_print_field_smob().

## ◆ field_smob_tag

scm_t_bits field_smob_tag
| static

Definition at line 78 of file scm-type.c.

Referenced by gdbscm_initialize_types(), tyscm_is_field(), and tyscm_make_field_smob().

## ◆ global_types_map

htab_t global_types_map
| static

Definition at line 89 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

## ◆ not_composite_error

const char not_composite_error[]
| static

Initial value:
=
N_("type is not a structure, union, or enum type")
N_
#define N_(String)
Definition: gdb_locale.h:36

Definition at line 71 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().

## ◆ type_functions

const scheme_function type_functions[]
| static

Definition at line 1333 of file scm-type.c.

Referenced by gdbscm_initialize_types().

## ◆ type_integer_constants

const scheme_integer_constant type_integer_constants[]
| static

Definition at line 1299 of file scm-type.c.

Referenced by gdbscm_initialize_types().

## ◆ type_smob_name

const char type_smob_name[] = "gdb:type"
| static

Definition at line 68 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().

## ◆ type_smob_tag

scm_t_bits type_smob_tag
| static

Definition at line 75 of file scm-type.c.

Referenced by gdbscm_initialize_types(), tyscm_is_type(), and tyscm_make_type_smob().

## ◆ tyscm_next_field_x_proc

SCM tyscm_next_field_x_proc
| static

Definition at line 81 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and gdbscm_make_field_iterator().

## ◆ tyscm_objfile_data_key

const struct objfile_data* tyscm_objfile_data_key
| static

Definition at line 86 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().