GDB (xrefs)
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.

Referenced by throw_exception().

#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.

Referenced by catch_errors(), catch_exceptions_with_msg(), and exceptions_state_mc().

#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.

Referenced by ada_exception_name_addr(), ada_tag_name(), ada_tag_value_at_base_address(), ada_val_print(), addr_string_to_sals(), adjust_value_for_child_access(), amd64_epilogue_frame_cache(), amd64_frame_cache(), amd64_sigtramp_frame_cache(), append_ocl_sos(), apply_frame_filter(), archpy_disassemble(), baseclass_offset(), bpfinishpy_detect_out_scope_cb(), bpfinishpy_init(), bpfinishpy_post_stop_hook(), bpfinishpy_pre_stop_hook(), bppy_delete_breakpoint(), bppy_get_commands(), bppy_init(), bppy_set_condition(), bppy_set_enabled(), bppy_set_ignore_count(), bppy_set_task(), c_describe_child(), call_site_find_chain(), catch_command_errors(), catch_command_errors_const(), catch_errors(), catch_exceptions_with_msg(), check_exception_resume(), check_status_exception_catchpoint(), cmdpy_init(), core_open(), cp_print_value(), cp_print_value_fields(), create_breakpoint(), create_excep_cond_exprs(), do_gdb_disassembly(), do_one_display(), dwarf2_build_frame_info(), dwarf2_build_psymtabs(), dwarf2_evaluate_loc_desc_full(), dwarf2_frame_cache(), dwarf2_tailcall_sniffer_first(), enable_break(), enable_break2(), enable_breakpoint_disp(), enumerate_args(), enumerate_locals(), evaluate_subexp_standard(), fetch_subexp_value(), find_linespec_symbols(), find_new_threads_once(), finish_command_continuation(), frame_info_to_frame_object(), frame_unwind_find_by_frame(), frame_unwind_pc_if_available(), frapy_arch(), frapy_block(), frapy_find_sal(), frapy_function(), frapy_is_valid(), frapy_name(), frapy_newer(), frapy_older(), frapy_pc(), frapy_read_var(), frapy_select(), frapy_type(), frapy_unwind_stop_reason(), gdb_set_bp(), gdbpy_block_for_pc(), gdbpy_lookup_global_symbol(), gdbpy_lookup_symbol(), gdbpy_newest_frame(), gdbpy_readline_wrapper(), gdbpy_selected_frame(), get_addr_from_python(), get_frame_address_in_block_if_available(), get_frame_language(), get_frame_pc_if_available(), i386_epilogue_frame_cache(), i386_frame_cache(), i386_sigtramp_frame_cache(), ia64_hpux_at_dld_breakpoint_p(), ia64_hpux_handle_dld_breakpoint(), inferior_event_handler(), info_common_command_for_block(), infpy_read_memory(), infpy_search_memory(), infpy_threads(), infpy_write_memory(), insert_bp_location(), insert_exception_resume_breakpoint(), inspect_type(), install_new_value(), jit_reader_try_read_symtab(), keep_going(), linux_nat_attach(), list_arg_or_local(), mi_breakpoint_created(), mi_breakpoint_modified(), mi_execute_command(), parmpy_init(), parse_cmd_to_aexpr(), parse_cond_to_aexpr(), parse_exp_in_context_1(), parse_expression_for_completion(), parse_linespec(), pascal_object_print_value(), post_create_inferior(), ppc_linux_spe_context(), print_frame(), print_frame_arg(), print_one_vtable(), print_stack_frame(), print_variable_and_value(), process_next_line(), py_print_args(), py_print_frame(), py_print_single_arg(), py_print_type(), py_print_value(), re_set_exception_catchpoint(), read_frame_arg(), read_frame_local(), record_btrace_enable_warn(), reload_shared_libraries_1(), remote_get_noisy_reply(), remote_get_trace_status(), remote_open_1(), replace_typedefs(), rs6000_convert_from_func_ptr_addr(), run_inferior_call(), safe_execute_command(), safe_parse_type(), save_breakpoints(), save_gdb_index_command(), script_from_file(), should_stop_exception(), show_convenience(), solib_read_symbols(), solib_svr4_r_map(), source_gdb_script_for_objfile(), source_script_from_stream(), start_event_loop(), stpy_convert_to_value(), sympy_needs_frame(), sympy_value(), target_translate_tls_address(), tfile_open(), thpy_switch(), thread_db_find_new_threads_silently(), type_to_string(), typy_array_1(), typy_const(), typy_fields_items(), typy_get_composite(), typy_get_sizeof(), typy_legacy_template_argument(), typy_lookup_type(), typy_lookup_typename(), typy_pointer(), typy_reference(), typy_richcompare(), typy_str(), typy_strip_typedefs(), typy_template_argument(), typy_unqualified(), typy_volatile(), update_breakpoint_locations(), update_global_location_list_nothrow(), update_solib_list(), val_print(), value_of_root_1(), value_of_this_silent(), value_rtti_type(), value_struct_element_index(), variable_value(), varobj_create(), varobj_set_value(), and watch_command_1().


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.

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

Referenced by captured_main().

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 ,
void *  ,
char *  ,
return_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 uiout,
catch_exceptions_ftype func,
void *  func_args,
char **  gdberrmsg,
return_mask  mask 
)
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 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 
)
void void void throw_error ( enum errors  error,
const char *  fmt,
  ... 
)
void void throw_exception ( struct gdb_exception  exception)
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.

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines