Always call the wrap_here method

This changes all existing calls to wrap_here to call the method on the
appropriate ui_file instead.  The choice of ui_file is determined by
context.
This commit is contained in:
Tom Tromey 2021-12-30 10:29:03 -07:00
parent 7016a382b0
commit 1285ce8629
28 changed files with 80 additions and 80 deletions

View file

@ -317,7 +317,7 @@ print_enum_type (struct type *type, struct ui_file *stream)
LONGEST lastval; LONGEST lastval;
fprintf_filtered (stream, "("); fprintf_filtered (stream, "(");
wrap_here (1); stream->wrap_here (1);
lastval = 0; lastval = 0;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
@ -325,7 +325,7 @@ print_enum_type (struct type *type, struct ui_file *stream)
QUIT; QUIT;
if (i) if (i)
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
fputs_styled (ada_enum_name (type->field (i).name ()), fputs_styled (ada_enum_name (type->field (i).name ()),
variable_name_style.style (), stream); variable_name_style.style (), stream);
if (lastval != type->field (i).loc_enumval ()) if (lastval != type->field (i).loc_enumval ())
@ -416,7 +416,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
elt_type = ada_array_element_type (type, n_indices); elt_type = ada_array_element_type (type, n_indices);
fprintf_filtered (stream, ") of "); fprintf_filtered (stream, ") of ");
wrap_here (0); stream->wrap_here (0);
ada_print_type (elt_type, "", stream, show == 0 ? 0 : show - 1, level + 1, ada_print_type (elt_type, "", stream, show == 0 ? 0 : show - 1, level + 1,
flags); flags);
/* Arrays with variable-length elements are never bit-packed in practice but /* Arrays with variable-length elements are never bit-packed in practice but
@ -892,7 +892,7 @@ print_func_type (struct type *type, struct ui_file *stream, const char *name,
if (i > 0) if (i > 0)
{ {
fputs_filtered ("; ", stream); fputs_filtered ("; ", stream);
wrap_here (4); stream->wrap_here (4);
} }
fprintf_filtered (stream, "a%d: ", i + 1); fprintf_filtered (stream, "a%d: ", i + 1);
ada_print_type (type->field (i).type (), "", stream, -1, 0, ada_print_type (type->field (i).type (), "", stream, -1, 0,

View file

@ -178,7 +178,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
fprintf_filtered (stream, "\n"); fprintf_filtered (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream); print_spaces_filtered (2 + 2 * recurse, stream);
} }
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
maybe_print_array_index (index_type, i + low, stream, options); maybe_print_array_index (index_type, i + low, stream, options);
i0 = i; i0 = i;
@ -235,7 +235,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
{ {
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
} }
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
maybe_print_array_index (index_type, j + low, maybe_print_array_index (index_type, j + low,
stream, options); stream, options);
} }
@ -614,7 +614,7 @@ print_field_values (struct value *value, struct value *outer_value,
} }
else else
{ {
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
} }
annotate_field_begin (type->field (i).type ()); annotate_field_begin (type->field (i).type ());

View file

@ -250,7 +250,7 @@ cp_type_print_derivation_info (struct ui_file *stream,
for (i = 0; i < TYPE_N_BASECLASSES (type); i++) for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{ {
wrap_here (8); stream->wrap_here (8);
fputs_filtered (i == 0 ? ": " : ", ", stream); fputs_filtered (i == 0 ? ": " : ", ", stream);
fprintf_filtered (stream, "%s%s ", fprintf_filtered (stream, "%s%s ",
BASETYPE_VIA_PUBLIC (type, i) BASETYPE_VIA_PUBLIC (type, i)
@ -310,7 +310,7 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
else if (i < nargs) else if (i < nargs)
{ {
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (8); stream->wrap_here (8);
} }
} }
} }
@ -573,7 +573,7 @@ c_type_print_args (struct type *type, struct ui_file *stream,
if (printed_any) if (printed_any)
{ {
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
} }
param_type = type->field (i).type (); param_type = type->field (i).type ();
@ -602,7 +602,7 @@ c_type_print_args (struct type *type, struct ui_file *stream,
if (printed_any && type->has_varargs ()) if (printed_any && type->has_varargs ())
{ {
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
fprintf_filtered (stream, "..."); fprintf_filtered (stream, "...");
} }
} }
@ -888,14 +888,14 @@ c_type_print_template_args (const struct type_print_options *flags,
if (first) if (first)
{ {
wrap_here (4); stream->wrap_here (4);
fprintf_filtered (stream, _("[with %s = "), sym->linkage_name ()); fprintf_filtered (stream, _("[with %s = "), sym->linkage_name ());
first = 0; first = 0;
} }
else else
{ {
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
wrap_here (9); stream->wrap_here (9);
fprintf_filtered (stream, "%s = ", sym->linkage_name ()); fprintf_filtered (stream, "%s = ", sym->linkage_name ());
} }
@ -1559,7 +1559,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream,
fputs_filtered (" ", stream); fputs_filtered (" ", stream);
} }
wrap_here (4); stream->wrap_here (4);
if (show < 0) if (show < 0)
{ {
/* If we just printed a tag name, no need to print anything /* If we just printed a tag name, no need to print anything
@ -1594,7 +1594,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream,
QUIT; QUIT;
if (i) if (i)
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
fputs_styled (type->field (i).name (), fputs_styled (type->field (i).name (),
variable_name_style.style (), stream); variable_name_style.style (), stream);
if (lastval != type->field (i).loc_enumval ()) if (lastval != type->field (i).loc_enumval ())

View file

@ -841,7 +841,7 @@ echo_command (const char *text, int from_tty)
reset_terminal_style (gdb_stdout); reset_terminal_style (gdb_stdout);
/* Force this output to appear now. */ /* Force this output to appear now. */
wrap_here (0); gdb_stdout->wrap_here (0);
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);
} }

