24 #include "filenames.h" 31 const char *(*func) (
void *);
65 return SCM_UNSPECIFIED;
74 SCM stack = scm_make_stack (SCM_BOOL_T, scm_list_1 (scm_from_int (2)));
78 return SCM_UNSPECIFIED;
86 return SCM_UNSPECIFIED;
103 if (matcher != NULL && matcher (key))
104 return SCM_UNSPECIFIED;
111 data->stack = scm_make_stack (SCM_BOOL_T, scm_list_1 (scm_from_int (2)));
119 return SCM_UNSPECIFIED;
153 = scm_c_catch (SCM_BOOL_T,
158 #if HAVE_GUILE_MANUAL_FINALIZATION 159 scm_run_finalizers ();
186 catch_data.
stack = SCM_BOOL_F;
210 catch_data.
stack = SCM_BOOL_F;
233 SCM *args = (SCM *) argsp;
235 return scm_call_0 (args[0]);
241 SCM args[] = {
proc };
251 SCM *args = (SCM *) argsp;
253 return scm_call_1 (args[0], args[1]);
259 SCM args[] = {
proc, arg0 };
269 SCM *args = (SCM *) argsp;
271 return scm_call_2 (args[0], args[1], args[2]);
277 SCM args[] = {
proc, arg0, arg1 };
287 SCM *args = (SCM *) argsp;
289 return scm_call_3 (args[0], args[1], args[2], args[3]);
296 SCM args[] = {
proc, arg1, arg2, arg3 };
306 SCM *args = (SCM *) argsp;
308 return scm_call_4 (args[0], args[1], args[2], args[3], args[4]);
315 SCM args[] = {
proc, arg1, arg2, arg3, arg4 };
325 SCM *args = (SCM *) argsp;
327 return scm_apply_1 (args[0], args[1], args[2]);
333 SCM args[] = {
proc, arg0, rest };
358 return scm_call_1 (
proc, arg0);
377 SCM result = scm_c_eval_string (data->
string);
381 SCM port = scm_current_output_port ();
383 scm_write (result, port);
406 return xstrdup (result);
417 const char *filename = (
const char *) data;
421 scm_c_primitive_load_path (filename);
444 if (!IS_ABSOLUTE_PATH (filename))
447 filename = abs_filename.get ();
454 return xstrdup (result);
466 scm_from_latin1_symbol (
"scheme"), NULL);
static SCM scscm_call_4_body(void *argsp)
SCM gdbscm_call_guile(SCM(*func)(void *), void *data, excp_matcher_func *ok_excps)
const char * gdbscm_with_guile(const char *(*func)(void *), void *data)
scm_t_catch_handler pre_unwind_handler
static void * gdbscm_with_catch(void *data)
SCM gdbscm_unsafe_call_1(SCM proc, SCM arg0)
SCM gdbscm_safe_call_0(SCM proc, excp_matcher_func *ok_excps)
scm_t_catch_handler unwind_handler
gdb::unique_xmalloc_ptr< char > gdb_realpath(const char *filename)
SCM gdbscm_safe_call_4(SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4, excp_matcher_func *ok_excps)
#define gdbscm_is_true(scm)
int excp_matcher_func(SCM key)
static SCM scscm_recording_unwind_handler(void *datap, SCM key, SCM args)
static SCM scscm_apply_1_body(void *argsp)
SCM gdbscm_make_exception(SCM tag, SCM args)
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
excp_matcher_func * excp_matcher
static SCM scscm_recording_pre_unwind_handler(void *datap, SCM key, SCM args)
static const char * scscm_eval_scheme_string(void *datap)
static SCM scscm_nop_unwind_handler(void *data, SCM key, SCM args)
SCM gdbscm_safe_call_2(SCM proc, SCM arg0, SCM arg1, excp_matcher_func *ok_excps)
SCM gdbscm_safe_call_1(SCM proc, SCM arg0, excp_matcher_func *ok_excps)
static const char * scscm_source_scheme_script(void *data)
static SCM scscm_call_2_body(void *argsp)
SCM gdbscm_safe_call_3(SCM proc, SCM arg1, SCM arg2, SCM arg3, excp_matcher_func *ok_excps)
static SCM scscm_printing_pre_unwind_handler(void *data, SCM key, SCM args)
const char *(* func)(void *)
char * gdbscm_safe_source_script(const char *filename)
SCM gdbscm_safe_apply_1(SCM proc, SCM arg0, SCM rest, excp_matcher_func *ok_excps)
SCM gdbscm_make_exception_with_stack(SCM key, SCM args, SCM stack)
static SCM scscm_call_1_body(void *argsp)
void gdbscm_print_exception_with_stack(SCM port, SCM stack, SCM key, SCM args)
void gdbscm_enter_repl(void)
static SCM scscm_call_0_body(void *argsp)
static SCM scscm_call_3_body(void *argsp)
static SCM scscm_safe_call_body(void *d)
char * gdbscm_safe_eval_string(const char *string, int display_result)