100 gdb_assert (htab !=
nullptr);
118 return htab_hash_pointer (b_smob->
block);
130 && a->
block != NULL);
158 if (b_smob->
block != NULL)
166 b_smob->
block = NULL;
191 hex_string (b->
start ()), hex_string (b->
end ()));
193 scm_puts (
">", port);
195 scm_remember_upto_here_1 (self);
210 b_smob->
block = NULL;
251 return (*slot)->containing_scm;
254 b_smob = (
block_smob *) SCM_SMOB_DATA (b_scm);
291 return b_smob->
block != NULL;
299 const char *func_name)
353 return b_smob->
block;
421 const struct block *super_block;
456 const struct block *static_block;
516 result = scm_cons (s_scm, result);
520 return scm_reverse_x (result, SCM_EOL);
548 ?
"global" :
"static");
567 scm_puts (
">", port);
569 scm_remember_upto_here_1 (self);
585 memset (&i_smob->
iter, 0, sizeof (i_smob->
iter));
633 SCM progress, iter_scm, block_scm;
687 if (cust != NULL && cust->
objfile () != NULL)
690 catch (
const gdb_exception &except)
696 if (cust == NULL || cust->
objfile () == NULL)
699 _(
"cannot locate object file for block"));
713Return #t if the object is a <gdb:block> object." },
717Return #t if the block is valid.\n\
718A block becomes invalid when its objfile is freed." },
722Return the start address of the block." },
726Return the end address of the block." },
730Return the gdb:symbol object of the function containing the block\n\
731or #f if the block does not live in any function." },
735Return the superblock (parent block) of the block." },
739Return the global block of the block." },
743Return the static block of the block." },
747Return #t if block is a global block." },
751Return #t if block is a static block." },
755Return a list of all symbols (as <gdb:symbol> objects) in the block." },
757 {
"make-block-symbols-iterator", 1, 0, 0,
760Return a <gdb:iterator> object for iterating over all symbols in the block." },
762 {
"block-symbols-progress?", 1, 0, 0,
765Return #t if the object is a <gdb:block-symbols-progress> object." },
769Return the innermost GDB block containing the address or #f if none found.\n\
772 address: the address to lookup" },
795 = scm_c_define_gsubr (
"%block-next-symbol!", 1, 0, 0,
800Internal function to assist the block symbols iterator."));
static struct parser_state * pstate
const struct block * block_global_block(const struct block *block)
const struct block * block_for_pc(CORE_ADDR pc)
const struct block * block_static_block(const struct block *block)
struct symbol * block_iterator_next(struct block_iterator *iterator)
struct symbol * block_iterator_first(const struct block *block, struct block_iterator *iterator)
void set(unsigned key, void *datum)
SCM gdbscm_make_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
void gdbscm_init_eqable_gsmob(eqable_gdb_smob *base, SCM containing_scm)
SCM gdbscm_make_type_error(const char *subr, int arg_pos, SCM bad_value, const char *expected_type)
SCM itscm_iterator_smob_object(iterator_smob *i_smob)
SCM itscm_iterator_smob_progress(iterator_smob *i_smob)
void gdbscm_parse_function_args(const char *function_name, int beginning_arg_pos, const SCM *keywords, const char *format,...)
SCM gdbscm_documentation_symbol
gdbscm_gdb_exception unpack(const gdb_exception &exc)
htab_t gdbscm_create_eqable_gsmob_ptr_map(htab_hash hash_fn, htab_eq eq_fn)
void gdbscm_init_gsmob(gdb_smob *base)
void gdbscm_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
SCM gdbscm_make_iterator(SCM object, SCM progress, SCM next)
void gdbscm_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
void gdbscm_clear_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
SCM gdbscm_scm_from_ulongest(ULONGEST l)
void gdbscm_printf(SCM port, const char *format,...) ATTRIBUTE_PRINTF(2
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
void gdbscm_define_functions(const scheme_function *, int is_public)
eqable_gdb_smob ** gdbscm_find_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
#define GDBSCM_HANDLE_GDB_EXCEPTION(exception)
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)
SCM itscm_get_iterator_arg_unsafe(SCM self, int arg_pos, const char *func_name)
SCM syscm_scm_from_symbol(struct symbol *symbol)
static scm_t_subr as_a_scm_t_subr(SCM(*func)(void))
SCM gdbscm_end_of_iteration(void)
SCM gdbscm_scm_from_c_string(const char *string)
static SCM bkscm_make_block_syms_progress_smob(void)
static block_smob * bkscm_get_block_smob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
static int bkscm_is_block(SCM scm)
static SCM gdbscm_block_end(SCM self)
static SCM gdbscm_block_next_symbol_x(SCM self)
static SCM gdbscm_block_static_p(SCM self)
static SCM gdbscm_block_valid_p(SCM self)
static SCM gdbscm_block_function(SCM self)
static SCM gdbscm_block_superblock(SCM self)
static SCM gdbscm_make_block_syms_iter(SCM self)
static int bkscm_eq_block_smob(const void *ap, const void *bp)
static int bkscm_print_block_smob(SCM self, SCM port, scm_print_state *pstate)
static scm_t_bits block_smob_tag
static SCM gdbscm_block_global_p(SCM self)
static const registry< objfile >::key< htab, bkscm_deleter > bkscm_objfile_data_key
static const char block_smob_name[]
static const scheme_function block_functions[]
static scm_t_bits block_syms_progress_smob_tag
SCM bkscm_scm_from_block(const struct block *block, struct objfile *objfile)
static htab_t bkscm_objfile_block_map(struct objfile *objfile)
static SCM gdbscm_lookup_block(SCM pc_scm)
static SCM bkscm_make_block_smob(void)
static int bkscm_is_valid(block_smob *b_smob)
static block_smob * bkscm_get_valid_block_smob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
void gdbscm_initialize_blocks(void)
const struct block * bkscm_scm_to_block(SCM block_scm, int arg_pos, const char *func_name, SCM *excp)
static SCM gdbscm_block_static_block(SCM self)
static SCM gdbscm_block_global_block(SCM self)
static SCM bkscm_next_symbol_x_proc
static SCM bkscm_get_block_arg_unsafe(SCM self, int arg_pos, const char *func_name)
static SCM gdbscm_block_p(SCM scm)
static int bkscm_is_block_syms_progress(SCM scm)
static SCM gdbscm_block_start(SCM self)
static const char block_syms_progress_smob_name[]
static hashval_t bkscm_hash_block_smob(const void *p)
static block_smob * bkscm_get_valid_block(SCM scm, int arg_pos, const char *func_name, SCM *excp)
static SCM gdbscm_block_symbols(SCM self)
static SCM bkscm_block_syms_progress_p(SCM scm)
static int bkscm_print_block_syms_progress_smob(SCM self, SCM port, scm_print_state *pstate)
static size_t bkscm_free_block_smob(SCM self)
const char * symtab_to_filename_for_display(struct symtab *symtab)
static int bkscm_mark_block_invalid(void **slot, void *info)
void operator()(htab_t htab)
union block_iterator::@19 d
struct compunit_symtab * compunit_symtab
const struct block * block
struct block_iterator iter
const block * superblock() const
symbol * function() const
symtab * primary_filetab() const
struct compunit_symtab ** includes
struct objfile * objfile() const
const char * print_name() const
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)