View file

@ -1414,7 +1414,7 @@ fput_command_names_styled (const cmd_list_element &c,
continue; continue;
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
wrap_here (3); stream->wrap_here (3);
fput_command_name_styled (alias, stream); fput_command_name_styled (alias, stream);
} }
@ -1651,7 +1651,7 @@ help_list (struct cmd_list_element *list, const char *cmdtype,
fprintf_filtered (stream, "\n\ fprintf_filtered (stream, "\n\
Type \"help%s\" followed by a class name for a list of commands in ", Type \"help%s\" followed by a class name for a list of commands in ",
cmdtype1); cmdtype1);
wrap_here (0); stream->wrap_here (0);
fprintf_filtered (stream, "that class."); fprintf_filtered (stream, "that class.");
fprintf_filtered (stream, "\n\ fprintf_filtered (stream, "\n\
@ -1660,16 +1660,16 @@ Type \"help all\" for the list of all commands.");
fprintf_filtered (stream, "\nType \"help%s\" followed by %scommand name ", fprintf_filtered (stream, "\nType \"help%s\" followed by %scommand name ",
cmdtype1, cmdtype2); cmdtype1, cmdtype2);
wrap_here (0); stream->wrap_here (0);
fputs_filtered ("for ", stream); fputs_filtered ("for ", stream);
wrap_here (0); stream->wrap_here (0);
fputs_filtered ("full ", stream); fputs_filtered ("full ", stream);
wrap_here (0); stream->wrap_here (0);
fputs_filtered ("documentation.\n", stream); fputs_filtered ("documentation.\n", stream);
fputs_filtered ("Type \"apropos word\" to search " fputs_filtered ("Type \"apropos word\" to search "
"for commands related to \"word\".\n", stream); "for commands related to \"word\".\n", stream);
fputs_filtered ("Type \"apropos -v word\" for full documentation", stream); fputs_filtered ("Type \"apropos -v word\" for full documentation", stream);
wrap_here (0); stream->wrap_here (0);
fputs_filtered (" of commands related to \"word\".\n", stream); fputs_filtered (" of commands related to \"word\".\n", stream);
fputs_filtered ("Command name abbreviations are allowed if unambiguous.\n", fputs_filtered ("Command name abbreviations are allowed if unambiguous.\n",
stream); stream);

