GDBserver
Classes | Macros | Enumerations | Functions | Variables
common-exceptions.h File Reference
#include "gdb_setjmp.h"

Go to the source code of this file.

Classes

struct  gdb_exception
 

Macros

#define RETURN_MASK(reason)   (1 << (int)(-reason))
 
#define TRY
 
#define CATCH(EXCEPTION, MASK)
 
#define END_CATCH   }
 

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, NOT_AVAILABLE_ERROR, OPTIMIZED_OUT_ERROR, NO_ENTRY_VALUE_ERROR,
  TARGET_CLOSE_ERROR, UNDEFINED_COMMAND_ERROR, NOT_SUPPORTED_ERROR, MAX_COMPLETIONS_REACHED_ERROR,
  NR_ERRORS
}
 

Functions

SIGJMP_BUFexceptions_state_mc_init (void)
 
int exceptions_state_mc_action_iter (void)
 
int exceptions_state_mc_action_iter_1 (void)
 
int exceptions_state_mc_catch (struct gdb_exception *, int)
 
void prepare_to_throw_exception (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_vquit (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
 
void void void void throw_quit (const char *fmt,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1
 

Variables

void void void void const struct gdb_exception exception_none
 

Macro Definition Documentation

#define CATCH (   EXCEPTION,
  MASK 
)
Value:
{ \
struct gdb_exception EXCEPTION; \
if (exceptions_state_mc_catch (&(EXCEPTION), MASK))
int exceptions_state_mc_catch(struct gdb_exception *, int)

Definition at line 171 of file common-exceptions.h.

Referenced by captured_main(), detach_or_kill_for_exit_cleanup(), linux_resume_one_lwp(), and main().

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

Definition at line 39 of file common-exceptions.h.

Referenced by exceptions_state_mc_catch().

#define TRY
Value:
{ \
SIGJMP_BUF *buf = \
SIGSETJMP (*buf); \
} \
int exceptions_state_mc_action_iter(void)
int exceptions_state_mc_action_iter_1(void)
SIGJMP_BUF * exceptions_state_mc_init(void)

Definition at line 162 of file common-exceptions.h.

Referenced by captured_main(), detach_or_kill_for_exit_cleanup(), linux_resume_one_lwp(), and main().

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 
NOT_AVAILABLE_ERROR 
OPTIMIZED_OUT_ERROR 
NO_ENTRY_VALUE_ERROR 
TARGET_CLOSE_ERROR 
UNDEFINED_COMMAND_ERROR 
NOT_SUPPORTED_ERROR 
MAX_COMPLETIONS_REACHED_ERROR 
NR_ERRORS 

Definition at line 50 of file common-exceptions.h.

Enumerator
RETURN_MASK_QUIT 
RETURN_MASK_ERROR 
RETURN_MASK_ALL 

Definition at line 41 of file common-exceptions.h.

Enumerator
RETURN_QUIT 
RETURN_ERROR 

Definition at line 31 of file common-exceptions.h.

Function Documentation

int exceptions_state_mc_action_iter ( void  )

Definition at line 205 of file common-exceptions.c.

References CATCH_ITER, and exceptions_state_mc().

int exceptions_state_mc_action_iter_1 ( void  )

Definition at line 211 of file common-exceptions.c.

References CATCH_ITER_1, and exceptions_state_mc().

int exceptions_state_mc_catch ( struct gdb_exception ,
int   
)
SIGJMP_BUF* exceptions_state_mc_init ( void  )
void prepare_to_throw_exception ( void  )

Definition at line 144 of file utils.c.

Referenced by throw_exception().

void void void throw_error ( enum errors  error,
const char *  fmt,
  ... 
)
void throw_exception ( struct gdb_exception  exception)
void void void void throw_quit ( const char *  fmt,
  ... 
)
void throw_verror ( enum errors  ,
const char *  fmt,
va_list  ap 
)
void void throw_vquit ( const char *  fmt,
va_list  ap 
)

Variable Documentation

void void void void const struct gdb_exception exception_none

Definition at line 23 of file common-exceptions.c.

Referenced by exceptions_state_mc_init().