aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 96d78ac..1495a5e 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3685,6 +3685,8 @@ watchpoint_check (void *p)
}
else
{
+ struct ui_out *uiout = current_uiout;
+
/* This seems like the only logical thing to do because
if we temporarily ignored the watchpoint, then when
we reenter the block in which it is valid it contains
@@ -4498,6 +4500,7 @@ static void
print_breakpoint_location (struct breakpoint *b,
struct bp_location *loc)
{
+ struct ui_out *uiout = current_uiout;
struct cleanup *old_chain = save_current_program_space ();
if (loc != NULL && loc->shlib_disabled)
@@ -4616,6 +4619,7 @@ print_one_breakpoint_location (struct breakpoint *b,
struct command_line *l;
static char bpenables[] = "nynny";
+ struct ui_out *uiout = current_uiout;
int header_of_multiple = 0;
int part_of_multiple = (loc != NULL);
struct value_print_options opts;
@@ -4906,6 +4910,7 @@ print_one_breakpoint (struct breakpoint *b,
int allflag)
{
struct cleanup *bkpt_chain;
+ struct ui_out *uiout = current_uiout;
bkpt_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "bkpt");
@@ -5031,6 +5036,7 @@ breakpoint_1 (char *args, int allflag,
struct value_print_options opts;
int print_address_bits = 0;
int print_type_col_width = 14;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
@@ -5177,6 +5183,8 @@ breakpoint_1 (char *args, int allflag,
static void
default_collect_info (void)
{
+ struct ui_out *uiout = current_uiout;
+
/* If it has no value (which is frequently the case), say nothing; a
message like "No default-collect." gets in user's face when it's
not wanted. */
@@ -5202,6 +5210,7 @@ static void
watchpoints_info (char *args, int from_tty)
{
int num_printed = breakpoint_1 (args, 0, is_watchpoint);
+ struct ui_out *uiout = current_uiout;
if (num_printed == 0)
{
@@ -6165,6 +6174,7 @@ print_one_catch_fork (struct breakpoint *b, struct bp_location **last_loc)
{
struct fork_catchpoint *c = (struct fork_catchpoint *) b;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
@@ -6260,6 +6270,7 @@ print_one_catch_vfork (struct breakpoint *b, struct bp_location **last_loc)
{
struct fork_catchpoint *c = (struct fork_catchpoint *) b;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
/* Field 4, the address, is omitted (which makes the columns not
@@ -6501,6 +6512,7 @@ print_one_catch_syscall (struct breakpoint *b,
{
struct syscall_catchpoint *c = (struct syscall_catchpoint *) b;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
/* Field 4, the address, is omitted (which makes the columns not
@@ -6743,6 +6755,7 @@ print_one_catch_exec (struct breakpoint *b, struct bp_location **last_loc)
{
struct exec_catchpoint *c = (struct exec_catchpoint *) b;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
@@ -7027,7 +7040,7 @@ static void
mention (struct breakpoint *b)
{
b->ops->print_mention (b);
- if (ui_out_is_mi_like_p (uiout))
+ if (ui_out_is_mi_like_p (current_uiout))
return;
printf_filtered ("\n");
}
@@ -8160,6 +8173,7 @@ print_it_ranged_breakpoint (bpstat bs)
{
struct breakpoint *b = bs->breakpoint_at;
struct bp_location *bl = b->loc;
+ struct ui_out *uiout = current_uiout;
gdb_assert (b->type == bp_hardware_breakpoint);
@@ -8192,6 +8206,7 @@ print_one_ranged_breakpoint (struct breakpoint *b,
{
struct bp_location *bl = b->loc;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
/* Ranged breakpoints have only one location. */
gdb_assert (bl && bl->next == NULL);
@@ -8241,6 +8256,7 @@ static void
print_mention_ranged_breakpoint (struct breakpoint *b)
{
struct bp_location *bl = b->loc;
+ struct ui_out *uiout = current_uiout;
gdb_assert (bl);
gdb_assert (b->type == bp_hardware_breakpoint);
@@ -8668,6 +8684,7 @@ print_it_watchpoint (bpstat bs)
struct ui_stream *stb;
enum print_stop_action result;
struct watchpoint *w;
+ struct ui_out *uiout = current_uiout;
gdb_assert (bs->bp_location_at != NULL);
@@ -8760,6 +8777,7 @@ print_mention_watchpoint (struct breakpoint *b)
{
struct cleanup *ui_out_chain;
struct watchpoint *w = (struct watchpoint *) b;
+ struct ui_out *uiout = current_uiout;
switch (b->type)
{
@@ -8874,6 +8892,7 @@ static enum print_stop_action
print_it_masked_watchpoint (bpstat bs)
{
struct breakpoint *b = bs->breakpoint_at;
+ struct ui_out *uiout = current_uiout;
/* Masked watchpoints have only one location. */
gdb_assert (b->loc && b->loc->next == NULL);
@@ -8940,6 +8959,7 @@ static void
print_mention_masked_watchpoint (struct breakpoint *b)
{
struct watchpoint *w = (struct watchpoint *) b;
+ struct ui_out *uiout = current_uiout;
struct cleanup *ui_out_chain;
switch (b->type)
@@ -9720,6 +9740,7 @@ catch_exec_command_1 (char *arg, int from_tty,
static enum print_stop_action
print_it_exception_catchpoint (bpstat bs)
{
+ struct ui_out *uiout = current_uiout;
struct breakpoint *b = bs->breakpoint_at;
int bp_temp, bp_throw;
@@ -9754,6 +9775,7 @@ print_one_exception_catchpoint (struct breakpoint *b,
struct bp_location **last_loc)
{
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
get_user_print_options (&opts);
if (opts.addressprint)
@@ -9777,6 +9799,7 @@ print_one_exception_catchpoint (struct breakpoint *b,
static void
print_mention_exception_catchpoint (struct breakpoint *b)
{
+ struct ui_out *uiout = current_uiout;
int bp_temp;
int bp_throw;
@@ -10650,6 +10673,7 @@ bpstat_remove_breakpoint_callback (struct thread_info *th, void *data)
static void
say_where (struct breakpoint *b)
{
+ struct ui_out *uiout = current_uiout;
struct value_print_options opts;
get_user_print_options (&opts);
@@ -10888,6 +10912,7 @@ bkpt_print_it (bpstat bs)
struct breakpoint *b;
const struct bp_location *bl;
int bp_temp;
+ struct ui_out *uiout = current_uiout;
gdb_assert (bs->bp_location_at != NULL);
@@ -10919,7 +10944,7 @@ bkpt_print_it (bpstat bs)
static void
bkpt_print_mention (struct breakpoint *b)
{
- if (ui_out_is_mi_like_p (uiout))
+ if (ui_out_is_mi_like_p (current_uiout))
return;
switch (b->type)
@@ -11069,6 +11094,8 @@ momentary_bkpt_check_status (bpstat bs)
static enum print_stop_action
momentary_bkpt_print_it (bpstat bs)
{
+ struct ui_out *uiout = current_uiout;
+
if (ui_out_is_mi_like_p (uiout))
{
struct breakpoint *b = bs->breakpoint_at;
@@ -11134,7 +11161,7 @@ tracepoint_print_one_detail (const struct breakpoint *self,
static void
tracepoint_print_mention (struct breakpoint *b)
{
- if (ui_out_is_mi_like_p (uiout))
+ if (ui_out_is_mi_like_p (current_uiout))
return;
switch (b->type)
@@ -11500,6 +11527,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
struct symtab_and_line sal;
struct symbol *sym;
struct static_tracepoint_marker *marker;
+ struct ui_out *uiout = current_uiout;
marker = VEC_index (static_tracepoint_marker_p, markers, 0);
@@ -12765,6 +12793,7 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
static void
tracepoints_info (char *args, int from_tty)
{
+ struct ui_out *uiout = current_uiout;
int num_printed;
num_printed = breakpoint_1 (args, 0, is_tracepoint);
@@ -13079,12 +13108,12 @@ save_breakpoints (char *filename, int from_tty,
fprintf_unfiltered (fp, " commands\n");
- ui_out_redirect (uiout, fp);
+ ui_out_redirect (current_uiout, fp);
TRY_CATCH (ex, RETURN_MASK_ALL)
{
- print_command_lines (uiout, tp->commands->commands, 2);
+ print_command_lines (current_uiout, tp->commands->commands, 2);
}
- ui_out_redirect (uiout, NULL);
+ ui_out_redirect (current_uiout, NULL);
if (ex.reason < 0)
throw_exception (ex);