diff options
author | Pedro Alves <palves@redhat.com> | 2011-08-04 19:10:14 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-08-04 19:10:14 +0000 |
commit | 79a45e254f090b628473614054ed318d70409239 (patch) | |
tree | 895d3401ff636850ce886625217c84259cbb791f /gdb/breakpoint.c | |
parent | f9679975a3374a650ce5ffc8a512b85d662bfcbf (diff) | |
download | gdb-79a45e254f090b628473614054ed318d70409239.zip gdb-79a45e254f090b628473614054ed318d70409239.tar.gz gdb-79a45e254f090b628473614054ed318d70409239.tar.bz2 |
2011-08-04 Pedro Alves <pedro@codesourcery.com>
* ui-out.h (uiout): Rename to ...
(current_uiout): ... this.
* ui-out.c (uiout): Rename to ...
(current_uiout): ... this.
* ada-lang.c (print_it_exception, print_one_exception)
(print_mention_exception): Adjust.
* breakpoint.c (watchpoint_check): Adjust.
(print_breakpoint_location, print_one_breakpoint, breakpoint_1)
(default_collect_info, watchpoints_info, print_one_catch_fork)
(print_one_catch_vfork, print_one_catch_syscall)
(print_one_catch_exec, mention, print_it_ranged_breakpoint)
(print_one_ranged_breakpoint, print_mention_ranged_breakpoint)
(print_it_watchpoint, print_mention_watchpoint)
(print_it_masked_watchpoint, print_mention_masked_watchpoint)
(print_it_exception_catchpoint, print_one_exception_catchpoint)
(print_mention_exception_catchpoint, say_where, bkpt_print_it)
(bkpt_print_mention, momentary_bkpt_print_it)
(tracepoint_print_mention, update_static_tracepoint)
(tracepoints_info, save_breakpoints): Adjust.
* cli-out.c (field_separator): Adjust.
* cp-abi.c (list_cp_abis, show_cp_abi_cmd): Adjust.
* exceptions.c (catch_exceptions_with_msg, catch_errors): Adjust.
* frame.c (get_current_frame): Adjust.
* infcmd.c (run_command_1, print_return_value): Adjust.
* inferior.c (inferior_command, info_inferiors_command): Adjust.
* infrun.c (print_end_stepping_range_reason): Adjust.
(print_signal_exited_reason, print_exited_reason): Adjust.
(print_signal_received_reason, print_no_history_reason): Adjust.
* interps.c (interp_set): Adjust.
* osdata.c (info_osdata_command): Adjust.
* progspace.c (maintenance_info_program_spaces_command): Adjust.
* remote-fileio.c (remote_fileio_request): Adjust.
* remote.c (show_remote_cmd): Adjust.
* solib.c (info_sharedlibrary_command): Adjust.
* source.c (print_source_lines_base): Adjust.
* stack.c (print_stack_frame): Adjust.
(do_gdb_disassembly, print_frame_info, print_frame): Adjust.
* symfile-mem.c (add_vsyscall_page): Adjust.
* symfile.c (load_progress, generic_load)
(print_transfer_performance): Adjust.
* thread.c (info_threads_command, restore_selected_frame)
(thread_command): Adjust.
* top.c (make_cleanup_restore_ui_file): Adjust.
* tracepoint.c (tvariables_info_1, trace_status_mi, tfind_1)
(print_one_static_tracepoint_marker): Adjust.
* cli/cli-cmds.c (print_disassembly): Adjust.
* cli/cli-decode.c (print_doc_line): Adjust.
* cli/cli-interp.c (safe_execute_command): Adjust.
* cli/cli-logging.c (set_logging_redirect, pop_output_files)
(handle_redirections): Adjust.
* cli/cli-script.c (show_user_1): Adjust.
* cli/cli-setshow.c (do_setshow_command, cmd_show_list): Adjust.
* mi/mi-cmd-break.c (breakpoint_notify): Adjust.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Adjust.
* mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_path)
(mi_cmd_env_dir): Adjust.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
(print_partial_file_name, mi_cmd_file_list_exec_source_files): Adjust.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
(mi_cmd_stack_info_depth, mi_cmd_stack_list_args)
(list_args_or_locals): Adjust.
* mi/mi-cmd-var.c (print_varobj, mi_cmd_var_create)
(mi_cmd_var_delete, mi_cmd_var_set_format, mi_cmd_var_set_frozen)
(mi_cmd_var_show_format, mi_cmd_var_info_num_children)
(mi_cmd_var_list_children, mi_cmd_var_info_type)
(mi_cmd_var_info_path_expression, mi_cmd_var_info_expression)
(mi_cmd_var_show_attributes, mi_cmd_var_evaluate_expression)
(mi_cmd_var_assign, mi_cmd_var_update, varobj_update_one): Adjust.
* mi/mi-interp.c (mi_on_normal_stop): Adjust.
* mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_thread_select)
(mi_cmd_thread_list_ids, mi_cmd_thread_info, print_one_inferior)
(list_available_thread_groups, mi_cmd_list_thread_groups)
(mi_cmd_data_list_register_names)
(mi_cmd_data_list_changed_registers)
(mi_cmd_data_list_register_values, get_register)
(mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
(mi_cmd_data_read_memory_bytes, mi_cmd_list_features)
(mi_cmd_list_target_features, mi_cmd_add_inferior)
(mi_execute_command, mi_load_progress): Adjust.
* mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Adjust.
* python/py-auto-load.c (print_script, info_auto_load_scripts):
Adjust.
* python/py-breakpoint.c (bppy_get_commands): Adjust.
* tui/tui-interp.c (tui_command_loop): Adjust.
* tui/tui-io.c (tui_setup_io, tui_initialize_io): Adjust.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 41 |
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); |