View file

@ -222,7 +222,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
} }
else else
{ {
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
} }
annotate_field_begin (type->field (i).type ()); annotate_field_begin (type->field (i).type ());

View file

@ -1118,7 +1118,7 @@ The following disassembler options are supported for use with the\n\
fprintf_filtered (file, "%s", valid_options->arg[i]->name); fprintf_filtered (file, "%s", valid_options->arg[i]->name);
if (valid_options->name[i + 1] != NULL) if (valid_options->name[i + 1] != NULL)
fprintf_filtered (file, ", "); fprintf_filtered (file, ", ");
wrap_here (2); file->wrap_here (2);
} }
fprintf_filtered (file, "\n"); fprintf_filtered (file, "\n");
} }
@ -1136,7 +1136,7 @@ The following disassembler options are supported for use with the\n\
for (j = 0; valid_args[i].values[j] != NULL; j++) for (j = 0; valid_args[i].values[j] != NULL; j++)
{ {
fprintf_filtered (file, " %s", valid_args[i].values[j]); fprintf_filtered (file, " %s", valid_args[i].values[j]);
wrap_here (3); file->wrap_here (3);
} }
fprintf_filtered (file, "\n"); fprintf_filtered (file, "\n");
} }

View file

@ -52,7 +52,7 @@ print_flush (void)
/* 1. The _filtered buffer. */ /* 1. The _filtered buffer. */
if (filtered_printing_initialized ()) if (filtered_printing_initialized ())
wrap_here (0); gdb_stdout->wrap_here (0);
/* 2. The stdio buffer. */ /* 2. The stdio buffer. */
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);

View file

@ -909,7 +909,7 @@ print_section_info (const target_section_table *t, bfd *abfd)
printf_filtered ("\t`%ps', ", printf_filtered ("\t`%ps', ",
styled_string (file_name_style.style (), styled_string (file_name_style.style (),
bfd_get_filename (abfd))); bfd_get_filename (abfd)));
wrap_here (8); gdb_stdout->wrap_here (8);
printf_filtered (_("file type %s.\n"), bfd_get_target (abfd)); printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
if (abfd == current_program_space->exec_bfd ()) if (abfd == current_program_space->exec_bfd ())
{ {

View file

@ -250,7 +250,7 @@ f_language::f_type_print_varspec_suffix (struct type *type,
if (i > 0) if (i > 0)
{ {
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
wrap_here (4); stream->wrap_here (4);
} }
print_type (type->field (i).type (), "", stream, -1, 0, 0); print_type (type->field (i).type (), "", stream, -1, 0, 0);
} }
@ -290,7 +290,7 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream,
QUIT; QUIT;
wrap_here (4); stream->wrap_here (4);
if (type == NULL) if (type == NULL)
{ {
fputs_styled ("<type unknown>", metadata_style.style (), stream); fputs_styled ("<type unknown>", metadata_style.style (), stream);

View file

@ -861,7 +861,7 @@ ppscm_print_children (SCM printer, enum display_hint hint,
print_spaces_filtered (2 + 2 * recurse, stream); print_spaces_filtered (2 + 2 * recurse, stream);
} }
else else
wrap_here (2 + 2 *recurse); stream->wrap_here (2 + 2 *recurse);
} }
if (is_map && i % 2 == 0) if (is_map && i % 2 == 0)

View file

