GDB (API)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/exceptions.h File Reference
#include "ui-out.h"
#include <setjmp.h>

Go to the source code of this file.

Classes

struct  gdb_exception

Defines

#define RETURN_MASK(reason)   (1 << (int)(-reason))
#define EXCEPTIONS_SIGJMP_BUF   jmp_buf
#define EXCEPTIONS_SIGSETJMP(buf)   setjmp(buf)
#define EXCEPTIONS_SIGLONGJMP(buf, val)   longjmp((buf), (val))
#define TRY_CATCH(EXCEPTION, MASK)

Typedefs

typedef intcatch_exceptions_ftype )(struct ui_out *ui_out, void *args)
typedef void( catch_exception_ftype )(struct ui_out *ui_out, void *args)
typedef intcatch_errors_ftype )(void *)
typedef void( catch_command_errors_ftype )(char *, int)
typedef void( catch_command_errors_const_ftype )(const char *, int)

Enumerations

enum  return_reason { RETURN_QUIT = -2, RETURN_ERROR }
enum  return_mask { RETURN_MASK_QUIT = RETURN_MASK (RETURN_QUIT), RETURN_MASK_ERROR = RETURN_MASK (RETURN_ERROR), RETURN_MASK_ALL = (RETURN_MASK_QUIT | RETURN_MASK_ERROR) }
enum  errors {
  GDB_NO_ERROR, GENERIC_ERROR, NOT_FOUND_ERROR, TLS_NO_LIBRARY_SUPPORT_ERROR,
  TLS_LOAD_MODULE_NOT_FOUND_ERROR, TLS_NOT_ALLOCATED_YET_ERROR, TLS_GENERIC_ERROR, XML_PARSE_ERROR,
  MEMORY_ERROR, UNSUPPORTED_ERROR, NOT_AVAILABLE_ERROR, NO_ENTRY_VALUE_ERROR,
  TARGET_CLOSE_ERROR, NR_ERRORS
}

Functions

EXCEPTIONS_SIGJMP_BUFexceptions_state_mc_init (volatile struct gdb_exception *exception, return_mask mask)
int exceptions_state_mc_action_iter (void)
int exceptions_state_mc_action_iter_1 (void)
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,...) ATTRIBUTE_PRINTF(3
void void throw_exception (struct gdb_exception exception) ATTRIBUTE_NORETURN
void throw_verror (enum errors, const char *fmt, va_list ap) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(2
void void throw_vfatal (const char *fmt, va_list ap) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1
void void void throw_error (enum errors error, const char *fmt,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(2
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 *uiout, catch_exceptions_ftype *func, void *func_args, char **gdberrmsg, return_mask mask)
int catch_errors (catch_errors_ftype *, void *, char *, return_mask)
int catch_command_errors (catch_command_errors_ftype *func, char *arg, int from_tty, return_mask)
int catch_command_errors_const (catch_command_errors_const_ftype *func, const char *arg, int from_tty, return_mask)

Variables

struct gdb_exception exception_none

Define Documentation

#define EXCEPTIONS_SIGJMP_BUF   jmp_buf

Definition at line 118 of file exceptions.h.

#define EXCEPTIONS_SIGLONGJMP (   buf,
  val 
)    longjmp((buf), (val))

Definition at line 120 of file exceptions.h.

#define EXCEPTIONS_SIGSETJMP (   buf)    setjmp(buf)

Definition at line 119 of file exceptions.h.

#define RETURN_MASK (   reason)    (1 << (int)(-reason))

Definition at line 40 of file exceptions.h.

#define TRY_CATCH (   EXCEPTION,
  MASK 
)
Value:
{ \
       EXCEPTIONS_SIGJMP_BUF *buf = \
         exceptions_state_mc_init (&(EXCEPTION), (MASK)); \
       EXCEPTIONS_SIGSETJMP (*buf); \
     } \
     while (exceptions_state_mc_action_iter ()) \
       while (exceptions_state_mc_action_iter_1 ())

Definition at line 153 of file exceptions.h.


Typedef Documentation

typedef void( catch_command_errors_const_ftype)(const char *, int)

Definition at line 260 of file exceptions.h.

typedef void( catch_command_errors_ftype)(char *, int)

Definition at line 254 of file exceptions.h.

typedef int( catch_errors_ftype)(void *)

Definition at line 248 of file exceptions.h.

typedef void( catch_exception_ftype)(struct ui_out *ui_out, void *args)

Definition at line 232 of file exceptions.h.

typedef int( catch_exceptions_ftype)(struct ui_out *ui_out, void *args)

Definition at line 228 of file exceptions.h.


Enumeration Type Documentation

enum errors
Enumerator:
GDB_NO_ERROR 
GENERIC_ERROR 
NOT_FOUND_ERROR 
TLS_NO_LIBRARY_SUPPORT_ERROR 
TLS_LOAD_MODULE_NOT_FOUND_ERROR 
TLS_NOT_ALLOCATED_YET_ERROR 
TLS_GENERIC_ERROR 
XML_PARSE_ERROR 
MEMORY_ERROR 
UNSUPPORTED_ERROR 
NOT_AVAILABLE_ERROR 
NO_ENTRY_VALUE_ERROR 
TARGET_CLOSE_ERROR 
NR_ERRORS 

Definition at line 51 of file exceptions.h.

Enumerator:
RETURN_MASK_QUIT 
RETURN_MASK_ERROR 
RETURN_MASK_ALL 

Definition at line 42 of file exceptions.h.

Enumerator:
RETURN_QUIT 
RETURN_ERROR 

Definition at line 32 of file exceptions.h.


Function Documentation

int catch_command_errors ( catch_command_errors_ftype func,
char *  arg,
int  from_tty,
return_mask   
)

Definition at line 544 of file exceptions.c.

Definition at line 560 of file exceptions.c.

int catch_errors ( catch_errors_ftype ,
void *  ,
char *  ,
return_mask   
)

Definition at line 512 of file exceptions.c.

int catch_exceptions ( struct ui_out *  uiout,
catch_exceptions_ftype func,
void *  func_args,
return_mask  mask 
)

Definition at line 451 of file exceptions.c.

int catch_exceptions_with_msg ( struct ui_out *  uiout,
catch_exceptions_ftype func,
void *  func_args,
char **  gdberrmsg,
return_mask  mask 
)

Definition at line 460 of file exceptions.c.

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 
)

Definition at line 306 of file exceptions.c.

Definition at line 208 of file exceptions.c.

Definition at line 214 of file exceptions.c.

EXCEPTIONS_SIGJMP_BUF* exceptions_state_mc_init ( volatile struct gdb_exception exception,
return_mask  mask 
)

Definition at line 86 of file exceptions.c.

void void void throw_error ( enum errors  error,
const char *  fmt,
  ... 
)
void void throw_exception ( struct gdb_exception  exception)

Definition at line 222 of file exceptions.c.

void throw_verror ( enum errors  ,
const char *  fmt,
va_list  ap 
)
void void throw_vfatal ( const char *  fmt,
va_list  ap 
)

Variable Documentation

Definition at line 32 of file exceptions.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines