23 #ifndef GDB_GUILE_INTERNAL_H
24 #define GDB_GUILE_INTERNAL_H
51 #define END_VARIABLES { NULL, SCM_BOOL_F, NULL }
67 #define END_FUNCTIONS { NULL, 0, 0, 0, NULL, NULL }
77 #define END_INTEGER_CONSTANTS { NULL, 0 }
81 #define GDBSCM_ARG_NONE 0
84 #undef scm_make_smob_type
85 #define scm_make_smob_type USE_gdbscm_make_smob_type_INSTEAD
92 #define scm_is_bool USE_gdbscm_is_bool_INSTEAD
93 #define scm_is_false USE_gdbscm_is_false_INSTEAD
94 #define scm_is_true USE_gdbscm_is_true_INSTEAD
95 #define gdbscm_is_bool(scm) \
96 (scm_is_eq ((scm), SCM_BOOL_F) || scm_is_eq ((scm), SCM_BOOL_T))
97 #define gdbscm_is_false(scm) scm_is_eq ((scm), SCM_BOOL_F)
98 #define gdbscm_is_true(scm) (!gdbscm_is_false (scm))
100 #ifndef HAVE_SCM_NEW_SMOB
107 SCM_RETURN_NEWSMOB (tc, data);
117 #define FUNC_NAME __func__
149 extern void gdbscm_printf (SCM port,
const char *format, ...)
157 int beginning_arg_pos,
159 const char *format, ...);
202 #define GDB_SMOB_HEAD \
203 int empty_base_class;
254 const struct objfile_data *data_key,
258 const struct objfile_data *data_key,
294 SCM bad_value,
const char *expected_type);
297 SCM bad_value,
const char *
error);
300 SCM bad_value,
const char *
error)
304 SCM bad_value,
const char *
error);
307 SCM bad_value,
const char *
error)
311 SCM bad_value,
const char *
error);
314 SCM bad_value,
const char *
error)
317 extern void gdbscm_throw (SCM exception) ATTRIBUTE_NORETURN;
383 const char *func_name);
390 struct objfile *objfile);
393 (SCM block_scm,
int arg_pos,
const char *func_name, SCM *excp);
398 const char *func_name,
int arg_pos,
405 int want_trailing_space);
414 const char *func_name);
442 const char *func_name);
449 const char *
encoding,
struct type *type);
453 const char *func_name,
457 (SCM
string,
struct ui_file *stream,
493 int strict, SCM *except_scmp);
496 const char *charset,
int strict);
509 (SCM self,
int arg_pos,
const char *func_name);
526 const char *func_name);
543 (
const char *func_name,
int obj_arg_pos, SCM obj,
544 int type_arg_pos, SCM type_scm, struct type *type, SCM *except_scmp,
548 (
const char *func_name,
int obj_arg_pos, SCM obj, SCM *except_scmp,
559 (
const struct extension_language_defn *,
560 struct objfile *, htab_t copied_types);
563 (
const struct extension_language_defn *,
566 struct
ui_file *stream,
int recurse,
567 const struct value *val,
605 #define GDBSCM_HANDLE_GDB_EXCEPTION(exception) \
607 if (exception.reason < 0) \
609 gdbscm_throw_gdb_exception (exception); \
616 #define GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS(exception, cleanups) \
618 if (exception.reason < 0) \
620 do_cleanups (cleanups); \
621 gdbscm_throw_gdb_exception (exception); \
arch_smob * arscm_get_arch_smob_arg_unsafe(SCM arch_scm, int arg_pos, const char *func_name)
void gdbscm_initialize_exceptions(void)
char * gdbscm_canonicalize_command_name(const char *name, int want_trailing_space)
struct frame_info * frscm_frame_smob_to_frame(frame_smob *)
SCM stscm_scm_from_sal(struct symtab_and_line sal)
const char * gdbscm_print_excp
GDB_SMOB_HEAD SCM containing_scm
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
int gdbscm_guile_major_version
SCM gdbscm_make_memory_error(const char *subr, const char *msg, SCM args)
SCM gdbscm_make_iterator(SCM object, SCM progress, SCM next)
void gdbscm_memory_error(const char *subr, const char *msg, SCM args) ATTRIBUTE_NORETURN
const char *const * gdbscm_gc_dup_argv(char **argv)
const char gdbscm_print_excp_none[]
void gdbscm_define_functions(const scheme_function *, int is_public)
void gdbscm_initialize_frames(void)
SCM gdbscm_scm_from_ulongest(ULONGEST l)
SCM tyscm_scm_from_field(SCM type_scm, int field_num)
SCM tyscm_scm_from_type(struct type *type)
char * gdbscm_scm_to_host_string(SCM string, size_t *lenp, SCM *except)
SCM gdbscm_safe_call_3(SCM proc, SCM arg0, SCM arg1, SCM arg2, excp_matcher_func *ok_excps)
SCM syscm_scm_from_symbol(struct symbol *symbol)
struct type ** const(pascal_builtin_types[])
void gdbscm_initialize_values(void)
struct value * vlscm_convert_value_from_scheme(const char *func_name, int obj_arg_pos, SCM obj, SCM *except_scmp, struct gdbarch *gdbarch, const struct language_defn *language)
struct type * tyscm_type_smob_type(type_smob *t_smob)
char * gdbscm_scm_to_c_string(SCM string)
void objfile_script_executor_func(const struct extension_language_defn *, struct objfile *, const char *name, const char *script)
SCM stscm_scm_from_symtab(struct symtab *symtab)
int vlscm_is_value(SCM scm)
SCM gdbscm_scm_from_longest(LONGEST l)
void gdbscm_init_chained_gsmob(chained_gdb_smob *base)
SCM gdbscm_make_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
scm_t_bits gdbscm_make_smob_type(const char *name, size_t size)
struct gdbarch * arscm_get_gdbarch(arch_smob *a_smob)
struct value * lsscm_safe_lazy_string_to_value(SCM string, int arg_pos, const char *func_name, SCM *except_scmp)
SCM vlscm_scm_from_value(struct value *value)
char * gdbscm_safe_source_script(const char *filename)
struct _chained_gdb_smob chained_gdb_smob
int gdbscm_is_exception(SCM scm)
SCM gdbscm_make_type_error(const char *subr, int arg_pos, SCM bad_value, const char *expected_type)
SCM gdbscm_exception_args(SCM excp)
char * gdbscm_parse_command_name(const char *name, const char *func_name, int arg_pos, struct cmd_list_element ***base_list, struct cmd_list_element **start_list)
int gdbscm_guile_minor_version
int excp_matcher_func(SCM key)
SCM lsscm_make_lazy_string(CORE_ADDR address, int length, const char *encoding, struct type *type)
void gdbscm_initialize_iterators(void)
int gdbscm_guile_version_is_at_least(int major, int minor, int micro)
void gdbscm_dynwind_xfree(void *ptr)
void gdbscm_initialize_pspaces(void)
SCM gdbscm_scm_from_string(const char *string, size_t len, const char *charset, int strict)
SCM gdbscm_invalid_object_error_symbol
int gdbscm_auto_load_enabled(const struct extension_language_defn *)
void gdbscm_init_gsmob(gdb_smob *base)
void gdbscm_initialize_smobs(void)
SCM itscm_get_iterator_arg_unsafe(SCM self, int arg_pos, const char *func_name)
char * gdbscm_exception_message_to_string(SCM exception)
void gdbscm_initialize_objfiles(void)
objfile_smob * ofscm_objfile_smob_from_objfile(struct objfile *objfile)
SCM psscm_scm_from_pspace(struct program_space *)
void objfile_script_sourcer_func(const struct extension_language_defn *, struct objfile *, FILE *stream, const char *filename)
SCM gdbscm_make_exception(SCM tag, SCM args)
SCM bkscm_scm_from_block(const struct block *block, struct objfile *objfile)
SCM itscm_iterator_smob_object(iterator_smob *i_smob)
SCM gdbscm_safe_apply_1(SCM proc, SCM arg0, SCM args, excp_matcher_func *ok_excps)
struct _chained_gdb_smob * next
SCM gdbscm_scm_from_c_string(const char *string)
SCM gdbscm_exception_key(SCM excp)
excp_matcher_func gdbscm_memory_error_p
SCM gdbscm_scm_from_host_string(const char *string, size_t len)
SCM gdbscm_scm_from_gdb_exception(struct gdb_exception exception)
void gdbscm_initialize_pretty_printers(void)
excp_matcher_func gdbscm_user_error_p
SCM gdbscm_make_error_scm(SCM key, SCM subr, SCM message, SCM args, SCM data)
void itscm_set_iterator_smob_progress_x(iterator_smob *i_smob, SCM progress)
SCM vlscm_scm_from_value_unsafe(struct value *value)
SCM gdbscm_safe_call_2(SCM proc, SCM arg0, SCM arg1, excp_matcher_func *ok_excps)
int syscm_is_symbol(SCM scm)
void gdbscm_initialize_auto_load(void)
void gdbscm_throw(SCM exception) ATTRIBUTE_NORETURN
GDB_SMOB_HEAD struct _chained_gdb_smob * prev
SCM ofscm_objfile_smob_pretty_printers(objfile_smob *o_smob)
void gdbscm_initialize_breakpoints(void)
void gdbscm_initialize_commands(void)
void lsscm_val_print_lazy_string(SCM string, struct ui_file *stream, const struct value_print_options *options)
int lsscm_is_lazy_string(SCM scm)
void gdbscm_define_variables(const scheme_variable *, int is_public)
void gdbscm_clear_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
int gdbscm_scm_string_to_int(SCM string)
ULONGEST gdbscm_scm_to_ulongest(SCM u)
SCM gdbscm_call_guile(SCM(*func)(void *), void *data, excp_matcher_func *ok_excps)
struct _eqable_gdb_smob eqable_gdb_smob
void gdbscm_printf(SCM port, const char *format,...) ATTRIBUTE_PRINTF(2
void gdbscm_initialize_symtabs(void)
enum ext_lang_bp_stop gdbscm_breakpoint_cond_says_stop(const struct extension_language_defn *, struct breakpoint *b)
enum ext_lang_rc gdbscm_apply_val_pretty_printer(const struct extension_language_defn *, struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language)
void void gdbscm_debug_display(SCM obj)
htab_t gdbscm_create_eqable_gsmob_ptr_map(htab_hash hash_fn, htab_eq eq_fn)
void gdbscm_initialize_math(void)
int itscm_is_end_of_iteration(SCM obj)
SCM gdbscm_end_of_iteration(void)
void gdbscm_init_eqable_gsmob(eqable_gdb_smob *base, SCM containing_scm)
char * gdbscm_safe_eval_string(const char *string, int display_result)
SCM gdbscm_safe_call_1(SCM proc, SCM arg0, excp_matcher_func *ok_excps)
const char const char int
void gdbscm_define_integer_constants(const scheme_integer_constant *, int is_public)
void gdbscm_remove_objfile_ref(struct objfile *objfile, const struct objfile_data *data_key, chained_gdb_smob *g_smob)
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
void gdbscm_initialize_arches(void)
SCM gdbscm_safe_call_4(SCM proc, SCM arg0, SCM arg1, SCM arg2, SCM arg3, excp_matcher_func *ok_excps)
void gdbscm_enter_repl(void)
void gdbscm_initialize_symbols(void)
const char gdbscm_print_excp_message[]
eqable_gdb_smob ** gdbscm_find_eqable_gsmob_ptr_slot(htab_t htab, eqable_gdb_smob *base)
LONGEST gdbscm_scm_to_longest(SCM l)
void gdbscm_preserve_values(const struct extension_language_defn *, struct objfile *, htab_t copied_types)
SCM gdbscm_unsafe_call_1(SCM proc, SCM arg0)
void gdbscm_misc_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
void gdbscm_print_gdb_exception(SCM port, SCM exception)
SCM gdbscm_make_invalid_object_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
SCM gdbscm_make_exception_with_stack(SCM key, SCM args, SCM stack)
void gdbscm_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error) ATTRIBUTE_NORETURN
SCM gdbscm_safe_call_0(SCM proc, excp_matcher_func *ok_excps)
frame_smob * frscm_get_frame_smob_arg_unsafe(SCM frame_scm, int arg_pos, const char *func_name)
void gdbscm_throw_gdb_exception(struct gdb_exception exception) ATTRIBUTE_NORETURN
SCM psscm_pspace_smob_pretty_printers(const pspace_smob *)
SCM gdbscm_documentation_symbol
SCM itscm_iterator_smob_progress(iterator_smob *i_smob)
type_smob * tyscm_get_type_smob_arg_unsafe(SCM type_scm, int arg_pos, const char *func_name)
void gdbscm_print_exception_with_stack(SCM port, SCM stack, SCM key, SCM args)
void * gdbscm_with_guile(void *(*func)(void *), void *data)
void gdbscm_initialize_lazy_strings(void)
const char gdbscm_module_name[]
void gdbscm_add_objfile_ref(struct objfile *objfile, const struct objfile_data *data_key, chained_gdb_smob *g_smob)
void gdbscm_parse_function_args(const char *function_name, int beginning_arg_pos, const SCM *keywords, const char *format,...)
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)
SCM gdbscm_make_misc_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
void gdbscm_initialize_blocks(void)
int gdbscm_breakpoint_has_cond(const struct extension_language_defn *, struct breakpoint *b)
void gdbscm_debug_write(SCM obj)
unsigned long long ULONGEST
SCM gdbscm_make_error(SCM key, const char *subr, const char *message, SCM args, SCM data)
void gdbscm_initialize_parameters(void)
static void ATTRIBUTE_PRINTF(6, 0)
const char * itscm_iterator_smob_name(void)
SCM itscm_safe_call_next_x(SCM iter, excp_matcher_func *ok_excps)
SCM gdbscm_scm_from_printf(const char *format,...) ATTRIBUTE_PRINTF(1
void gdbscm_initialize_strings(void)
void gdbscm_initialize_types(void)
int gdb_scheme_initialized
int itscm_is_iterator(SCM scm)
struct value * vlscm_scm_to_value(SCM scm)
SCM ofscm_scm_from_objfile(struct objfile *objfile)
int tyscm_is_type(SCM scm)
const char gdbscm_init_module_name[]
pspace_smob * psscm_pspace_smob_from_pspace(struct program_space *)
const char gdbscm_print_excp_full[]
int frscm_is_frame(SCM scm)
int gdbscm_is_procedure(SCM proc)
int gdbscm_valid_command_class_p(int command_class)
SCM char * gdbscm_scm_to_string(SCM string, size_t *lenp, const char *charset, int strict, SCM *except_scmp)
void error(const char *fmt,...)
SCM arscm_scm_from_arch(struct gdbarch *gdbarch)
int gdbscm_guile_micro_version
int( gsmob_pred_func)(SCM)
struct value * vlscm_convert_typed_value_from_scheme(const char *func_name, int obj_arg_pos, SCM obj, int type_arg_pos, SCM type_scm, struct type *type, SCM *except_scmp, struct gdbarch *gdbarch, const struct language_defn *language)
char * gdbscm_gc_xstrdup(const char *)
void gdbscm_initialize_ports(void)
void gdbscm_initialize_disasm(void)