90 return htab_hash_pointer (b_smob->
block);
102 && a->
block != NULL);
130 if (b_smob->
block != NULL)
138 b_smob->
block = NULL;
165 scm_puts (
">", port);
167 scm_remember_upto_here_1 (
self);
182 b_smob->
block = NULL;
220 b_smob_for_lookup.
block = block;
223 return (*slot)->containing_scm;
226 b_smob = (
block_smob *) SCM_SMOB_DATA (b_scm);
227 b_smob->
block = block;
263 return b_smob->
block != NULL;
271 const char *func_name)
325 return b_smob->
block;
337 b_smob->
block = NULL;
422 const struct block *super_block;
457 const struct block *static_block;
517 result = scm_cons (s_scm, result);
521 return scm_reverse_x (result, SCM_EOL);
549 ?
"global" :
"static");
568 scm_puts (
">", port);
570 scm_remember_upto_here_1 (
self);
586 memset (&i_smob->
iter, 0, sizeof (i_smob->
iter));
635 SCM progress, iter_scm, block_scm;
648 block = b_smob->
block;
700 _(
"cannot locate object file for block"));
714 Return #t if the object is a <gdb:block> object." },
718 Return #t if the block is valid.\n\
719 A block becomes invalid when its objfile is freed." },
723 Return the start address of the block." },
727 Return the end address of the block." },
731 Return the gdb:symbol object of the function containing the block\n\
732 or #f if the block does not live in any function." },
736 Return the superblock (parent block) of the block." },
740 Return the global block of the block." },
744 Return the static block of the block." },
748 Return #t if block is a global block." },
752 Return #t if block is a static block." },
756 Return a list of all symbols (as <gdb:symbol> objects) in the block." },
760 Return a <gdb:iterator> object for iterating over all symbols in the block." },
764 Return #t if the object is a <gdb:block-symbols-progress> object." },
768 Return the innermost GDB block containing the address or #f if none found.\n\
771 address: the address to lookup" },
794 = scm_c_define_gsubr (
"%block-next-symbol!", 1, 0, 0,
799 Internal function to assist the block symbols iterator."));
static SCM gdbscm_make_block_syms_iter(SCM self)
char * hex_string(LONGEST num)
static SCM gdbscm_block_static_block(SCM self)
struct symbol * block_iterator_next(struct block_iterator *iterator)
const char * symtab_to_filename_for_display(struct symtab *symtab)
static size_t bkscm_free_block_smob(SCM self)
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
struct block_iterator iter
SCM gdbscm_make_iterator(SCM object, SCM progress, SCM next)
static SCM gdbscm_block_global_p(SCM self)
#define SYMBOL_PRINT_NAME(symbol)
void gdbscm_define_functions(const scheme_function *, int is_public)
SCM gdbscm_scm_from_ulongest(ULONGEST l)
SCM syscm_scm_from_symbol(struct symbol *symbol)
static int bkscm_mark_block_invalid(void **slot, void *info)
const struct block * block_global_block(const struct block *block)
static int bkscm_print_block_smob(SCM self, SCM port, scm_print_state *pstate)
static SCM gdbscm_block_p(SCM scm)
struct compunit_symtab * compunit_symtab
static htab_t bkscm_objfile_block_map(struct objfile *objfile)
static const char block_smob_name[]
scm_t_bits gdbscm_make_smob_type(const char *name, size_t size)
static SCM bkscm_make_block_syms_progress_smob(void)
SCM gdbscm_make_type_error(const char *subr, int arg_pos, SCM bad_value, const char *expected_type)
const struct block * block_for_pc(CORE_ADDR pc)
static block_smob * bkscm_get_block_smob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
#define BLOCK_FUNCTION(bl)
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
static SCM bkscm_block_syms_progress_p(SCM scm)
struct compunit_symtab ** includes
void gdbscm_init_gsmob(gdb_smob *base)
#define CATCH(EXCEPTION, MASK)
SCM itscm_get_iterator_arg_unsafe(SCM self, int arg_pos, const char *func_name)
union block_iterator::@31 d
SCM itscm_iterator_smob_object(iterator_smob *i_smob)
static struct parser_state * pstate
SCM gdbscm_scm_from_c_string(const char *string)
struct symtab * compunit_primary_filetab(const struct compunit_symtab *cust)
static int bkscm_is_block(SCM scm)
static block_smob * bkscm_get_valid_block_smob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
void gdbscm_initialize_blocks(void)
static SCM gdbscm_lookup_block(SCM pc_scm)
#define BLOCK_SUPERBLOCK(bl)
static int bkscm_print_block_syms_progress_smob(SCM self, SCM port, scm_print_state *pstate)
static SCM gdbscm_block_global_block(SCM self)
const struct block * block
static SCM gdbscm_block_superblock(SCM self)
void gdbscm_clear_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
static scm_t_bits block_syms_progress_smob_tag
void gdbscm_printf(SCM port, const char *format,...) ATTRIBUTE_PRINTF(2
static SCM gdbscm_block_valid_p(SCM self)
static scm_t_bits block_smob_tag
static int bkscm_is_block_syms_progress(SCM scm)
static SCM gdbscm_block_static_p(SCM self)
htab_t gdbscm_create_eqable_gsmob_ptr_map(htab_hash hash_fn, htab_eq eq_fn)
SCM gdbscm_end_of_iteration(void)
void gdbscm_init_eqable_gsmob(eqable_gdb_smob *base, SCM containing_scm)
static SCM gdbscm_block_start(SCM self)
static hashval_t bkscm_hash_block_smob(const void *p)
SCM bkscm_scm_from_block(const struct block *block, struct objfile *objfile)
static block_smob * bkscm_get_valid_block(SCM scm, int arg_pos, const char *func_name, SCM *excp)
static int bkscm_eq_block_smob(const void *ap, const void *bp)
void gdbscm_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
eqable_gdb_smob ** gdbscm_find_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
const struct block * block_static_block(const struct block *block)
static SCM gdbscm_block_end(SCM self)
SCM gdbscm_make_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
void gdbscm_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
#define COMPUNIT_OBJFILE(cust)
static const char block_syms_progress_smob_name[]
static const struct objfile_data * bkscm_objfile_data_key
SCM gdbscm_documentation_symbol
SCM itscm_iterator_smob_progress(iterator_smob *i_smob)
static void bkscm_del_objfile_blocks(struct objfile *objfile, void *datum)
void gdbscm_parse_function_args(const char *function_name, int beginning_arg_pos, const SCM *keywords, const char *format,...)
void gdbscm_fill_eqable_gsmob_ptr_slot(eqable_gdb_smob **slot, eqable_gdb_smob *base)
static int bkscm_is_valid(block_smob *b_smob)
#define GDBSCM_HANDLE_GDB_EXCEPTION(exception)
const struct block * bkscm_scm_to_block(SCM block_scm, int arg_pos, const char *func_name, SCM *excp)
static SCM gdbscm_block_next_symbol_x(SCM self)
static SCM bkscm_make_block_smob(void)
static SCM gdbscm_block_symbols(SCM self)
struct symbol * block_iterator_first(const struct block *block, struct block_iterator *iterator)
static SCM bkscm_get_block_arg_unsafe(SCM self, int arg_pos, const char *func_name)
static SCM gdbscm_block_function(SCM self)
static SCM bkscm_next_symbol_x_proc
struct _block_smob block_smob