GDBserver
Classes | Enumerations | Functions | Variables
common-exceptions.c File Reference
#include "common-defs.h"
#include "common-exceptions.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

jmp_buf * exceptions_state_mc_init (void)
 
static void catcher_pop (void)
 
static int exceptions_state_mc (enum catcher_action action)
 
int exceptions_state_mc_catch (struct gdb_exception *exception, int mask)
 
int exceptions_state_mc_action_iter (void)
 
int exceptions_state_mc_action_iter_1 (void)
 
void * exception_try_scope_entry (void)
 
void exception_try_scope_exit (void *saved_state)
 
void exception_rethrow (void)
 
static void gdb_exception_sliced_copy (struct gdb_exception *to, const struct gdb_exception *from)
 
void throw_exception_sjlj (struct gdb_exception exception)
 
static ATTRIBUTE_NORETURN void throw_exception_cxx (struct gdb_exception exception)
 
void throw_exception (struct gdb_exception exception)
 
static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0)
 
void throw_verror (enum errors error, const char *fmt, va_list ap)
 
void throw_vquit (const char *fmt, va_list ap)
 
void throw_error (enum errors error, const char *fmt,...)
 
void throw_quit (const char *fmt,...)
 

Variables

const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL }
 
static struct catchercurrent_catcher
 
static int try_scope_depth
 
static char ** exception_messages
 
static int exception_messages_size
 

Enumeration Type Documentation

◆ catcher_action

Enumerator
CATCH_ITER 
CATCH_ITER_1 
CATCH_THROWING 

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

◆ catcher_state

Enumerator
CATCHER_CREATED 
CATCHER_RUNNING 
CATCHER_RUNNING_1 
CATCHER_ABORTING 

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

Function Documentation

◆ ATTRIBUTE_PRINTF()

static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF ( ,
 
)
static

◆ catcher_pop()

static void catcher_pop ( void  )
static

◆ exception_rethrow()

void exception_rethrow ( void  )

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

References all_cleanups(), and do_cleanups().

◆ exception_try_scope_entry()

void* exception_try_scope_entry ( void  )

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

References save_cleanups(), and try_scope_depth.

Referenced by exception_try_scope::exception_try_scope().

◆ exception_try_scope_exit()

void exception_try_scope_exit ( void *  saved_state)

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

References restore_cleanups(), and try_scope_depth.

Referenced by exception_try_scope::~exception_try_scope().

◆ exceptions_state_mc()

static int exceptions_state_mc ( enum catcher_action  action)
static

◆ exceptions_state_mc_action_iter()

int exceptions_state_mc_action_iter ( void  )

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

References CATCH_ITER, and exceptions_state_mc().

◆ exceptions_state_mc_action_iter_1()

int exceptions_state_mc_action_iter_1 ( void  )

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

References CATCH_ITER_1, and exceptions_state_mc().

◆ exceptions_state_mc_catch()

int exceptions_state_mc_catch ( struct gdb_exception exception,
int  mask 
)

◆ exceptions_state_mc_init()

jmp_buf* exceptions_state_mc_init ( void  )

◆ gdb_exception_sliced_copy()

static void gdb_exception_sliced_copy ( struct gdb_exception to,
const struct gdb_exception from 
)
static

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

Referenced by throw_exception_cxx().

◆ throw_error()

void throw_error ( enum errors  error,
const char *  fmt,
  ... 
)

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

References error(), and throw_verror().

Referenced by regcache_raw_get_unsigned().

◆ throw_exception()

void throw_exception ( struct gdb_exception  exception)

◆ throw_exception_cxx()

static ATTRIBUTE_NORETURN void throw_exception_cxx ( struct gdb_exception  exception)
static

◆ throw_exception_sjlj()

void throw_exception_sjlj ( struct gdb_exception  exception)

◆ throw_quit()

void throw_quit ( const char *  fmt,
  ... 
)

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

References throw_vquit().

Referenced by captured_main().

◆ throw_verror()

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

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

References error(), and RETURN_ERROR.

Referenced by throw_error(), and verror().

◆ throw_vquit()

void throw_vquit ( const char *  fmt,
va_list  ap 
)

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

References GDB_NO_ERROR, and RETURN_QUIT.

Referenced by throw_quit().

Variable Documentation

◆ current_catcher

struct catcher* current_catcher
static

◆ exception_messages

char** exception_messages
static

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

Referenced by ATTRIBUTE_PRINTF().

◆ exception_messages_size

int exception_messages_size
static

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

Referenced by ATTRIBUTE_PRINTF().

◆ exception_none

const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL }

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

Referenced by exceptions_state_mc_init().

◆ try_scope_depth

int try_scope_depth
static