GDB (xrefs)
Classes | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/exceptions.c File Reference
#include "defs.h"
#include "exceptions.h"
#include "breakpoint.h"
#include "target.h"
#include "inferior.h"
#include "annotate.h"
#include "ui-out.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "serial.h"
#include "gdbthread.h"

Go to the source code of this file.

Classes

struct  catcher

Enumerations

enum  catcher_state { CATCHER_CREATED, CATCHER_RUNNING, CATCHER_RUNNING_1, CATCHER_ABORTING }
enum  catcher_action { CATCH_ITER, CATCH_ITER_1, CATCH_THROWING }

Functions

static int catcher_list_size (void)
EXCEPTIONS_SIGJMP_BUFexceptions_state_mc_init (volatile struct gdb_exception *exception, return_mask mask)
static void catcher_pop (void)
static int exceptions_state_mc (enum catcher_action action)
int exceptions_state_mc_action_iter (void)
int exceptions_state_mc_action_iter_1 (void)
void throw_exception (struct gdb_exception exception)
static void print_flush (void)
static void print_exception (struct ui_file *file, struct gdb_exception e)
void exception_print (struct ui_file *file, struct gdb_exception e)
void exception_fprintf (struct ui_file *file, struct gdb_exception e, const char *prefix,...)
static void print_any_exception (struct ui_file *file, const char *prefix, struct gdb_exception e)
static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0)
void throw_verror (enum errors error, const char *fmt, va_list ap)
void throw_vfatal (const char *fmt, va_list ap)
void throw_error (enum errors error, const char *fmt,...)
int catch_exceptions (struct ui_out *uiout, catch_exceptions_ftype *func, void *func_args, return_mask mask)
int catch_exceptions_with_msg (struct ui_out *func_uiout, catch_exceptions_ftype *func, void *func_args, char **gdberrmsg, return_mask mask)
int catch_errors (catch_errors_ftype *func, void *func_args, char *errstring, return_mask mask)
int catch_command_errors (catch_command_errors_ftype *command, char *arg, int from_tty, return_mask mask)
int catch_command_errors_const (catch_command_errors_const_ftype *command, const char *arg, int from_tty, return_mask mask)

Variables

struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }
static struct catchercurrent_catcher
static char ** exception_messages
static int exception_messages_size

Enumeration Type Documentation

Enumerator:
CATCH_ITER 
CATCH_ITER_1 
CATCH_THROWING 

Definition at line 46 of file exceptions.c.

Enumerator:
CATCHER_CREATED 
CATCHER_RUNNING 
CATCHER_RUNNING_1 
CATCHER_ABORTING 

Definition at line 35 of file exceptions.c.


Function Documentation

static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF ( ,
 
) [static]
int catch_command_errors ( catch_command_errors_ftype command,
char *  arg,
int  from_tty,
return_mask  mask 
)

Definition at line 544 of file exceptions.c.

References gdb_stderr, print_any_exception(), gdb_exception::reason, and TRY_CATCH.

Referenced by captured_main().

int catch_command_errors_const ( catch_command_errors_const_ftype command,
const char *  arg,
int  from_tty,
return_mask  mask 
)

Definition at line 560 of file exceptions.c.

References gdb_stderr, print_any_exception(), gdb_exception::reason, and TRY_CATCH.

Referenced by captured_main().

int catch_errors ( catch_errors_ftype func,
void *  func_args,
char *  errstring,
return_mask  mask 
)
int catch_exceptions ( struct ui_out uiout,
catch_exceptions_ftype func,
void *  func_args,
return_mask  mask 
)
int catch_exceptions_with_msg ( struct ui_out func_uiout,
catch_exceptions_ftype func,
void *  func_args,
char **  gdberrmsg,
return_mask  mask 
)
static int catcher_list_size ( void  ) [static]

Definition at line 72 of file exceptions.c.

References catcher::prev, and size.

Referenced by ATTRIBUTE_PRINTF().

static void catcher_pop ( void  ) [static]
void exception_fprintf ( struct ui_file file,
struct gdb_exception  e,
const char *  prefix,
  ... 
)
void exception_print ( struct ui_file file,
struct gdb_exception  e 
)
static int exceptions_state_mc ( enum catcher_action  action) [static]

Definition at line 208 of file exceptions.c.

References CATCH_ITER, and exceptions_state_mc().

Definition at line 214 of file exceptions.c.

References CATCH_ITER_1, and exceptions_state_mc().

EXCEPTIONS_SIGJMP_BUF* exceptions_state_mc_init ( volatile struct gdb_exception exception,
return_mask  mask 
)
static void print_any_exception ( struct ui_file file,
const char *  prefix,
struct gdb_exception  e 
) [static]
static void print_exception ( struct ui_file file,
struct gdb_exception  e 
) [static]
static void print_flush ( void  ) [static]
void throw_error ( enum errors  error,
const char *  fmt,
  ... 
)
void throw_exception ( struct gdb_exception  exception)
void throw_verror ( enum errors  error,
const char *  fmt,
va_list  ap 
)

Definition at line 405 of file exceptions.c.

References RETURN_ERROR.

Referenced by error(), mips_error(), and verror().

void throw_vfatal ( const char *  fmt,
va_list  ap 
)

Definition at line 411 of file exceptions.c.

References GDB_NO_ERROR, and RETURN_QUIT.

Referenced by fatal(), and vfatal().


Variable Documentation

struct catcher* current_catcher [static]

Definition at line 67 of file exceptions.c.

Referenced by catcher_pop(), and exceptions_state_mc_init().

char** exception_messages [static]

Definition at line 362 of file exceptions.c.

Referenced by ATTRIBUTE_PRINTF().

Definition at line 365 of file exceptions.c.

Referenced by ATTRIBUTE_PRINTF().

struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }

Definition at line 32 of file exceptions.c.

Referenced by gdbtk_interpreter_exec(), interp_exec(), and mi_interpreter_exec().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines