GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include <ctype.h>
#include "breakpoint.h"
#include "gdbcmd.h"
#include "inferior.h"
#include "annotate.h"
#include "valprint.h"
#include "cli/cli-utils.h"
#include "completer.h"
#include "gdb_obstack.h"
Go to the source code of this file.
#define INTERNAL_SIGNAL | ( | x | ) | ((x) == GDB_SIGNAL_TRAP || (x) == GDB_SIGNAL_INT) |
Definition at line 32 of file break-catch-sig.c.
Referenced by signal_catchpoint_breakpoint_hit(), signal_catchpoint_insert_location(), and signal_catchpoint_remove_location().
typedef enum gdb_signal gdb_signal_type |
Definition at line 34 of file break-catch-sig.c.
void _initialize_break_catch_sig | ( | void | ) |
Definition at line 489 of file break-catch-sig.c.
References _, add_catch_command(), CATCH_PERMANENT, catch_signal_command(), CATCH_TEMPORARY, initialize_signal_catchpoint_ops(), and signal_catch_counts.
static void catch_signal_command | ( | char * | arg, |
int | from_tty, | ||
struct cmd_list_element * | command | ||
) | [static] |
Definition at line 442 of file break-catch-sig.c.
References CATCH_TEMPORARY, create_signal_catchpoint(), get_cmd_context(), skip_spaces(), and VEC.
Referenced by _initialize_break_catch_sig().
static void create_signal_catchpoint | ( | int | tempflag, |
VEC(gdb_signal_type)* | filter, | ||
int | catch_all | ||
) | [static] |
Definition at line 367 of file break-catch-sig.c.
References signal_catchpoint::base, get_current_arch(), init_catchpoint(), install_breakpoint(), and signal_catchpoint_ops.
Referenced by catch_signal_command().
static void initialize_signal_catchpoint_ops | ( | void | ) | [static] |
Definition at line 467 of file break-catch-sig.c.
References base_breakpoint_ops, breakpoint_ops::breakpoint_hit, breakpoint_ops::dtor, breakpoint_ops::explains_signal, initialize_breakpoint_ops(), breakpoint_ops::insert_location, breakpoint_ops::print_it, breakpoint_ops::print_mention, breakpoint_ops::print_one, breakpoint_ops::print_recreate, breakpoint_ops::remove_location, signal_catchpoint_breakpoint_hit(), signal_catchpoint_dtor(), signal_catchpoint_explains_signal(), signal_catchpoint_insert_location(), signal_catchpoint_ops, signal_catchpoint_print_it(), signal_catchpoint_print_mention(), signal_catchpoint_print_one(), signal_catchpoint_print_recreate(), and signal_catchpoint_remove_location().
Referenced by _initialize_break_catch_sig().
static int signal_catchpoint_breakpoint_hit | ( | const struct bp_location * | bl, |
struct address_space * | aspace, | ||
CORE_ADDR | bp_addr, | ||
const struct target_waitstatus * | ws | ||
) | [static] |
Definition at line 177 of file break-catch-sig.c.
References gdb_assert, INTERNAL_SIGNAL, target_waitstatus::kind, bp_location::owner, target_waitstatus::sig, TARGET_WAITKIND_STOPPED, target_waitstatus::value, and VEC_iterate.
Referenced by initialize_signal_catchpoint_ops().
static void signal_catchpoint_dtor | ( | struct breakpoint * | b | ) | [static] |
Definition at line 94 of file break-catch-sig.c.
References base_breakpoint_ops, breakpoint_ops::dtor, and VEC_free.
Referenced by initialize_signal_catchpoint_ops().
static enum bpstat_signal_value signal_catchpoint_explains_signal | ( | struct breakpoint * | b, |
enum gdb_signal | sig | ||
) | [static] |
Definition at line 354 of file break-catch-sig.c.
References BPSTAT_SIGNAL_PASS.
Referenced by initialize_signal_catchpoint_ops().
static int signal_catchpoint_insert_location | ( | struct bp_location * | bl | ) | [static] |
Definition at line 107 of file break-catch-sig.c.
References INTERNAL_SIGNAL, bp_location::owner, signal_catch_counts, signal_catch_update(), and VEC_iterate.
Referenced by initialize_signal_catchpoint_ops().
static enum print_stop_action signal_catchpoint_print_it | ( | bpstat | bs | ) | [static] |
Definition at line 215 of file break-catch-sig.c.
References _, annotate_catchpoint(), bpstats::breakpoint_at, get_last_target_status(), breakpoint::number, PRINT_SRC_AND_LOC, printf_filtered(), target_waitstatus::sig, signal_to_name_or_int(), and target_waitstatus::value.
Referenced by initialize_signal_catchpoint_ops().
static void signal_catchpoint_print_mention | ( | struct breakpoint * | b | ) | [static] |
Definition at line 296 of file break-catch-sig.c.
References _, name, breakpoint::number, printf_filtered(), signal_to_name_or_int(), VEC_iterate, and VEC_length.
Referenced by initialize_signal_catchpoint_ops().
static void signal_catchpoint_print_one | ( | struct breakpoint * | b, |
struct bp_location ** | last_loc | ||
) | [static] |
Definition at line 237 of file break-catch-sig.c.
References value_print_options::addressprint, annotate_field(), current_uiout, do_cleanups(), get_user_print_options(), make_cleanup_obstack_free(), name, signal_to_name_or_int(), ui_out_field_skip(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_text(), VEC_iterate, and VEC_length.
Referenced by initialize_signal_catchpoint_ops().
static void signal_catchpoint_print_recreate | ( | struct breakpoint * | b, |
struct ui_file * | fp | ||
) | [static] |
Definition at line 330 of file break-catch-sig.c.
References fprintf_unfiltered(), signal_to_name_or_int(), and VEC_iterate.
Referenced by initialize_signal_catchpoint_ops().
static int signal_catchpoint_remove_location | ( | struct bp_location * | bl | ) | [static] |
Definition at line 139 of file break-catch-sig.c.
References gdb_assert, INTERNAL_SIGNAL, bp_location::owner, signal_catch_counts, signal_catch_update(), and VEC_iterate.
Referenced by initialize_signal_catchpoint_ops().
static const char* signal_to_name_or_int | ( | enum gdb_signal | sig | ) | [static] |
Definition at line 78 of file break-catch-sig.c.
References gdb_signal_to_name(), and plongest().
Referenced by signal_catchpoint_print_it(), signal_catchpoint_print_mention(), signal_catchpoint_print_one(), and signal_catchpoint_print_recreate().
static VEC | ( | gdb_signal_type | ) | [static] |
Definition at line 385 of file break-catch-sig.c.
References _, discard_cleanups(), do_cleanups(), error(), extract_arg(), gdb_assert, gdb_signal_from_command(), gdb_signal_from_name(), int, make_cleanup(), skip_spaces(), VEC, VEC_cleanup, VEC_safe_push, and xfree().
Definition at line 486 of file break-catch-sig.c.
Referenced by initialize_all_files().
unsigned int* signal_catch_counts [static] |
Definition at line 70 of file break-catch-sig.c.
Referenced by _initialize_break_catch_sig(), signal_catchpoint_insert_location(), and signal_catchpoint_remove_location().
struct breakpoint_ops signal_catchpoint_ops [static] |
Definition at line 66 of file break-catch-sig.c.
Referenced by create_signal_catchpoint(), and initialize_signal_catchpoint_ops().