GDB (xrefs)
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 ada_to_fixed_type_1(), completion_tracker::add_completion(), baseclass_offset(), call_function_by_hand_dummy(), call_site_find_chain_1(), call_site_for_pc(), call_site_to_target_addr(), create_sals_line_offset(), displaced_step_prepare_throw(), dwarf2_frame_cfa(), dwarf_entry_parameter_to_value(), dwarf_expr_reg_to_entry_parameter(), find_method(), find_overload_match(), frame_unwind_pc(), frame_unwind_register(), frame_unwind_register_signed(), frame_unwind_register_unsigned(), func_addr_to_tail_call_list(), func_verify_no_selftailcall(), get_frame_func(), getpkt_or_notif_sane_1(), gnuv2_baseclass_offset(), interrupt_query(), linespec_expression_to_pc(), linux_displaced_step_location(), linux_nat_attach(), memory_error(), mi_parse(), parse_probes(), dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value(), readchar(), record_btrace_frame_prev_register(), regcache_raw_get_signed(), regcache_raw_get_unsigned(), regcache_read_pc(), remote_get_thread_local_address(), remote_insert_breakpoint(), remote_unpush_and_throw(), require_available(), rw_pieced_value(), script_from_file(), source_file_not_found_error(), spu_software_single_step(), symbol_not_found_error(), thread_db_get_thread_local_address(), throw_perror_with_name(), undefined_label_error(), unexpected_linespec_error(), unpush_and_perror(), value_assign(), value_of_dwarf_block_entry(), value_struct_elt(), value_x_binop(), and value_x_unop().

◆ throw_exception()

void throw_exception ( struct gdb_exception  exception)

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

References catcher::exception, throw_exception_cxx(), and throw_exception_sjlj().

Referenced by aarch64_make_prologue_cache(), aarch64_make_stub_cache(), amd64_epilogue_frame_cache(), amd64_frame_cache(), amd64_sigtramp_frame_cache(), append_ocl_sos(), ATTRIBUTE_PRINTF(), baseclass_offset(), btrace_compute_ftrace(), btrace_enable(), call_function_by_hand_dummy(), call_site_find_chain(), cmd_record_btrace_bts_start(), cmd_record_btrace_pt_start(), cmd_record_btrace_start(), compile_object_run(), complete_line_internal(), create_breakpoint(), detach_one_lwp(), displaced_step_prepare(), dwarf2_evaluate_loc_desc_full(), dwarf2_frame_cache(), evaluate_funcall(), evaluate_subexp_standard(), evaluate_var_value(), event_location_to_sals(), fetch_subexp_value(), find_linespec_symbols(), frame_unwind_pc(), frame_unwind_try_unwinder(), gdb_rl_callback_read_char_wrapper(), get_frame_address_in_block_if_available(), get_frame_language(), get_frame_pc_if_available(), get_prev_frame_always(), get_thread_current_frame(), i386_epilogue_frame_cache(), i386_frame_cache(), i386_sigtramp_frame_cache(), inferior_event_handler(), linux_resume_one_lwp(), location_to_sals(), gdb_xml_parser::parse(), parse_exp_in_context_1(), parse_linespec(), post_create_inferior(), print_frame_local_vars(), process_next_line(), re_set_exception_catchpoint(), record_btrace_insert_breakpoint(), record_btrace_remove_breakpoint(), record_btrace_start_replaying(), remote_get_trace_status(), remote_kill_k(), remote_open_1(), resume(), resume_stopped_resumed_lwps(), rs6000_epilogue_frame_cache(), rs6000_frame_cache(), s390_frame_unwind_cache(), save_breakpoints(), target_translate_tls_address(), tfile_open(), types_deeply_equal(), value_rtti_indirect_type(), and write_gcore_file().

◆ 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 internal_verror(), prompt_for_continue(), and quit().

◆ 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(), gdb_xml_parser::verror(), 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 }

◆ try_scope_depth

int try_scope_depth
static