GDB (xrefs)
Classes | Functions | Variables
scm-exception.c File Reference
#include "defs.h"
#include <signal.h>
#include "guile-internal.h"

Go to the source code of this file.

Classes

struct  exception_smob
 

Functions

static int exscm_print_exception_smob (SCM self, SCM port, scm_print_state *pstate)
 
SCM gdbscm_make_exception (SCM key, SCM args)
 
int gdbscm_is_exception (SCM scm)
 
static SCM gdbscm_exception_p (SCM scm)
 
SCM gdbscm_exception_key (SCM self)
 
SCM gdbscm_exception_args (SCM self)
 
SCM gdbscm_make_exception_with_stack (SCM key, SCM args, SCM stack)
 
SCM gdbscm_make_error_scm (SCM key, SCM subr, SCM message, SCM args, SCM data)
 
SCM gdbscm_make_error (SCM key, const char *subr, const char *message, SCM args, SCM data)
 
SCM gdbscm_make_type_error (const char *subr, int arg_pos, SCM bad_value, const char *expected_type)
 
static SCM gdbscm_make_arg_error (SCM key, const char *subr, int arg_pos, SCM bad_value, const char *error_prefix, const char *error)
 
SCM gdbscm_make_invalid_object_error (const char *subr, int arg_pos, SCM bad_value, const char *object)
 
void gdbscm_invalid_object_error (const char *subr, int arg_pos, SCM bad_value, const char *object)
 
SCM gdbscm_make_out_of_range_error (const char *subr, int arg_pos, SCM bad_value, const char *error)
 
void gdbscm_out_of_range_error (const char *subr, int arg_pos, SCM bad_value, const char *error)
 
SCM gdbscm_make_misc_error (const char *subr, int arg_pos, SCM bad_value, const char *error)
 
void gdbscm_misc_error (const char *subr, int arg_pos, SCM bad_value, const char *error)
 
SCM gdbscm_make_memory_error (const char *subr, const char *msg, SCM args)
 
void gdbscm_memory_error (const char *subr, const char *msg, SCM args)
 
int gdbscm_memory_error_p (SCM key)
 
int gdbscm_user_error_p (SCM key)
 
void gdbscm_throw (SCM exception)
 
SCM gdbscm_scm_from_gdb_exception (struct gdb_exception exception)
 
void gdbscm_throw_gdb_exception (struct gdb_exception exception)
 
static void gdbscm_print_exception_message (SCM port, SCM frame, SCM key, SCM args)
 
void gdbscm_print_exception_with_stack (SCM port, SCM stack, SCM key, SCM args)
 
void gdbscm_print_gdb_exception (SCM port, SCM exception)
 
char * gdbscm_exception_message_to_string (SCM exception)
 
static SCM gdbscm_percent_exception_print_style (void)
 
static SCM gdbscm_percent_exception_count (void)
 
void gdbscm_initialize_exceptions (void)
 

Variables

static const char exception_smob_name [] = "gdb:exception"
 
static scm_t_bits exception_smob_tag
 
static SCM error_symbol
 
static SCM memory_error_symbol
 
static SCM signal_symbol
 
static SCM user_error_symbol
 
static SCM with_stack_error_symbol
 
SCM gdbscm_invalid_object_error_symbol
 
static SCM none_symbol
 
static SCM message_symbol
 
static SCM full_symbol
 
static const char percent_print_exception_message_name []
 
static SCM percent_print_exception_message_var = SCM_BOOL_F
 
static const char percent_print_exception_with_stack_name []
 
static SCM percent_print_exception_with_stack_var = SCM_BOOL_F
 
static unsigned long gdbscm_exception_count = 0
 
static const scheme_function exception_functions []
 
static const scheme_function private_exception_functions []
 

Function Documentation

static int exscm_print_exception_smob ( SCM  self,
SCM  port,
scm_print_state *  pstate 
)
static
SCM gdbscm_exception_args ( SCM  self)
SCM gdbscm_exception_key ( SCM  self)
char* gdbscm_exception_message_to_string ( SCM  exception)
static SCM gdbscm_exception_p ( SCM  scm)
static

Definition at line 155 of file scm-exception.c.

References gdbscm_is_exception().

void gdbscm_initialize_exceptions ( void  )
void gdbscm_invalid_object_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  object 
)
int gdbscm_is_exception ( SCM  scm)
static SCM gdbscm_make_arg_error ( SCM  key,
const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  error_prefix,
const char *  error 
)
static
SCM gdbscm_make_error ( SCM  key,
const char *  subr,
const char *  message,
SCM  args,
SCM  data 
)
SCM gdbscm_make_error_scm ( SCM  key,
SCM  subr,
SCM  message,
SCM  args,
SCM  data 
)

Definition at line 210 of file scm-exception.c.

References gdbscm_make_exception().

Referenced by gdbscm_make_error().

SCM gdbscm_make_exception ( SCM  key,
SCM  args 
)
SCM gdbscm_make_exception_with_stack ( SCM  key,
SCM  args,
SCM  stack 
)

Definition at line 192 of file scm-exception.c.

References gdbscm_make_exception(), and with_stack_error_symbol.

Referenced by scscm_recording_unwind_handler().

SCM gdbscm_make_invalid_object_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  object 
)
SCM gdbscm_make_memory_error ( const char *  subr,
const char *  msg,
SCM  args 
)

