171 scm_puts (
">", port);
173 scm_remember_upto_here_1 (
self);
226 int frame_id_is_next = 0;
232 f_smob_for_lookup.
inferior = inferior;
235 return (*slot)->containing_scm;
247 frame_id_is_next = 1;
252 frame_id_is_next = 0;
263 f_smob = (
frame_smob *) SCM_SMOB_DATA (f_scm);
267 f_smob->frame_id_is_next = frame_id_is_next;
335 scm_misc_error (func_name,
_(
"inferior has changed"), SCM_EOL);
415 return scm_from_bool (frame != NULL);
493 return scm_from_int (type);
556 return scm_from_int (stop_reason);
622 for (fn_block = block;
627 if (block == NULL || fn_block == NULL ||
BLOCK_FUNCTION (fn_block) == NULL)
629 scm_misc_error (
FUNC_NAME,
_(
"cannot find block for frame"),
650 struct symbol *sym = NULL;
800 register_scm, ®ister_str);
812 strlen (register_str));
834 _(
"unknown register"));
854 int block_arg_pos = -1;
855 SCM block_scm = SCM_UNDEFINED;
857 struct symbol *var = NULL;
879 rest, &block_arg_pos, &block_scm);
885 SCM_ASSERT (SCM_UNBNDP (block_scm), block_scm, SCM_ARG3,
FUNC_NAME);
887 else if (scm_is_string (symbol_scm))
894 if (! SCM_UNBNDP (block_scm))
929 _(
"variable not found"));
937 SCM_ASSERT_TYPE (0, symbol_scm, SCM_ARG1,
FUNC_NAME,
938 _(
"gdb:symbol or string"));
983 return SCM_UNSPECIFIED;
1038 reason_scm, &reason);
1040 if (reason < UNWIND_FIRST || reason > UNWIND_LAST)
1041 scm_out_of_range (
FUNC_NAME, reason_scm);
1051 #define ENTRY(X) { #X, X }
1063 #define SET(name, description) \
1064 { "FRAME_" #name, name },
1065 #include "unwind_stop_reasons.def"
1075 Return #t if the object is a <gdb:frame> object." },
1079 Return #t if the object is a valid <gdb:frame> object.\n\
1080 Frames become invalid when the inferior returns to its caller." },
1084 Return the name of the function corresponding to this frame,\n\
1085 or #f if there is no function." },
1089 Return the frame's architecture as a <gdb:arch> object." },
1093 Return the frame type, namely one of the gdb:*_FRAME constants." },
1097 Return one of the gdb:FRAME_UNWIND_* constants explaining why\n\
1098 it's not possible to find frames older than this." },
1102 Return the frame's resume address." },
1106 Return the frame's code block, or #f if one cannot be found." },
1110 Return the <gdb:symbol> for the function corresponding to this frame,\n\
1111 or #f if there isn't one." },
1115 Return the frame immediately older (outer) to this frame,\n\
1116 or #f if there isn't one." },
1120 Return the frame immediately newer (inner) to this frame,\n\
1121 or #f if there isn't one." },
1125 Return the frame's symtab-and-line <gdb:sal> object." },
1129 Return the value of the symbol in the frame.\n\
1131 Arguments: <gdb:frame> <gdb:symbol>\n\
1132 Or: <gdb:frame> string [#:block <gdb:block>]" },
1136 Return the value of the register in the frame.\n\
1138 Arguments: <gdb:frame> string" },
1142 Select this frame." },
1146 Return the newest frame." },
1150 Return the selected frame." },
1154 Return a string explaining the unwind stop reason.\n\
1156 Arguments: integer (the result of frame-unwind-stop-reason)" },
struct frame_info * frame_find_by_id(struct frame_id id)
unsigned int special_addr_p
SCM stscm_scm_from_sal(struct symtab_and_line sal)
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
static const char frame_smob_name[]
CORE_ADDR get_frame_address_in_block(struct frame_info *this_frame)
struct frame_info * get_selected_frame(const char *message)
__extension__ enum frame_id_stack_status stack_status
CORE_ADDR get_frame_pc(struct frame_info *frame)
void gdbscm_define_functions(const scheme_function *, int is_public)
struct frame_info * get_current_frame(void)
static SCM frscm_scm_from_frame_unsafe(struct frame_info *frame, struct inferior *inferior)
static SCM gdbscm_frame_unwind_stop_reason(SCM self)
SCM gdbscm_scm_from_ulongest(ULONGEST l)
static SCM gdbscm_frame_read_var(SCM self, SCM symbol_scm, SCM rest)
struct frame_info * get_prev_frame(struct frame_info *this_frame)
SCM syscm_scm_from_symbol(struct symbol *symbol)
static SCM gdbscm_frame_block(SCM self)
char * ui_file_xstrdup(struct ui_file *file, long *length)
char * gdbscm_scm_to_c_string(SCM string)
static int frscm_eq_frame_smob(const void *ap, const void *bp)
void ui_file_delete(struct ui_file *file)
static void frscm_del_inferior_frames(struct inferior *inferior, void *datum)
void select_frame(struct frame_info *fi)
const struct frame_id null_frame_id
static SCM gdbscm_frame_pc(SCM self)
static SCM gdbscm_frame_select(SCM self)
const struct gdb_exception exception_none
void find_frame_funname(struct frame_info *frame, char **funname, enum language *funlang, struct symbol **funcp)
frame_smob * frscm_get_frame_smob_arg_unsafe(SCM self, int arg_pos, const char *func_name)
struct value * read_var_value(struct symbol *var, struct frame_info *frame)
scm_t_bits gdbscm_make_smob_type(const char *name, size_t size)
static SCM gdbscm_unwind_stop_reason_string(SCM reason_scm)
static SCM gdbscm_newest_frame(void)
static scm_t_bits frame_smob_tag
static SCM gdbscm_selected_frame(void)
SCM vlscm_scm_from_value(struct value *value)
int gdbscm_is_exception(SCM scm)
struct objfile * symbol_objfile(const struct symbol *symbol)
static htab_t frscm_inferior_frame_map(struct inferior *inferior)
#define BLOCK_FUNCTION(bl)
int frame_id_eq(struct frame_id l, struct frame_id r)
void find_frame_sal(struct frame_info *frame, struct symtab_and_line *sal)
const char * unwind_stop_reason_to_string(enum unwind_stop_reason reason)
void gdbscm_initialize_frames(void)
enum frame_type get_frame_type(struct frame_info *frame)
struct frame_id get_frame_id(struct frame_info *fi)
#define CATCH(EXCEPTION, MASK)
static const struct inferior_data * frscm_inferior_data_key
SCM bkscm_scm_from_block(const struct block *block, struct objfile *objfile)
static SCM gdbscm_frame_name(SCM self)
static struct parser_state * pstate
int frscm_is_frame(SCM scm)
SCM gdbscm_scm_from_c_string(const char *string)
enum unwind_stop_reason get_frame_unwind_stop_reason(struct frame_info *frame)
struct symbol * find_pc_function(CORE_ADDR pc)
const struct block * get_frame_block(struct frame_info *frame, CORE_ADDR *addr_in_block)
static SCM gdbscm_frame_p(SCM scm)
SCM gdbscm_scm_from_gdb_exception(struct gdb_exception exception)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
struct inferior * inferior
int syscm_is_symbol(SCM scm)
#define BLOCK_SUPERBLOCK(bl)
void gdbscm_throw(SCM exception) ATTRIBUTE_NORETURN
static SCM gdbscm_frame_sal(SCM self)
void gdbscm_clear_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
int user_reg_map_name_to_regnum(struct gdbarch *gdbarch, const char *name, int len)
struct ui_file * mem_fileopen(void)
static int frscm_mark_frame_invalid(void **slot, void *info)
void gdbscm_printf(SCM port, const char *format,...) ATTRIBUTE_PRINTF(2
unsigned long hash(const void *addr, int length)
htab_t gdbscm_create_eqable_gsmob_ptr_map(htab_hash hash_fn, htab_eq eq_fn)
void gdbscm_init_eqable_gsmob(eqable_gdb_smob *base, SCM containing_scm)
static size_t frscm_free_frame_smob(SCM self)
struct frame_info * get_next_frame(struct frame_info *this_frame)
void gdbscm_define_integer_constants(const scheme_integer_constant *, int is_public)
const struct block * bkscm_scm_to_block(SCM block_scm, int arg_pos, const char *func_name, SCM *excp)
void gdbscm_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
static hashval_t frscm_hash_frame_smob(const void *p)
enum unwind_stop_reason stop_reason
eqable_gdb_smob ** gdbscm_find_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
struct value * value_of_register(int regnum, struct frame_info *frame)
void gdbscm_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
struct frame_info * frscm_frame_smob_to_frame(frame_smob *f_smob)
void gdbscm_parse_function_args(const char *function_name, int beginning_arg_pos, const SCM *keywords, const char *format,...)
static SCM gdbscm_frame_function(SCM self)
struct symbol * syscm_get_valid_symbol_arg_unsafe(SCM self, int arg_pos, const char *func_name)
void gdbscm_fill_eqable_gsmob_ptr_slot(eqable_gdb_smob **slot, eqable_gdb_smob *base)
void fprint_frame_id(struct ui_file *file, struct frame_id id)
static int frscm_print_frame_smob(SCM self, SCM port, scm_print_state *pstate)
static SCM gdbscm_frame_arch(SCM self)
static SCM gdbscm_frame_valid_p(SCM self)
struct inferior * current_inferior(void)
static SCM frscm_make_frame_smob(void)
#define GDBSCM_HANDLE_GDB_EXCEPTION(exception)
static SCM gdbscm_frame_type(SCM self)
static SCM gdbscm_frame_older(SCM self)
static SCM frscm_get_frame_arg_unsafe(SCM self, int arg_pos, const char *func_name)
static SCM gdbscm_frame_newer(SCM self)
static SCM gdbscm_frame_read_register(SCM self, SCM register_scm)
static SCM frscm_scm_from_frame(struct frame_info *frame, struct inferior *inferior)
SCM arscm_scm_from_arch(struct gdbarch *gdbarch)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
void do_cleanups(struct cleanup *old_chain)
#define END_INTEGER_CONSTANTS