@ -79,7 +79,7 @@ m2_print_type (struct type *type, const char *varstring,
QUIT; QUIT;
wrap_here (4); stream->wrap_here (4);
if (type == NULL) if (type == NULL)
{ {
fputs_styled (_("<type unknown>"), metadata_style.style (), stream); fputs_styled (_("<type unknown>"), metadata_style.style (), stream);
@ -292,7 +292,7 @@ m2_procedure (struct type *type, struct ui_file *stream,
if (i > 0) if (i > 0)
{ {
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
wrap_here (4); stream->wrap_here (4);
} }
m2_print_type (type->field (i).type (), "", stream, -1, 0, flags); m2_print_type (type->field (i).type (), "", stream, -1, 0, flags);
} }
@ -539,7 +539,7 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show,
fprintf_filtered (stream, " = "); fprintf_filtered (stream, " = ");
} }
} }
wrap_here (4); stream->wrap_here (4);
if (show < 0) if (show < 0)
{ {
if (type->code () == TYPE_CODE_STRUCT) if (type->code () == TYPE_CODE_STRUCT)
@ -608,7 +608,7 @@ m2_enum (struct type *type, struct ui_file *stream, int show, int level)
QUIT; QUIT;
if (i > 0) if (i > 0)
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
fputs_styled (type->field (i).name (), fputs_styled (type->field (i).name (),
variable_name_style.style (), stream); variable_name_style.style (), stream);
if (lastval != type->field (i).loc_enumval ()) if (lastval != type->field (i).loc_enumval ())

View file

@ -1121,7 +1121,7 @@ captured_main_1 (struct captured_main_args *context)
if (print_version) if (print_version)
{ {
print_gdb_version (gdb_stdout, false); print_gdb_version (gdb_stdout, false);
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered ("\n"); printf_filtered ("\n");
exit (0); exit (0);
} }
@ -1135,7 +1135,7 @@ captured_main_1 (struct captured_main_args *context)
if (print_configuration) if (print_configuration)
{ {
print_gdb_configuration (gdb_stdout); print_gdb_configuration (gdb_stdout);
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered ("\n"); printf_filtered ("\n");
exit (0); exit (0);
} }
@ -1151,7 +1151,7 @@ captured_main_1 (struct captured_main_args *context)
print_gdb_version (gdb_stdout, true); print_gdb_version (gdb_stdout, true);
if (symarg) if (symarg)
printf_filtered (".."); printf_filtered ("..");
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered ("\n"); printf_filtered ("\n");
gdb_flush (gdb_stdout); /* Force to screen during slow gdb_flush (gdb_stdout); /* Force to screen during slow
operations. */ operations. */
@ -1172,7 +1172,7 @@ captured_main_1 (struct captured_main_args *context)
print_gdb_version (gdb_stdout, true); print_gdb_version (gdb_stdout, true);
if (symarg) if (symarg)
printf_filtered (".."); printf_filtered ("..");
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered ("\n"); printf_filtered ("\n");
gdb_flush (gdb_stdout); /* Force to screen during slow gdb_flush (gdb_stdout); /* Force to screen during slow
operations. */ operations. */

View file

@ -364,9 +364,9 @@ maint_print_all_sections (const char *header, bfd *abfd, objfile *objfile,
const char *arg) const char *arg)
{ {
puts_filtered (header); puts_filtered (header);
wrap_here (8); gdb_stdout->wrap_here (8);
printf_filtered ("`%s', ", bfd_get_filename (abfd)); printf_filtered ("`%s', ", bfd_get_filename (abfd));
wrap_here (8); gdb_stdout->wrap_here (8);
printf_filtered (_("file type %s.\n"), bfd_get_target (abfd)); printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
int section_count = gdb_bfd_count_sections (abfd); int section_count = gdb_bfd_count_sections (abfd);

View file

@ -287,7 +287,7 @@ pascal_language::print_func_args (struct type *type, struct ui_file *stream,
if (i > 0) if (i > 0)
{ {
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
wrap_here (4); stream->wrap_here (4);
} }
/* Can we find if it is a var parameter ?? /* Can we find if it is a var parameter ??
if ( TYPE_FIELD(type, i) == ) if ( TYPE_FIELD(type, i) == )
@ -419,7 +419,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int
section_type; section_type;
QUIT; QUIT;
wrap_here (4); stream->wrap_here (4);
if (type == NULL) if (type == NULL)
{ {
fputs_styled ("<type unknown>", metadata_style.style (), stream); fputs_styled ("<type unknown>", metadata_style.style (), stream);
@ -487,7 +487,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int
fprintf_filtered (stream, "case <?> of "); fprintf_filtered (stream, "case <?> of ");
struct_union: struct_union:
wrap_here (4); stream->wrap_here (4);
if (show < 0) if (show < 0)
{ {
/* If we just printed a tag name, no need to print anything else. */ /* If we just printed a tag name, no need to print anything else. */
@ -692,7 +692,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int
/* enum is just defined by /* enum is just defined by
type enume_name = (enum_member1,enum_member2,...) */ type enume_name = (enum_member1,enum_member2,...) */
fprintf_filtered (stream, " = "); fprintf_filtered (stream, " = ");
wrap_here (4); stream->wrap_here (4);
if (show < 0) if (show < 0)
{ {
/* If we just printed a tag name, no need to print anything else. */ /* If we just printed a tag name, no need to print anything else. */
@ -709,7 +709,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int
QUIT; QUIT;
if (i) if (i)
fprintf_filtered (stream, ", "); fprintf_filtered (stream, ", ");
wrap_here (4); stream->wrap_here (4);
fputs_filtered (type->field (i).name (), stream); fputs_filtered (type->field (i).name (), stream);
if (lastval != type->field (i).loc_enumval ()) if (lastval != type->field (i).loc_enumval ())
{ {

View file

@ -574,7 +574,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
} }
else else
{ {
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
} }
annotate_field_begin (type->field (i).type ()); annotate_field_begin (type->field (i).type ());

View file

@ -317,7 +317,7 @@ print_formatted (struct value *val, int size,
case 'i': case 'i':
/* We often wrap here if there are long symbolic names. */ /* We often wrap here if there are long symbolic names. */
wrap_here (4); stream->wrap_here (4);
next_address = (value_address (val) next_address = (value_address (val)
+ gdb_print_insn (type->arch (), + gdb_print_insn (type->arch (),
value_address (val), stream, value_address (val), stream,
@ -826,7 +826,7 @@ find_instruction_backward (struct gdbarch *gdbarch, CORE_ADDR addr,
is calculated after the loop. */ is calculated after the loop. */
printf_filtered (_("No line number information available " printf_filtered (_("No line number information available "
"for address ")); "for address "));
wrap_here (2); gdb_stdout->wrap_here (2);
print_address (gdbarch, loop_start - 1, gdb_stdout); print_address (gdbarch, loop_start - 1, gdb_stdout);
printf_filtered ("\n"); printf_filtered ("\n");
break; break;
@ -1498,7 +1498,7 @@ output_command (const char *exp, int from_tty)
annotate_value_end (); annotate_value_end ();
wrap_here (0); gdb_stdout->wrap_here (0);
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);
} }
@ -2895,7 +2895,7 @@ printf_command (const char *arg, int from_tty)
{ {
ui_printf (arg, gdb_stdout); ui_printf (arg, gdb_stdout);
reset_terminal_style (gdb_stdout); reset_terminal_style (gdb_stdout);
wrap_here (0); gdb_stdout->wrap_here (0);
gdb_stdout->flush (); gdb_stdout->flush ();
} }

View file

@ -1422,11 +1422,11 @@ partial_symtab::expand_dependencies (struct objfile *objfile)
if (info_verbose) if (info_verbose)
{ {
puts_filtered (" "); puts_filtered (" ");
wrap_here (0); gdb_stdout->wrap_here (0);
puts_filtered ("and "); puts_filtered ("and ");
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered ("%s...", dependencies[i]->filename); printf_filtered ("%s...", dependencies[i]->filename);
wrap_here (0); /* Flush output */ gdb_stdout->wrap_here (0); /* Flush output */
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);
} }
dependencies[i]->expand_psymtab (objfile); dependencies[i]->expand_psymtab (objfile);
@ -1679,14 +1679,14 @@ maintenance_info_psymtabs (const char *regexp, int from_tty)
if (! printed_objfile_start) if (! printed_objfile_start)
{ {
printf_filtered ("{ objfile %s ", objfile_name (objfile)); printf_filtered ("{ objfile %s ", objfile_name (objfile));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered ("((struct objfile *) %s)\n", printf_filtered ("((struct objfile *) %s)\n",
host_address_to_string (objfile)); host_address_to_string (objfile));
printed_objfile_start = 1; printed_objfile_start = 1;
} }
printf_filtered (" { psymtab %s ", psymtab->filename); printf_filtered (" { psymtab %s ", psymtab->filename);
wrap_here (4); gdb_stdout->wrap_here (4);
printf_filtered ("((struct partial_symtab *) %s)\n", printf_filtered ("((struct partial_symtab *) %s)\n",
host_address_to_string (psymtab)); host_address_to_string (psymtab));

View file

@ -474,7 +474,7 @@ print_children (PyObject *printer, const char *hint,
print_spaces_filtered (2 + 2 * recurse, stream); print_spaces_filtered (2 + 2 * recurse, stream);
} }
else else
wrap_here (2 + 2 *recurse); stream->wrap_here (2 + 2 *recurse);
} }
if (is_map && i % 2 == 0) if (is_map && i % 2 == 0)

View file

@ -1548,7 +1548,7 @@ info_line_command (const char *arg, int from_tty)
user about a source line, at least let them have the symbolic user about a source line, at least let them have the symbolic
address. */ address. */
printf_filtered (" for address "); printf_filtered (" for address ");
wrap_here (2); gdb_stdout->wrap_here (2);
print_address (gdbarch, sal.pc, gdb_stdout); print_address (gdbarch, sal.pc, gdb_stdout);
} }
else else
@ -1565,10 +1565,10 @@ info_line_command (const char *arg, int from_tty)
printf_filtered ("Line %d of \"%s\"", printf_filtered ("Line %d of \"%s\"",
sal.line, sal.line,
symtab_to_filename_for_display (sal.symtab)); symtab_to_filename_for_display (sal.symtab));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" is at address "); printf_filtered (" is at address ");
print_address (gdbarch, start_pc, gdb_stdout); print_address (gdbarch, start_pc, gdb_stdout);
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" but contains no code.\n"); printf_filtered (" but contains no code.\n");
} }
else else
@ -1576,10 +1576,10 @@ info_line_command (const char *arg, int from_tty)
printf_filtered ("Line %d of \"%s\"", printf_filtered ("Line %d of \"%s\"",
sal.line, sal.line,
symtab_to_filename_for_display (sal.symtab)); symtab_to_filename_for_display (sal.symtab));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" starts at address "); printf_filtered (" starts at address ");
print_address (gdbarch, start_pc, gdb_stdout); print_address (gdbarch, start_pc, gdb_stdout);
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" and ends at "); printf_filtered (" and ends at ");
print_address (gdbarch, end_pc, gdb_stdout); print_address (gdbarch, end_pc, gdb_stdout);
printf_filtered (".\n"); printf_filtered (".\n");

