for all exception catchpoint kinds. */
static void
-check_status_exception (bpstat bs)
+check_status_exception (bpstat *bs)
{
bs->stop = should_stop_exception (bs->bp_location_at.get ());
}
for all exception catchpoint kinds. */
static enum print_stop_action
-print_it_exception (bpstat bs)
+print_it_exception (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
/* The 'normal_stop' observer notification callback. */
static void
-ada_tasks_normal_stop_observer (struct bpstats *unused_args, int unused_args2)
+ada_tasks_normal_stop_observer (struct bpstat *unused_args, int unused_args2)
{
/* The inferior has been resumed, and just stopped. This means that
our task_list needs to be recomputed before it can be used again. */
catchpoints. */
static enum print_stop_action
-signal_catchpoint_print_it (bpstat bs)
+signal_catchpoint_print_it (bpstat *bs)
{
struct breakpoint *b = bs->breakpoint_at;
struct target_waitstatus last;
catchpoints. */
static enum print_stop_action
-print_it_catch_syscall (bpstat bs)
+print_it_catch_syscall (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
/* Implement the 'check_status' method. */
static void
-check_status_exception_catchpoint (struct bpstats *bs)
+check_status_exception_catchpoint (struct bpstat *bs)
{
struct exception_catchpoint *self
= (struct exception_catchpoint *) bs->breakpoint_at;
}
static enum print_stop_action
-print_it_exception_catchpoint (bpstat bs)
+print_it_exception_catchpoint (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
static int remove_breakpoint (struct bp_location *);
static int remove_breakpoint_1 (struct bp_location *, enum remove_bp_reason);
-static enum print_stop_action print_bp_stop_message (bpstat bs);
+static enum print_stop_action print_bp_stop_message (bpstat *bs);
static int hw_breakpoint_used_count (void);
Also free any storage that is part of a bpstat. */
void
-bpstat_clear (bpstat *bsp)
+bpstat_clear (bpstat **bsp)
{
- bpstat p;
- bpstat q;
+ bpstat *p;
+ bpstat *q;
if (bsp == 0)
return;
*bsp = NULL;
}
-bpstats::bpstats (const bpstats &other)
+bpstat::bpstat (const bpstat &other)
: next (NULL),
bp_location_at (other.bp_location_at),
breakpoint_at (other.breakpoint_at),
/* Return a copy of a bpstat. Like "bs1 = bs2" but all storage that
is part of the bpstat is copied as well. */
-bpstat
-bpstat_copy (bpstat bs)
+bpstat *
+bpstat_copy (bpstat *bs)
{
- bpstat p = NULL;
- bpstat tmp;
- bpstat retval = NULL;
+ bpstat *p = nullptr;
+ bpstat *tmp;
+ bpstat *retval = nullptr;
if (bs == NULL)
return bs;
for (; bs != NULL; bs = bs->next)
{
- tmp = new bpstats (*bs);
+ tmp = new bpstat (*bs);
if (p == NULL)
/* This is the first thing in the chain. */
/* Find the bpstat associated with this breakpoint. */
-bpstat
-bpstat_find_breakpoint (bpstat bsp, struct breakpoint *breakpoint)
+bpstat *
+bpstat_find_breakpoint (bpstat *bsp, struct breakpoint *breakpoint)
{
if (bsp == NULL)
return NULL;
/* See breakpoint.h. */
bool
-bpstat_explains_signal (bpstat bsp, enum gdb_signal sig)
+bpstat_explains_signal (bpstat *bsp, enum gdb_signal sig)
{
for (; bsp != NULL; bsp = bsp->next)
{
Return 1 otherwise. */
int
-bpstat_num (bpstat *bsp, int *num)
+bpstat_num (bpstat **bsp, int *num)
{
struct breakpoint *b;
void
bpstat_clear_actions (void)
{
- bpstat bs;
+ bpstat *bs;
if (inferior_ptid == null_ptid)
return;
bpstat of the current thread. */
static int
-bpstat_do_actions_1 (bpstat *bsp)
+bpstat_do_actions_1 (bpstat **bsp)
{
- bpstat bs;
+ bpstat *bs;
int again = 0;
/* Avoid endless recursion if a `source' command is contained
normal_stop(). */
static enum print_stop_action
-print_bp_stop_message (bpstat bs)
+print_bp_stop_message (bpstat *bs)
{
switch (bs->print_it)
{
further info to be printed. */
enum print_stop_action
-bpstat_print (bpstat bs, int kind)
+bpstat_print (bpstat *bs, int kind)
{
enum print_stop_action val;
/* Allocate a new bpstat. Link it to the FIFO list by BS_LINK_POINTER. */
-bpstats::bpstats (struct bp_location *bl, bpstat **bs_link_pointer)
+bpstat::bpstat (struct bp_location *bl, bpstat ***bs_link_pointer)
: next (NULL),
bp_location_at (bp_location_ref_ptr::new_reference (bl)),
breakpoint_at (bl->owner),
*bs_link_pointer = &next;
}
-bpstats::bpstats ()
+bpstat::bpstat ()
: next (NULL),
breakpoint_at (NULL),
commands (NULL),
changed. */
static wp_check_result
-watchpoint_check (bpstat bs)
+watchpoint_check (bpstat *bs)
{
struct watchpoint *b;
struct frame_info *fr;
should stop. If not, set BS->stop to 0. */
static void
-bpstat_check_watchpoint (bpstat bs)
+bpstat_check_watchpoint (bpstat *bs)
{
const struct bp_location *bl;
struct watchpoint *b;
breakpoint, set BS->stop to 0. */
static void
-bpstat_check_breakpoint_conditions (bpstat bs, thread_info *thread)
+bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
{
const struct bp_location *bl;
struct breakpoint *b;
/* See breakpoint.h. */
-bpstat
+bpstat *
build_bpstat_chain (const address_space *aspace, CORE_ADDR bp_addr,
const struct target_waitstatus *ws)
{
- bpstat bs_head = NULL, *bs_link = &bs_head;
+ bpstat *bs_head = nullptr, **bs_link = &bs_head;
for (breakpoint *b : all_breakpoints ())
{
/* Come here if it's a watchpoint, or if the break address
matches. */
- bpstat bs = new bpstats (bl, &bs_link); /* Alloc a bpstat to
+ bpstat *bs = new bpstat (bl, &bs_link); /* Alloc a bpstat to
explain stop. */
/* Assume we stop. Should we find a watchpoint that is not
if (breakpoint_location_address_match (loc, aspace, bp_addr)
&& need_moribund_for_location_type (loc))
{
- bpstat bs = new bpstats (loc, &bs_link);
+ bpstat *bs = new bpstat (loc, &bs_link);
/* For hits of moribund locations, we should just proceed. */
bs->stop = 0;
bs->print = 0;
/* See breakpoint.h. */
-bpstat
+bpstat *
bpstat_stop_status (const address_space *aspace,
CORE_ADDR bp_addr, thread_info *thread,
const struct target_waitstatus *ws,
- bpstat stop_chain)
+ bpstat *stop_chain)
{
struct breakpoint *b = NULL;
/* First item of allocated bpstat's. */
- bpstat bs_head = stop_chain;
- bpstat bs;
+ bpstat *bs_head = stop_chain;
+ bpstat *bs;
int need_remove_insert;
int removed_any;
/* Decide what infrun needs to do with this bpstat. */
struct bpstat_what
-bpstat_what (bpstat bs_head)
+bpstat_what (bpstat *bs_head)
{
struct bpstat_what retval;
- bpstat bs;
+ bpstat *bs;
retval.main_action = BPSTAT_WHAT_KEEP_CHECKING;
retval.call_dummy = STOP_NONE;
}
void
-bpstat_run_callbacks (bpstat bs_head)
+bpstat_run_callbacks (bpstat *bs_head)
{
- bpstat bs;
+ bpstat *bs;
for (bs = bs_head; bs != NULL; bs = bs->next)
{
/* See breakpoint.h. */
bool
-bpstat_causes_stop (bpstat bs)
+bpstat_causes_stop (bpstat *bs)
{
for (; bs != NULL; bs = bs->next)
if (bs->stop)
catchpoints. */
static enum print_stop_action
-print_it_catch_fork (bpstat bs)
+print_it_catch_fork (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
catchpoints. */
static enum print_stop_action
-print_it_catch_vfork (bpstat bs)
+print_it_catch_vfork (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
}
static void
-check_status_catch_solib (struct bpstats *bs)
+check_status_catch_solib (struct bpstat *bs)
{
struct solib_catchpoint *self
= (struct solib_catchpoint *) bs->breakpoint_at;
}
static enum print_stop_action
-print_it_catch_solib (bpstat bs)
+print_it_catch_solib (bpstat *bs)
{
struct breakpoint *b = bs->breakpoint_at;
struct ui_out *uiout = current_uiout;
}
static enum print_stop_action
-print_it_catch_exec (bpstat bs)
+print_it_catch_exec (bpstat *bs)
{
struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
ranged breakpoints. */
static enum print_stop_action
-print_it_ranged_breakpoint (bpstat bs)
+print_it_ranged_breakpoint (bpstat *bs)
{
struct breakpoint *b = bs->breakpoint_at;
struct bp_location *bl = b->loc;
}
static void
-check_status_watchpoint (bpstat bs)
+check_status_watchpoint (bpstat *bs)
{
gdb_assert (is_watchpoint (bs->breakpoint_at));
}
static enum print_stop_action
-print_it_watchpoint (bpstat bs)
+print_it_watchpoint (bpstat *bs)
{
struct breakpoint *b;
enum print_stop_action result;
masked hardware watchpoints. */
static enum print_stop_action
-print_it_masked_watchpoint (bpstat bs)
+print_it_masked_watchpoint (bpstat *bs)
{
struct breakpoint *b = bs->breakpoint_at;
struct ui_out *uiout = current_uiout;
This is called after any breakpoint is hit, or after errors. */
void
-breakpoint_auto_delete (bpstat bs)
+breakpoint_auto_delete (bpstat *bs)
{
for (; bs; bs = bs->next)
if (bs->breakpoint_at
/* Clear BKP from a BPS. */
static void
-bpstat_remove_bp_location (bpstat bps, struct breakpoint *bpt)
+bpstat_remove_bp_location (bpstat *bps, struct breakpoint *bpt)
{
- bpstat bs;
+ bpstat *bs;
for (bs = bps; bs; bs = bs->next)
if (bs->breakpoint_at == bpt)
}
static void
-base_breakpoint_check_status (bpstat bs)
+base_breakpoint_check_status (bpstat *bs)
{
/* Always stop. */
}
}
static enum print_stop_action
-base_breakpoint_print_it (bpstat bs)
+base_breakpoint_print_it (bpstat *bs)
{
internal_error_pure_virtual_called ();
}
/* The default "after_condition_true" method. */
static void
-base_breakpoint_after_condition_true (struct bpstats *bs)
+base_breakpoint_after_condition_true (struct bpstat *bs)
{
/* Nothing to do. */
}
}
static enum print_stop_action
-bkpt_print_it (bpstat bs)
+bkpt_print_it (bpstat *bs)
{
struct breakpoint *b;
const struct bp_location *bl;
}
static void
-internal_bkpt_check_status (bpstat bs)
+internal_bkpt_check_status (bpstat *bs)
{
if (bs->breakpoint_at->type == bp_shlib_event)
{
}
static enum print_stop_action
-internal_bkpt_print_it (bpstat bs)
+internal_bkpt_print_it (bpstat *bs)
{
struct breakpoint *b;
}
static void
-momentary_bkpt_check_status (bpstat bs)
+momentary_bkpt_check_status (bpstat *bs)
{
/* Nothing. The point of these breakpoints is causing a stop. */
}
static enum print_stop_action
-momentary_bkpt_print_it (bpstat bs)
+momentary_bkpt_print_it (bpstat *bs)
{
return PRINT_UNKNOWN;
}
address are all handled. */
static void
-dprintf_after_condition_true (struct bpstats *bs)
+dprintf_after_condition_true (struct bpstat *bs)
{
- struct bpstats tmp_bs;
- struct bpstats *tmp_bs_p = &tmp_bs;
+ struct bpstat tmp_bs;
+ struct bpstat *tmp_bs_p = &tmp_bs;
/* dprintf's never cause a stop. This wasn't set in the
check_status hook instead because that would make the dprintf's
struct gdbscm_breakpoint_object;
struct number_or_range_parser;
struct thread_info;
-struct bpstats;
+struct bpstat;
struct bp_location;
struct linespec_result;
struct linespec_sals;
/* Check internal conditions of the breakpoint referred to by BS.
If we should not stop for this breakpoint, set BS->stop to 0. */
- void (*check_status) (struct bpstats *bs);
+ void (*check_status) (struct bpstat *bs);
/* Tell how many hardware resources (debug registers) are needed
for this breakpoint. If this function is not provided, then
/* The normal print routine for this breakpoint, called when we
hit it. */
- enum print_stop_action (*print_it) (struct bpstats *bs);
+ enum print_stop_action (*print_it) (struct bpstat *bs);
/* Display information about this breakpoint, for "info
breakpoints". */
/* Called after evaluating the breakpoint's condition,
and only if it evaluated true. */
- void (*after_condition_true) (struct bpstats *bs);
+ void (*after_condition_true) (struct bpstat *bs);
};
/* Helper for breakpoint_ops->print_recreate implementations. Prints
status"). This provides the ability to determine whether we have
stopped at a breakpoint, and what we should do about it. */
-typedef struct bpstats *bpstat;
-
/* Clears a chain of bpstat, freeing storage
of each. */
-extern void bpstat_clear (bpstat *);
+extern void bpstat_clear (bpstat **);
/* Return a copy of a bpstat. Like "bs1 = bs2" but all storage that
is part of the bpstat is copied as well. */
-extern bpstat bpstat_copy (bpstat);
+extern bpstat *bpstat_copy (bpstat *);
/* Build the (raw) bpstat chain for the stop information given by ASPACE,
BP_ADDR, and WS. Returns the head of the bpstat chain. */
-extern bpstat build_bpstat_chain (const address_space *aspace,
+extern bpstat *build_bpstat_chain (const address_space *aspace,
CORE_ADDR bp_addr,
const struct target_waitstatus *ws);
Each element of the chain has valid next, breakpoint_at,
commands, FIXME??? fields. */
-extern bpstat bpstat_stop_status (const address_space *aspace,
+extern bpstat *bpstat_stop_status (const address_space *aspace,
CORE_ADDR pc, thread_info *thread,
const struct target_waitstatus *ws,
- bpstat stop_chain = NULL);
+ bpstat *stop_chain = nullptr);
\f
/* This bpstat_what stuff tells wait_for_inferior what to do with a
breakpoint (a challenging task).
};
/* Tell what to do about this bpstat. */
-struct bpstat_what bpstat_what (bpstat);
+struct bpstat_what bpstat_what (bpstat *);
/* Run breakpoint event callbacks associated with the breakpoints that
triggered. */
-extern void bpstat_run_callbacks (bpstat bs_head);
+extern void bpstat_run_callbacks (bpstat *bs_head);
/* Find the bpstat associated with a breakpoint. NULL otherwise. */
-bpstat bpstat_find_breakpoint (bpstat, struct breakpoint *);
+bpstat *bpstat_find_breakpoint (bpstat *, struct breakpoint *);
/* True if a signal that we got in target_wait() was due to
circumstances explained by the bpstat; the signal is therefore not
random. */
-extern bool bpstat_explains_signal (bpstat, enum gdb_signal);
+extern bool bpstat_explains_signal (bpstat *, enum gdb_signal);
/* True if this bpstat causes a stop. */
-extern bool bpstat_causes_stop (bpstat);
+extern bool bpstat_causes_stop (bpstat *);
/* True if we should step constantly (e.g. watchpoints on machines
without hardware support). This isn't related to a specific bpstat,
/* Print a message indicating what happened. Returns nonzero to
say that only the source line should be printed after this (zero
return means print the frame as well as the source line). */
-extern enum print_stop_action bpstat_print (bpstat, int);
+extern enum print_stop_action bpstat_print (bpstat *, int);
/* Put in *NUM the breakpoint number of the first breakpoint we are
stopped at. *BSP upon return is a bpstat which points to the
Return -1 if stopped at a breakpoint that has been deleted since
we set it.
Return 1 otherwise. */
-extern int bpstat_num (bpstat *, int *);
+extern int bpstat_num (bpstat **, int *);
/* Perform actions associated with the stopped inferior. Actually, we
just use this for breakpoint commands. Perhaps other actions will
print_it_done
};
-struct bpstats
+struct bpstat
{
- bpstats ();
- bpstats (struct bp_location *bl, bpstat **bs_link_pointer);
+ bpstat ();
+ bpstat (struct bp_location *bl, bpstat ***bs_link_pointer);
- bpstats (const bpstats &);
- bpstats &operator= (const bpstats &) = delete;
+ bpstat (const bpstat &);
+ bpstat &operator= (const bpstat &) = delete;
/* Linked list because there can be more than one breakpoint at
the same place, and a bpstat reflects the fact that all have
been hit. */
- bpstat next;
+ bpstat *next;
/* Location that caused the stop. Locations are refcounted, so
this will never be NULL. Note that this location may end up
extern void breakpoint_init_inferior (enum inf_context);
-extern void breakpoint_auto_delete (bpstat);
+extern void breakpoint_auto_delete (bpstat *);
/* Return the chain of command lines to execute when this breakpoint
is hit. */
/* Observer for the normal_stop notification. */
static void
-cli_on_normal_stop (struct bpstats *bs, int print_frame)
+cli_on_normal_stop (struct bpstat *bs, int print_frame)
{
if (!print_frame)
return;
/* Chain containing status of breakpoint(s) the thread stopped
at. */
- bpstat stop_bpstat = nullptr;
+ bpstat *stop_bpstat = nullptr;
/* Whether the command that started the thread was a stepping
command. This is used to decide whether "set scheduler-locking
stopped at. */
if (args != NULL)
{
- bpstat bs = NULL;
+ bpstat *bs = nullptr;
int num, stat;
int stopped = 0;
struct thread_info *tp;
static void
info_program_command (const char *args, int from_tty)
{
- bpstat bs;
+ bpstat *bs;
int num, stat;
ptid_t ptid;
process_stratum_target *proc_target;
ecs->event_thread->control.stop_step = 0;
stop_print_frame = true;
stopped_by_random_signal = 0;
- bpstat stop_chain = NULL;
+ bpstat *stop_chain = nullptr;
/* Hide inlined functions starting here, unless we just performed stepi or
nexti. After stepi and nexti, always show the innermost frame (not any
set at FRAME_BLOCK. */
static bool
-stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain)
+stopped_by_user_bp_inline_frame (const block *frame_block, bpstat *stop_chain)
{
- for (bpstat s = stop_chain; s != NULL; s = s->next)
+ for (bpstat *s = stop_chain; s != nulltr; s = s->next)
{
struct breakpoint *bpt = s->breakpoint_at;
/* See inline-frame.h. */
void
-skip_inline_frames (thread_info *thread, bpstat stop_chain)
+skip_inline_frames (thread_info *thread, bpstat *stop_chain)
{
const struct block *frame_block, *cur_block;
std::vector<struct symbol *> skipped_syms;
struct frame_info;
struct frame_unwind;
-struct bpstats;
+struct bpstat;
struct process_stratum_target;
/* The inline frame unwinder. */
user's perspective. GDB will stop "in" the inlined frame instead of
the caller. */
-void skip_inline_frames (thread_info *thread, struct bpstats *stop_chain);
+void skip_inline_frames (thread_info *thread, struct bpstat *stop_chain);
/* Forget about any hidden inlined functions in PTID, which is new or
about to be resumed. PTID may be minus_one_ptid (all processes of
static void mi_on_end_stepping_range (void);
static void mi_on_signal_exited (enum gdb_signal siggnal);
static void mi_on_exited (int exitstatus);
-static void mi_on_normal_stop (struct bpstats *bs, int print_frame);
+static void mi_on_normal_stop (struct bpstat *bs, int print_frame);
static void mi_on_no_history (void);
static void mi_new_thread (struct thread_info *t);
}
static void
-mi_on_normal_stop_1 (struct bpstats *bs, int print_frame)
+mi_on_normal_stop_1 (struct bpstat *bs, int print_frame)
{
/* Since this can be called when CLI command is executing,
using cli interpreter, be sure to use MI uiout for output,
}
static void
-mi_on_normal_stop (struct bpstats *bs, int print_frame)
+mi_on_normal_stop (struct bpstat *bs, int print_frame)
{
SWITCH_THRU_ALL_UIS ()
{
#include "gdbsupport/observable.h"
-struct bpstats;
+struct bpstat;
struct so_list;
struct objfile;
struct thread_info;
condition that is not met. If the breakpoint has any associated
commands list, the commands are executed after the notification is
emitted. */
-extern observable<struct bpstats */* bs */, int /* print_frame */> normal_stop;
+extern observable<struct bpstat */* bs */, int /* print_frame */> normal_stop;
/* The inferior was stopped by a signal. */
extern observable<enum gdb_signal /* siggnal */> signal_received;
out of the scope of any FinishBreakpoint before it has been hit. */
static void
-bpfinishpy_handle_stop (struct bpstats *bs, int print_frame)
+bpfinishpy_handle_stop (struct bpstat *bs, int print_frame)
{
gdbpy_enter enter_py (get_current_arch (), current_language);
} while (0)
static void
-python_on_normal_stop (struct bpstats *bs, int print_frame)
+python_on_normal_stop (struct bpstat *bs, int print_frame)
{
enum gdb_signal stop_signal;
returns -1. */
int
-emit_stop_event (struct bpstats *bs, enum gdb_signal stop_signal)
+emit_stop_event (struct bpstat *bs, enum gdb_signal stop_signal)
{
gdbpy_ref<> stop_event_obj;
gdbpy_ref<> list;
PyObject *first_bp = NULL;
- struct bpstats *current_bs;
+ struct bpstat *current_bs;
if (evregpy_no_listeners_p (gdb_py_events.stop))
return 0;
extern gdbpy_ref<> create_stop_event_object (PyTypeObject *py_type);
extern void stop_evpy_dealloc (PyObject *self);
-extern int emit_stop_event (struct bpstats *bs,
+extern int emit_stop_event (struct bpstat *bs,
enum gdb_signal stop_signal);
extern gdbpy_ref<> create_breakpoint_event_object (PyObject *breakpoint_list,
struct value;
struct language_defn;
struct program_space;
-struct bpstats;
+struct bpstat;
struct inferior;
extern int gdb_python_initialized;
/* This module's normal_stop observer. */
static void
-solib_aix_normal_stop_observer (struct bpstats *unused_1, int unused_2)
+solib_aix_normal_stop_observer (struct bpstat *unused_1, int unused_2)
{
struct solib_aix_inferior_data *data
= get_solib_aix_inferior_data (current_inferior ());
/* Observer for the normal_stop notification. */
static void
-tui_normal_stop (struct bpstats *bs, int print_frame)
+tui_normal_stop (struct bpstat *bs, int print_frame)
{
from_stack = true;
}
/* Observer for the normal_stop notification. */
static void
-tui_on_normal_stop (struct bpstats *bs, int print_frame)
+tui_on_normal_stop (struct bpstat *bs, int print_frame)
{
if (!print_frame)
return;