Definition at line 382 of file scm-exception.c.

References gdbscm_make_error(), and memory_error_symbol.

Referenced by gdbscm_memory_error().

SCM gdbscm_make_misc_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  error 
)

Definition at line 361 of file scm-exception.c.

References gdbscm_make_arg_error().

Referenced by gdbscm_misc_error(), and vlscm_convert_typed_value_from_scheme().

SCM gdbscm_make_out_of_range_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  error 
)
SCM gdbscm_make_type_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  expected_type 
)
void gdbscm_memory_error ( const char *  subr,
const char *  msg,
SCM  args 
)
int gdbscm_memory_error_p ( SCM  key)

Definition at line 402 of file scm-exception.c.

References memory_error_symbol.

void gdbscm_misc_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  error 
)
void gdbscm_out_of_range_error ( const char *  subr,
int  arg_pos,
SCM  bad_value,
const char *  error 
)
static SCM gdbscm_percent_exception_count ( void  )
static

Definition at line 629 of file scm-exception.c.

References gdbscm_exception_count.

static SCM gdbscm_percent_exception_print_style ( void  )
static
static void gdbscm_print_exception_message ( SCM  port,
SCM  frame,
SCM  key,
SCM  args 
)
static
void gdbscm_print_exception_with_stack ( SCM  port,
SCM  stack,
SCM  key,
SCM  args 
)
void gdbscm_print_gdb_exception ( SCM  port,
SCM  exception 
)
SCM gdbscm_scm_from_gdb_exception ( struct gdb_exception  exception)
void gdbscm_throw ( SCM  exception)
void gdbscm_throw_gdb_exception ( struct gdb_exception  exception)

Definition at line 457 of file scm-exception.c.

References gdbscm_scm_from_gdb_exception(), and gdbscm_throw().

Referenced by gdbscm_breakpoint_commands().

int gdbscm_user_error_p ( SCM  key)

Definition at line 411 of file scm-exception.c.

References user_error_symbol.

Variable Documentation

SCM error_symbol
static

Definition at line 57 of file scm-exception.c.

Referenced by gdbscm_initialize_exceptions(), and gdbscm_scm_from_gdb_exception().

const scheme_function exception_functions[]
static
Initial value:
=
{
{ "make-exception", 2, 0, 0, gdbscm_make_exception,
"\
Create a <gdb:exception> object.\n\
\n\
Arguments: key args\n\
These are the standard key,args arguments of \"throw\"." },
{ "exception?", 1, 0, 0, gdbscm_exception_p,
"\
Return #t if the object is a <gdb:exception> object." },
{ "exception-key", 1, 0, 0, gdbscm_exception_key,
"\
Return the exception's key." },
{ "exception-args", 1, 0, 0, gdbscm_exception_args,
"\
Return the exception's arg list." },
}
SCM gdbscm_exception_args(SCM self)
#define END_FUNCTIONS
static SCM gdbscm_exception_p(SCM scm)
SCM gdbscm_make_exception(SCM key, SCM args)
SCM gdbscm_exception_key(SCM self)

Definition at line 636 of file scm-exception.c.

const char exception_smob_name[] = "gdb:exception"
static
scm_t_bits exception_smob_tag
static
SCM full_symbol
static
unsigned long gdbscm_exception_count = 0
static

Definition at line 102 of file scm-exception.c.

Referenced by gdbscm_make_exception(), and gdbscm_percent_exception_count().

SCM gdbscm_invalid_object_error_symbol
SCM memory_error_symbol
static
SCM message_symbol
static
SCM none_symbol
static
const char percent_print_exception_message_name[]
static
Initial value:
=
"%print-exception-message"

Definition at line 84 of file scm-exception.c.

Referenced by gdbscm_print_exception_message().

SCM percent_print_exception_message_var = SCM_BOOL_F
static

Definition at line 90 of file scm-exception.c.

Referenced by gdbscm_print_exception_message().

const char percent_print_exception_with_stack_name[]
static
Initial value:
=
"%print-exception-with-stack"

Definition at line 92 of file scm-exception.c.

Referenced by gdbscm_print_exception_with_stack().

SCM percent_print_exception_with_stack_var = SCM_BOOL_F
static

Definition at line 98 of file scm-exception.c.

Referenced by gdbscm_print_exception_with_stack().

const scheme_function private_exception_functions[]
static
Initial value:
=
{
{ "%exception-print-style", 0, 0, 0, gdbscm_percent_exception_print_style,
"\
Return the value of the \"guile print-stack\" option." },
{ "%exception-count", 0, 0, 0, gdbscm_percent_exception_count,
"\
Return a count of the number of <gdb:exception> objects created.\n\
This is for debugging purposes." },
}
static SCM gdbscm_percent_exception_print_style(void)
static SCM gdbscm_percent_exception_count(void)
#define END_FUNCTIONS

Definition at line 660 of file scm-exception.c.

SCM signal_symbol
static

Definition at line 64 of file scm-exception.c.

Referenced by gdbscm_initialize_exceptions(), and gdbscm_scm_from_gdb_exception().

SCM user_error_symbol
static

Definition at line 67 of file scm-exception.c.

Referenced by gdbscm_initialize_exceptions(), and gdbscm_user_error_p().

SCM with_stack_error_symbol
static