mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
gdb: remove bpstat typedef, rename bpstats to bpstat
I don't find that the bpstat typedef, which hides a pointer, is particularly useful. In fact, it confused me many times, and I just see it as something to remember that adds cognitive load. Also, with C++, we might want to be able to pass bpstats objects by const-reference, not necessarily by pointer. So, remove the bpstat typedef and rename struct bpstats to bpstat (since it represents one bpstat, it makes sense that it is singular). Change-Id: I52e763b6e54ee666a9e045785f686d37b4f5f849
This commit is contained in:
parent
9be90c6894
commit
313f3b21cb
@ -11805,7 +11805,7 @@ should_stop_exception (const struct bp_location *bl)
|
||||
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 ());
|
||||
}
|
||||
@ -11814,7 +11814,7 @@ check_status_exception (bpstat bs)
|
||||
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;
|
||||
|
@ -1433,7 +1433,7 @@ ada_tasks_invalidate_inferior_data (struct inferior *inf)
|
||||
/* 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. */
|
||||
|
@ -179,7 +179,7 @@ signal_catchpoint_breakpoint_hit (const struct bp_location *bl,
|
||||
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;
|
||||
|
@ -175,7 +175,7 @@ breakpoint_hit_catch_syscall (const struct bp_location *bl,
|
||||
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;
|
||||
|
@ -144,7 +144,7 @@ classify_exception_breakpoint (struct breakpoint *b)
|
||||
/* 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;
|
||||
@ -227,7 +227,7 @@ re_set_exception_catchpoint (struct breakpoint *self)
|
||||
}
|
||||
|
||||
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;
|
||||
|
122
gdb/breakpoint.c
122
gdb/breakpoint.c
@ -160,7 +160,7 @@ static int breakpoint_location_address_range_overlap (struct bp_location *,
|
||||
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);
|
||||
|
||||
@ -4235,10 +4235,10 @@ is_catchpoint (struct breakpoint *b)
|
||||
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;
|
||||
@ -4252,7 +4252,7 @@ bpstat_clear (bpstat *bsp)
|
||||
*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),
|
||||
@ -4268,19 +4268,19 @@ bpstats::bpstats (const bpstats &other)
|
||||
/* 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. */
|
||||
@ -4295,8 +4295,8 @@ bpstat_copy (bpstat bs)
|
||||
|
||||
/* 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;
|
||||
@ -4312,7 +4312,7 @@ bpstat_find_breakpoint (bpstat bsp, struct breakpoint *breakpoint)
|
||||
/* 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)
|
||||
{
|
||||
@ -4345,7 +4345,7 @@ bpstat_explains_signal (bpstat bsp, enum gdb_signal sig)
|
||||
Return 1 otherwise. */
|
||||
|
||||
int
|
||||
bpstat_num (bpstat *bsp, int *num)
|
||||
bpstat_num (bpstat **bsp, int *num)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
|
||||
@ -4369,7 +4369,7 @@ bpstat_num (bpstat *bsp, int *num)
|
||||
void
|
||||
bpstat_clear_actions (void)
|
||||
{
|
||||
bpstat bs;
|
||||
bpstat *bs;
|
||||
|
||||
if (inferior_ptid == null_ptid)
|
||||
return;
|
||||
@ -4421,9 +4421,9 @@ command_line_is_silent (struct command_line *cmd)
|
||||
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
|
||||
@ -4589,7 +4589,7 @@ maybe_print_thread_hit_breakpoint (struct ui_out *uiout)
|
||||
normal_stop(). */
|
||||
|
||||
static enum print_stop_action
|
||||
print_bp_stop_message (bpstat bs)
|
||||
print_bp_stop_message (bpstat *bs)
|
||||
{
|
||||
switch (bs->print_it)
|
||||
{
|
||||
@ -4699,7 +4699,7 @@ print_solib_event (int is_catchpoint)
|
||||
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;
|
||||
|
||||
@ -4744,7 +4744,7 @@ breakpoint_cond_eval (expression *exp)
|
||||
|
||||
/* 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),
|
||||
@ -4757,7 +4757,7 @@ bpstats::bpstats (struct bp_location *bl, bpstat **bs_link_pointer)
|
||||
*bs_link_pointer = &next;
|
||||
}
|
||||
|
||||
bpstats::bpstats ()
|
||||
bpstat::bpstat ()
|
||||
: next (NULL),
|
||||
breakpoint_at (NULL),
|
||||
commands (NULL),
|
||||
@ -4866,7 +4866,7 @@ enum wp_check_result
|
||||
changed. */
|
||||
|
||||
static wp_check_result
|
||||
watchpoint_check (bpstat bs)
|
||||
watchpoint_check (bpstat *bs)
|
||||
{
|
||||
struct watchpoint *b;
|
||||
struct frame_info *fr;
|
||||
@ -5028,7 +5028,7 @@ bpstat_check_location (const struct bp_location *bl,
|
||||
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;
|
||||
@ -5197,7 +5197,7 @@ bpstat_check_watchpoint (bpstat bs)
|
||||
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;
|
||||
@ -5347,11 +5347,11 @@ need_moribund_for_location_type (struct bp_location *loc)
|
||||
|
||||
/* 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 ())
|
||||
{
|
||||
@ -5377,7 +5377,7 @@ build_bpstat_chain (const address_space *aspace, CORE_ADDR bp_addr,
|
||||
/* 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
|
||||
@ -5408,7 +5408,7 @@ build_bpstat_chain (const address_space *aspace, CORE_ADDR bp_addr,
|
||||
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;
|
||||
@ -5422,16 +5422,16 @@ build_bpstat_chain (const address_space *aspace, CORE_ADDR bp_addr,
|
||||
|
||||
/* 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;
|
||||
|
||||
@ -5559,10 +5559,10 @@ handle_jit_event (CORE_ADDR address)
|
||||
/* 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;
|
||||
@ -5737,9 +5737,9 @@ bpstat_what (bpstat bs_head)
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -5777,7 +5777,7 @@ bpstat_should_step ()
|
||||
/* See breakpoint.h. */
|
||||
|
||||
bool
|
||||
bpstat_causes_stop (bpstat bs)
|
||||
bpstat_causes_stop (bpstat *bs)
|
||||
{
|
||||
for (; bs != NULL; bs = bs->next)
|
||||
if (bs->stop)
|
||||
@ -7775,7 +7775,7 @@ breakpoint_hit_catch_fork (const struct bp_location *bl,
|
||||
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;
|
||||
@ -7891,7 +7891,7 @@ breakpoint_hit_catch_vfork (const struct bp_location *bl,
|
||||
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;
|
||||
@ -8027,7 +8027,7 @@ breakpoint_hit_catch_solib (const struct bp_location *bl,
|
||||
}
|
||||
|
||||
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;
|
||||
@ -8056,7 +8056,7 @@ check_status_catch_solib (struct bpstats *bs)
|
||||
}
|
||||
|
||||
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;
|
||||
@ -8286,7 +8286,7 @@ breakpoint_hit_catch_exec (const struct bp_location *bl,
|
||||
}
|
||||
|
||||
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;
|
||||
@ -9804,7 +9804,7 @@ resources_needed_ranged_breakpoint (const struct bp_location *bl)
|
||||
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;
|
||||
@ -10144,7 +10144,7 @@ breakpoint_hit_watchpoint (const struct bp_location *bl,
|
||||
}
|
||||
|
||||
static void
|
||||
check_status_watchpoint (bpstat bs)
|
||||
check_status_watchpoint (bpstat *bs)
|
||||
{
|
||||
gdb_assert (is_watchpoint (bs->breakpoint_at));
|
||||
|
||||
@ -10174,7 +10174,7 @@ works_in_software_mode_watchpoint (const struct breakpoint *b)
|
||||
}
|
||||
|
||||
static enum print_stop_action
|
||||
print_it_watchpoint (bpstat bs)
|
||||
print_it_watchpoint (bpstat *bs)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
enum print_stop_action result;
|
||||
@ -10395,7 +10395,7 @@ works_in_software_mode_masked_watchpoint (const struct breakpoint *b)
|
||||
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;
|
||||
@ -11544,7 +11544,7 @@ clear_command (const char *arg, int from_tty)
|
||||
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
|
||||
@ -12145,9 +12145,9 @@ update_global_location_list_nothrow (enum ugll_insert_mode insert_mode)
|
||||
/* 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)
|
||||
@ -12287,7 +12287,7 @@ base_breakpoint_breakpoint_hit (const struct bp_location *bl,
|
||||
}
|
||||
|
||||
static void
|
||||
base_breakpoint_check_status (bpstat bs)
|
||||
base_breakpoint_check_status (bpstat *bs)
|
||||
{
|
||||
/* Always stop. */
|
||||
}
|
||||
@ -12311,7 +12311,7 @@ base_breakpoint_resources_needed (const struct bp_location *bl)
|
||||
}
|
||||
|
||||
static enum print_stop_action
|
||||
base_breakpoint_print_it (bpstat bs)
|
||||
base_breakpoint_print_it (bpstat *bs)
|
||||
{
|
||||
internal_error_pure_virtual_called ();
|
||||
}
|
||||
@ -12379,7 +12379,7 @@ base_breakpoint_explains_signal (struct breakpoint *b, enum gdb_signal sig)
|
||||
/* 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. */
|
||||
}
|
||||
@ -12492,7 +12492,7 @@ bkpt_resources_needed (const struct bp_location *bl)
|
||||
}
|
||||
|
||||
static enum print_stop_action
|
||||
bkpt_print_it (bpstat bs)
|
||||
bkpt_print_it (bpstat *bs)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
const struct bp_location *bl;
|
||||
@ -12650,7 +12650,7 @@ internal_bkpt_re_set (struct breakpoint *b)
|
||||
}
|
||||
|
||||
static void
|
||||
internal_bkpt_check_status (bpstat bs)
|
||||
internal_bkpt_check_status (bpstat *bs)
|
||||
{
|
||||
if (bs->breakpoint_at->type == bp_shlib_event)
|
||||
{
|
||||
@ -12666,7 +12666,7 @@ internal_bkpt_check_status (bpstat bs)
|
||||
}
|
||||
|
||||
static enum print_stop_action
|
||||
internal_bkpt_print_it (bpstat bs)
|
||||
internal_bkpt_print_it (bpstat *bs)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
|
||||
@ -12731,13 +12731,13 @@ momentary_bkpt_re_set (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;
|
||||
}
|
||||
@ -13002,10 +13002,10 @@ dprintf_print_recreate (struct breakpoint *tp, struct ui_file *fp)
|
||||
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
|
||||
|
@ -41,7 +41,7 @@ struct gdbpy_breakpoint_object;
|
||||
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;
|
||||
@ -591,7 +591,7 @@ struct breakpoint_ops
|
||||
|
||||
/* 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
|
||||
@ -605,7 +605,7 @@ struct breakpoint_ops
|
||||
|
||||
/* 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". */
|
||||
@ -674,7 +674,7 @@ struct breakpoint_ops
|
||||
|
||||
/* 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
|
||||
@ -935,20 +935,18 @@ struct tracepoint : public breakpoint
|
||||
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);
|
||||
|
||||
@ -972,10 +970,10 @@ extern bpstat build_bpstat_chain (const address_space *aspace,
|
||||
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);
|
||||
|
||||
/* This bpstat_what stuff tells wait_for_inferior what to do with a
|
||||
breakpoint (a challenging task).
|
||||
@ -1073,22 +1071,22 @@ struct bpstat_what
|
||||
};
|
||||
|
||||
/* 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,
|
||||
@ -1098,7 +1096,7 @@ extern bool bpstat_should_step ();
|
||||
/* 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
|
||||
@ -1109,7 +1107,7 @@ extern enum print_stop_action bpstat_print (bpstat, int);
|
||||
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
|
||||
@ -1140,18 +1138,18 @@ enum bp_print_how
|
||||
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
|
||||
@ -1297,7 +1295,7 @@ extern void set_ignore_count (int, int, int);
|
||||
|
||||
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. */
|
||||
|
@ -125,7 +125,7 @@ should_print_stop_to_console (struct interp *console_interp,
|
||||
/* 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;
|
||||
|
@ -154,7 +154,7 @@ struct thread_control_state
|
||||
|
||||
/* 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
|
||||
|
@ -669,7 +669,7 @@ continue_command (const char *args, int from_tty)
|
||||
stopped at. */
|
||||
if (args != NULL)
|
||||
{
|
||||
bpstat bs = NULL;
|
||||
bpstat *bs = nullptr;
|
||||
int num, stat;
|
||||
int stopped = 0;
|
||||
struct thread_info *tp;
|
||||
@ -1827,7 +1827,7 @@ finish_command (const char *arg, int from_tty)
|
||||
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;
|
||||
|
@ -6114,7 +6114,7 @@ handle_signal_stop (struct execution_control_state *ecs)
|
||||
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
|
||||
|
@ -308,9 +308,9 @@ block_starting_point_at (CORE_ADDR pc, const struct block *block)
|
||||
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;
|
||||
|
||||
@ -341,7 +341,7 @@ stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain)
|
||||
/* 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;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
struct frame_info;
|
||||
struct frame_unwind;
|
||||
struct bpstats;
|
||||
struct bpstat;
|
||||
struct process_stratum_target;
|
||||
|
||||
/* The inline frame unwinder. */
|
||||
@ -37,7 +37,7 @@ extern const struct frame_unwind inline_frame_unwind;
|
||||
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
|
||||
|
@ -64,7 +64,7 @@ static void mi_on_signal_received (enum gdb_signal siggnal);
|
||||
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);
|
||||
@ -614,7 +614,7 @@ mi_on_no_history (void)
|
||||
}
|
||||
|
||||
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,
|
||||
@ -673,7 +673,7 @@ mi_on_normal_stop_1 (struct bpstats *bs, int print_frame)
|
||||
}
|
||||
|
||||
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 ()
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "gdbsupport/observable.h"
|
||||
|
||||
struct bpstats;
|
||||
struct bpstat;
|
||||
struct so_list;
|
||||
struct objfile;
|
||||
struct thread_info;
|
||||
@ -50,7 +50,7 @@ namespace observers
|
||||
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;
|
||||
|
@ -378,7 +378,7 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b,
|
||||
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);
|
||||
|
||||
|
@ -74,7 +74,7 @@ static const struct inferior_data *infpy_inf_data_key;
|
||||
} 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;
|
||||
|
||||
|
@ -35,12 +35,12 @@ create_stop_event_object (PyTypeObject *py_type)
|
||||
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;
|
||||
|
@ -25,7 +25,7 @@
|
||||
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,
|
||||
|
@ -295,7 +295,7 @@ struct block;
|
||||
struct value;
|
||||
struct language_defn;
|
||||
struct program_space;
|
||||
struct bpstats;
|
||||
struct bpstat;
|
||||
struct inferior;
|
||||
|
||||
extern int gdb_python_initialized;
|
||||
|
@ -696,7 +696,7 @@ solib_aix_get_toc_value (CORE_ADDR pc)
|
||||
/* 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 ());
|
||||
|
@ -190,7 +190,7 @@ tui_before_prompt (const char *current_gdb_prompt)
|
||||
/* 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;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ tui_exit (void)
|
||||
/* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user