24 #include "filenames.h"
31 void *(*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 ();
179 c_data.
result =
_(
"Error while executing Scheme code.");
182 catch_data.
data = &c_data;
186 catch_data.
stack = SCM_BOOL_F;
210 catch_data.
stack = SCM_BOOL_F;
235 return scm_call_0 (args[0]);
241 SCM args[] = { proc };
253 return scm_call_1 (args[0], args[1]);
259 SCM args[] = { proc, arg0 };
271 return scm_call_2 (args[0], args[1], args[2]);
277 SCM args[] = { proc, arg0, arg1 };
289 return scm_call_3 (args[0], args[1], args[2], args[3]);
296 SCM args[] = { proc, arg1, arg2, arg3 };
308 return scm_call_4 (args[0], args[1], args[2], args[3], args[4]);
315 SCM args[] = { proc, arg1, arg2, arg3, arg4 };
327 return scm_apply_1 (args[0], args[1], args[2]);
333 SCM args[] = { proc, arg0, rest };
358 return scm_call_1 (proc, arg0);
376 SCM result = scm_c_eval_string (data->
string);
380 SCM port = scm_current_output_port ();
382 scm_write (result, port);
405 return xstrdup (result);
416 const char *filename = data;
420 scm_c_primitive_load_path (filename);
440 char *abs_filename = NULL;
443 if (!IS_ABSOLUTE_PATH (filename))
446 filename = abs_filename;
452 xfree (abs_filename);
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)
char * gdb_realpath(const char *filename)
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
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)
static void * scscm_source_scheme_script(void *data)
excp_matcher_func * excp_matcher
static SCM scscm_recording_pre_unwind_handler(void *datap, SCM key, SCM args)
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 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)
char * gdbscm_safe_source_script(const char *filename)
static void * scscm_eval_scheme_string(void *datap)
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_with_guile(void *(*func)(void *), void *data)
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)