GDB (xrefs)
|
#include "defs.h"
#include "exceptions.h"
#include "breakpoint.h"
#include "target.h"
#include "inferior.h"
#include "annotate.h"
#include "ui-out.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "serial.h"
#include "gdbthread.h"
Go to the source code of this file.
enum catcher_action |
Definition at line 46 of file exceptions.c.
enum catcher_state |
Definition at line 35 of file exceptions.c.
static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF | ( | 3 | , |
0 | |||
) | [static] |
Definition at line 367 of file exceptions.c.
References catcher_list_size(), gdb_exception::error, error(), exception_messages, exception_messages_size, gdb_assert, memset(), gdb_exception::message, gdb_exception::reason, throw_exception(), xfree(), xrealloc(), and xstrvprintf().
int catch_command_errors | ( | catch_command_errors_ftype * | command, |
char * | arg, | ||
int | from_tty, | ||
return_mask | 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().
int catch_command_errors_const | ( | catch_command_errors_const_ftype * | command, |
const char * | arg, | ||
int | from_tty, | ||
return_mask | mask | ||
) |
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 * | func, |
void * | func_args, | ||
char * | errstring, | ||
return_mask | mask | ||
) |
Definition at line 512 of file exceptions.c.
References current_uiout, func, gdb_stderr, print_any_exception(), gdb_exception::reason, RETURN_MASK, RETURN_MASK_ALL, throw_exception(), and TRY_CATCH.
Referenced by bpstat_check_breakpoint_conditions(), bpstat_check_watchpoint(), breakpoint_re_set(), call_wrapped_function(), captured_main(), dump_symtab_1(), find_objc_msgcall_submethod(), gdb_loadfile(), gdb_main(), gdbtk_call_wrapper(), get_windows_debug_event(), inferior_event_handler(), m32r_load(), normal_stop(), record_full_message_wrapper_safe(), remote_kill(), restore_infcall_control_state(), safe_read_memory_integer(), safe_symbol_file_add(), and update_solib_list().
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.
References catch_exceptions_with_msg().
Referenced by add_vsyscall_page(), get_current_frame(), and remote_fileio_request().
int catch_exceptions_with_msg | ( | struct ui_out * | func_uiout, |
catch_exceptions_ftype * | func, | ||
void * | func_args, | ||
char ** | gdberrmsg, | ||
return_mask | mask | ||
) |
Definition at line 460 of file exceptions.c.
References current_uiout, gdb_assert, gdb_stderr, gdb_exception::message, print_any_exception(), gdb_exception::reason, RETURN_MASK, RETURN_MASK_ALL, throw_exception(), and TRY_CATCH.
Referenced by catch_exceptions(), gdb_breakpoint_query(), gdb_list_thread_ids(), and gdb_thread_select().
static int catcher_list_size | ( | void | ) | [static] |
Definition at line 72 of file exceptions.c.
References catcher::prev, and size.
Referenced by ATTRIBUTE_PRINTF().
static void catcher_pop | ( | void | ) | [static] |
Definition at line 112 of file exceptions.c.
References current_catcher, catcher::prev, restore_cleanups(), catcher::saved_cleanup_chain, and xfree().
Referenced by exceptions_state_mc().
void exception_fprintf | ( | struct ui_file * | file, |
struct gdb_exception | e, | ||
const char * | prefix, | ||
... | |||
) |
Definition at line 316 of file exceptions.c.
References gdb_exception::message, print_exception(), print_flush(), gdb_exception::reason, and vfprintf_filtered().
Referenced by enable_breakpoint_disp(), find_new_threads_once(), reload_shared_libraries_1(), remote_get_noisy_reply(), remote_get_trace_status(), save_gdb_index_command(), should_stop_exception(), solib_read_symbols(), thread_db_find_new_threads_silently(), and update_solib_list().
void exception_print | ( | struct ui_file * | file, |
struct gdb_exception | e | ||
) |
Definition at line 306 of file exceptions.c.
References gdb_exception::message, print_exception(), print_flush(), and gdb_exception::reason.
Referenced by call_site_find_chain(), check_status_exception_catchpoint(), core_open(), create_breakpoint(), do_gdb_disassembly(), dwarf2_build_psymtabs(), dwarf2_evaluate_loc_desc_full(), dwarf2_tailcall_sniffer_first(), finish_command_continuation(), inferior_event_handler(), keep_going(), safe_execute_command(), solib_svr4_r_map(), source_gdb_script_for_objfile(), and start_event_loop().
static int exceptions_state_mc | ( | enum catcher_action | action | ) | [static] |
Definition at line 130 of file exceptions.c.
References _, CATCH_ITER, CATCH_ITER_1, CATCH_THROWING, CATCHER_ABORTING, CATCHER_CREATED, catcher_pop(), CATCHER_RUNNING, CATCHER_RUNNING_1, catcher::exception, internal_error(), catcher::mask, gdb_exception::reason, RETURN_MASK, catcher::state, and throw_exception().
Referenced by exceptions_state_mc_action_iter(), exceptions_state_mc_action_iter_1(), and throw_exception().
int exceptions_state_mc_action_iter | ( | void | ) |
Definition at line 208 of file exceptions.c.
References CATCH_ITER, and exceptions_state_mc().
int exceptions_state_mc_action_iter_1 | ( | void | ) |
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 | ||
) |
Definition at line 86 of file exceptions.c.
References catcher::buf, CATCHER_CREATED, current_catcher, gdb_exception::error, catcher::exception, GDB_NO_ERROR, catcher::mask, gdb_exception::message, catcher::prev, gdb_exception::reason, save_cleanups(), catcher::saved_cleanup_chain, catcher::state, and XZALLOC.
static void print_any_exception | ( | struct ui_file * | file, |
const char * | prefix, | ||
struct gdb_exception | e | ||
) | [static] |
Definition at line 335 of file exceptions.c.
References annotate_error_begin(), fputs_filtered(), gdb_flush(), gdb_stdout, gdb_exception::message, print_exception(), gdb_exception::reason, target_terminal_ours, and wrap_here().
Referenced by catch_command_errors(), catch_command_errors_const(), catch_errors(), and catch_exceptions_with_msg().
static void print_exception | ( | struct ui_file * | file, |
struct gdb_exception | e | ||
) | [static] |
Definition at line 270 of file exceptions.c.
References _, annotate_error(), annotate_quit(), fprintf_filtered(), fputs_filtered(), internal_error(), gdb_exception::message, gdb_exception::reason, RETURN_ERROR, RETURN_QUIT, strchr(), and ui_file_write().
Referenced by exception_fprintf(), exception_print(), and print_any_exception().
static void print_flush | ( | void | ) | [static] |
Definition at line 238 of file exceptions.c.
References annotate_error_begin(), deprecated_error_begin_hook, gdb_flush(), gdb_stderr, gdb_stdout, serial_drain_output(), serial_fdopen(), serial_un_fdopen(), target_terminal_ours, and wrap_here().
Referenced by exception_fprintf(), and exception_print().
void throw_error | ( | enum errors | error, |
const char * | fmt, | ||
... | |||
) |
Definition at line 417 of file exceptions.c.
References RETURN_ERROR.
Referenced by baseclass_offset(), call_function_by_hand(), call_site_find_chain_1(), call_site_for_pc(), call_site_to_target_addr(), create_sals_line_offset(), displaced_step_prepare(), dwarf2_frame_cfa(), dwarf_entry_parameter_to_value(), dwarf_expr_push_dwarf_reg_entry_value(), dwarf_expr_reg_to_entry_parameter(), find_method(), find_overload_match(), frame_unwind_pc(), frame_unwind_register(), func_addr_to_tail_call_list(), func_verify_no_selftailcall(), get_frame_func(), getpkt_or_notif_sane_1(), gnuv2_baseclass_offset(), linespec_expression_to_pc(), linespec_parse_basic(), linux_nat_attach(), memory_error(), parse_probes(), readchar(), regcache_read_pc(), remote_get_thread_local_address(), require_available(), script_from_file(), source_python_script(), spu_software_single_step(), symbol_not_found_error(), target_translate_tls_address(), thread_db_get_thread_local_address(), throw_perror_with_name(), unexpected_linespec_error(), unpush_and_perror(), value_assign(), value_of_dwarf_block_entry(), value_struct_elt(), value_x_binop(), value_x_unop(), and write_pieced_value().
void throw_exception | ( | struct gdb_exception | exception | ) |
Definition at line 222 of file exceptions.c.
References all_cleanups(), catcher::buf, CATCH_THROWING, clear_quit_flag(), do_cleanups(), catcher::exception, EXCEPTIONS_SIGLONGJMP, exceptions_state_mc(), immediate_quit, and gdb_exception::reason.
Referenced by addr_string_to_sals(), amd64_epilogue_frame_cache(), amd64_frame_cache(), amd64_sigtramp_frame_cache(), append_ocl_sos(), ATTRIBUTE_PRINTF(), baseclass_offset(), call_function_by_hand(), call_site_find_chain(), catch_errors(), catch_exceptions_with_msg(), create_breakpoint(), dwarf2_evaluate_loc_desc_full(), dwarf2_frame_cache(), evaluate_subexp_standard(), exceptions_state_mc(), fetch_subexp_value(), find_linespec_symbols(), frame_unwind_find_by_frame(), frame_unwind_pc_if_available(), gdbtk_source_start_file(), 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(), parse_exp_in_context_1(), parse_linespec(), post_create_inferior(), process_next_line(), re_set_exception_catchpoint(), remote_get_trace_status(), remote_open_1(), save_breakpoints(), source_script_from_stream(), target_translate_tls_address(), tfile_open(), and watch_command_1().
void throw_verror | ( | enum errors | error, |
const char * | fmt, | ||
va_list | ap | ||
) |
Definition at line 405 of file exceptions.c.
References RETURN_ERROR.
Referenced by error(), mips_error(), and verror().
void throw_vfatal | ( | const char * | fmt, |
va_list | ap | ||
) |
Definition at line 411 of file exceptions.c.
References GDB_NO_ERROR, and RETURN_QUIT.
struct catcher* current_catcher [static] |
Definition at line 67 of file exceptions.c.
Referenced by catcher_pop(), and exceptions_state_mc_init().
char** exception_messages [static] |
Definition at line 362 of file exceptions.c.
Referenced by ATTRIBUTE_PRINTF().
int exception_messages_size [static] |
Definition at line 365 of file exceptions.c.
Referenced by ATTRIBUTE_PRINTF().
struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL } |
Definition at line 32 of file exceptions.c.
Referenced by gdbtk_interpreter_exec(), interp_exec(), and mi_interpreter_exec().