diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 124 | ||||
-rw-r--r-- | gdb/cli/cli-decode.c | 78 | ||||
-rw-r--r-- | gdb/cli/cli-dump.c | 36 | ||||
-rw-r--r-- | gdb/cli/cli-logging.c | 45 | ||||
-rw-r--r-- | gdb/cli/cli-script.c | 8 | ||||
-rw-r--r-- | gdb/cli/cli-setshow.c | 4 | ||||
-rw-r--r-- | gdb/cli/cli-style.c | 14 | ||||
-rw-r--r-- | gdb/cli/cli-utils.c | 6 |
8 files changed, 157 insertions, 158 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index a4c257e..6a03f25 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -460,7 +460,7 @@ static void show_version (const char *args, int from_tty) { print_gdb_version (gdb_stdout, true); - printf_filtered ("\n"); + gdb_printf ("\n"); } static void @@ -506,14 +506,14 @@ pwd_command (const char *args, int from_tty) safe_strerror (errno)); if (strcmp (cwd.get (), current_directory) != 0) - printf_filtered (_("Working directory %ps\n (canonically %ps).\n"), - styled_string (file_name_style.style (), - current_directory), - styled_string (file_name_style.style (), cwd.get ())); + gdb_printf (_("Working directory %ps\n (canonically %ps).\n"), + styled_string (file_name_style.style (), + current_directory), + styled_string (file_name_style.style (), cwd.get ())); else - printf_filtered (_("Working directory %ps.\n"), - styled_string (file_name_style.style (), - current_directory)); + gdb_printf (_("Working directory %ps.\n"), + styled_string (file_name_style.style (), + current_directory)); } void @@ -626,9 +626,9 @@ static void show_script_ext_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Script filename extension recognition is \"%s\".\n"), - value); + gdb_printf (file, + _("Script filename extension recognition is \"%s\".\n"), + value); } /* Try to open SCRIPT_FILE. @@ -837,10 +837,10 @@ echo_command (const char *text, int from_tty) c = parse_escape (get_current_arch (), &p); if (c >= 0) - printf_filtered ("%c", c); + gdb_printf ("%c", c); } else - printf_filtered ("%c", c); + gdb_printf ("%c", c); } gdb_stdout->reset_style (); @@ -894,10 +894,10 @@ shell_escape (const char *arg, int from_tty) arg = "inferior shell"; if (rc == -1) - fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", arg, - safe_strerror (errno)); + gdb_printf (gdb_stderr, "Cannot execute %s: %s\n", arg, + safe_strerror (errno)); else if (rc) - fprintf_unfiltered (gdb_stderr, "%s exited with status %d\n", arg, rc); + gdb_printf (gdb_stderr, "%s exited with status %d\n", arg, rc); #ifdef GLOBAL_CURDIR /* Make sure to return to the directory GDB thinks it is, in case the shell command we just ran changed it. */ @@ -921,8 +921,8 @@ shell_escape (const char *arg, int from_tty) else execl (user_shell, p, "-c", arg, (char *) 0); - fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", user_shell, - safe_strerror (errno)); + gdb_printf (gdb_stderr, "Cannot execute %s: %s\n", user_shell, + safe_strerror (errno)); _exit (0177); } @@ -1011,16 +1011,16 @@ edit_command (const char *arg, int from_tty) gdbarch = sal.symtab->objfile ()->arch (); sym = find_pc_function (sal.pc); if (sym) - printf_filtered ("%s is in %s (%s:%d).\n", - paddress (gdbarch, sal.pc), - sym->print_name (), - symtab_to_filename_for_display (sal.symtab), - sal.line); + gdb_printf ("%s is in %s (%s:%d).\n", + paddress (gdbarch, sal.pc), + sym->print_name (), + symtab_to_filename_for_display (sal.symtab), + sal.line); else - printf_filtered ("%s is at %s:%d.\n", - paddress (gdbarch, sal.pc), - symtab_to_filename_for_display (sal.symtab), - sal.line); + gdb_printf ("%s is at %s:%d.\n", + paddress (gdbarch, sal.pc), + symtab_to_filename_for_display (sal.symtab), + sal.line); } /* If what was given does not imply a symtab, it must be an @@ -1350,14 +1350,14 @@ list_command (const char *arg, int from_tty) gdbarch = sal.symtab->objfile ()->arch (); sym = find_pc_function (sal.pc); if (sym) - printf_filtered ("%s is in %s (%s:%d).\n", - paddress (gdbarch, sal.pc), - sym->print_name (), - symtab_to_filename_for_display (sal.symtab), sal.line); + gdb_printf ("%s is in %s (%s:%d).\n", + paddress (gdbarch, sal.pc), + sym->print_name (), + symtab_to_filename_for_display (sal.symtab), sal.line); else - printf_filtered ("%s is at %s:%d.\n", - paddress (gdbarch, sal.pc), - symtab_to_filename_for_display (sal.symtab), sal.line); + gdb_printf ("%s is at %s:%d.\n", + paddress (gdbarch, sal.pc), + symtab_to_filename_for_display (sal.symtab), sal.line); } /* If line was not specified by just a line number, and it does not @@ -1425,18 +1425,18 @@ print_disassembly (struct gdbarch *gdbarch, const char *name, else #endif { - printf_filtered (_("Dump of assembler code ")); + gdb_printf (_("Dump of assembler code ")); if (name != NULL) - printf_filtered (_("for function %ps:\n"), - styled_string (function_name_style.style (), name)); + gdb_printf (_("for function %ps:\n"), + styled_string (function_name_style.style (), name)); if (block == nullptr || BLOCK_CONTIGUOUS_P (block)) { if (name == NULL) - printf_filtered (_("from %ps to %ps:\n"), - styled_string (address_style.style (), - paddress (gdbarch, low)), - styled_string (address_style.style (), - paddress (gdbarch, high))); + gdb_printf (_("from %ps to %ps:\n"), + styled_string (address_style.style (), + paddress (gdbarch, low)), + styled_string (address_style.style (), + paddress (gdbarch, high))); /* Dump the specified range. */ gdb_disassembly (gdbarch, current_uiout, flags, -1, low, high); @@ -1447,16 +1447,16 @@ print_disassembly (struct gdbarch *gdbarch, const char *name, { CORE_ADDR range_low = BLOCK_RANGE_START (block, i); CORE_ADDR range_high = BLOCK_RANGE_END (block, i); - printf_filtered (_("Address range %ps to %ps:\n"), - styled_string (address_style.style (), - paddress (gdbarch, range_low)), - styled_string (address_style.style (), - paddress (gdbarch, range_high))); + gdb_printf (_("Address range %ps to %ps:\n"), + styled_string (address_style.style (), + paddress (gdbarch, range_low)), + styled_string (address_style.style (), + paddress (gdbarch, range_high))); gdb_disassembly (gdbarch, current_uiout, flags, -1, range_low, range_high); } } - printf_filtered (_("End of assembler dump.\n")); + gdb_printf (_("End of assembler dump.\n")); } } @@ -2020,9 +2020,9 @@ print_sal_location (const symtab_and_line &sal) const char *sym_name = NULL; if (sal.symbol != NULL) sym_name = sal.symbol->print_name (); - printf_filtered (_("file: \"%s\", line number: %d, symbol: \"%s\"\n"), - symtab_to_filename_for_display (sal.symtab), - sal.line, sym_name != NULL ? sym_name : "???"); + gdb_printf (_("file: \"%s\", line number: %d, symbol: \"%s\"\n"), + symtab_to_filename_for_display (sal.symtab), + sal.line, sym_name != NULL ? sym_name : "???"); } /* Print a list of files and line numbers which a user may choose from @@ -2117,28 +2117,28 @@ show_info_verbose (struct ui_file *file, int from_tty, const char *value) { if (info_verbose) - fprintf_filtered (file, - _("Verbose printing of informational messages is %s.\n"), - value); + gdb_printf (file, + _("Verbose printing of informational messages is %s.\n"), + value); else - fprintf_filtered (file, _("Verbosity is %s.\n"), value); + gdb_printf (file, _("Verbosity is %s.\n"), value); } static void show_history_expansion_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("History expansion on command input is %s.\n"), - value); + gdb_printf (file, _("History expansion on command input is %s.\n"), + value); } static void show_max_user_call_depth (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The max call depth for user-defined commands is %s.\n"), - value); + gdb_printf (file, + _("The max call depth for user-defined commands is %s.\n"), + value); } /* Implement 'show suppress-cli-notifications'. */ @@ -2147,8 +2147,8 @@ static void show_suppress_cli_notifications (ui_file *file, int from_tty, cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Suppression of printing CLI notifications " - "is %s.\n"), value); + gdb_printf (file, _("Suppression of printing CLI notifications " + "is %s.\n"), value); } /* Implement 'set suppress-cli-notifications'. */ diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 0233401..a152834 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1357,9 +1357,9 @@ fput_alias_definition_styled (const cmd_list_element &c, gdb_assert (c.is_alias ()); gdb_puts (" alias ", stream); fput_command_name_styled (c, stream); - fprintf_filtered (stream, " = "); + gdb_printf (stream, " = "); fput_command_name_styled (*c.alias_target, stream); - fprintf_filtered (stream, " %s\n", c.default_args.c_str ()); + gdb_printf (stream, " %s\n", c.default_args.c_str ()); } /* Print the definition of the aliases of CMD that have default args. */ @@ -1579,7 +1579,7 @@ help_cmd (const char *command, struct ui_file *stream) if (!c->is_prefix () && !c->is_command_class_help ()) return; - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); /* If this is a prefix command, print it's subcommands. */ if (c->is_prefix ()) @@ -1591,17 +1591,17 @@ help_cmd (const char *command, struct ui_file *stream) help_list (cmdlist, "", c->theclass, stream); if (c->hook_pre || c->hook_post) - fprintf_filtered (stream, - "\nThis command has a hook (or hooks) defined:\n"); + gdb_printf (stream, + "\nThis command has a hook (or hooks) defined:\n"); if (c->hook_pre) - fprintf_filtered (stream, - "\tThis command is run after : %s (pre hook)\n", - c->hook_pre->name); + gdb_printf (stream, + "\tThis command is run after : %s (pre hook)\n", + c->hook_pre->name); if (c->hook_post) - fprintf_filtered (stream, - "\tThis command is run before : %s (post hook)\n", - c->hook_post->name); + gdb_printf (stream, + "\tThis command is run before : %s (post hook)\n", + c->hook_post->name); } /* @@ -1640,26 +1640,26 @@ help_list (struct cmd_list_element *list, const char *cmdtype, } if (theclass == all_classes) - fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2); + gdb_printf (stream, "List of classes of %scommands:\n\n", cmdtype2); else - fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2); + gdb_printf (stream, "List of %scommands:\n\n", cmdtype2); help_cmd_list (list, theclass, theclass >= 0, stream); if (theclass == all_classes) { - fprintf_filtered (stream, "\n\ + gdb_printf (stream, "\n\ Type \"help%s\" followed by a class name for a list of commands in ", - cmdtype1); + cmdtype1); stream->wrap_here (0); - fprintf_filtered (stream, "that class."); + gdb_printf (stream, "that class."); - fprintf_filtered (stream, "\n\ + gdb_printf (stream, "\n\ Type \"help all\" for the list of all commands."); } - fprintf_filtered (stream, "\nType \"help%s\" followed by %scommand name ", - cmdtype1, cmdtype2); + gdb_printf (stream, "\nType \"help%s\" followed by %scommand name ", + cmdtype1, cmdtype2); stream->wrap_here (0); gdb_puts ("for ", stream); stream->wrap_here (0); @@ -1690,7 +1690,7 @@ help_all (struct ui_file *stream) if (c->is_command_class_help ()) { - fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name); + gdb_printf (stream, "\nCommand class: %s\n\n", c->name); help_cmd_list (cmdlist, c->theclass, true, stream); } } @@ -1708,7 +1708,7 @@ help_all (struct ui_file *stream) { if (!seen_unclassified) { - fprintf_filtered (stream, "\nUnclassified commands\n\n"); + gdb_printf (stream, "\nUnclassified commands\n\n"); seen_unclassified = 1; } print_help_for_command (*c, true, stream); @@ -2281,23 +2281,23 @@ deprecated_cmd_warning (const char *text, struct cmd_list_element *list) tmp_alias_str += std::string (alias->name); if (cmd->cmd_deprecated) - printf_filtered (_("Warning: command '%ps' (%ps) is deprecated.\n"), - styled_string (title_style.style (), - tmp_cmd_str.c_str ()), - styled_string (title_style.style (), - tmp_alias_str.c_str ())); + gdb_printf (_("Warning: command '%ps' (%ps) is deprecated.\n"), + styled_string (title_style.style (), + tmp_cmd_str.c_str ()), + styled_string (title_style.style (), + tmp_alias_str.c_str ())); else - printf_filtered (_("Warning: '%ps', an alias for the command '%ps', " - "is deprecated.\n"), - styled_string (title_style.style (), - tmp_alias_str.c_str ()), - styled_string (title_style.style (), - tmp_cmd_str.c_str ())); + gdb_printf (_("Warning: '%ps', an alias for the command '%ps', " + "is deprecated.\n"), + styled_string (title_style.style (), + tmp_alias_str.c_str ()), + styled_string (title_style.style (), + tmp_cmd_str.c_str ())); } else - printf_filtered (_("Warning: command '%ps' is deprecated.\n"), - styled_string (title_style.style (), - tmp_cmd_str.c_str ())); + gdb_printf (_("Warning: command '%ps' is deprecated.\n"), + styled_string (title_style.style (), + tmp_cmd_str.c_str ())); /* Now display a second line indicating what the user should use instead. If it is only the alias that is deprecated, we want to indicate the @@ -2308,11 +2308,11 @@ deprecated_cmd_warning (const char *text, struct cmd_list_element *list) else replacement = cmd->replacement; if (replacement != nullptr) - printf_filtered (_("Use '%ps'.\n\n"), - styled_string (title_style.style (), - replacement)); + gdb_printf (_("Use '%ps'.\n\n"), + styled_string (title_style.style (), + replacement)); else - printf_filtered (_("No alternative known.\n\n")); + gdb_printf (_("No alternative known.\n\n")); /* We've warned you, now we'll keep quiet. */ if (alias != nullptr) diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index d3cc560..33c162b 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -398,8 +398,8 @@ restore_one_section (bfd *ibfd, asection *isec, || (load_end > 0 && sec_start >= load_end)) { /* No, no useable data in this section. */ - printf_filtered (_("skipping section %s...\n"), - bfd_section_name (isec)); + gdb_printf (_("skipping section %s...\n"), + bfd_section_name (isec)); return; } @@ -419,19 +419,19 @@ restore_one_section (bfd *ibfd, asection *isec, error (_("Failed to read bfd file %s: '%s'."), bfd_get_filename (ibfd), bfd_errmsg (bfd_get_error ())); - printf_filtered ("Restoring section %s (0x%lx to 0x%lx)", - bfd_section_name (isec), - (unsigned long) sec_start, - (unsigned long) sec_end); + gdb_printf ("Restoring section %s (0x%lx to 0x%lx)", + bfd_section_name (isec), + (unsigned long) sec_start, + (unsigned long) sec_end); if (load_offset != 0 || load_start != 0 || load_end != 0) - printf_filtered (" into memory (%s to %s)\n", - paddress (target_gdbarch (), - (unsigned long) sec_start - + sec_offset + load_offset), - paddress (target_gdbarch (), - (unsigned long) sec_start + sec_offset - + load_offset + sec_load_count)); + gdb_printf (" into memory (%s to %s)\n", + paddress (target_gdbarch (), + (unsigned long) sec_start + + sec_offset + load_offset), + paddress (target_gdbarch (), + (unsigned long) sec_start + sec_offset + + load_offset + sec_load_count)); else gdb_puts ("\n"); @@ -474,7 +474,7 @@ restore_binary_file (const char *filename, CORE_ADDR load_offset, if (load_start > 0) len -= load_start; - printf_filtered + gdb_printf ("Restoring binary file %s into memory (0x%lx to 0x%lx)\n", filename, (unsigned long) (load_start + load_offset), @@ -542,10 +542,10 @@ restore_command (const char *args, int from_tty) } if (info_verbose) - printf_filtered ("Restore file %s offset 0x%lx start 0x%lx end 0x%lx\n", - filename.get (), (unsigned long) load_offset, - (unsigned long) load_start, - (unsigned long) load_end); + gdb_printf ("Restore file %s offset 0x%lx start 0x%lx end 0x%lx\n", + filename.get (), (unsigned long) load_offset, + (unsigned long) load_start, + (unsigned long) load_end); if (binary_flag) { diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index bf12b1a..93f50a6 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -31,8 +31,8 @@ static void show_logging_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The current logfile is \"%ps\".\n"), - styled_string (file_name_style.style (), value)); + gdb_printf (file, _("The current logfile is \"%ps\".\n"), + styled_string (file_name_style.style (), value)); } static bool logging_overwrite; @@ -57,9 +57,9 @@ show_logging_overwrite (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_overwrite) - fprintf_filtered (file, _("on: Logging overwrites the log file.\n")); + gdb_printf (file, _("on: Logging overwrites the log file.\n")); else - fprintf_filtered (file, _("off: Logging appends to the log file.\n")); + gdb_printf (file, _("off: Logging appends to the log file.\n")); } /* Value as configured by the user. */ @@ -78,9 +78,9 @@ show_logging_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_redirect) - fprintf_filtered(file, _("on: Output will go only to the log file.\n")); + gdb_printf (file, _("on: Output will go only to the log file.\n")); else - fprintf_filtered + gdb_printf (file, _("off: Output will go to both the screen and the log file.\n")); } @@ -90,10 +90,9 @@ show_logging_debug_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (debug_redirect) - fprintf_filtered(file, - _("on: Debug output will go only to the log file.\n")); + gdb_printf (file, _("on: Debug output will go only to the log file.\n")); else - fprintf_filtered + gdb_printf (file, _("off: Debug output will go to both the screen and the log file.\n")); } @@ -115,8 +114,8 @@ handle_redirections (int from_tty) { if (!saved_filename.empty ()) { - printf_filtered ("Already logging to %s.\n", - saved_filename.c_str ()); + gdb_printf ("Already logging to %s.\n", + saved_filename.c_str ()); return; } @@ -128,18 +127,18 @@ handle_redirections (int from_tty) if (from_tty) { if (!logging_redirect) - printf_filtered ("Copying output to %s.\n", - logging_filename.c_str ()); + gdb_printf ("Copying output to %s.\n", + logging_filename.c_str ()); else - printf_filtered ("Redirecting output to %s.\n", - logging_filename.c_str ()); + gdb_printf ("Redirecting output to %s.\n", + logging_filename.c_str ()); if (!debug_redirect) - printf_filtered ("Copying debug output to %s.\n", - logging_filename.c_str ()); + gdb_printf ("Copying debug output to %s.\n", + logging_filename.c_str ()); else - printf_filtered ("Redirecting debug output to %s.\n", - logging_filename.c_str ()); + gdb_printf ("Redirecting debug output to %s.\n", + logging_filename.c_str ()); } saved_filename = logging_filename; @@ -177,8 +176,8 @@ set_logging_off (const char *args, int from_tty) pop_output_files (); if (from_tty) - printf_filtered ("Done logging to %s.\n", - saved_filename.c_str ()); + gdb_printf ("Done logging to %s.\n", + saved_filename.c_str ()); saved_filename.clear (); } @@ -199,9 +198,9 @@ show_logging_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_enabled) - fprintf_unfiltered (file, _("on: Logging is enabled.\n")); + gdb_printf (file, _("on: Logging is enabled.\n")); else - fprintf_unfiltered (file, _("off: Logging is disabled.\n")); + gdb_printf (file, _("off: Logging is disabled.\n")); } void _initialize_cli_logging (); diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index fe4682d..aa73d53 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -496,7 +496,7 @@ print_command_trace (const char *fmt, ...) return; for (i=0; i < command_nest_depth; i++) - printf_filtered ("+"); + gdb_printf ("+"); va_list args; @@ -1647,11 +1647,11 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name, { struct command_line *cmdlines = c->user_commands.get (); - fprintf_filtered (stream, "User %scommand \"", - c->is_prefix () ? "prefix" : ""); + gdb_printf (stream, "User %scommand \"", + c->is_prefix () ? "prefix" : ""); fprintf_styled (stream, title_style.style (), "%s%s", prefix, name); - fprintf_filtered (stream, "\":\n"); + gdb_printf (stream, "\":\n"); if (cmdlines) { print_command_lines (current_uiout, cmdlines, 1); diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 99f35eb..213573e 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -140,11 +140,11 @@ deprecated_show_value_hack (struct ui_file *ignore_file, case var_optional_filename: case var_filename: case var_enum: - printf_filtered ((" is \"%s\".\n"), value); + gdb_printf ((" is \"%s\".\n"), value); break; default: - printf_filtered ((" is %s.\n"), value); + gdb_printf ((" is %s.\n"), value); break; } } diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c index bdf7a3d..3fd85f4 100644 --- a/gdb/cli/cli-style.c +++ b/gdb/cli/cli-style.c @@ -189,7 +189,7 @@ do_show (const char *what, struct ui_file *file, cli_style_option *cso = (cli_style_option *) cmd->context (); gdb_puts (_("The "), file); fprintf_styled (file, cso->style (), _("\"%s\" style"), cso->name ()); - fprintf_filtered (file, _(" %s is: %s\n"), what, value); + gdb_printf (file, _(" %s is: %s\n"), what, value); } /* See cli-style.h. */ @@ -299,9 +299,9 @@ show_style_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (cli_styling) - fprintf_filtered (file, _("CLI output styling is enabled.\n")); + gdb_printf (file, _("CLI output styling is enabled.\n")); else - fprintf_filtered (file, _("CLI output styling is disabled.\n")); + gdb_printf (file, _("CLI output styling is disabled.\n")); } static void @@ -309,9 +309,9 @@ show_style_sources (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (source_styling) - fprintf_filtered (file, _("Source code styling is enabled.\n")); + gdb_printf (file, _("Source code styling is enabled.\n")); else - fprintf_filtered (file, _("Source code styling is disabled.\n")); + gdb_printf (file, _("Source code styling is disabled.\n")); } /* Implement 'show style disassembler'. */ @@ -321,9 +321,9 @@ show_style_disassembler (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (disassembler_styling) - fprintf_filtered (file, _("Disassembler output styling is enabled.\n")); + gdb_printf (file, _("Disassembler output styling is enabled.\n")); else - fprintf_filtered (file, _("Disassembler output styling is disabled.\n")); + gdb_printf (file, _("Disassembler output styling is disabled.\n")); } void _initialize_cli_style (); diff --git a/gdb/cli/cli-utils.c b/gdb/cli/cli-utils.c index d612b15..3d93115 100644 --- a/gdb/cli/cli-utils.c +++ b/gdb/cli/cli-utils.c @@ -100,7 +100,7 @@ get_number_trailer (const char **pp, int trailer) retval = value_as_long (val); else { - printf_filtered (_("History value must have integer type.\n")); + gdb_printf (_("History value must have integer type.\n")); retval = 0; } } @@ -122,8 +122,8 @@ get_number_trailer (const char **pp, int trailer) retval = (int) longest_val; else { - printf_filtered (_("Convenience variable must " - "have integer value.\n")); + gdb_printf (_("Convenience variable must " + "have integer value.\n")); retval = 0; } } |