View file

@ -1557,13 +1557,13 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p)
else else
fputs_styled ("<unavailable>", metadata_style.style (), gdb_stdout); fputs_styled ("<unavailable>", metadata_style.style (), gdb_stdout);
wrap_here (3); gdb_stdout->wrap_here (3);
if (funname) if (funname)
{ {
printf_filtered (" in "); printf_filtered (" in ");
puts_filtered (funname); puts_filtered (funname);
} }
wrap_here (3); gdb_stdout->wrap_here (3);
if (sal.symtab) if (sal.symtab)
printf_filtered printf_filtered
(" (%ps:%d)", (" (%ps:%d)",
@ -1571,7 +1571,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p)
symtab_to_filename_for_display (sal.symtab)), symtab_to_filename_for_display (sal.symtab)),
sal.line); sal.line);
puts_filtered ("; "); puts_filtered ("; ");
wrap_here (4); gdb_stdout->wrap_here (4);
printf_filtered ("saved %s = ", pc_regname); printf_filtered ("saved %s = ", pc_regname);
if (!frame_id_p (frame_unwind_caller_id (fi))) if (!frame_id_p (frame_unwind_caller_id (fi)))
@ -1627,7 +1627,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p)
} }
if (get_next_frame (fi) && calling_frame_info) if (get_next_frame (fi) && calling_frame_info)
puts_filtered (","); puts_filtered (",");
wrap_here (3); gdb_stdout->wrap_here (3);
if (get_next_frame (fi)) if (get_next_frame (fi))
{ {
printf_filtered (" caller of frame at "); printf_filtered (" caller of frame at ");
@ -1765,7 +1765,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p)
puts_filtered (" Saved registers:\n "); puts_filtered (" Saved registers:\n ");
else else
puts_filtered (","); puts_filtered (",");
wrap_here (1); gdb_stdout->wrap_here (1);
printf_filtered (" %s at ", printf_filtered (" %s at ",
gdbarch_register_name (gdbarch, i)); gdbarch_register_name (gdbarch, i));
puts_filtered (paddress (gdbarch, addr)); puts_filtered (paddress (gdbarch, addr));

View file

@ -2607,9 +2607,9 @@ reread_symbols (int from_tty)
if (!objfile_has_symbols (objfile)) if (!objfile_has_symbols (objfile))
{ {
wrap_here (0); gdb_stdout->wrap_here (0);
printf_filtered (_("(no debugging symbols found)\n")); printf_filtered (_("(no debugging symbols found)\n"));
wrap_here (0); gdb_stdout->wrap_here (0);
} }
/* We're done reading the symbol file; finish off complaints. */ /* We're done reading the symbol file; finish off complaints. */

View file

@ -766,7 +766,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
if (! printed_objfile_start) if (! printed_objfile_start)
{ {
printf_filtered ("{ objfile %s ", objfile_name (objfile)); printf_filtered ("{ objfile %s ", objfile_name (objfile));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered ("((struct objfile *) %s)\n", printf_filtered ("((struct objfile *) %s)\n",
host_address_to_string (objfile)); host_address_to_string (objfile));
printed_objfile_start = 1; printed_objfile_start = 1;
@ -816,7 +816,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
printf_filtered ("\t{ symtab %s ", printf_filtered ("\t{ symtab %s ",
symtab_to_filename_for_display (symtab)); symtab_to_filename_for_display (symtab));
wrap_here (4); gdb_stdout->wrap_here (4);
printf_filtered ("((struct symtab *) %s)\n", printf_filtered ("((struct symtab *) %s)\n",
host_address_to_string (symtab)); host_address_to_string (symtab));
printf_filtered ("\t fullname %s\n", printf_filtered ("\t fullname %s\n",
@ -873,7 +873,7 @@ maintenance_check_symtabs (const char *ignore, int from_tty)
if (! printed_objfile_start) if (! printed_objfile_start)
{ {
printf_filtered ("{ objfile %s ", objfile_name (objfile)); printf_filtered ("{ objfile %s ", objfile_name (objfile));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered ("((struct objfile *) %s)\n", printf_filtered ("((struct objfile *) %s)\n",
host_address_to_string (objfile)); host_address_to_string (objfile));
printed_objfile_start = 1; printed_objfile_start = 1;

View file

@ -4380,7 +4380,7 @@ output_source_filename_data::output (const char *disp_name,
m_uiout->text (", "); m_uiout->text (", ");
m_first = false; m_first = false;
wrap_here (0); m_uiout->wrap_hint (0);
if (m_uiout->is_mi_like_p ()) if (m_uiout->is_mi_like_p ())
{ {
m_uiout->field_string ("file", disp_name, file_name_style.style ()); m_uiout->field_string ("file", disp_name, file_name_style.style ());

View file

@ -1364,7 +1364,7 @@ command_line_input (const char *prompt_arg, const char *annotation_suffix)
/* Make sure that all output has been output. Some machines may /* Make sure that all output has been output. Some machines may
let you get away with leaving out some of the gdb_flush, but let you get away with leaving out some of the gdb_flush, but
not all. */ not all. */
wrap_here (0); gdb_stdout->wrap_here (0);
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);
gdb_flush (gdb_stderr); gdb_flush (gdb_stderr);

View file

@ -2395,10 +2395,10 @@ tfind_line_command (const char *args, int from_tty)
printf_filtered ("Line %d of \"%s\"", printf_filtered ("Line %d of \"%s\"",
sal.line, sal.line,
symtab_to_filename_for_display (sal.symtab)); symtab_to_filename_for_display (sal.symtab));
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" is at address "); printf_filtered (" is at address ");
print_address (get_current_arch (), start_pc, gdb_stdout); print_address (get_current_arch (), start_pc, gdb_stdout);
wrap_here (2); gdb_stdout->wrap_here (2);
printf_filtered (" but contains no code.\n"); printf_filtered (" but contains no code.\n");
sal = find_pc_line (start_pc, 0); sal = find_pc_line (start_pc, 0);
if (sal.line > 0 if (sal.line > 0

View file

@ -154,7 +154,7 @@ vwarning (const char *string, va_list args)
target_terminal::ours_for_output (); target_terminal::ours_for_output ();
} }
if (filtered_printing_initialized ()) if (filtered_printing_initialized ())
wrap_here (0); /* Force out any buffered output. */ gdb_stdout->wrap_here (0); /* Force out any buffered output. */
gdb_flush (gdb_stdout); gdb_flush (gdb_stdout);
if (warning_pre_print) if (warning_pre_print)
fputs_unfiltered (warning_pre_print, gdb_stderr); fputs_unfiltered (warning_pre_print, gdb_stderr);
@ -881,7 +881,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
{ {
target_terminal::scoped_restore_terminal_state term_state; target_terminal::scoped_restore_terminal_state term_state;
target_terminal::ours_for_output (); target_terminal::ours_for_output ();
wrap_here (0); gdb_stdout->wrap_here (0);
vfprintf_filtered (gdb_stdout, ctlstr, args); vfprintf_filtered (gdb_stdout, ctlstr, args);
printf_filtered (_("(%s or %s) [answered %c; " printf_filtered (_("(%s or %s) [answered %c; "
@ -1795,8 +1795,8 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
if (*lineptr == '\n') if (*lineptr == '\n')
{ {
chars_printed = 0; chars_printed = 0;
wrap_here (0); /* Spit out chars, cancel stream->wrap_here (0); /* Spit out chars, cancel
further wraps. */ further wraps. */
lines_printed++; lines_printed++;
/* XXX: The ideal thing would be to call /* XXX: The ideal thing would be to call
'stream->putc' here, but we can't because it 'stream->putc' here, but we can't because it

View file

@ -1946,7 +1946,7 @@ value_print_array_elements (struct value *val, struct ui_file *stream,
fprintf_filtered (stream, "\n"); fprintf_filtered (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream); print_spaces_filtered (2 + 2 * recurse, stream);
} }
wrap_here (2 + 2 * recurse); stream->wrap_here (2 + 2 * recurse);
maybe_print_array_index (index_type, i + low_bound, maybe_print_array_index (index_type, i + low_bound,
stream, options); stream, options);