50#undef scm_make_smob_type
59 uintptr_t v = (uintptr_t) item;
69 return item_lhs == item_rhs;
81 gdb_assert (*slot == NULL);
82 *slot = (
void *) gsmob_code;
109#if SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION == 0
112 SCM bound_name = scm_string_append (scm_list_3 (scm_from_latin1_string (
"<"),
113 scm_from_latin1_string (
name),
114 scm_from_latin1_string (
">")));
115 bound_name = scm_string_to_symbol (bound_name);
116 SCM smob_type = scm_public_ref (scm_list_2 (scm_from_latin1_symbol (
"oop"),
117 scm_from_latin1_symbol (
"goops")),
119#elif SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION == 1 && SCM_MICRO_VERSION == 0
124# error "Unsupported Guile version"
127 SCM smob_type = scm_smob_type_class (result);
130 SCM smob_type_name = scm_class_name (smob_type);
131 scm_define (smob_type_name, smob_type);
132 scm_module_export (scm_current_module (), scm_list_1 (smob_type_name));
142 base->empty_base_class = 0;
197 smobnum = SCM_SMOBNUM (smob);
198 name = SCM_SMOBNAME (smobnum);
199 gdb::unique_xmalloc_ptr<char> kind = xstrprintf (
"<%s>",
name);
200 result = scm_from_latin1_symbol (kind.get ());
215 htab_t htab = htab_create_alloc (7, hash_fn, eq_fn,
228 void **slot = htab_find_slot (htab, base, INSERT);
253 void **slot = htab_find_slot (htab, base, NO_INSERT);
255 gdb_assert (slot != NULL);
256 htab_clear_slot (htab, slot);
268Return the kind of the GDB object, e.g., <gdb:breakpoint>, as a symbol." },
void * xcalloc(size_t number, size_t size)
void gdbscm_define_functions(const scheme_function *, int is_public)
#define scm_make_smob_type
static scm_t_subr as_a_scm_t_subr(SCM(*func)(void))
void gdbscm_init_eqable_gsmob(eqable_gdb_smob *base, SCM containing_scm)
static htab_t registered_gsmobs
htab_t gdbscm_create_eqable_gsmob_ptr_map(htab_hash hash_fn, htab_eq eq_fn)
void gdbscm_init_gsmob(gdb_smob *base)
static int gdbscm_is_gsmob(SCM scm)
void gdbscm_init_chained_gsmob(chained_gdb_smob *base)
static int eq_scm_t_bits(const void *item_lhs, const void *item_rhs)
void gdbscm_clear_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
static hashval_t hash_scm_t_bits(const void *item)
static SCM gdbscm_gsmob_kind(SCM self)
void gdbscm_initialize_smobs(void)
static SCM gsscm_get_gsmob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
eqable_gdb_smob ** gdbscm_find_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
static const scheme_function gsmob_functions[]
void gdbscm_fill_eqable_gsmob_ptr_slot(eqable_gdb_smob **slot, eqable_gdb_smob *base)
scm_t_bits gdbscm_make_smob_type(const char *name, size_t size)
static void register_gsmob(scm_t_bits gsmob_code)
GDB_SMOB_HEAD chained_gdb_smob * prev
GDB_SMOB_HEAD SCM containing_scm