diff options
Diffstat (limited to 'gdb')
249 files changed, 8456 insertions, 8470 deletions
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index cb132d5..55094b3 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -1489,10 +1489,10 @@ aarch64_linux_syscall_record (struct regcache *regcache, if (syscall_gdb < 0) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %s\n"), - plongest (svc_number)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %s\n"), + plongest (svc_number)); return -1; } diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index b714f61..9a14c4d 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -214,7 +214,7 @@ static void show_aarch64_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("AArch64 debugging is %s.\n"), value); + gdb_printf (file, _("AArch64 debugging is %s.\n"), value); } namespace { @@ -3691,8 +3691,8 @@ aarch64_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) if (tdep == NULL) return; - fprintf_filtered (file, _("aarch64_dump_tdep: Lowest pc = 0x%s"), - paddress (gdbarch, tdep->lowest_pc)); + gdb_printf (file, _("aarch64_dump_tdep: Lowest pc = 0x%s"), + paddress (gdbarch, tdep->lowest_pc)); } #if GDB_SELF_TEST @@ -4696,11 +4696,11 @@ aarch64_process_record (struct gdbarch *gdbarch, struct regcache *regcache, ret = aarch64_record_decode_insn_handler (&aarch64_record); if (ret == AARCH64_RECORD_UNSUPPORTED) { - fprintf_unfiltered (gdb_stderr, - _("Process record does not support instruction " - "0x%0x at address %s.\n"), - aarch64_record.aarch64_insn, - paddress (gdbarch, insn_addr)); + gdb_printf (gdb_stderr, + _("Process record does not support instruction " + "0x%0x at address %s.\n"), + aarch64_record.aarch64_insn, + paddress (gdbarch, insn_addr)); ret = -1; } diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 0f772fd..59cbb11 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3485,7 +3485,7 @@ ada_print_symbol_signature (struct ui_file *stream, struct symbol *sym, { struct type *type = sym->type (); - fprintf_filtered (stream, "%s", sym->print_name ()); + gdb_printf (stream, "%s", sym->print_name ()); if (!print_signatures || type == NULL || type->code () != TYPE_CODE_FUNC) @@ -3495,20 +3495,20 @@ ada_print_symbol_signature (struct ui_file *stream, struct symbol *sym, { int i; - fprintf_filtered (stream, " ("); + gdb_printf (stream, " ("); for (i = 0; i < type->num_fields (); ++i) { if (i > 0) - fprintf_filtered (stream, "; "); + gdb_printf (stream, "; "); ada_print_type (type->field (i).type (), NULL, stream, -1, 0, flags); } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } if (TYPE_TARGET_TYPE (type) != NULL && TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, " return "); + gdb_printf (stream, " return "); ada_print_type (TYPE_TARGET_TYPE (type), NULL, stream, -1, 0, flags); } } @@ -3634,9 +3634,9 @@ See set/show multiple-symbol.")); if (select_mode == multiple_symbols_all && max_results > 1) return nsyms; - printf_filtered (_("[0] cancel\n")); + gdb_printf (_("[0] cancel\n")); if (max_results > 1) - printf_filtered (_("[1] all\n")); + gdb_printf (_("[1] all\n")); sort_choices (syms, nsyms); @@ -3650,14 +3650,14 @@ See set/show multiple-symbol.")); struct symtab_and_line sal = find_function_start_sal (syms[i].symbol, 1); - printf_filtered ("[%d] ", i + first_choice); + gdb_printf ("[%d] ", i + first_choice); ada_print_symbol_signature (gdb_stdout, syms[i].symbol, &type_print_raw_options); if (sal.symtab == NULL) - printf_filtered (_(" at %p[<no source file available>%p]:%d\n"), - metadata_style.style ().ptr (), nullptr, sal.line); + gdb_printf (_(" at %p[<no source file available>%p]:%d\n"), + metadata_style.style ().ptr (), nullptr, sal.line); else - printf_filtered + gdb_printf (_(" at %ps:%d\n"), styled_string (file_name_style.style (), symtab_to_filename_for_display (sal.symtab)), @@ -3677,37 +3677,37 @@ See set/show multiple-symbol.")); if (syms[i].symbol->line () != 0 && symtab != NULL) { - printf_filtered ("[%d] ", i + first_choice); + gdb_printf ("[%d] ", i + first_choice); ada_print_symbol_signature (gdb_stdout, syms[i].symbol, &type_print_raw_options); - printf_filtered (_(" at %s:%d\n"), - symtab_to_filename_for_display (symtab), - syms[i].symbol->line ()); + gdb_printf (_(" at %s:%d\n"), + symtab_to_filename_for_display (symtab), + syms[i].symbol->line ()); } else if (is_enumeral && syms[i].symbol->type ()->name () != NULL) { - printf_filtered (("[%d] "), i + first_choice); + gdb_printf (("[%d] "), i + first_choice); ada_print_type (syms[i].symbol->type (), NULL, gdb_stdout, -1, 0, &type_print_raw_options); - printf_filtered (_("'(%s) (enumeral)\n"), - syms[i].symbol->print_name ()); + gdb_printf (_("'(%s) (enumeral)\n"), + syms[i].symbol->print_name ()); } else { - printf_filtered ("[%d] ", i + first_choice); + gdb_printf ("[%d] ", i + first_choice); ada_print_symbol_signature (gdb_stdout, syms[i].symbol, &type_print_raw_options); if (symtab != NULL) - printf_filtered (is_enumeral - ? _(" in %s (enumeral)\n") - : _(" at %s:?\n"), - symtab_to_filename_for_display (symtab)); + gdb_printf (is_enumeral + ? _(" in %s (enumeral)\n") + : _(" at %s:?\n"), + symtab_to_filename_for_display (symtab)); else - printf_filtered (is_enumeral - ? _(" (enumeral)\n") - : _(" at ?\n")); + gdb_printf (is_enumeral + ? _(" (enumeral)\n") + : _(" at ?\n")); } } } @@ -3870,7 +3870,7 @@ ada_resolve_variable (struct symbol *sym, const struct block *block, } else { - printf_filtered (_("Multiple matches for %s\n"), sym->print_name ()); + gdb_printf (_("Multiple matches for %s\n"), sym->print_name ()); user_select_syms (candidates.data (), candidates.size (), 1); i = 0; } @@ -4053,7 +4053,7 @@ ada_resolve_function (std::vector<struct block_symbol> &syms, return -1; else if (m > 1 && !parse_completion) { - printf_filtered (_("Multiple matches for %s\n"), name); + gdb_printf (_("Multiple matches for %s\n"), name); user_select_syms (syms.data (), m, 1); return 0; } @@ -9466,7 +9466,7 @@ ada_aggregate_component::uses_objfile (struct objfile *objfile) void ada_aggregate_component::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sAggregate\n"), depth, ""); + gdb_printf (stream, _("%*sAggregate\n"), depth, ""); for (const auto &item : m_components) item->dump (stream, depth + 1); } @@ -9533,8 +9533,8 @@ ada_positional_component::uses_objfile (struct objfile *objfile) void ada_positional_component::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sPositional, index = %d\n"), - depth, "", m_index); + gdb_printf (stream, _("%*sPositional, index = %d\n"), + depth, "", m_index); m_op->dump (stream, depth + 1); } @@ -9568,7 +9568,7 @@ ada_discrete_range_association::uses_objfile (struct objfile *objfile) void ada_discrete_range_association::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sDiscrete range:\n"), depth, ""); + gdb_printf (stream, _("%*sDiscrete range:\n"), depth, ""); m_low->dump (stream, depth + 1); m_high->dump (stream, depth + 1); } @@ -9604,7 +9604,7 @@ ada_name_association::uses_objfile (struct objfile *objfile) void ada_name_association::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sName:\n"), depth, ""); + gdb_printf (stream, _("%*sName:\n"), depth, ""); m_val->dump (stream, depth + 1); } @@ -9662,7 +9662,7 @@ ada_choices_component::uses_objfile (struct objfile *objfile) void ada_choices_component::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sChoices:\n"), depth, ""); + gdb_printf (stream, _("%*sChoices:\n"), depth, ""); m_op->dump (stream, depth + 1); for (const auto &item : m_assocs) item->dump (stream, depth + 1); @@ -9691,7 +9691,7 @@ ada_others_component::uses_objfile (struct objfile *objfile) void ada_others_component::dump (ui_file *stream, int depth) { - fprintf_filtered (stream, _("%*sOthers:\n"), depth, ""); + gdb_printf (stream, _("%*sOthers:\n"), depth, ""); m_op->dump (stream, depth + 1); } @@ -12460,21 +12460,21 @@ print_recreate_exception (struct breakpoint *b, struct ui_file *fp) switch (c->m_kind) { case ada_catch_exception: - fprintf_filtered (fp, "catch exception"); + gdb_printf (fp, "catch exception"); if (!c->excep_string.empty ()) - fprintf_filtered (fp, " %s", c->excep_string.c_str ()); + gdb_printf (fp, " %s", c->excep_string.c_str ()); break; case ada_catch_exception_unhandled: - fprintf_filtered (fp, "catch exception unhandled"); + gdb_printf (fp, "catch exception unhandled"); break; case ada_catch_handlers: - fprintf_filtered (fp, "catch handlers"); + gdb_printf (fp, "catch handlers"); break; case ada_catch_assert: - fprintf_filtered (fp, "catch assert"); + gdb_printf (fp, "catch assert"); break; default: @@ -13155,13 +13155,13 @@ info_exceptions_command (const char *regexp, int from_tty) std::vector<ada_exc_info> exceptions = ada_exceptions_list (regexp); if (regexp != NULL) - printf_filtered + gdb_printf (_("All Ada exceptions matching regular expression \"%s\":\n"), regexp); else - printf_filtered (_("All defined Ada exceptions:\n")); + gdb_printf (_("All defined Ada exceptions:\n")); for (const ada_exc_info &info : exceptions) - printf_filtered ("%s: %s\n", info.name, paddress (gdbarch, info.addr)); + gdb_printf ("%s: %s\n", info.name, paddress (gdbarch, info.addr)); } @@ -13392,7 +13392,7 @@ public: struct value *index_value = val_atr (index_type, index); value_print (index_value, stream, options); - fprintf_filtered (stream, " => "); + gdb_printf (stream, " => "); } /* Implement the "read_var_value" language_defn method for Ada. */ diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index 6a41d5f..5622772 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -1223,23 +1223,23 @@ info_task (struct ui_out *uiout, const char *taskno_str, struct inferior *inf) task_info = &data->task_list[taskno - 1]; /* Print the Ada task ID. */ - printf_filtered (_("Ada Task: %s\n"), - paddress (target_gdbarch (), task_info->task_id)); + gdb_printf (_("Ada Task: %s\n"), + paddress (target_gdbarch (), task_info->task_id)); /* Print the name of the task. */ if (task_info->name[0] != '\0') - printf_filtered (_("Name: %s\n"), task_info->name); + gdb_printf (_("Name: %s\n"), task_info->name); else fprintf_styled (gdb_stdout, metadata_style.style (), _("<no name>\n")); /* Print the TID and LWP. */ - printf_filtered (_("Thread: 0x%s\n"), phex_nz (task_info->ptid.tid (), - sizeof (ULONGEST))); - printf_filtered (_("LWP: %#lx\n"), task_info->ptid.lwp ()); + gdb_printf (_("Thread: 0x%s\n"), phex_nz (task_info->ptid.tid (), + sizeof (ULONGEST))); + gdb_printf (_("LWP: %#lx\n"), task_info->ptid.lwp ()); /* If set, print the base CPU. */ if (task_info->base_cpu != 0) - printf_filtered (_("Base CPU: %d\n"), task_info->base_cpu); + gdb_printf (_("Base CPU: %d\n"), task_info->base_cpu); /* Print who is the parent (if any). */ if (task_info->parent != 0) @@ -1248,16 +1248,16 @@ info_task (struct ui_out *uiout, const char *taskno_str, struct inferior *inf) { struct ada_task_info *parent = &data->task_list[parent_taskno - 1]; - printf_filtered (_("Parent: %d"), parent_taskno); + gdb_printf (_("Parent: %d"), parent_taskno); if (parent->name[0] != '\0') - printf_filtered (" (%s)", parent->name); - printf_filtered ("\n"); + gdb_printf (" (%s)", parent->name); + gdb_printf ("\n"); } else - printf_filtered (_("No parent\n")); + gdb_printf (_("No parent\n")); /* Print the base priority. */ - printf_filtered (_("Base Priority: %d\n"), task_info->priority); + gdb_printf (_("Base Priority: %d\n"), task_info->priority); /* print the task current state. */ { @@ -1266,27 +1266,27 @@ info_task (struct ui_out *uiout, const char *taskno_str, struct inferior *inf) if (task_info->caller_task) { target_taskno = get_task_number_from_id (task_info->caller_task, inf); - printf_filtered (_("State: Accepting rendezvous with %d"), - target_taskno); + gdb_printf (_("State: Accepting rendezvous with %d"), + target_taskno); } else if (task_info->called_task) { target_taskno = get_task_number_from_id (task_info->called_task, inf); - printf_filtered (_("State: Waiting on task %d's entry"), - target_taskno); + gdb_printf (_("State: Waiting on task %d's entry"), + target_taskno); } else - printf_filtered (_("State: %s"), _(long_task_states[task_info->state])); + gdb_printf (_("State: %s"), _(long_task_states[task_info->state])); if (target_taskno) { ada_task_info *target_task_info = &data->task_list[target_taskno - 1]; if (target_task_info->name[0] != '\0') - printf_filtered (" (%s)", target_task_info->name); + gdb_printf (" (%s)", target_task_info->name); } - printf_filtered ("\n"); + gdb_printf ("\n"); } } @@ -1316,15 +1316,15 @@ display_current_task_id (void) const int current_task = ada_get_task_number (inferior_thread ()); if (current_task == 0) - printf_filtered (_("[Current task is unknown]\n")); + gdb_printf (_("[Current task is unknown]\n")); else { struct ada_tasks_inferior_data *data = get_ada_tasks_inferior_data (current_inferior ()); struct ada_task_info *task_info = &data->task_list[current_task - 1]; - printf_filtered (_("[Current task is %s]\n"), - task_to_str (current_task, task_info).c_str ()); + gdb_printf (_("[Current task is %s]\n"), + task_to_str (current_task, task_info).c_str ()); } } @@ -1372,8 +1372,8 @@ task_command_1 (const char *taskno_str, int from_tty, struct inferior *inf) switch_to_thread (tp); ada_find_printable_frame (get_selected_frame (NULL)); - printf_filtered (_("[Switching to task %s]\n"), - task_to_str (taskno, task_info).c_str ()); + gdb_printf (_("[Switching to task %s]\n"), + task_to_str (taskno, task_info).c_str ()); print_stack_frame (get_selected_frame (NULL), frame_relative_level (get_selected_frame (NULL)), SRC_AND_LOC, 1); diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c index ee382eb..0eb95cb 100644 --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c @@ -166,22 +166,22 @@ print_range (struct type *type, struct ui_file *stream, access to an actual object, which is not available when the user is using the "ptype" command on a type. Print the range as an unbounded range. */ - fprintf_filtered (stream, "<>"); + gdb_printf (stream, "<>"); got_error = 1; } if (!got_error) { ada_print_scalar (type, lo, stream); - fprintf_filtered (stream, " .. "); + gdb_printf (stream, " .. "); ada_print_scalar (type, hi, stream); } } break; default: - fprintf_filtered (stream, "%.*s", - ada_name_prefix_len (type->name ()), - type->name ()); + gdb_printf (stream, "%.*s", + ada_name_prefix_len (type->name ()), + type->name ()); break; } } @@ -228,7 +228,7 @@ print_range_bound (struct type *type, const char *bounds, int *n, bound_len = pend - bound; *n += bound_len + 2; } - fprintf_filtered (stream, "%.*s", bound_len, bound); + gdb_printf (stream, "%.*s", bound_len, bound); } } @@ -247,7 +247,7 @@ print_dynamic_range_bound (struct type *type, const char *name, int name_len, if (get_int_var_value (name_buf.c_str (), B)) ada_print_scalar (type, B, stream); else - fprintf_filtered (stream, "?"); + gdb_printf (stream, "?"); } /* Print RAW_TYPE as a range type, using any bound information @@ -297,7 +297,7 @@ print_range_type (struct type *raw_type, struct ui_file *stream, print_dynamic_range_bound (base_type, name, prefix_len, "___L", stream); - fprintf_filtered (stream, " .. "); + gdb_printf (stream, " .. "); if (*subtype_info == 'U') print_range_bound (base_type, bounds_str, &n, stream); @@ -316,7 +316,7 @@ print_enum_type (struct type *type, struct ui_file *stream) int i; LONGEST lastval; - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); stream->wrap_here (1); lastval = 0; @@ -324,19 +324,19 @@ print_enum_type (struct type *type, struct ui_file *stream) { QUIT; if (i) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); fputs_styled (ada_enum_name (type->field (i).name ()), variable_name_style.style (), stream); if (lastval != type->field (i).loc_enumval ()) { - fprintf_filtered (stream, " => %s", - plongest (type->field (i).loc_enumval ())); + gdb_printf (stream, " => %s", + plongest (type->field (i).loc_enumval ())); lastval = type->field (i).loc_enumval (); } lastval += 1; } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } /* Print simple (constrained) array type TYPE on STREAM. LEVEL is the @@ -356,7 +356,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show, type = ada_coerce_to_simple_array_type (type); bitsize = 0; - fprintf_filtered (stream, "array ("); + gdb_printf (stream, "array ("); if (type == NULL) { @@ -381,7 +381,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show, arr_type = TYPE_TARGET_TYPE (arr_type)) { if (arr_type != type) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); print_range (arr_type->index_type (), stream, 0 /* bounds_prefered_p */); if (TYPE_FIELD_BITSIZE (arr_type, 0) > 0) @@ -398,7 +398,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show, k += 1, arr_type = TYPE_TARGET_TYPE (arr_type)) { if (k > 0) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); print_range_type (range_desc_type->field (k).type (), stream, 0 /* bounds_prefered_p */); if (TYPE_FIELD_BITSIZE (arr_type, 0) > 0) @@ -411,11 +411,11 @@ print_array_type (struct type *type, struct ui_file *stream, int show, int i, i0; for (i = i0 = ada_array_arity (type); i > 0; i -= 1) - fprintf_filtered (stream, "%s<>", i == i0 ? "" : ", "); + gdb_printf (stream, "%s<>", i == i0 ? "" : ", "); } elt_type = ada_array_element_type (type, n_indices); - fprintf_filtered (stream, ") of "); + gdb_printf (stream, ") of "); stream->wrap_here (0); ada_print_type (elt_type, "", stream, show == 0 ? 0 : show - 1, level + 1, flags); @@ -423,7 +423,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show, compilers have to describe their stride so that we can properly fetch individual elements. Do not say the array is packed in this case. */ if (bitsize > 0 && !is_dynamic_type (elt_type)) - fprintf_filtered (stream, " <packed: %d-bit elements>", bitsize); + gdb_printf (stream, " <packed: %d-bit elements>", bitsize); } /* Print the choices encoded by field FIELD_NUM of variant-part TYPE on @@ -460,13 +460,13 @@ print_choices (struct type *type, int field_num, struct ui_file *stream, goto Huh; case '_': case '\0': - fprintf_filtered (stream, " =>"); + gdb_printf (stream, " =>"); return 1; case 'S': case 'R': case 'O': if (have_output) - fprintf_filtered (stream, " | "); + gdb_printf (stream, " | "); have_output = 1; break; } @@ -490,19 +490,19 @@ print_choices (struct type *type, int field_num, struct ui_file *stream, || name[p] != 'T' || !ada_scan_number (name, p + 1, &U, &p)) goto Huh; ada_print_scalar (val_type, L, stream); - fprintf_filtered (stream, " .. "); + gdb_printf (stream, " .. "); ada_print_scalar (val_type, U, stream); break; } case 'O': - fprintf_filtered (stream, "others"); + gdb_printf (stream, "others"); p += 1; break; } } Huh: - fprintf_filtered (stream, "? =>"); + gdb_printf (stream, "? =>"); return 0; } @@ -520,14 +520,14 @@ print_variant_clauses (struct type *var_type, struct type *discr_type, { for (int i = 0; i < var_type->num_fields (); i += 1) { - fprintf_filtered (stream, "\n%*swhen ", level, ""); + gdb_printf (stream, "\n%*swhen ", level, ""); if (print_choices (var_type, i, stream, discr_type)) { if (print_record_field_types (var_type->field (i).type (), outer_type, stream, show, level, flags) <= 0) - fprintf_filtered (stream, " null;"); + gdb_printf (stream, " null;"); } else print_selected_record_field_types (var_type, outer_type, i, i, @@ -588,10 +588,10 @@ print_variant_part (struct type *type, int field_num, struct type *outer_type, if (*variant == '\0') variant = "?"; - fprintf_filtered (stream, "\n%*scase %s is", level + 4, "", variant); + gdb_printf (stream, "\n%*scase %s is", level + 4, "", variant); print_variant_clauses (type, field_num, outer_type, stream, show, level + 4, flags); - fprintf_filtered (stream, "\n%*send case;", level + 4, ""); + gdb_printf (stream, "\n%*send case;", level + 4, ""); } /* Print a description on STREAM of the fields FLD0 through FLD1 in @@ -633,11 +633,11 @@ print_selected_record_field_types (struct type *type, struct type *outer_type, else { flds += 1; - fprintf_filtered (stream, "\n%*s", level + 4, ""); + gdb_printf (stream, "\n%*s", level + 4, ""); ada_print_type (type->field (i).type (), type->field (i).name (), stream, show - 1, level + 4, flags); - fprintf_filtered (stream, ";"); + gdb_printf (stream, ";"); } } @@ -657,16 +657,16 @@ static void print_choices (struct type *discr_type, const variant &variant, struct ui_file *stream, int level) { - fprintf_filtered (stream, "\n%*swhen ", level, ""); + gdb_printf (stream, "\n%*swhen ", level, ""); if (variant.is_default ()) - fprintf_filtered (stream, "others"); + gdb_printf (stream, "others"); else { bool first = true; for (const discriminant_range &range : variant.discriminants) { if (!first) - fprintf_filtered (stream, " | "); + gdb_printf (stream, " | "); first = false; ada_print_scalar (discr_type, range.low, stream); @@ -675,7 +675,7 @@ print_choices (struct type *discr_type, const variant &variant, } } - fprintf_filtered (stream, " =>"); + gdb_printf (stream, " =>"); } /* Print a single variant part, PART, on STREAM. TYPE is the @@ -701,7 +701,7 @@ print_variant_part (const variant_part &part, discr_type = type->field (part.discriminant_index).type (); } - fprintf_filtered (stream, "\n%*scase %s is", level + 4, "", name); + gdb_printf (stream, "\n%*scase %s is", level + 4, "", name); int last_field = -1; for (const variant &variant : part.variants) @@ -709,7 +709,7 @@ print_variant_part (const variant_part &part, print_choices (discr_type, variant, stream, level + 8); if (variant.first_field == variant.last_field) - fprintf_filtered (stream, " null;"); + gdb_printf (stream, " null;"); else { print_record_field_types_dynamic (variant.parts, @@ -720,7 +720,7 @@ print_variant_part (const variant_part &part, } } - fprintf_filtered (stream, "\n%*send case;", level + 4, ""); + gdb_printf (stream, "\n%*send case;", level + 4, ""); return last_field; } @@ -813,15 +813,15 @@ print_record_type (struct type *type0, struct ui_file *stream, int show, prevents a crash trying to print a NULL pointer. */ if (parent_name == NULL) parent_name = ada_type_name (parent_type); - fprintf_filtered (stream, "new %s with record", parent_name); + gdb_printf (stream, "new %s with record", parent_name); } else if (parent_type == NULL && ada_is_tagged_type (type, 0)) - fprintf_filtered (stream, "tagged record"); + gdb_printf (stream, "tagged record"); else - fprintf_filtered (stream, "record"); + gdb_printf (stream, "record"); if (show < 0) - fprintf_filtered (stream, " ... end record"); + gdb_printf (stream, " ... end record"); else { int flds; @@ -834,11 +834,11 @@ print_record_type (struct type *type0, struct ui_file *stream, int show, flags); if (flds > 0) - fprintf_filtered (stream, "\n%*send record", level, ""); + gdb_printf (stream, "\n%*send record", level, ""); else if (flds < 0) - fprintf_filtered (stream, _(" <incomplete type> end record")); + gdb_printf (stream, _(" <incomplete type> end record")); else - fprintf_filtered (stream, " null; end record"); + gdb_printf (stream, " null; end record"); } } @@ -852,17 +852,17 @@ print_unchecked_union_type (struct type *type, struct ui_file *stream, const struct type_print_options *flags) { if (show < 0) - fprintf_filtered (stream, "record (?) is ... end record"); + gdb_printf (stream, "record (?) is ... end record"); else if (type->num_fields () == 0) - fprintf_filtered (stream, "record (?) is null; end record"); + gdb_printf (stream, "record (?) is null; end record"); else { - fprintf_filtered (stream, "record (?) is\n%*scase ? is", level + 4, ""); + gdb_printf (stream, "record (?) is\n%*scase ? is", level + 4, ""); print_variant_clauses (type, nullptr, type, stream, show, level + 8, flags); - fprintf_filtered (stream, "\n%*send case;\n%*send record", - level + 4, "", level, ""); + gdb_printf (stream, "\n%*send case;\n%*send record", + level + 4, "", level, ""); } } @@ -879,9 +879,9 @@ print_func_type (struct type *type, struct ui_file *stream, const char *name, if (TYPE_TARGET_TYPE (type) != NULL && TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_VOID) - fprintf_filtered (stream, "procedure"); + gdb_printf (stream, "procedure"); else - fprintf_filtered (stream, "function"); + gdb_printf (stream, "function"); if (name != NULL && name[0] != '\0') { @@ -891,7 +891,7 @@ print_func_type (struct type *type, struct ui_file *stream, const char *name, if (len > 0) { - fprintf_filtered (stream, " ("); + gdb_printf (stream, " ("); for (i = 0; i < len; i += 1) { if (i > 0) @@ -899,18 +899,18 @@ print_func_type (struct type *type, struct ui_file *stream, const char *name, gdb_puts ("; ", stream); stream->wrap_here (4); } - fprintf_filtered (stream, "a%d: ", i + 1); + gdb_printf (stream, "a%d: ", i + 1); ada_print_type (type->field (i).type (), "", stream, -1, 0, flags); } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } if (TYPE_TARGET_TYPE (type) == NULL) - fprintf_filtered (stream, " return <unknown return type>"); + gdb_printf (stream, " return <unknown return type>"); else if (TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, " return "); + gdb_printf (stream, " return "); ada_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, 0, flags); } } @@ -954,20 +954,20 @@ ada_print_type (struct type *type0, const char *varstring, if (type == NULL) { if (is_var_decl) - fprintf_filtered (stream, "%.*s: ", - ada_name_prefix_len (varstring), varstring); + gdb_printf (stream, "%.*s: ", + ada_name_prefix_len (varstring), varstring); fprintf_styled (stream, metadata_style.style (), "<null type?>"); return; } if (is_var_decl && type->code () != TYPE_CODE_FUNC) - fprintf_filtered (stream, "%.*s: ", - ada_name_prefix_len (varstring), varstring); + gdb_printf (stream, "%.*s: ", + ada_name_prefix_len (varstring), varstring); if (type_name != NULL && show <= 0 && !ada_is_aligner_type (type)) { - fprintf_filtered (stream, "%.*s", - ada_name_prefix_len (type_name), type_name); + gdb_printf (stream, "%.*s", + ada_name_prefix_len (type_name), type_name); return; } @@ -980,9 +980,9 @@ ada_print_type (struct type *type0, const char *varstring, switch (type->code ()) { default: - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); c_print_type (type, "", stream, show, level, flags); - fprintf_filtered (stream, ">"); + gdb_printf (stream, ">"); break; case TYPE_CODE_PTR: case TYPE_CODE_TYPEDEF: @@ -990,12 +990,12 @@ ada_print_type (struct type *type0, const char *varstring, "access" in this case. */ if (type->code () != TYPE_CODE_PTR || strstr (varstring, "___XVL") == nullptr) - fprintf_filtered (stream, "access "); + gdb_printf (stream, "access "); ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); break; case TYPE_CODE_REF: - fprintf_filtered (stream, "<ref> "); + gdb_printf (stream, "<ref> "); ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); break; @@ -1003,7 +1003,7 @@ ada_print_type (struct type *type0, const char *varstring, print_array_type (type, stream, show, level, flags); break; case TYPE_CODE_BOOL: - fprintf_filtered (stream, "(false, true)"); + gdb_printf (stream, "(false, true)"); break; case TYPE_CODE_INT: { @@ -1015,7 +1015,7 @@ ada_print_type (struct type *type0, const char *varstring, pulongest (TYPE_LENGTH (type))); else { - fprintf_filtered (stream, "range "); + gdb_printf (stream, "range "); print_range_type (type, stream, 1 /* bounds_prefered_p */); } } @@ -1023,16 +1023,16 @@ ada_print_type (struct type *type0, const char *varstring, case TYPE_CODE_RANGE: if (is_fixed_point_type (type)) { - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); print_type_fixed_point (type, stream); - fprintf_filtered (stream, ">"); + gdb_printf (stream, ">"); } else if (ada_is_modular_type (type)) - fprintf_filtered (stream, "mod %s", - int_string (ada_modulus (type), 10, 0, 0, 1)); + gdb_printf (stream, "mod %s", + int_string (ada_modulus (type), 10, 0, 0, 1)); else { - fprintf_filtered (stream, "range "); + gdb_printf (stream, "range "); print_range (type, stream, 1 /* bounds_prefered_p */); } break; @@ -1043,7 +1043,7 @@ ada_print_type (struct type *type0, const char *varstring, break; case TYPE_CODE_ENUM: if (show < 0) - fprintf_filtered (stream, "(...)"); + gdb_printf (stream, "(...)"); else print_enum_type (type, stream); break; @@ -1051,8 +1051,8 @@ ada_print_type (struct type *type0, const char *varstring, if (ada_is_array_descriptor_type (type)) print_array_type (type, stream, show, level, flags); else if (ada_is_bogus_array_descriptor (type)) - fprintf_filtered (stream, - _("array (?) of ? (<mal-formed descriptor>)")); + gdb_printf (stream, + _("array (?) of ? (<mal-formed descriptor>)")); else print_record_type (type, stream, show, level, flags); break; diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index f125a38..2db3111 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -106,7 +106,7 @@ print_optional_low_bound (struct ui_file *stream, struct type *type, } ada_print_scalar (index_type, low_bound, stream); - fprintf_filtered (stream, " => "); + gdb_printf (stream, " => "); return 1; } @@ -165,17 +165,17 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, { if (options->prettyformat_arrays) { - fprintf_filtered (stream, ",\n"); + gdb_printf (stream, ",\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else { - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); } } else if (options->prettyformat_arrays) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } stream->wrap_here (2 + 2 * recurse); @@ -211,8 +211,8 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, opts.deref_ref = 0; common_val_print (v0, stream, recurse + 1, &opts, current_language); annotate_elt_rep (i - i0); - fprintf_filtered (stream, _(" %p[<repeats %u times>%p]"), - metadata_style.style ().ptr (), i - i0, nullptr); + gdb_printf (stream, _(" %p[<repeats %u times>%p]"), + metadata_style.style ().ptr (), i - i0, nullptr); annotate_elt_rep_end (); } @@ -228,12 +228,12 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, { if (options->prettyformat_arrays) { - fprintf_filtered (stream, ",\n"); + gdb_printf (stream, ",\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else { - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); } stream->wrap_here (2 + 2 * recurse); maybe_print_array_index (index_type, j + low, @@ -249,7 +249,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, annotate_array_section_end (); if (i < len) { - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); } value_free_to_mark (mark); @@ -272,15 +272,15 @@ ada_emit_char (int c, struct type *type, struct ui_file *stream, if (c <= UCHAR_MAX && isascii (c) && isprint (c)) { if (c == quoter && c == '"') - fprintf_filtered (stream, "\"\""); + gdb_printf (stream, "\"\""); else - fprintf_filtered (stream, "%c", c); + gdb_printf (stream, "%c", c); } else { /* Follow GNAT's lead here and only use 6 digits for wide_wide_character. */ - fprintf_filtered (stream, "[\"%0*x\"]", std::min (6, type_len * 2), c); + gdb_printf (stream, "[\"%0*x\"]", std::min (6, type_len * 2), c); } } @@ -351,12 +351,12 @@ ada_print_floating (const gdb_byte *valaddr, struct type *type, { pos = s.find ('e'); if (pos == std::string::npos) - fprintf_filtered (stream, "%s.0", s.c_str ()); + gdb_printf (stream, "%s.0", s.c_str ()); else - fprintf_filtered (stream, "%.*s.0%s", (int) pos, s.c_str (), &s[pos]); + gdb_printf (stream, "%.*s.0%s", (int) pos, s.c_str (), &s[pos]); } else - fprintf_filtered (stream, "%s", &s[skip_count]); + gdb_printf (stream, "%s", &s[skip_count]); } void @@ -417,7 +417,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_BOOL: - fprintf_filtered (stream, val ? "true" : "false"); + gdb_printf (stream, val ? "true" : "false"); break; case TYPE_CODE_RANGE: @@ -507,8 +507,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); gdb_puts ("'", stream); - fprintf_filtered (stream, _(" %p[<repeats %u times>%p]"), - metadata_style.style ().ptr (), reps, nullptr); + gdb_printf (stream, _(" %p[<repeats %u times>%p]"), + metadata_style.style ().ptr (), reps, nullptr); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; @@ -615,12 +615,12 @@ print_field_values (struct value *value, struct value *outer_value, } if (comma_needed) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); comma_needed = 1; if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else @@ -629,9 +629,9 @@ print_field_values (struct value *value, struct value *outer_value, } annotate_field_begin (type->field (i).type ()); - fprintf_filtered (stream, "%.*s", - ada_name_prefix_len (type->field (i).name ()), - type->field (i).name ()); + gdb_printf (stream, "%.*s", + ada_name_prefix_len (type->field (i).name ()), + type->field (i).name ()); annotate_field_name_end (); gdb_puts (" => ", stream); annotate_field_value (); @@ -746,7 +746,7 @@ ada_value_print_ptr (struct value *val, gdb::unique_xmalloc_ptr<char> name = ada_tag_name (val); if (name != NULL) - fprintf_filtered (stream, " (%s)", name.get ()); + gdb_printf (stream, " (%s)", name.get ()); } } @@ -799,9 +799,9 @@ ada_value_print_num (struct value *val, struct ui_file *stream, int recurse, struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr; CORE_ADDR addr = extract_typed_address (valaddr, ptr_type); - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); gdb_puts (paddress (gdbarch, addr), stream); } else @@ -855,9 +855,9 @@ ada_val_print_enum (struct value *value, struct ui_file *stream, int recurse, const char *name = ada_enum_name (type->field (i).name ()); if (name[0] == '\'') - fprintf_filtered (stream, "%ld %ps", (long) val, - styled_string (variable_name_style.style (), - name)); + gdb_printf (stream, "%ld %ps", (long) val, + styled_string (variable_name_style.style (), + name)); else fputs_styled (name, variable_name_style.style (), stream); } @@ -876,21 +876,21 @@ ada_val_print_struct_union (struct value *value, { if (ada_is_bogus_array_descriptor (value_type (value))) { - fprintf_filtered (stream, "(...?)"); + gdb_printf (stream, "(...?)"); return; } - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); if (print_field_values (value, value, stream, recurse, options, 0, language_def (language_ada)) != 0 && options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } /* Implement Ada value_print'ing for the case where TYPE is a @@ -914,7 +914,7 @@ ada_value_print_array (struct value *val, struct ui_file *stream, int recurse, return; } - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); print_optional_low_bound (stream, type, options); if (value_entirely_optimized_out (val)) @@ -928,7 +928,7 @@ ada_value_print_array (struct value *val, struct ui_file *stream, int recurse, } else value_print_array_elements (val, stream, recurse, options, 0); - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } /* Implement Ada val_print'ing for the case where TYPE is @@ -1010,7 +1010,7 @@ ada_value_print_inner (struct value *val, struct ui_file *stream, int recurse, if (val == nullptr) { gdb_assert (type->code () == TYPE_CODE_TYPEDEF); - fprintf_filtered (stream, "0x0"); + gdb_printf (stream, "0x0"); return; } } @@ -1102,9 +1102,9 @@ ada_value_print (struct value *val0, struct ui_file *stream, || TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_INT || TYPE_TARGET_TYPE (type)->is_unsigned ()) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); } } else if (ada_is_array_descriptor_type (type)) @@ -1114,16 +1114,16 @@ ada_value_print (struct value *val0, struct ui_file *stream, a fat pointer - hence the check against TYPE_CODE_TYPEDEF). */ if (type->code () == TYPE_CODE_TYPEDEF) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); } } else if (ada_is_bogus_array_descriptor (type)) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") (...?)"); + gdb_printf (stream, ") (...?)"); return; } diff --git a/gdb/addrmap.c b/gdb/addrmap.c index bf30faa..f888806 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -612,10 +612,10 @@ addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload) addr_str = "<ends here>"; if (matches || previous_matched) - fprintf_filtered (outfile, " %s%s %s\n", - payload != nullptr ? " " : "", - core_addr_to_string (start_addr), - addr_str); + gdb_printf (outfile, " %s%s %s\n", + payload != nullptr ? " " : "", + core_addr_to_string (start_addr), + addr_str); previous_matched = matches; diff --git a/gdb/agent.c b/gdb/agent.c index 5a6eac9..28c1340 100644 --- a/gdb/agent.c +++ b/gdb/agent.c @@ -40,9 +40,9 @@ static void show_can_use_agent (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's willingness to use agent in inferior " - "as a helper is %s.\n"), value); + gdb_printf (file, + _("Debugger's willingness to use agent in inferior " + "as a helper is %s.\n"), value); } static void diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 6a4b469..85be4c1 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -266,9 +266,9 @@ ptrace_check (int req, int id, int ret) if (ret == -1 && errno == EPERM) { if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "ptrace (%d, %d) = %d (errno = %d)\n", - req, id, ret, errno); + gdb_printf (gdb_stdlog, + "ptrace (%d, %d) = %d (errno = %d)\n", + req, id, ret, errno); return ret == -1 ? 0 : 1; } break; @@ -338,16 +338,16 @@ pdc_symbol_addrs (pthdb_user_t user, pthdb_symbol_t *symbols, int count) char *name; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n", - user, (long) symbols, count); + gdb_printf (gdb_stdlog, + "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n", + user, (long) symbols, count); for (i = 0; i < count; i++) { name = symbols[i].name; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - " symbols[%d].name = \"%s\"\n", i, name); + gdb_printf (gdb_stdlog, + " symbols[%d].name = \"%s\"\n", i, name); if (!*name) symbols[i].addr = 0; @@ -357,17 +357,17 @@ pdc_symbol_addrs (pthdb_user_t user, pthdb_symbol_t *symbols, int count) if (ms.minsym == NULL) { if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE\n"); + gdb_printf (gdb_stdlog, " returning PDC_FAILURE\n"); return PDC_FAILURE; } symbols[i].addr = BMSYMBOL_VALUE_ADDRESS (ms); } if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = %s\n", - i, hex_string (symbols[i].addr)); + gdb_printf (gdb_stdlog, " symbols[%d].addr = %s\n", + i, hex_string (symbols[i].addr)); } if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS\n"); + gdb_printf (gdb_stdlog, " returning PDC_SUCCESS\n"); return PDC_SUCCESS; } @@ -396,8 +396,8 @@ pdc_read_regs (pthdb_user_t user, struct ptsprs sprs32; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n", - (int) tid, hex_string (flags)); + gdb_printf (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n", + (int) tid, hex_string (flags)); /* General-purpose registers. */ if (flags & PTHDB_FLAG_GPRS) @@ -462,8 +462,8 @@ pdc_write_regs (pthdb_user_t user, however this code is untested. */ if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n", - (int) tid, hex_string (flags)); + gdb_printf (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n", + (int) tid, hex_string (flags)); /* General-purpose registers. */ if (flags & PTHDB_FLAG_GPRS) @@ -506,16 +506,16 @@ pdc_read_data (pthdb_user_t user, void *buf, int status, ret; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", - user, (long) buf, hex_string (addr), len); + gdb_printf (gdb_stdlog, + "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", + user, (long) buf, hex_string (addr), len); status = target_read_memory (addr, (gdb_byte *) buf, len); ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n", - status, pd_status2str (ret)); + gdb_printf (gdb_stdlog, " status=%d, returning %s\n", + status, pd_status2str (ret)); return ret; } @@ -528,16 +528,16 @@ pdc_write_data (pthdb_user_t user, void *buf, int status, ret; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", - user, (long) buf, hex_string (addr), len); + gdb_printf (gdb_stdlog, + "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", + user, (long) buf, hex_string (addr), len); status = target_write_memory (addr, (gdb_byte *) buf, len); ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n", status, - pd_status2str (ret)); + gdb_printf (gdb_stdlog, " status=%d, returning %s\n", status, + pd_status2str (ret)); return ret; } @@ -548,13 +548,13 @@ static int pdc_alloc (pthdb_user_t user, size_t len, void **bufp) { if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n", - user, len, (long) bufp); + gdb_printf (gdb_stdlog, + "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n", + user, len, (long) bufp); *bufp = xmalloc (len); if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - " malloc returned 0x%lx\n", (long) *bufp); + gdb_printf (gdb_stdlog, + " malloc returned 0x%lx\n", (long) *bufp); /* Note: xmalloc() can't return 0; therefore PDC_FAILURE will never be returned. */ @@ -570,13 +570,13 @@ static int pdc_realloc (pthdb_user_t user, void *buf, size_t len, void **bufp) { if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n", - user, (long) buf, len, (long) bufp); + gdb_printf (gdb_stdlog, + "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n", + user, (long) buf, len, (long) bufp); *bufp = xrealloc (buf, len); if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - " realloc returned 0x%lx\n", (long) *bufp); + gdb_printf (gdb_stdlog, + " realloc returned 0x%lx\n", (long) *bufp); return *bufp ? PDC_SUCCESS : PDC_FAILURE; } @@ -587,9 +587,9 @@ static int pdc_dealloc (pthdb_user_t user, void *buf) { if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "pdc_free (user = %ld, buf = 0x%lx)\n", user, - (long) buf); + gdb_printf (gdb_stdlog, + "pdc_free (user = %ld, buf = 0x%lx)\n", user, + (long) buf); xfree (buf); return PDC_SUCCESS; } @@ -1227,8 +1227,8 @@ fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid) pthdb_context_t ctx; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "fetch_regs_user_thread %lx\n", (long) pdtid); + gdb_printf (gdb_stdlog, + "fetch_regs_user_thread %lx\n", (long) pdtid); status = pthdb_pthread_context (pd_session, pdtid, &ctx); if (status != PTHDB_SUCCESS) error (_("aix-thread: fetch_registers: pthdb_pthread_context returned %s"), @@ -1286,9 +1286,9 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno, int i; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "fetch_regs_kernel_thread tid=%lx regno=%d arch64=%d\n", - (long) tid, regno, arch64); + gdb_printf (gdb_stdlog, + "fetch_regs_kernel_thread tid=%lx regno=%d arch64=%d\n", + (long) tid, regno, arch64); /* General-purpose registers. */ if (regno == -1 @@ -1509,8 +1509,8 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid) uint64_t int64; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "store_regs_user_thread %lx\n", (long) pdtid); + gdb_printf (gdb_stdlog, + "store_regs_user_thread %lx\n", (long) pdtid); /* Retrieve the thread's current context for its non-register values. */ @@ -1600,9 +1600,9 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno, struct ptsprs sprs32; if (debug_aix_thread) - fprintf_unfiltered (gdb_stdlog, - "store_regs_kernel_thread tid=%lx regno=%d\n", - (long) tid, regno); + gdb_printf (gdb_stdlog, + "store_regs_kernel_thread tid=%lx regno=%d\n", + (long) tid, regno); /* General-purpose registers. */ if (regno == -1 diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index d0df72b..7f3af21 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1102,7 +1102,7 @@ enclosing function for address %s"), paddress (gdbarch, orig_pc)); if (!blurb_printed) { - printf_filtered (_("\ + gdb_printf (_("\ This warning occurs if you are debugging a function without any symbols\n\ (for example, in a stripped executable). In that case, you may wish to\n\ increase the size of the search with the `set heuristic-fence-post' command.\n\ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 2416204..b61428d 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -1496,10 +1496,10 @@ amd64_linux_syscall_record_common (struct regcache *regcache, if (syscall_gdb == gdb_sys_no_syscall) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %s\n"), - pulongest (syscall_native)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %s\n"), + pulongest (syscall_native)); return -1; } else diff --git a/gdb/annotate.c b/gdb/annotate.c index 8d6f58c..c16eb46 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -293,7 +293,7 @@ void annotate_error_begin (void) { if (annotation_level > 1) - fprintf_unfiltered (gdb_stderr, "\n\032\032error-begin\n"); + gdb_printf (gdb_stderr, "\n\032\032error-begin\n"); } void diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 297f83b..d6da288 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -435,14 +435,14 @@ arc_insn_get_branch_target (const struct arc_instruction &insn) /* JLI and EI depend on optional AUX registers. Not supported right now. */ else if (insn.insn_class == JLI) { - fprintf_unfiltered (gdb_stderr, - "JLI_S instruction is not supported by the GDB."); + gdb_printf (gdb_stderr, + "JLI_S instruction is not supported by the GDB."); return 0; } else if (insn.insn_class == EI) { - fprintf_unfiltered (gdb_stderr, - "EI_S instruction is not supported by the GDB."); + gdb_printf (gdb_stderr, + "EI_S instruction is not supported by the GDB."); return 0; } /* LEAVE_S: PC = BLINK. */ @@ -2450,16 +2450,16 @@ arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) { arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch); - fprintf_filtered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc); + gdb_printf (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc); - fprintf_filtered (file, "arc_dump_tdep: is_sigtramp = <%s>\n", - host_address_to_string (tdep->is_sigtramp)); - fprintf_filtered (file, "arc_dump_tdep: sigcontext_addr = <%s>\n", - host_address_to_string (tdep->sigcontext_addr)); - fprintf_filtered (file, "arc_dump_tdep: sc_reg_offset = <%s>\n", - host_address_to_string (tdep->sc_reg_offset)); - fprintf_filtered (file, "arc_dump_tdep: sc_num_regs = %d\n", - tdep->sc_num_regs); + gdb_printf (file, "arc_dump_tdep: is_sigtramp = <%s>\n", + host_address_to_string (tdep->is_sigtramp)); + gdb_printf (file, "arc_dump_tdep: sigcontext_addr = <%s>\n", + host_address_to_string (tdep->sigcontext_addr)); + gdb_printf (file, "arc_dump_tdep: sc_reg_offset = <%s>\n", + host_address_to_string (tdep->sc_reg_offset)); + gdb_printf (file, "arc_dump_tdep: sc_num_regs = %d\n", + tdep->sc_num_regs); } /* This command accepts single argument - address of instruction to diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h index 0a8d1dc..ceca003 100644 --- a/gdb/arc-tdep.h +++ b/gdb/arc-tdep.h @@ -110,7 +110,7 @@ enum arc_regnum /* Special value for register offset arrays. */ #define ARC_OFFSET_NO_REGISTER (-1) -#define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args) +#define arc_print(fmt, args...) gdb_printf (gdb_stdlog, fmt, ##args) extern bool arc_debug; diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 3ee978a..ff946ee 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -375,18 +375,18 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c, { if (target_byte_order_user == BFD_ENDIAN_UNKNOWN) if (gdbarch_byte_order (get_current_arch ()) == BFD_ENDIAN_BIG) - fprintf_filtered (file, _("The target endianness is set automatically " - "(currently big endian).\n")); + gdb_printf (file, _("The target endianness is set automatically " + "(currently big endian).\n")); else - fprintf_filtered (file, _("The target endianness is set automatically " - "(currently little endian).\n")); + gdb_printf (file, _("The target endianness is set automatically " + "(currently little endian).\n")); else if (target_byte_order_user == BFD_ENDIAN_BIG) - fprintf_filtered (file, - _("The target is set to big endian.\n")); + gdb_printf (file, + _("The target is set to big endian.\n")); else - fprintf_filtered (file, - _("The target is set to little endian.\n")); + gdb_printf (file, + _("The target is set to little endian.\n")); } static void @@ -405,8 +405,8 @@ set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c) { info.byte_order = BFD_ENDIAN_LITTLE; if (! gdbarch_update_p (info)) - fprintf_unfiltered (gdb_stderr, - _("Little endian target not supported by GDB\n")); + gdb_printf (gdb_stderr, + _("Little endian target not supported by GDB\n")); else target_byte_order_user = BFD_ENDIAN_LITTLE; } @@ -414,8 +414,8 @@ set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c) { info.byte_order = BFD_ENDIAN_BIG; if (! gdbarch_update_p (info)) - fprintf_unfiltered (gdb_stderr, - _("Big endian target not supported by GDB\n")); + gdb_printf (gdb_stderr, + _("Big endian target not supported by GDB\n")); else target_byte_order_user = BFD_ENDIAN_BIG; } @@ -535,12 +535,12 @@ show_architecture (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (target_architecture_user == NULL) - fprintf_filtered (file, _("The target architecture is set to " - "\"auto\" (currently \"%s\").\n"), - gdbarch_bfd_arch_info (get_current_arch ())->printable_name); + gdb_printf (file, _("The target architecture is set to " + "\"auto\" (currently \"%s\").\n"), + gdbarch_bfd_arch_info (get_current_arch ())->printable_name); else - fprintf_filtered (file, _("The target architecture is set to \"%s\".\n"), - set_architecture_string); + gdb_printf (file, _("The target architecture is set to \"%s\".\n"), + set_architecture_string); } @@ -569,9 +569,9 @@ set_architecture (const char *ignore_args, if (gdbarch_update_p (info)) target_architecture_user = info.bfd_arch_info; else - fprintf_unfiltered (gdb_stderr, - _("Architecture `%s' not recognized.\n"), - set_architecture_string); + gdb_printf (gdb_stderr, + _("Architecture `%s' not recognized.\n"), + set_architecture_string); } show_architecture (gdb_stdout, from_tty, NULL, NULL); } @@ -599,8 +599,8 @@ gdbarch_update_p (struct gdbarch_info info) if (new_gdbarch == NULL) { if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: " - "Architecture not found\n"); + gdb_printf (gdb_stdlog, "gdbarch_update_p: " + "Architecture not found\n"); return 0; } @@ -609,19 +609,19 @@ gdbarch_update_p (struct gdbarch_info info) if (new_gdbarch == target_gdbarch ()) { if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: " - "Architecture %s (%s) unchanged\n", - host_address_to_string (new_gdbarch), - gdbarch_bfd_arch_info (new_gdbarch)->printable_name); + gdb_printf (gdb_stdlog, "gdbarch_update_p: " + "Architecture %s (%s) unchanged\n", + host_address_to_string (new_gdbarch), + gdbarch_bfd_arch_info (new_gdbarch)->printable_name); return 1; } /* It's a new architecture, swap it in. */ if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: " - "New architecture %s (%s) selected\n", - host_address_to_string (new_gdbarch), - gdbarch_bfd_arch_info (new_gdbarch)->printable_name); + gdb_printf (gdb_stdlog, "gdbarch_update_p: " + "New architecture %s (%s) selected\n", + host_address_to_string (new_gdbarch), + gdbarch_bfd_arch_info (new_gdbarch)->printable_name); set_target_gdbarch (new_gdbarch); return 1; @@ -1106,7 +1106,7 @@ static void show_gdbarch_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Architecture debugging is %s.\n"), value); + gdb_printf (file, _("Architecture debugging is %s.\n"), value); } static const char * @@ -1202,7 +1202,7 @@ struct gdbarch_tdep * gdbarch_tdep (struct gdbarch *gdbarch) { if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); + gdb_printf (gdb_stdlog, "gdbarch_tdep called\n"); return gdbarch->tdep; } @@ -1385,9 +1385,9 @@ gdbarch_register (enum bfd_architecture bfd_architecture, } /* log it */ if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", - bfd_arch_info->printable_name, - host_address_to_string (init)); + gdb_printf (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", + bfd_arch_info->printable_name, + host_address_to_string (init)); /* Append it */ (*curr) = XNEW (struct gdbarch_registration); (*curr)->bfd_architecture = bfd_architecture; @@ -1446,23 +1446,23 @@ gdbarch_find_by_info (struct gdbarch_info info) if (gdbarch_debug) { - fprintf_unfiltered (gdb_stdlog, - "gdbarch_find_by_info: info.bfd_arch_info %s\n", - (info.bfd_arch_info != NULL - ? info.bfd_arch_info->printable_name - : "(null)")); - fprintf_unfiltered (gdb_stdlog, - "gdbarch_find_by_info: info.byte_order %d (%s)\n", - info.byte_order, - (info.byte_order == BFD_ENDIAN_BIG ? "big" - : info.byte_order == BFD_ENDIAN_LITTLE ? "little" - : "default")); - fprintf_unfiltered (gdb_stdlog, - "gdbarch_find_by_info: info.osabi %d (%s)\n", - info.osabi, gdbarch_osabi_name (info.osabi)); - fprintf_unfiltered (gdb_stdlog, - "gdbarch_find_by_info: info.abfd %s\n", - host_address_to_string (info.abfd)); + gdb_printf (gdb_stdlog, + "gdbarch_find_by_info: info.bfd_arch_info %s\n", + (info.bfd_arch_info != NULL + ? info.bfd_arch_info->printable_name + : "(null)")); + gdb_printf (gdb_stdlog, + "gdbarch_find_by_info: info.byte_order %d (%s)\n", + info.byte_order, + (info.byte_order == BFD_ENDIAN_BIG ? "big" + : info.byte_order == BFD_ENDIAN_LITTLE ? "little" + : "default")); + gdb_printf (gdb_stdlog, + "gdbarch_find_by_info: info.osabi %d (%s)\n", + info.osabi, gdbarch_osabi_name (info.osabi)); + gdb_printf (gdb_stdlog, + "gdbarch_find_by_info: info.abfd %s\n", + host_address_to_string (info.abfd)); } /* Find the tdep code that knows about this architecture. */ @@ -1474,8 +1474,8 @@ gdbarch_find_by_info (struct gdbarch_info info) if (rego == NULL) { if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " - "No matching architecture\n"); + gdb_printf (gdb_stdlog, "gdbarch_find_by_info: " + "No matching architecture\n"); return 0; } @@ -1487,8 +1487,8 @@ gdbarch_find_by_info (struct gdbarch_info info) if (new_gdbarch == NULL) { if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " - "Target rejected architecture\n"); + gdb_printf (gdb_stdlog, "gdbarch_find_by_info: " + "Target rejected architecture\n"); return NULL; } @@ -1500,10 +1500,10 @@ gdbarch_find_by_info (struct gdbarch_info info) struct gdbarch_list **list; struct gdbarch_list *self; if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " - "Previous architecture %s (%s) selected\n", - host_address_to_string (new_gdbarch), - new_gdbarch->bfd_arch_info->printable_name); + gdb_printf (gdb_stdlog, "gdbarch_find_by_info: " + "Previous architecture %s (%s) selected\n", + host_address_to_string (new_gdbarch), + new_gdbarch->bfd_arch_info->printable_name); /* Find the existing arch in the list. */ for (list = ®o->arches; (*list) != NULL && (*list)->gdbarch != new_gdbarch; @@ -1522,10 +1522,10 @@ gdbarch_find_by_info (struct gdbarch_info info) /* It's a new architecture. */ if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " - "New architecture %s (%s) selected\n", - host_address_to_string (new_gdbarch), - new_gdbarch->bfd_arch_info->printable_name); + gdb_printf (gdb_stdlog, "gdbarch_find_by_info: " + "New architecture %s (%s) selected\n", + host_address_to_string (new_gdbarch), + new_gdbarch->bfd_arch_info->printable_name); /* Insert the new architecture into the front of the architecture list (keep the list sorted Most Recently Used). */ diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 6aac016..c8e882a 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -1650,10 +1650,10 @@ arm_linux_syscall_record (struct regcache *regcache, unsigned long svc_number) if (syscall_gdb == gdb_sys_no_syscall) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %s\n"), - plongest (svc_number)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %s\n"), + plongest (svc_number)); return -1; } diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index a87affe..4d0f349 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -4038,9 +4038,9 @@ arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, type = (status >> 24) & 127; if (status & (1 << 31)) - fprintf_filtered (file, _("Hardware FPU type %d\n"), type); + gdb_printf (file, _("Hardware FPU type %d\n"), type); else - fprintf_filtered (file, _("Software FPU type %d\n"), type); + gdb_printf (file, _("Software FPU type %d\n"), type); /* i18n: [floating point unit] mask */ gdb_puts (_("mask: "), file); print_fpu_flags (file, status >> 16); @@ -8551,13 +8551,13 @@ show_fp_model (struct ui_file *file, int from_tty, if (arm_fp_model == ARM_FLOAT_AUTO && gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm) - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The current ARM floating point model is \"auto\" (currently \"%s\").\n"), - fp_model_strings[tdep->fp_model]); + fp_model_strings[tdep->fp_model]); else - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The current ARM floating point model is \"%s\".\n"), - fp_model_strings[arm_fp_model]); + fp_model_strings[arm_fp_model]); } static void @@ -8589,32 +8589,32 @@ arm_show_abi (struct ui_file *file, int from_tty, if (arm_abi_global == ARM_ABI_AUTO && gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm) - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The current ARM ABI is \"auto\" (currently \"%s\").\n"), - arm_abi_strings[tdep->arm_abi]); + arm_abi_strings[tdep->arm_abi]); else - fprintf_filtered (file, _("The current ARM ABI is \"%s\".\n"), - arm_abi_string); + gdb_printf (file, _("The current ARM ABI is \"%s\".\n"), + arm_abi_string); } static void arm_show_fallback_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The current execution mode assumed " - "(when symbols are unavailable) is \"%s\".\n"), - arm_fallback_mode_string); + gdb_printf (file, + _("The current execution mode assumed " + "(when symbols are unavailable) is \"%s\".\n"), + arm_fallback_mode_string); } static void arm_show_force_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The current execution mode assumed " - "(even when symbols are available) is \"%s\".\n"), - arm_force_mode_string); + gdb_printf (file, + _("The current execution mode assumed " + "(even when symbols are available) is \"%s\".\n"), + arm_force_mode_string); } /* If the user changes the register disassembly style used for info @@ -8649,7 +8649,7 @@ show_disassembly_style_sfunc (struct ui_file *file, int from_tty, len = strcspn (style, ","); } - fprintf_filtered (file, "The disassembly style is \"%.*s\".\n", len, style); + gdb_printf (file, "The disassembly style is \"%.*s\".\n", len, style); } /* Return the ARM register name corresponding to register I. */ @@ -9746,38 +9746,38 @@ arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) if (tdep == NULL) return; - fprintf_filtered (file, _("arm_dump_tdep: fp_model = %i\n"), - (int) tdep->fp_model); - fprintf_filtered (file, _("arm_dump_tdep: have_fpa_registers = %i\n"), - (int) tdep->have_fpa_registers); - fprintf_filtered (file, _("arm_dump_tdep: have_wmmx_registers = %i\n"), - (int) tdep->have_wmmx_registers); - fprintf_filtered (file, _("arm_dump_tdep: vfp_register_count = %i\n"), - (int) tdep->vfp_register_count); - fprintf_filtered (file, _("arm_dump_tdep: have_s_pseudos = %s\n"), - tdep->have_s_pseudos? "true" : "false"); - fprintf_filtered (file, _("arm_dump_tdep: s_pseudo_base = %i\n"), - (int) tdep->s_pseudo_base); - fprintf_filtered (file, _("arm_dump_tdep: s_pseudo_count = %i\n"), - (int) tdep->s_pseudo_count); - fprintf_filtered (file, _("arm_dump_tdep: have_q_pseudos = %s\n"), - tdep->have_q_pseudos? "true" : "false"); - fprintf_filtered (file, _("arm_dump_tdep: q_pseudo_base = %i\n"), - (int) tdep->q_pseudo_base); - fprintf_filtered (file, _("arm_dump_tdep: q_pseudo_count = %i\n"), - (int) tdep->q_pseudo_count); - fprintf_filtered (file, _("arm_dump_tdep: have_neon = %i\n"), - (int) tdep->have_neon); - fprintf_filtered (file, _("arm_dump_tdep: have_mve = %s\n"), - tdep->have_mve? "yes" : "no"); - fprintf_filtered (file, _("arm_dump_tdep: mve_vpr_regnum = %i\n"), - tdep->mve_vpr_regnum); - fprintf_filtered (file, _("arm_dump_tdep: mve_pseudo_base = %i\n"), - tdep->mve_pseudo_base); - fprintf_filtered (file, _("arm_dump_tdep: mve_pseudo_count = %i\n"), - tdep->mve_pseudo_count); - fprintf_filtered (file, _("arm_dump_tdep: Lowest pc = 0x%lx\n"), - (unsigned long) tdep->lowest_pc); + gdb_printf (file, _("arm_dump_tdep: fp_model = %i\n"), + (int) tdep->fp_model); + gdb_printf (file, _("arm_dump_tdep: have_fpa_registers = %i\n"), + (int) tdep->have_fpa_registers); + gdb_printf (file, _("arm_dump_tdep: have_wmmx_registers = %i\n"), + (int) tdep->have_wmmx_registers); + gdb_printf (file, _("arm_dump_tdep: vfp_register_count = %i\n"), + (int) tdep->vfp_register_count); + gdb_printf (file, _("arm_dump_tdep: have_s_pseudos = %s\n"), + tdep->have_s_pseudos? "true" : "false"); + gdb_printf (file, _("arm_dump_tdep: s_pseudo_base = %i\n"), + (int) tdep->s_pseudo_base); + gdb_printf (file, _("arm_dump_tdep: s_pseudo_count = %i\n"), + (int) tdep->s_pseudo_count); + gdb_printf (file, _("arm_dump_tdep: have_q_pseudos = %s\n"), + tdep->have_q_pseudos? "true" : "false"); + gdb_printf (file, _("arm_dump_tdep: q_pseudo_base = %i\n"), + (int) tdep->q_pseudo_base); + gdb_printf (file, _("arm_dump_tdep: q_pseudo_count = %i\n"), + (int) tdep->q_pseudo_count); + gdb_printf (file, _("arm_dump_tdep: have_neon = %i\n"), + (int) tdep->have_neon); + gdb_printf (file, _("arm_dump_tdep: have_mve = %s\n"), + tdep->have_mve? "yes" : "no"); + gdb_printf (file, _("arm_dump_tdep: mve_vpr_regnum = %i\n"), + tdep->mve_vpr_regnum); + gdb_printf (file, _("arm_dump_tdep: mve_pseudo_base = %i\n"), + tdep->mve_pseudo_base); + gdb_printf (file, _("arm_dump_tdep: mve_pseudo_count = %i\n"), + tdep->mve_pseudo_count); + gdb_printf (file, _("arm_dump_tdep: Lowest pc = 0x%lx\n"), + (unsigned long) tdep->lowest_pc); } #if GDB_SELF_TEST @@ -11359,10 +11359,10 @@ arm_record_b_bl (insn_decode_record *arm_insn_r) static int arm_record_unsupported_insn (insn_decode_record *arm_insn_r) { - fprintf_unfiltered (gdb_stderr, - _("Process record does not support instruction " - "0x%0x at address %s.\n"),arm_insn_r->arm_insn, - paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr)); + gdb_printf (gdb_stderr, + _("Process record does not support instruction " + "0x%0x at address %s.\n"),arm_insn_r->arm_insn, + paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr)); return -1; } @@ -11948,7 +11948,7 @@ arm_record_coproc_data_proc (insn_decode_record *arm_insn_r) } else { - fprintf_unfiltered (gdb_stderr, _("no syscall record support\n")); + gdb_printf (gdb_stderr, _("no syscall record support\n")); return -1; } } @@ -12380,12 +12380,12 @@ thumb_record_misc (insn_decode_record *thumb_insn_r) record_buf[1] = ARM_LR_REGNUM; thumb_insn_r->reg_rec_count = 2; /* We need to save SPSR value, which is not yet done. */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support instruction " - "0x%0x at address %s.\n"), - thumb_insn_r->arm_insn, - paddress (thumb_insn_r->gdbarch, - thumb_insn_r->this_addr)); + gdb_printf (gdb_stderr, + _("Process record does not support instruction " + "0x%0x at address %s.\n"), + thumb_insn_r->arm_insn, + paddress (thumb_insn_r->gdbarch, + thumb_insn_r->this_addr)); return -1; case 0xf: @@ -12473,7 +12473,7 @@ thumb_record_ldm_stm_swi (insn_decode_record *thumb_insn_r) } else { - fprintf_unfiltered (gdb_stderr, _("no syscall record support\n")); + gdb_printf (gdb_stderr, _("no syscall record support\n")); return -1; } } @@ -13384,11 +13384,11 @@ decode_insn (abstract_memory_reader &reader, insn_decode_record *arm_record, { if (record_debug) { - fprintf_unfiltered (gdb_stdlog, - _("Process record: error reading memory at " - "addr %s len = %d.\n"), - paddress (arm_record->gdbarch, - arm_record->this_addr), insn_size); + gdb_printf (gdb_stdlog, + _("Process record: error reading memory at " + "addr %s len = %d.\n"), + paddress (arm_record->gdbarch, + arm_record->this_addr), insn_size); } return -1; } @@ -13643,9 +13643,9 @@ arm_process_record (struct gdbarch *gdbarch, struct regcache *regcache, if (record_debug > 1) { - fprintf_unfiltered (gdb_stdlog, "Process record: arm_process_record " - "addr = %s\n", - paddress (gdbarch, arm_record.this_addr)); + gdb_printf (gdb_stdlog, "Process record: arm_process_record " + "addr = %s\n", + paddress (gdbarch, arm_record.this_addr)); } instruction_reader reader; @@ -13653,11 +13653,11 @@ arm_process_record (struct gdbarch *gdbarch, struct regcache *regcache, { if (record_debug) { - fprintf_unfiltered (gdb_stdlog, - _("Process record: error reading memory at " - "addr %s len = %d.\n"), - paddress (arm_record.gdbarch, - arm_record.this_addr), 2); + gdb_printf (gdb_stdlog, + _("Process record: error reading memory at " + "addr %s len = %d.\n"), + paddress (arm_record.gdbarch, + arm_record.this_addr), 2); } return -1; } diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 5f530d0..057104d 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -74,9 +74,9 @@ static void show_debug_auto_load (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging output for files " - "of 'set auto-load ...' is %s.\n"), - value); + gdb_printf (file, _("Debugging output for files " + "of 'set auto-load ...' is %s.\n"), + value); } /* User-settable option to enable/disable auto-loading of GDB_AUTO_FILE_NAME @@ -92,9 +92,9 @@ static void show_auto_load_gdb_scripts (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Auto-loading of canned sequences of commands " - "scripts is %s.\n"), - value); + gdb_printf (file, _("Auto-loading of canned sequences of commands " + "scripts is %s.\n"), + value); } /* See auto-load.h. */ @@ -132,9 +132,9 @@ static void show_auto_load_local_gdbinit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Auto-loading of .gdbinit script from current " - "directory is %s.\n"), - value); + gdb_printf (file, _("Auto-loading of .gdbinit script from current " + "directory is %s.\n"), + value); } /* Directory list from which to load auto-loaded scripts. It is not checked @@ -158,9 +158,9 @@ static void show_auto_load_dir (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("List of directories from which to load " - "auto-loaded scripts is %s.\n"), - value); + gdb_printf (file, _("List of directories from which to load " + "auto-loaded scripts is %s.\n"), + value); } /* Directory list safe to hold auto-loaded files. It is not checked for @@ -275,12 +275,12 @@ show_auto_load_safe_path (struct ui_file *file, int from_tty, for (cs = value; *cs && (*cs == DIRNAME_SEPARATOR || IS_DIR_SEPARATOR (*cs)); cs++); if (*cs == 0) - fprintf_filtered (file, _("Auto-load files are safe to load from any " - "directory.\n")); + gdb_printf (file, _("Auto-load files are safe to load from any " + "directory.\n")); else - fprintf_filtered (file, _("List of directories from which it is safe to " - "auto-load files is %s.\n"), - value); + gdb_printf (file, _("List of directories from which it is safe to " + "auto-load files is %s.\n"), + value); } /* "add-auto-load-safe-path" command for the auto_load_safe_path configuration @@ -476,7 +476,7 @@ file_is_auto_load_safe (const char *filename) } } - printf_filtered (_("\ + gdb_printf (_("\ To enable execution of this file add\n\ \tadd-auto-load-safe-path %s\n\ line to your configuration file \"%ps\".\n\ @@ -1357,15 +1357,15 @@ static void info_auto_load_local_gdbinit (const char *args, int from_tty) { if (auto_load_local_gdbinit_pathname == NULL) - printf_filtered (_("Local .gdbinit file was not found.\n")); + gdb_printf (_("Local .gdbinit file was not found.\n")); else if (auto_load_local_gdbinit_loaded) - printf_filtered (_("Local .gdbinit file \"%ps\" has been loaded.\n"), - styled_string (file_name_style.style (), - auto_load_local_gdbinit_pathname)); + gdb_printf (_("Local .gdbinit file \"%ps\" has been loaded.\n"), + styled_string (file_name_style.style (), + auto_load_local_gdbinit_pathname)); else - printf_filtered (_("Local .gdbinit file \"%ps\" has not been loaded.\n"), - styled_string (file_name_style.style (), - auto_load_local_gdbinit_pathname)); + gdb_printf (_("Local .gdbinit file \"%ps\" has not been loaded.\n"), + styled_string (file_name_style.style (), + auto_load_local_gdbinit_pathname)); } /* Print an "unsupported script" warning if it has not already been printed. @@ -414,15 +414,15 @@ fprint_auxv_entry (struct ui_file *file, const char *name, const char *description, enum auxv_format format, CORE_ADDR type, CORE_ADDR val) { - fprintf_filtered (file, ("%-4s %-20s %-30s "), - plongest (type), name, description); + gdb_printf (file, ("%-4s %-20s %-30s "), + plongest (type), name, description); switch (format) { case AUXV_FORMAT_DEC: - fprintf_filtered (file, ("%s\n"), plongest (val)); + gdb_printf (file, ("%s\n"), plongest (val)); break; case AUXV_FORMAT_HEX: - fprintf_filtered (file, ("%s\n"), paddress (target_gdbarch (), val)); + gdb_printf (file, ("%s\n"), paddress (target_gdbarch (), val)); break; case AUXV_FORMAT_STR: { @@ -430,10 +430,10 @@ fprint_auxv_entry (struct ui_file *file, const char *name, get_user_print_options (&opts); if (opts.addressprint) - fprintf_filtered (file, ("%s "), paddress (target_gdbarch (), val)); + gdb_printf (file, ("%s "), paddress (target_gdbarch (), val)); val_print_string (builtin_type (target_gdbarch ())->builtin_char, NULL, val, -1, file, &opts); - fprintf_filtered (file, ("\n")); + gdb_printf (file, ("\n")); } break; } diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 7f79ef9..310c8cf 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -668,8 +668,8 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end, if (num_pushes > AVR_MAX_PUSHES) { - fprintf_unfiltered (gdb_stderr, _("Num pushes too large: %d\n"), - num_pushes); + gdb_printf (gdb_stderr, _("Num pushes too large: %d\n"), + num_pushes); num_pushes = 0; } @@ -1574,9 +1574,9 @@ avr_io_reg_read_command (const char *args, int from_tty) if (!buf) { - fprintf_unfiltered (gdb_stderr, - _("ERR: info io_registers NOT supported " - "by current target\n")); + gdb_printf (gdb_stderr, + _("ERR: info io_registers NOT supported " + "by current target\n")); return; } @@ -1584,12 +1584,12 @@ avr_io_reg_read_command (const char *args, int from_tty) if (sscanf (bufstr, "%x", &nreg) != 1) { - fprintf_unfiltered (gdb_stderr, - _("Error fetching number of io registers\n")); + gdb_printf (gdb_stderr, + _("Error fetching number of io registers\n")); return; } - printf_filtered (_("Target has %u io registers:\n\n"), nreg); + gdb_printf (_("Target has %u io registers:\n\n"), nreg); /* only fetch up to 8 registers at a time to keep the buffer small */ int step = 8; @@ -1607,9 +1607,9 @@ avr_io_reg_read_command (const char *args, int from_tty) if (!buf) { - fprintf_unfiltered (gdb_stderr, - _("ERR: error reading avr.io_reg:%x,%x\n"), - i, j); + gdb_printf (gdb_stderr, + _("ERR: error reading avr.io_reg:%x,%x\n"), + i, j); return; } @@ -1618,7 +1618,7 @@ avr_io_reg_read_command (const char *args, int from_tty) { if (sscanf (p, "%[^,],%x;", query, &val) == 2) { - printf_filtered ("[%02x] %-15s : %02x\n", k, query, val); + gdb_printf ("[%02x] %-15s : %02x\n", k, query, val); while ((*p != ';') && (*p != '\0')) p++; p++; /* skip over ';' */ diff --git a/gdb/ax-general.c b/gdb/ax-general.c index f829b32..c025aa2 100644 --- a/gdb/ax-general.c +++ b/gdb/ax-general.c @@ -365,11 +365,11 @@ ax_print (struct ui_file *f, struct agent_expr *x) { int i; - fprintf_filtered (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope)); - fprintf_filtered (f, _("Reg mask:")); + gdb_printf (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope)); + gdb_printf (f, _("Reg mask:")); for (i = 0; i < x->reg_mask_len; ++i) - fprintf_filtered (f, _(" %02x"), x->reg_mask[i]); - fprintf_filtered (f, _("\n")); + gdb_printf (f, _(" %02x"), x->reg_mask[i]); + gdb_printf (f, _("\n")); /* Check the size of the name array against the number of entries in the enum, to catch additions that people didn't sync. */ @@ -384,18 +384,18 @@ ax_print (struct ui_file *f, struct agent_expr *x) if (op >= (sizeof (aop_map) / sizeof (aop_map[0])) || !aop_map[op].name) { - fprintf_filtered (f, _("%3d <bad opcode %02x>\n"), i, op); + gdb_printf (f, _("%3d <bad opcode %02x>\n"), i, op); i++; continue; } if (i + 1 + aop_map[op].op_size > x->len) { - fprintf_filtered (f, _("%3d <incomplete opcode %s>\n"), - i, aop_map[op].name); + gdb_printf (f, _("%3d <incomplete opcode %s>\n"), + i, aop_map[op].name); break; } - fprintf_filtered (f, "%3d %s", i, aop_map[op].name); + gdb_printf (f, "%3d %s", i, aop_map[op].name); if (aop_map[op].op_size > 0) { gdb_puts (" ", f); @@ -412,11 +412,11 @@ ax_print (struct ui_file *f, struct agent_expr *x) nargs = x->buf[i++]; slen = x->buf[i++]; slen = slen * 256 + x->buf[i++]; - fprintf_filtered (f, _(" \"%s\", %d args"), - &(x->buf[i]), nargs); + gdb_printf (f, _(" \"%s\", %d args"), + &(x->buf[i]), nargs); i += slen - 1; } - fprintf_filtered (f, "\n"); + gdb_printf (f, "\n"); i += 1 + aop_map[op].op_size; } } diff --git a/gdb/bcache.c b/gdb/bcache.c index 6d0741b..80ba1f6 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -245,15 +245,15 @@ print_percentage (int portion, int total) { if (total == 0) /* i18n: Like "Percentage of duplicates, by count: (not applicable)". */ - printf_filtered (_("(not applicable)\n")); + gdb_printf (_("(not applicable)\n")); else - printf_filtered ("%3d%%\n", (int) (portion * 100.0 / total)); + gdb_printf ("%3d%%\n", (int) (portion * 100.0 / total)); } /* Print statistics on BCACHE's memory usage and efficacity at eliminating duplication. NAME should describe the kind of data - BCACHE holds. Statistics are printed using `printf_filtered' and + BCACHE holds. Statistics are printed using `gdb_printf' and its ilk. */ void bcache::print_statistics (const char *type) @@ -325,59 +325,59 @@ bcache::print_statistics (const char *type) xfree (entry_size); } - printf_filtered (_(" M_Cached '%s' statistics:\n"), type); - printf_filtered (_(" Total object count: %ld\n"), m_total_count); - printf_filtered (_(" Unique object count: %lu\n"), m_unique_count); - printf_filtered (_(" Percentage of duplicates, by count: ")); + gdb_printf (_(" M_Cached '%s' statistics:\n"), type); + gdb_printf (_(" Total object count: %ld\n"), m_total_count); + gdb_printf (_(" Unique object count: %lu\n"), m_unique_count); + gdb_printf (_(" Percentage of duplicates, by count: ")); print_percentage (m_total_count - m_unique_count, m_total_count); - printf_filtered ("\n"); + gdb_printf ("\n"); - printf_filtered (_(" Total object size: %ld\n"), m_total_size); - printf_filtered (_(" Unique object size: %ld\n"), m_unique_size); - printf_filtered (_(" Percentage of duplicates, by size: ")); + gdb_printf (_(" Total object size: %ld\n"), m_total_size); + gdb_printf (_(" Unique object size: %ld\n"), m_unique_size); + gdb_printf (_(" Percentage of duplicates, by size: ")); print_percentage (m_total_size - m_unique_size, m_total_size); - printf_filtered ("\n"); + gdb_printf ("\n"); - printf_filtered (_(" Max entry size: %d\n"), max_entry_size); - printf_filtered (_(" Average entry size: ")); + gdb_printf (_(" Max entry size: %d\n"), max_entry_size); + gdb_printf (_(" Average entry size: ")); if (m_unique_count > 0) - printf_filtered ("%ld\n", m_unique_size / m_unique_count); + gdb_printf ("%ld\n", m_unique_size / m_unique_count); else /* i18n: "Average entry size: (not applicable)". */ - printf_filtered (_("(not applicable)\n")); - printf_filtered (_(" Median entry size: %d\n"), median_entry_size); - printf_filtered ("\n"); + gdb_printf (_("(not applicable)\n")); + gdb_printf (_(" Median entry size: %d\n"), median_entry_size); + gdb_printf ("\n"); - printf_filtered (_(" \ + gdb_printf (_(" \ Total memory used by bcache, including overhead: %ld\n"), - m_structure_size); - printf_filtered (_(" Percentage memory overhead: ")); + m_structure_size); + gdb_printf (_(" Percentage memory overhead: ")); print_percentage (m_structure_size - m_unique_size, m_unique_size); - printf_filtered (_(" Net memory savings: ")); + gdb_printf (_(" Net memory savings: ")); print_percentage (m_total_size - m_structure_size, m_total_size); - printf_filtered ("\n"); - - printf_filtered (_(" Hash table size: %3d\n"), - m_num_buckets); - printf_filtered (_(" Hash table expands: %lu\n"), - m_expand_count); - printf_filtered (_(" Hash table hashes: %lu\n"), - m_total_count + m_expand_hash_count); - printf_filtered (_(" Half hash misses: %lu\n"), - m_half_hash_miss_count); - printf_filtered (_(" Hash table population: ")); + gdb_printf ("\n"); + + gdb_printf (_(" Hash table size: %3d\n"), + m_num_buckets); + gdb_printf (_(" Hash table expands: %lu\n"), + m_expand_count); + gdb_printf (_(" Hash table hashes: %lu\n"), + m_total_count + m_expand_hash_count); + gdb_printf (_(" Half hash misses: %lu\n"), + m_half_hash_miss_count); + gdb_printf (_(" Hash table population: ")); print_percentage (occupied_buckets, m_num_buckets); - printf_filtered (_(" Median hash chain length: %3d\n"), - median_chain_length); - printf_filtered (_(" Average hash chain length: ")); + gdb_printf (_(" Median hash chain length: %3d\n"), + median_chain_length); + gdb_printf (_(" Average hash chain length: ")); if (m_num_buckets > 0) - printf_filtered ("%3lu\n", m_unique_count / m_num_buckets); + gdb_printf ("%3lu\n", m_unique_count / m_num_buckets); else /* i18n: "Average hash chain length: (not applicable)". */ - printf_filtered (_("(not applicable)\n")); - printf_filtered (_(" Maximum hash chain length: %3d\n"), - max_chain_length); - printf_filtered ("\n"); + gdb_printf (_("(not applicable)\n")); + gdb_printf (_(" Maximum hash chain length: %3d\n"), + max_chain_length); + gdb_printf ("\n"); } int diff --git a/gdb/bcache.h b/gdb/bcache.h index 8b05ead..3d41ece 100644 --- a/gdb/bcache.h +++ b/gdb/bcache.h @@ -157,7 +157,7 @@ struct bcache /* Print statistics on this bcache's memory usage and efficacity at eliminating duplication. TYPE should be a string describing the kind of data this bcache holds. Statistics are printed using - `printf_filtered' and its ilk. */ + `gdb_printf' and its ilk. */ void print_statistics (const char *type); int memory_used (); diff --git a/gdb/bpf-tdep.c b/gdb/bpf-tdep.c index 6a7d9ac..09030cf 100644 --- a/gdb/bpf-tdep.c +++ b/gdb/bpf-tdep.c @@ -76,7 +76,7 @@ static void show_bpf_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of BPF is %s.\n"), value); + gdb_printf (file, _("Debugging of BPF is %s.\n"), value); } @@ -136,9 +136,9 @@ bpf_gdb_print_insn (bfd_vma memaddr, disassemble_info *info) static CORE_ADDR bpf_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) { - fprintf_unfiltered (gdb_stdlog, - "Skipping prologue: start_pc=%s\n", - paddress (gdbarch, start_pc)); + gdb_printf (gdb_stdlog, + "Skipping prologue: start_pc=%s\n", + paddress (gdbarch, start_pc)); /* XXX: to be completed. */ return start_pc + 0; } @@ -252,8 +252,8 @@ bpf_push_dummy_call (struct gdbarch *gdbarch, struct value *function, function_call_return_method return_method, CORE_ADDR struct_addr) { - fprintf_unfiltered (gdb_stdlog, "Pushing dummy call: sp=%s\n", - paddress (gdbarch, sp)); + gdb_printf (gdb_stdlog, "Pushing dummy call: sp=%s\n", + paddress (gdbarch, sp)); /* XXX writeme */ return sp; } diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c index c0cf2ae..10a578b 100644 --- a/gdb/break-catch-exec.c +++ b/gdb/break-catch-exec.c @@ -124,7 +124,7 @@ print_one_catch_exec (struct breakpoint *b, struct bp_location **last_loc) static void print_mention_catch_exec (struct breakpoint *b) { - printf_filtered (_("Catchpoint %d (exec)"), b->number); + gdb_printf (_("Catchpoint %d (exec)"), b->number); } /* Implement the "print_recreate" breakpoint_ops method for exec @@ -133,7 +133,7 @@ print_mention_catch_exec (struct breakpoint *b) static void print_recreate_catch_exec (struct breakpoint *b, struct ui_file *fp) { - fprintf_unfiltered (fp, "catch exec"); + gdb_printf (fp, "catch exec"); print_recreate_thread (b, fp); } diff --git a/gdb/break-catch-fork.c b/gdb/break-catch-fork.c index af44a9f..c2c87e8 100644 --- a/gdb/break-catch-fork.c +++ b/gdb/break-catch-fork.c @@ -162,8 +162,8 @@ static void print_mention_catch_fork (struct breakpoint *b) { struct fork_catchpoint *c = (struct fork_catchpoint *) b; - printf_filtered (_("Catchpoint %d (%s)"), c->number, - c->is_vfork ? "vfork" : "fork"); + gdb_printf (_("Catchpoint %d (%s)"), c->number, + c->is_vfork ? "vfork" : "fork"); } /* Implement the "print_recreate" breakpoint_ops method for fork @@ -173,8 +173,8 @@ static void print_recreate_catch_fork (struct breakpoint *b, struct ui_file *fp) { struct fork_catchpoint *c = (struct fork_catchpoint *) b; - fprintf_unfiltered (fp, "catch %s", - c->is_vfork ? "vfork" : "fork"); + gdb_printf (fp, "catch %s", + c->is_vfork ? "vfork" : "fork"); print_recreate_thread (b, fp); } diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index b41a908..b739ca7 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -193,7 +193,7 @@ signal_catchpoint_print_it (bpstat *bs) annotate_catchpoint (b->number); maybe_print_thread_hit_breakpoint (uiout); - printf_filtered (_("Catchpoint %d (signal %s), "), b->number, signal_name); + gdb_printf (_("Catchpoint %d (signal %s), "), b->number, signal_name); return PRINT_SRC_AND_LOC; } @@ -261,22 +261,22 @@ signal_catchpoint_print_mention (struct breakpoint *b) if (!c->signals_to_be_caught.empty ()) { if (c->signals_to_be_caught.size () > 1) - printf_filtered (_("Catchpoint %d (signals"), b->number); + gdb_printf (_("Catchpoint %d (signals"), b->number); else - printf_filtered (_("Catchpoint %d (signal"), b->number); + gdb_printf (_("Catchpoint %d (signal"), b->number); for (gdb_signal iter : c->signals_to_be_caught) { const char *name = signal_to_name_or_int (iter); - printf_filtered (" %s", name); + gdb_printf (" %s", name); } - printf_filtered (")"); + gdb_printf (")"); } else if (c->catch_all) - printf_filtered (_("Catchpoint %d (any signal)"), b->number); + gdb_printf (_("Catchpoint %d (any signal)"), b->number); else - printf_filtered (_("Catchpoint %d (standard signals)"), b->number); + gdb_printf (_("Catchpoint %d (standard signals)"), b->number); } /* Implement the "print_recreate" breakpoint_ops method for signal @@ -287,15 +287,15 @@ signal_catchpoint_print_recreate (struct breakpoint *b, struct ui_file *fp) { struct signal_catchpoint *c = (struct signal_catchpoint *) b; - fprintf_unfiltered (fp, "catch signal"); + gdb_printf (fp, "catch signal"); if (!c->signals_to_be_caught.empty ()) { for (gdb_signal iter : c->signals_to_be_caught) - fprintf_unfiltered (fp, " %s", signal_to_name_or_int (iter)); + gdb_printf (fp, " %s", signal_to_name_or_int (iter)); } else if (c->catch_all) - fprintf_unfiltered (fp, " all"); + gdb_printf (fp, " all"); gdb_putc ('\n', fp); } diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index 9ad8aaa..515a957 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -289,9 +289,9 @@ print_mention_catch_syscall (struct breakpoint *b) if (!c->syscalls_to_be_caught.empty ()) { if (c->syscalls_to_be_caught.size () > 1) - printf_filtered (_("Catchpoint %d (syscalls"), b->number); + gdb_printf (_("Catchpoint %d (syscalls"), b->number); else - printf_filtered (_("Catchpoint %d (syscall"), b->number); + gdb_printf (_("Catchpoint %d (syscall"), b->number); for (int iter : c->syscalls_to_be_caught) { @@ -299,15 +299,15 @@ print_mention_catch_syscall (struct breakpoint *b) get_syscall_by_number (gdbarch, iter, &s); if (s.name != NULL) - printf_filtered (" '%s' [%d]", s.name, s.number); + gdb_printf (" '%s' [%d]", s.name, s.number); else - printf_filtered (" %d", s.number); + gdb_printf (" %d", s.number); } - printf_filtered (")"); + gdb_printf (")"); } else - printf_filtered (_("Catchpoint %d (any syscall)"), - b->number); + gdb_printf (_("Catchpoint %d (any syscall)"), + b->number); } /* Implement the "print_recreate" breakpoint_ops method for syscall @@ -319,7 +319,7 @@ print_recreate_catch_syscall (struct breakpoint *b, struct ui_file *fp) struct syscall_catchpoint *c = (struct syscall_catchpoint *) b; struct gdbarch *gdbarch = b->loc->gdbarch; - fprintf_unfiltered (fp, "catch syscall"); + gdb_printf (fp, "catch syscall"); for (int iter : c->syscalls_to_be_caught) { @@ -327,9 +327,9 @@ print_recreate_catch_syscall (struct breakpoint *b, struct ui_file *fp) get_syscall_by_number (gdbarch, iter, &s); if (s.name != NULL) - fprintf_unfiltered (fp, " %s", s.name); + gdb_printf (fp, " %s", s.name); else - fprintf_unfiltered (fp, " %d", s.number); + gdb_printf (fp, " %d", s.number); } print_recreate_thread (b, fp); diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index fcd644e..d98baf4 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -333,17 +333,17 @@ print_recreate_exception_catchpoint (struct breakpoint *b, enum exception_event_kind kind = classify_exception_breakpoint (b); bp_temp = b->disposition == disp_del; - fprintf_unfiltered (fp, bp_temp ? "tcatch " : "catch "); + gdb_printf (fp, bp_temp ? "tcatch " : "catch "); switch (kind) { case EX_EVENT_THROW: - fprintf_unfiltered (fp, "throw"); + gdb_printf (fp, "throw"); break; case EX_EVENT_CATCH: - fprintf_unfiltered (fp, "catch"); + gdb_printf (fp, "catch"); break; case EX_EVENT_RETHROW: - fprintf_unfiltered (fp, "rethrow"); + gdb_printf (fp, "rethrow"); break; } print_recreate_thread (b, fp); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 60d343e..8275624 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -324,10 +324,10 @@ show_can_use_hw_watchpoints (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's willingness to use " - "watchpoint hardware is %s.\n"), - value); + gdb_printf (file, + _("Debugger's willingness to use " + "watchpoint hardware is %s.\n"), + value); } /* If AUTO_BOOLEAN_FALSE, gdb will not attempt to create pending breakpoints. @@ -340,10 +340,10 @@ show_pending_break_support (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's behavior regarding " - "pending breakpoints is %s.\n"), - value); + gdb_printf (file, + _("Debugger's behavior regarding " + "pending breakpoints is %s.\n"), + value); } /* If true, gdb will automatically use hardware breakpoints for breakpoints @@ -356,9 +356,9 @@ show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Automatic usage of hardware breakpoints is %s.\n"), - value); + gdb_printf (file, + _("Automatic usage of hardware breakpoints is %s.\n"), + value); } /* If on, GDB keeps breakpoints inserted even if the inferior is @@ -374,8 +374,8 @@ static void show_always_inserted_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Always inserted breakpoint mode is %s.\n"), - value); + gdb_printf (file, _("Always inserted breakpoint mode is %s.\n"), + value); } /* See breakpoint.h. */ @@ -798,14 +798,14 @@ show_condition_evaluation_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (condition_evaluation_mode == condition_evaluation_auto) - fprintf_filtered (file, - _("Breakpoint condition evaluation " - "mode is %s (currently %s).\n"), - value, - breakpoint_condition_evaluation_mode ()); + gdb_printf (file, + _("Breakpoint condition evaluation " + "mode is %s (currently %s).\n"), + value, + breakpoint_condition_evaluation_mode ()); else - fprintf_filtered (file, _("Breakpoint condition evaluation mode is %s.\n"), - value); + gdb_printf (file, _("Breakpoint condition evaluation mode is %s.\n"), + value); } /* Parse COND_STRING in the context of LOC and set as the condition @@ -828,9 +828,9 @@ set_breakpoint_location_condition (const char *cond_string, bp_location *loc, { loc->cond = std::move (new_exp); if (loc->disabled_by_cond && loc->enabled) - printf_filtered (_("Breakpoint %d's condition is now valid at " - "location %d, enabling.\n"), - bp_num, loc_num); + gdb_printf (_("Breakpoint %d's condition is now valid at " + "location %d, enabling.\n"), + bp_num, loc_num); loc->disabled_by_cond = false; } @@ -875,9 +875,9 @@ set_breakpoint_condition (struct breakpoint *b, const char *exp, { loc->cond.reset (); if (loc->disabled_by_cond && loc->enabled) - printf_filtered (_("Breakpoint %d's condition is now valid at " - "location %d, enabling.\n"), - b->number, loc_num); + gdb_printf (_("Breakpoint %d's condition is now valid at " + "location %d, enabling.\n"), + b->number, loc_num); loc->disabled_by_cond = false; loc_num++; @@ -888,7 +888,7 @@ set_breakpoint_condition (struct breakpoint *b, const char *exp, } if (from_tty) - printf_filtered (_("Breakpoint %d now unconditional.\n"), b->number); + gdb_printf (_("Breakpoint %d now unconditional.\n"), b->number); } else { @@ -2084,10 +2084,10 @@ update_watchpoint (struct watchpoint *b, int reparse) } else if (!within_current_scope) { - printf_filtered (_("\ + gdb_printf (_("\ Watchpoint %d deleted because the program has left the block\n\ in which its expression is valid.\n"), - b->number); + b->number); watchpoint_del_at_next_stop (b); } @@ -2578,12 +2578,12 @@ insert_bp_location (struct bp_location *bl, if (mr != nullptr && mr->attrib.mode != MEM_RW) { - fprintf_unfiltered (tmp_error_stream, - _("Cannot insert breakpoint %d.\n" - "Cannot set software breakpoint " - "at read-only address %s\n"), - bl->owner->number, - paddress (bl->gdbarch, bl->address)); + gdb_printf (tmp_error_stream, + _("Cannot insert breakpoint %d.\n" + "Cannot set software breakpoint " + "at read-only address %s\n"), + bl->owner->number, + paddress (bl->gdbarch, bl->address)); return 1; } } @@ -2650,10 +2650,10 @@ insert_bp_location (struct bp_location *bl, } if (bp_excpt.reason != 0) - fprintf_unfiltered (tmp_error_stream, - "Overlay breakpoint %d " - "failed: in ROM?\n", - bl->owner->number); + gdb_printf (tmp_error_stream, + "Overlay breakpoint %d " + "failed: in ROM?\n", + bl->owner->number); } } /* Shall we set a breakpoint at the VMA? */ @@ -2714,16 +2714,16 @@ insert_bp_location (struct bp_location *bl, gdb::observers::breakpoint_modified.notify (bl->owner); if (!*disabled_breaks) { - fprintf_unfiltered (tmp_error_stream, - "Cannot insert breakpoint %d.\n", - bl->owner->number); - fprintf_unfiltered (tmp_error_stream, - "Temporarily disabling shared " - "library breakpoints:\n"); + gdb_printf (tmp_error_stream, + "Cannot insert breakpoint %d.\n", + bl->owner->number); + gdb_printf (tmp_error_stream, + "Temporarily disabling shared " + "library breakpoints:\n"); } *disabled_breaks = 1; - fprintf_unfiltered (tmp_error_stream, - "breakpoint #%d\n", bl->owner->number); + gdb_printf (tmp_error_stream, + "breakpoint #%d\n", bl->owner->number); return 0; } else @@ -2732,13 +2732,13 @@ insert_bp_location (struct bp_location *bl, { *hw_breakpoint_error = 1; *hw_bp_error_explained_already = bp_excpt.message != NULL; - fprintf_unfiltered (tmp_error_stream, - "Cannot insert hardware breakpoint %d%s", - bl->owner->number, - bp_excpt.message ? ":" : ".\n"); + gdb_printf (tmp_error_stream, + "Cannot insert hardware breakpoint %d%s", + bl->owner->number, + bp_excpt.message ? ":" : ".\n"); if (bp_excpt.message != NULL) - fprintf_unfiltered (tmp_error_stream, "%s.\n", - bp_excpt.what ()); + gdb_printf (tmp_error_stream, "%s.\n", + bp_excpt.what ()); } else { @@ -2748,17 +2748,17 @@ insert_bp_location (struct bp_location *bl, = memory_error_message (TARGET_XFER_E_IO, bl->gdbarch, bl->address); - fprintf_unfiltered (tmp_error_stream, - "Cannot insert breakpoint %d.\n" - "%s\n", - bl->owner->number, message.c_str ()); + gdb_printf (tmp_error_stream, + "Cannot insert breakpoint %d.\n" + "%s\n", + bl->owner->number, message.c_str ()); } else { - fprintf_unfiltered (tmp_error_stream, - "Cannot insert breakpoint %d: %s\n", - bl->owner->number, - bp_excpt.what ()); + gdb_printf (tmp_error_stream, + "Cannot insert breakpoint %d: %s\n", + bl->owner->number, + bp_excpt.what ()); } } return 1; @@ -3093,9 +3093,9 @@ remove_threaded_breakpoints (struct thread_info *tp, int silent) { b->disposition = disp_del_at_next_stop; - printf_filtered (_("\ + gdb_printf (_("\ Thread-specific breakpoint %d deleted - thread %s no longer in the thread list.\n"), - b->number, print_thread_id (tp)); + b->number, print_thread_id (tp)); /* Hide it from the user. */ b->number = 0; @@ -5076,8 +5076,8 @@ bpstat_check_watchpoint (bpstat *bs) SWITCH_THRU_ALL_UIS () { - printf_filtered (_("Watchpoint %d deleted.\n"), - b->number); + gdb_printf (_("Watchpoint %d deleted.\n"), + b->number); } watchpoint_del_at_next_stop (b); e = WP_DELETED; @@ -6740,25 +6740,25 @@ describe_other_breakpoints (struct gdbarch *gdbarch, if (others > 0) { if (others == 1) - printf_filtered (_("Note: breakpoint ")); + gdb_printf (_("Note: breakpoint ")); else /* if (others == ???) */ - printf_filtered (_("Note: breakpoints ")); + gdb_printf (_("Note: breakpoints ")); for (breakpoint *b : all_breakpoints ()) if (user_breakpoint_p (b) && breakpoint_has_pc (b, pspace, pc, section)) { others--; - printf_filtered ("%d", b->number); + gdb_printf ("%d", b->number); if (b->thread == -1 && thread != -1) - printf_filtered (" (all threads)"); + gdb_printf (" (all threads)"); else if (b->thread != -1) - printf_filtered (" (thread %d)", b->thread); - printf_filtered ("%s%s ", - ((b->enable_state == bp_disabled - || b->enable_state == bp_call_disabled) - ? " (disabled)" - : ""), - (others > 1) ? "," - : ((others == 1) ? " and" : "")); + gdb_printf (" (thread %d)", b->thread); + gdb_printf ("%s%s ", + ((b->enable_state == bp_disabled + || b->enable_state == bp_call_disabled) + ? " (disabled)" + : ""), + (others > 1) ? "," + : ((others == 1) ? " and" : "")); } current_uiout->message (_("also set at pc %ps.\n"), styled_string (address_style.style (), @@ -7884,8 +7884,8 @@ print_mention_catch_solib (struct breakpoint *b) { struct solib_catchpoint *self = (struct solib_catchpoint *) b; - printf_filtered (_("Catchpoint %d (%s)"), b->number, - self->is_load ? "load" : "unload"); + gdb_printf (_("Catchpoint %d (%s)"), b->number, + self->is_load ? "load" : "unload"); } static void @@ -7893,12 +7893,12 @@ print_recreate_catch_solib (struct breakpoint *b, struct ui_file *fp) { struct solib_catchpoint *self = (struct solib_catchpoint *) b; - fprintf_unfiltered (fp, "%s %s", - b->disposition == disp_del ? "tcatch" : "catch", - self->is_load ? "load" : "unload"); + gdb_printf (fp, "%s %s", + b->disposition == disp_del ? "tcatch" : "catch", + self->is_load ? "load" : "unload"); if (self->regex) - fprintf_unfiltered (fp, " %s", self->regex.get ()); - fprintf_unfiltered (fp, "\n"); + gdb_printf (fp, " %s", self->regex.get ()); + gdb_printf (fp, "\n"); } static struct breakpoint_ops catch_solib_breakpoint_ops; @@ -8263,9 +8263,9 @@ handle_automatic_hardware_breakpoints (bp_location *bl) bl->loc_type = new_type; if (!said) { - printf_filtered (_("Note: automatically using " - "hardware breakpoints for " - "read-only addresses.\n")); + gdb_printf (_("Note: automatically using " + "hardware breakpoints for " + "read-only addresses.\n")); said = true; } } @@ -8517,17 +8517,17 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, t->static_trace_marker_id.assign (p, endp - p); - printf_filtered (_("Probed static tracepoint " - "marker \"%s\"\n"), - t->static_trace_marker_id.c_str ()); + gdb_printf (_("Probed static tracepoint " + "marker \"%s\"\n"), + t->static_trace_marker_id.c_str ()); } else if (target_static_tracepoint_marker_at (sal.pc, &marker)) { t->static_trace_marker_id = std::move (marker.str_id); - printf_filtered (_("Probed static tracepoint " - "marker \"%s\"\n"), - t->static_trace_marker_id.c_str ()); + gdb_printf (_("Probed static tracepoint " + "marker \"%s\"\n"), + t->static_trace_marker_id.c_str ()); } else warning (_("Couldn't determine the static " @@ -9299,7 +9299,7 @@ thbreak_command (const char *arg, int from_tty) static void stop_command (const char *arg, int from_tty) { - printf_filtered (_("Specify the type of breakpoint to set.\n\ + gdb_printf (_("Specify the type of breakpoint to set.\n\ Usage: stop in <function | address>\n\ stop at <line>\n")); } @@ -9332,7 +9332,7 @@ stopin_command (const char *arg, int from_tty) } if (badInput) - printf_filtered (_("Usage: stop in <function | address>\n")); + gdb_printf (_("Usage: stop in <function | address>\n")); else break_command_1 (arg, 0, from_tty); } @@ -9364,7 +9364,7 @@ stopat_command (const char *arg, int from_tty) } if (badInput) - printf_filtered (_("Usage: stop at LINE\n")); + gdb_printf (_("Usage: stop at LINE\n")); else break_command_1 (arg, 0, from_tty); } @@ -9544,9 +9544,9 @@ print_mention_ranged_breakpoint (struct breakpoint *b) static void print_recreate_ranged_breakpoint (struct breakpoint *b, struct ui_file *fp) { - fprintf_unfiltered (fp, "break-range %s, %s", - event_location_to_string (b->location.get ()), - event_location_to_string (b->location_range_end.get ())); + gdb_printf (fp, "break-range %s, %s", + event_location_to_string (b->location.get ()), + event_location_to_string (b->location_range_end.get ())); print_recreate_thread (b, fp); } @@ -9949,20 +9949,20 @@ print_recreate_watchpoint (struct breakpoint *b, struct ui_file *fp) { case bp_watchpoint: case bp_hardware_watchpoint: - fprintf_unfiltered (fp, "watch"); + gdb_printf (fp, "watch"); break; case bp_read_watchpoint: - fprintf_unfiltered (fp, "rwatch"); + gdb_printf (fp, "rwatch"); break; case bp_access_watchpoint: - fprintf_unfiltered (fp, "awatch"); + gdb_printf (fp, "awatch"); break; default: internal_error (__FILE__, __LINE__, _("Invalid watchpoint type.")); } - fprintf_unfiltered (fp, " %s", w->exp_string.get ()); + gdb_printf (fp, " %s", w->exp_string.get ()); print_recreate_thread (b, fp); } @@ -10141,21 +10141,21 @@ print_recreate_masked_watchpoint (struct breakpoint *b, struct ui_file *fp) switch (b->type) { case bp_hardware_watchpoint: - fprintf_unfiltered (fp, "watch"); + gdb_printf (fp, "watch"); break; case bp_read_watchpoint: - fprintf_unfiltered (fp, "rwatch"); + gdb_printf (fp, "rwatch"); break; case bp_access_watchpoint: - fprintf_unfiltered (fp, "awatch"); + gdb_printf (fp, "awatch"); break; default: internal_error (__FILE__, __LINE__, _("Invalid hardware watchpoint type.")); } - fprintf_unfiltered (fp, " %s mask 0x%s", w->exp_string.get (), - phex (w->hw_wp_mask, sizeof (CORE_ADDR))); + gdb_printf (fp, " %s mask 0x%s", w->exp_string.get (), + phex (w->hw_wp_mask, sizeof (CORE_ADDR))); print_recreate_thread (b, fp); } @@ -11057,15 +11057,15 @@ clear_command (const char *arg, int from_tty) if (from_tty) { if (found.size () == 1) - printf_filtered (_("Deleted breakpoint ")); + gdb_printf (_("Deleted breakpoint ")); else - printf_filtered (_("Deleted breakpoints ")); + gdb_printf (_("Deleted breakpoints ")); } for (breakpoint *iter : found) { if (from_tty) - printf_filtered ("%d ", iter->number); + gdb_printf ("%d ", iter->number); delete_breakpoint (iter); } if (from_tty) @@ -11474,9 +11474,9 @@ update_global_location_list (enum ugll_insert_mode insert_mode) Note that at this point, old_loc->owner is still valid, as delete_breakpoint frees the breakpoint only after calling us. */ - printf_filtered (_("warning: Error removing " - "breakpoint %d\n"), - old_loc->owner->number); + gdb_printf (_("warning: Error removing " + "breakpoint %d\n"), + old_loc->owner->number); } removed = 1; } @@ -11720,29 +11720,29 @@ say_where (struct breakpoint *b) a condition or dprintf arguments. */ if (b->extra_string == NULL) { - printf_filtered (_(" (%s) pending."), - event_location_to_string (b->location.get ())); + gdb_printf (_(" (%s) pending."), + event_location_to_string (b->location.get ())); } else if (b->type == bp_dprintf) { - printf_filtered (_(" (%s,%s) pending."), - event_location_to_string (b->location.get ()), - b->extra_string.get ()); + gdb_printf (_(" (%s,%s) pending."), + event_location_to_string (b->location.get ()), + b->extra_string.get ()); } else { - printf_filtered (_(" (%s %s) pending."), - event_location_to_string (b->location.get ()), - b->extra_string.get ()); + gdb_printf (_(" (%s %s) pending."), + event_location_to_string (b->location.get ()), + b->extra_string.get ()); } } else { if (opts.addressprint || b->loc->symtab == NULL) - printf_filtered (" at %ps", - styled_string (address_style.style (), - paddress (b->loc->gdbarch, - b->loc->address))); + gdb_printf (" at %ps", + styled_string (address_style.style (), + paddress (b->loc->gdbarch, + b->loc->address))); if (b->loc->symtab != NULL) { /* If there is a single location, we can print the location @@ -11751,17 +11751,17 @@ say_where (struct breakpoint *b) { const char *filename = symtab_to_filename_for_display (b->loc->symtab); - printf_filtered (": file %ps, line %d.", - styled_string (file_name_style.style (), - filename), - b->loc->line_number); + gdb_printf (": file %ps, line %d.", + styled_string (file_name_style.style (), + filename), + b->loc->line_number); } else /* This is not ideal, but each location may have a different file name, and this at least reflects the real situation somewhat. */ - printf_filtered (": %s.", - event_location_to_string (b->location.get ())); + gdb_printf (": %s.", + event_location_to_string (b->location.get ())); } if (b->loc->next) @@ -11770,7 +11770,7 @@ say_where (struct breakpoint *b) int n = 0; for (; loc; loc = loc->next) ++n; - printf_filtered (" (%d locations)", n); + gdb_printf (" (%d locations)", n); } } } @@ -12072,18 +12072,18 @@ bkpt_print_mention (struct breakpoint *b) case bp_breakpoint: case bp_gnu_ifunc_resolver: if (b->disposition == disp_del) - printf_filtered (_("Temporary breakpoint")); + gdb_printf (_("Temporary breakpoint")); else - printf_filtered (_("Breakpoint")); - printf_filtered (_(" %d"), b->number); + gdb_printf (_("Breakpoint")); + gdb_printf (_(" %d"), b->number); if (b->type == bp_gnu_ifunc_resolver) - printf_filtered (_(" at gnu-indirect-function resolver")); + gdb_printf (_(" at gnu-indirect-function resolver")); break; case bp_hardware_breakpoint: - printf_filtered (_("Hardware assisted breakpoint %d"), b->number); + gdb_printf (_("Hardware assisted breakpoint %d"), b->number); break; case bp_dprintf: - printf_filtered (_("Dprintf %d"), b->number); + gdb_printf (_("Dprintf %d"), b->number); break; } @@ -12094,25 +12094,25 @@ static void bkpt_print_recreate (struct breakpoint *tp, struct ui_file *fp) { if (tp->type == bp_breakpoint && tp->disposition == disp_del) - fprintf_unfiltered (fp, "tbreak"); + gdb_printf (fp, "tbreak"); else if (tp->type == bp_breakpoint) - fprintf_unfiltered (fp, "break"); + gdb_printf (fp, "break"); else if (tp->type == bp_hardware_breakpoint && tp->disposition == disp_del) - fprintf_unfiltered (fp, "thbreak"); + gdb_printf (fp, "thbreak"); else if (tp->type == bp_hardware_breakpoint) - fprintf_unfiltered (fp, "hbreak"); + gdb_printf (fp, "hbreak"); else internal_error (__FILE__, __LINE__, _("unhandled breakpoint type %d"), (int) tp->type); - fprintf_unfiltered (fp, " %s", - event_location_to_string (tp->location.get ())); + gdb_printf (fp, " %s", + event_location_to_string (tp->location.get ())); /* Print out extra_string if this breakpoint is pending. It might contain, for example, conditions that were set by the user. */ if (tp->loc == NULL && tp->extra_string != NULL) - fprintf_unfiltered (fp, " %s", tp->extra_string.get ()); + gdb_printf (fp, " %s", tp->extra_string.get ()); print_recreate_thread (tp, fp); } @@ -12217,29 +12217,29 @@ internal_bkpt_print_it (bpstat *bs) case bp_thread_event: /* Not sure how we will get here. GDB should not stop for these breakpoints. */ - printf_filtered (_("Thread Event Breakpoint: gdb should not stop!\n")); + gdb_printf (_("Thread Event Breakpoint: gdb should not stop!\n")); break; case bp_overlay_event: /* By analogy with the thread event, GDB should not stop for these. */ - printf_filtered (_("Overlay Event Breakpoint: gdb should not stop!\n")); + gdb_printf (_("Overlay Event Breakpoint: gdb should not stop!\n")); break; case bp_longjmp_master: /* These should never be enabled. */ - printf_filtered (_("Longjmp Master Breakpoint: gdb should not stop!\n")); + gdb_printf (_("Longjmp Master Breakpoint: gdb should not stop!\n")); break; case bp_std_terminate_master: /* These should never be enabled. */ - printf_filtered (_("std::terminate Master Breakpoint: " - "gdb should not stop!\n")); + gdb_printf (_("std::terminate Master Breakpoint: " + "gdb should not stop!\n")); break; case bp_exception_master: /* These should never be enabled. */ - printf_filtered (_("Exception Master Breakpoint: " - "gdb should not stop!\n")); + gdb_printf (_("Exception Master Breakpoint: " + "gdb should not stop!\n")); break; } @@ -12387,16 +12387,16 @@ tracepoint_print_mention (struct breakpoint *b) switch (b->type) { case bp_tracepoint: - printf_filtered (_("Tracepoint")); - printf_filtered (_(" %d"), b->number); + gdb_printf (_("Tracepoint")); + gdb_printf (_(" %d"), b->number); break; case bp_fast_tracepoint: - printf_filtered (_("Fast tracepoint")); - printf_filtered (_(" %d"), b->number); + gdb_printf (_("Fast tracepoint")); + gdb_printf (_(" %d"), b->number); break; case bp_static_tracepoint: - printf_filtered (_("Static tracepoint")); - printf_filtered (_(" %d"), b->number); + gdb_printf (_("Static tracepoint")); + gdb_printf (_(" %d"), b->number); break; default: internal_error (__FILE__, __LINE__, @@ -12412,21 +12412,21 @@ tracepoint_print_recreate (struct breakpoint *self, struct ui_file *fp) struct tracepoint *tp = (struct tracepoint *) self; if (self->type == bp_fast_tracepoint) - fprintf_unfiltered (fp, "ftrace"); + gdb_printf (fp, "ftrace"); else if (self->type == bp_static_tracepoint) - fprintf_unfiltered (fp, "strace"); + gdb_printf (fp, "strace"); else if (self->type == bp_tracepoint) - fprintf_unfiltered (fp, "trace"); + gdb_printf (fp, "trace"); else internal_error (__FILE__, __LINE__, _("unhandled tracepoint type %d"), (int) self->type); - fprintf_unfiltered (fp, " %s", - event_location_to_string (self->location.get ())); + gdb_printf (fp, " %s", + event_location_to_string (self->location.get ())); print_recreate_thread (self, fp); if (tp->pass_count) - fprintf_unfiltered (fp, " passcount %d\n", tp->pass_count); + gdb_printf (fp, " passcount %d\n", tp->pass_count); } static void @@ -12519,9 +12519,9 @@ dprintf_re_set (struct breakpoint *b) static void dprintf_print_recreate (struct breakpoint *tp, struct ui_file *fp) { - fprintf_unfiltered (fp, "dprintf %s,%s", - event_location_to_string (tp->location.get ()), - tp->extra_string.get ()); + gdb_printf (fp, "dprintf %s,%s", + event_location_to_string (tp->location.get ()), + tp->extra_string.get ()); print_recreate_thread (tp, fp); } @@ -13072,10 +13072,10 @@ update_breakpoint_locations (struct breakpoint *b, /* Ranged breakpoints have only one start location and one end location. */ b->enable_state = bp_disabled; - fprintf_unfiltered (gdb_stderr, - _("Could not reset ranged breakpoint %d: " - "multiple locations found\n"), - b->number); + gdb_printf (gdb_stderr, + _("Could not reset ranged breakpoint %d: " + "multiple locations found\n"), + b->number); return; } @@ -13455,8 +13455,8 @@ set_ignore_count (int bptnum, int count, int from_tty) if (is_tracepoint (b)) { if (from_tty && count != 0) - printf_filtered (_("Ignore count ignored for tracepoint %d."), - bptnum); + gdb_printf (_("Ignore count ignored for tracepoint %d."), + bptnum); return; } @@ -13464,16 +13464,16 @@ set_ignore_count (int bptnum, int count, int from_tty) if (from_tty) { if (count == 0) - printf_filtered (_("Will stop next time " - "breakpoint %d is reached."), - bptnum); + gdb_printf (_("Will stop next time " + "breakpoint %d is reached."), + bptnum); else if (count == 1) - printf_filtered (_("Will ignore next crossing of breakpoint %d."), - bptnum); + gdb_printf (_("Will ignore next crossing of breakpoint %d."), + bptnum); else - printf_filtered (_("Will ignore next %d " - "crossings of breakpoint %d."), - count, bptnum); + gdb_printf (_("Will ignore next %d " + "crossings of breakpoint %d."), + count, bptnum); } gdb::observers::breakpoint_modified.notify (b); return; @@ -13503,7 +13503,7 @@ ignore_command (const char *args, int from_tty) longest_to_int (value_as_long (parse_and_eval (p))), from_tty); if (from_tty) - printf_filtered ("\n"); + gdb_printf ("\n"); } @@ -13533,7 +13533,7 @@ map_breakpoint_number_range (std::pair<int, int> bp_num_range, break; } if (!match) - printf_filtered (_("No breakpoint number %d.\n"), i); + gdb_printf (_("No breakpoint number %d.\n"), i); } } } @@ -14354,8 +14354,8 @@ trace_pass_set_count (struct tracepoint *tp, int count, int from_tty) tp->pass_count = count; gdb::observers::breakpoint_modified.notify (tp); if (from_tty) - printf_filtered (_("Setting tracepoint %d's passcount to %d\n"), - tp->number, count); + gdb_printf (_("Setting tracepoint %d's passcount to %d\n"), + tp->number, count); } /* Set passcount for tracepoint. @@ -14460,10 +14460,10 @@ get_tracepoint_by_number (const char **arg, if (tpnum <= 0) { if (instring && *instring) - printf_filtered (_("bad tracepoint number at or near '%s'\n"), - instring); + gdb_printf (_("bad tracepoint number at or near '%s'\n"), + instring); else - printf_filtered (_("No previous tracepoint\n")); + gdb_printf (_("No previous tracepoint\n")); return NULL; } @@ -14471,7 +14471,7 @@ get_tracepoint_by_number (const char **arg, if (t->number == tpnum) return (struct tracepoint *) t; - printf_filtered ("No tracepoint number %d.\n", tpnum); + gdb_printf ("No tracepoint number %d.\n", tpnum); return NULL; } @@ -14479,12 +14479,12 @@ void print_recreate_thread (struct breakpoint *b, struct ui_file *fp) { if (b->thread != -1) - fprintf_unfiltered (fp, " thread %d", b->thread); + gdb_printf (fp, " thread %d", b->thread); if (b->task != 0) - fprintf_unfiltered (fp, " task %d", b->task); + gdb_printf (fp, " task %d", b->task); - fprintf_unfiltered (fp, "\n"); + gdb_printf (fp, "\n"); } /* Save information on user settable breakpoints (watchpoints, etc) to @@ -14606,7 +14606,7 @@ save_breakpoints (const char *filename, int from_tty, fp.printf ("set default-collect %s\n", default_collect.c_str ()); if (from_tty) - printf_filtered (_("Saved to file '%s'.\n"), expanded_filename.get ()); + gdb_printf (_("Saved to file '%s'.\n"), expanded_filename.get ()); } /* The `save breakpoints' command. */ diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index 354df04..45c7f11 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -204,10 +204,10 @@ void bsd_kvm_target::files_info () { if (bsd_kvm_corefile && strcmp (bsd_kvm_corefile, _PATH_MEM) != 0) - printf_filtered (_("\tUsing the kernel crash dump %s.\n"), - bsd_kvm_corefile); + gdb_printf (_("\tUsing the kernel crash dump %s.\n"), + bsd_kvm_corefile); else - printf_filtered (_("\tUsing the currently running kernel.\n")); + gdb_printf (_("\tUsing the currently running kernel.\n")); } /* Fetch process control block at address PADDR. */ diff --git a/gdb/btrace.c b/gdb/btrace.c index ea733fe..b195b59 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -62,8 +62,8 @@ static void btrace_add_pc (struct thread_info *tp); do \ { \ if (record_debug != 0) \ - fprintf_unfiltered (gdb_stdlog, \ - "[btrace] " msg "\n", ##args); \ + gdb_printf (gdb_stdlog, \ + "[btrace] " msg "\n", ##args); \ } \ while (0) @@ -2852,122 +2852,122 @@ pt_print_packet (const struct pt_packet *packet) switch (packet->type) { default: - printf_filtered (("[??: %x]"), packet->type); + gdb_printf (("[??: %x]"), packet->type); break; case ppt_psb: - printf_filtered (("psb")); + gdb_printf (("psb")); break; case ppt_psbend: - printf_filtered (("psbend")); + gdb_printf (("psbend")); break; case ppt_pad: - printf_filtered (("pad")); + gdb_printf (("pad")); break; case ppt_tip: - printf_filtered (("tip %u: 0x%" PRIx64 ""), - packet->payload.ip.ipc, - packet->payload.ip.ip); + gdb_printf (("tip %u: 0x%" PRIx64 ""), + packet->payload.ip.ipc, + packet->payload.ip.ip); break; case ppt_tip_pge: - printf_filtered (("tip.pge %u: 0x%" PRIx64 ""), - packet->payload.ip.ipc, - packet->payload.ip.ip); + gdb_printf (("tip.pge %u: 0x%" PRIx64 ""), + packet->payload.ip.ipc, + packet->payload.ip.ip); break; case ppt_tip_pgd: - printf_filtered (("tip.pgd %u: 0x%" PRIx64 ""), - packet->payload.ip.ipc, - packet->payload.ip.ip); + gdb_printf (("tip.pgd %u: 0x%" PRIx64 ""), + packet->payload.ip.ipc, + packet->payload.ip.ip); break; case ppt_fup: - printf_filtered (("fup %u: 0x%" PRIx64 ""), - packet->payload.ip.ipc, - packet->payload.ip.ip); + gdb_printf (("fup %u: 0x%" PRIx64 ""), + packet->payload.ip.ipc, + packet->payload.ip.ip); break; case ppt_tnt_8: - printf_filtered (("tnt-8 %u: 0x%" PRIx64 ""), - packet->payload.tnt.bit_size, - packet->payload.tnt.payload); + gdb_printf (("tnt-8 %u: 0x%" PRIx64 ""), + packet->payload.tnt.bit_size, + packet->payload.tnt.payload); break; case ppt_tnt_64: - printf_filtered (("tnt-64 %u: 0x%" PRIx64 ""), - packet->payload.tnt.bit_size, - packet->payload.tnt.payload); + gdb_printf (("tnt-64 %u: 0x%" PRIx64 ""), + packet->payload.tnt.bit_size, + packet->payload.tnt.payload); break; case ppt_pip: - printf_filtered (("pip %" PRIx64 "%s"), packet->payload.pip.cr3, - packet->payload.pip.nr ? (" nr") : ("")); + gdb_printf (("pip %" PRIx64 "%s"), packet->payload.pip.cr3, + packet->payload.pip.nr ? (" nr") : ("")); break; case ppt_tsc: - printf_filtered (("tsc %" PRIx64 ""), packet->payload.tsc.tsc); + gdb_printf (("tsc %" PRIx64 ""), packet->payload.tsc.tsc); break; case ppt_cbr: - printf_filtered (("cbr %u"), packet->payload.cbr.ratio); + gdb_printf (("cbr %u"), packet->payload.cbr.ratio); break; case ppt_mode: switch (packet->payload.mode.leaf) { default: - printf_filtered (("mode %u"), packet->payload.mode.leaf); + gdb_printf (("mode %u"), packet->payload.mode.leaf); break; case pt_mol_exec: - printf_filtered (("mode.exec%s%s"), - packet->payload.mode.bits.exec.csl - ? (" cs.l") : (""), - packet->payload.mode.bits.exec.csd - ? (" cs.d") : ("")); + gdb_printf (("mode.exec%s%s"), + packet->payload.mode.bits.exec.csl + ? (" cs.l") : (""), + packet->payload.mode.bits.exec.csd + ? (" cs.d") : ("")); break; case pt_mol_tsx: - printf_filtered (("mode.tsx%s%s"), - packet->payload.mode.bits.tsx.intx - ? (" intx") : (""), - packet->payload.mode.bits.tsx.abrt - ? (" abrt") : ("")); + gdb_printf (("mode.tsx%s%s"), + packet->payload.mode.bits.tsx.intx + ? (" intx") : (""), + packet->payload.mode.bits.tsx.abrt + ? (" abrt") : ("")); break; } break; case ppt_ovf: - printf_filtered (("ovf")); + gdb_printf (("ovf")); break; case ppt_stop: - printf_filtered (("stop")); + gdb_printf (("stop")); break; case ppt_vmcs: - printf_filtered (("vmcs %" PRIx64 ""), packet->payload.vmcs.base); + gdb_printf (("vmcs %" PRIx64 ""), packet->payload.vmcs.base); break; case ppt_tma: - printf_filtered (("tma %x %x"), packet->payload.tma.ctc, - packet->payload.tma.fc); + gdb_printf (("tma %x %x"), packet->payload.tma.ctc, + packet->payload.tma.fc); break; case ppt_mtc: - printf_filtered (("mtc %x"), packet->payload.mtc.ctc); + gdb_printf (("mtc %x"), packet->payload.mtc.ctc); break; case ppt_cyc: - printf_filtered (("cyc %" PRIx64 ""), packet->payload.cyc.value); + gdb_printf (("cyc %" PRIx64 ""), packet->payload.cyc.value); break; case ppt_mnt: - printf_filtered (("mnt %" PRIx64 ""), packet->payload.mnt.payload); + gdb_printf (("mnt %" PRIx64 ""), packet->payload.mnt.payload); break; } } @@ -3149,9 +3149,9 @@ btrace_maint_print_packets (struct btrace_thread_info *btinfo, { const btrace_block &block = blocks.at (blk); - printf_filtered ("%u\tbegin: %s, end: %s\n", blk, - core_addr_to_string_nz (block.begin), - core_addr_to_string_nz (block.end)); + gdb_printf ("%u\tbegin: %s, end: %s\n", blk, + core_addr_to_string_nz (block.begin), + core_addr_to_string_nz (block.end)); } btinfo->maint.variant.bts.packet_history.begin = begin; @@ -3170,15 +3170,15 @@ btrace_maint_print_packets (struct btrace_thread_info *btinfo, { const struct btrace_pt_packet &packet = packets.at (pkt); - printf_filtered ("%u\t", pkt); - printf_filtered ("0x%" PRIx64 "\t", packet.offset); + gdb_printf ("%u\t", pkt); + gdb_printf ("0x%" PRIx64 "\t", packet.offset); if (packet.errcode == pte_ok) pt_print_packet (&packet.packet); else - printf_filtered ("[error: %s]", pt_errstr (packet.errcode)); + gdb_printf ("[error: %s]", pt_errstr (packet.errcode)); - printf_filtered ("\n"); + gdb_printf ("\n"); } btinfo->maint.variant.pt.packet_history.begin = begin; @@ -3256,7 +3256,7 @@ maint_btrace_packet_history_cmd (const char *arg, int from_tty) btrace_maint_update_packets (btinfo, &begin, &end, &from, &to); if (begin == end) { - printf_filtered (_("No trace.\n")); + gdb_printf (_("No trace.\n")); return; } @@ -3398,8 +3398,8 @@ maint_info_btrace_cmd (const char *args, int from_tty) if (conf == NULL) error (_("No btrace configuration.")); - printf_filtered (_("Format: %s.\n"), - btrace_format_string (conf->format)); + gdb_printf (_("Format: %s.\n"), + btrace_format_string (conf->format)); switch (conf->format) { @@ -3407,8 +3407,8 @@ maint_info_btrace_cmd (const char *args, int from_tty) break; case BTRACE_FORMAT_BTS: - printf_filtered (_("Number of packets: %zu.\n"), - btinfo->data.variant.bts.blocks->size ()); + gdb_printf (_("Number of packets: %zu.\n"), + btinfo->data.variant.bts.blocks->size ()); break; #if defined (HAVE_LIBIPT) @@ -3417,14 +3417,14 @@ maint_info_btrace_cmd (const char *args, int from_tty) struct pt_version version; version = pt_library_version (); - printf_filtered (_("Version: %u.%u.%u%s.\n"), version.major, - version.minor, version.build, - version.ext != NULL ? version.ext : ""); + gdb_printf (_("Version: %u.%u.%u%s.\n"), version.major, + version.minor, version.build, + version.ext != NULL ? version.ext : ""); btrace_maint_update_pt_packets (btinfo); - printf_filtered (_("Number of packets: %zu.\n"), - ((btinfo->maint.variant.pt.packets == nullptr) - ? 0 : btinfo->maint.variant.pt.packets->size ())); + gdb_printf (_("Number of packets: %zu.\n"), + ((btinfo->maint.variant.pt.packets == nullptr) + ? 0 : btinfo->maint.variant.pt.packets->size ())); } break; #endif /* defined (HAVE_LIBIPT) */ @@ -3438,7 +3438,7 @@ show_maint_btrace_pt_skip_pad (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Skip PAD packets is %s.\n"), value); + gdb_printf (file, _("Skip PAD packets is %s.\n"), value); } diff --git a/gdb/build-id.c b/gdb/build-id.c index 8a2d5b4..345ed0e 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -76,7 +76,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, { if (separate_debug_file_debug) { - fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ()); + gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ()); gdb_flush (gdb_stdlog); } @@ -94,8 +94,8 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, if (filename == NULL) { if (separate_debug_file_debug) - fprintf_unfiltered (gdb_stdlog, - _(" no, unable to compute real path\n")); + gdb_printf (gdb_stdlog, + _(" no, unable to compute real path\n")); return {}; } @@ -106,7 +106,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, if (debug_bfd == NULL) { if (separate_debug_file_debug) - fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n")); + gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); return {}; } @@ -114,13 +114,13 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) { if (separate_debug_file_debug) - fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n")); + gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n")); return {}; } if (separate_debug_file_debug) - fprintf_unfiltered (gdb_stdlog, _(" yes!\n")); + gdb_printf (gdb_stdlog, _(" yes!\n")); return debug_bfd; } @@ -210,9 +210,9 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) if (build_id != NULL) { if (separate_debug_file_debug) - fprintf_unfiltered (gdb_stdlog, - _("\nLooking for separate debug info (build-id) for " - "%s\n"), objfile_name (objfile)); + gdb_printf (gdb_stdlog, + _("\nLooking for separate debug info (build-id) for " + "%s\n"), objfile_name (objfile)); gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size, build_id->data)); diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 262b3e1..6b53716 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -205,14 +205,14 @@ c_print_typedef (struct type *type, struct ui_file *stream) { type = check_typedef (type); - fprintf_filtered (stream, "typedef "); + gdb_printf (stream, "typedef "); type_print (type, "", stream, -1); if ((new_symbol->type ())->name () == 0 || strcmp ((new_symbol->type ())->name (), new_symbol->linkage_name ()) != 0 || new_symbol->type ()->code () == TYPE_CODE_TYPEDEF) - fprintf_filtered (stream, " %s", new_symbol->print_name ()); - fprintf_filtered (stream, ";"); + gdb_printf (stream, " %s", new_symbol->print_name ()); + gdb_printf (stream, ";"); } /* If TYPE is a derived type, then print out derivation information. @@ -252,16 +252,16 @@ cp_type_print_derivation_info (struct ui_file *stream, { stream->wrap_here (8); gdb_puts (i == 0 ? ": " : ", ", stream); - fprintf_filtered (stream, "%s%s ", - BASETYPE_VIA_PUBLIC (type, i) - ? "public" : (TYPE_FIELD_PROTECTED (type, i) - ? "protected" : "private"), - BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : ""); + gdb_printf (stream, "%s%s ", + BASETYPE_VIA_PUBLIC (type, i) + ? "public" : (TYPE_FIELD_PROTECTED (type, i) + ? "protected" : "private"), + BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : ""); name = TYPE_BASECLASS (type, i)->name (); if (name) print_name_maybe_canonical (name, flags, stream); else - fprintf_filtered (stream, "(null)"); + gdb_printf (stream, "(null)"); } if (i > 0) { @@ -306,20 +306,20 @@ cp_type_print_method_args (struct type *mtype, const char *prefix, c_print_type (arg.type (), "", stream, 0, 0, flags); if (i == nargs && varargs) - fprintf_filtered (stream, ", ..."); + gdb_printf (stream, ", ..."); else if (i < nargs) { - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (8); } } } else if (varargs) - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); else if (language == language_cplus) - fprintf_filtered (stream, "void"); + gdb_printf (stream, "void"); - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); /* For non-static methods, read qualifiers from the type of THIS. */ @@ -332,18 +332,18 @@ cp_type_print_method_args (struct type *mtype, const char *prefix, domain = TYPE_TARGET_TYPE (args[0].type ()); if (TYPE_CONST (domain)) - fprintf_filtered (stream, " const"); + gdb_printf (stream, " const"); if (TYPE_VOLATILE (domain)) - fprintf_filtered (stream, " volatile"); + gdb_printf (stream, " volatile"); if (TYPE_RESTRICT (domain)) - fprintf_filtered (stream, (language == language_cplus - ? " __restrict__" - : " restrict")); + gdb_printf (stream, (language == language_cplus + ? " __restrict__" + : " restrict")); if (TYPE_ATOMIC (domain)) - fprintf_filtered (stream, " _Atomic"); + gdb_printf (stream, " _Atomic"); } } @@ -385,7 +385,7 @@ c_type_print_varspec_prefix (struct type *type, c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 1, language, flags, podata); - fprintf_filtered (stream, "*"); + gdb_printf (stream, "*"); c_type_print_modifier (type, stream, 1, need_post_space, language); break; @@ -399,14 +399,14 @@ c_type_print_varspec_prefix (struct type *type, c_type_print_base_1 (TYPE_SELF_TYPE (type), stream, -1, passed_a_ptr, language, flags, podata); - fprintf_filtered (stream, "::*"); + gdb_printf (stream, "::*"); break; case TYPE_CODE_METHODPTR: c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0, language, flags, podata); - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); name = TYPE_SELF_TYPE (type)->name (); if (name) print_name_maybe_canonical (name, flags, stream); @@ -414,7 +414,7 @@ c_type_print_varspec_prefix (struct type *type, c_type_print_base_1 (TYPE_SELF_TYPE (type), stream, -1, passed_a_ptr, language, flags, podata); - fprintf_filtered (stream, "::*"); + gdb_printf (stream, "::*"); break; case TYPE_CODE_REF: @@ -422,7 +422,7 @@ c_type_print_varspec_prefix (struct type *type, c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 0, language, flags, podata); - fprintf_filtered (stream, type->code () == TYPE_CODE_REF ? "&" : "&&"); + gdb_printf (stream, type->code () == TYPE_CODE_REF ? "&" : "&&"); c_type_print_modifier (type, stream, 1, need_post_space, language); break; @@ -432,7 +432,7 @@ c_type_print_varspec_prefix (struct type *type, stream, show, 0, 0, language, flags, podata); if (passed_a_ptr) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); break; case TYPE_CODE_ARRAY: @@ -440,7 +440,7 @@ c_type_print_varspec_prefix (struct type *type, stream, show, 0, need_post_space, language, flags, podata); if (passed_a_ptr) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); break; case TYPE_CODE_TYPEDEF: @@ -497,34 +497,34 @@ c_type_print_modifier (struct type *type, struct ui_file *stream, if (TYPE_CONST (type) && !TYPE_IS_REFERENCE (type)) { if (need_pre_space) - fprintf_filtered (stream, " "); - fprintf_filtered (stream, "const"); + gdb_printf (stream, " "); + gdb_printf (stream, "const"); did_print_modifier = 1; } if (TYPE_VOLATILE (type)) { if (did_print_modifier || need_pre_space) - fprintf_filtered (stream, " "); - fprintf_filtered (stream, "volatile"); + gdb_printf (stream, " "); + gdb_printf (stream, "volatile"); did_print_modifier = 1; } if (TYPE_RESTRICT (type)) { if (did_print_modifier || need_pre_space) - fprintf_filtered (stream, " "); - fprintf_filtered (stream, (language == language_cplus - ? "__restrict__" - : "restrict")); + gdb_printf (stream, " "); + gdb_printf (stream, (language == language_cplus + ? "__restrict__" + : "restrict")); did_print_modifier = 1; } if (TYPE_ATOMIC (type)) { if (did_print_modifier || need_pre_space) - fprintf_filtered (stream, " "); - fprintf_filtered (stream, "_Atomic"); + gdb_printf (stream, " "); + gdb_printf (stream, "_Atomic"); did_print_modifier = 1; } @@ -534,13 +534,13 @@ c_type_print_modifier (struct type *type, struct ui_file *stream, if (address_space_id) { if (did_print_modifier || need_pre_space) - fprintf_filtered (stream, " "); - fprintf_filtered (stream, "@%s", address_space_id); + gdb_printf (stream, " "); + gdb_printf (stream, "@%s", address_space_id); did_print_modifier = 1; } if (did_print_modifier && need_post_space) - fprintf_filtered (stream, " "); + gdb_printf (stream, " "); } @@ -561,7 +561,7 @@ c_type_print_args (struct type *type, struct ui_file *stream, int i; int printed_any = 0; - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); for (i = 0; i < type->num_fields (); i++) { @@ -572,7 +572,7 @@ c_type_print_args (struct type *type, struct ui_file *stream, if (printed_any) { - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); } @@ -601,16 +601,16 @@ c_type_print_args (struct type *type, struct ui_file *stream, represents unprototyped (K&R style) C functions. */ if (printed_any && type->has_varargs ()) { - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); } } else if (!printed_any && (type->is_prototyped () || language == language_cplus)) - fprintf_filtered (stream, "void"); + gdb_printf (stream, "void"); - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } /* Return true iff the j'th overloading of the i'th method of TYPE @@ -778,18 +778,18 @@ c_type_print_varspec_suffix (struct type *type, int is_vector = type->is_vector (); if (passed_a_ptr) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); - fprintf_filtered (stream, (is_vector ? - " __attribute__ ((vector_size(" : "[")); + gdb_printf (stream, (is_vector ? + " __attribute__ ((vector_size(" : "[")); /* Bounds are not yet resolved, print a bounds placeholder instead. */ if (type->bounds ()->high.kind () == PROP_LOCEXPR || type->bounds ()->high.kind () == PROP_LOCLIST) - fprintf_filtered (stream, "variable length"); + gdb_printf (stream, "variable length"); else if (get_array_bounds (type, &low_bound, &high_bound)) - fprintf_filtered (stream, "%s", - plongest (high_bound - low_bound + 1)); - fprintf_filtered (stream, (is_vector ? ")))" : "]")); + gdb_printf (stream, "%s", + plongest (high_bound - low_bound + 1)); + gdb_printf (stream, (is_vector ? ")))" : "]")); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 0, 0, language, flags); @@ -802,7 +802,7 @@ c_type_print_varspec_suffix (struct type *type, break; case TYPE_CODE_METHODPTR: - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 0, 0, language, flags); break; @@ -817,7 +817,7 @@ c_type_print_varspec_suffix (struct type *type, case TYPE_CODE_METHOD: case TYPE_CODE_FUNC: if (passed_a_ptr) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); if (!demangled_args) c_type_print_args (type, stream, 0, language, flags); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, @@ -889,14 +889,14 @@ c_type_print_template_args (const struct type_print_options *flags, if (first) { stream->wrap_here (4); - fprintf_filtered (stream, _("[with %s = "), sym->linkage_name ()); + gdb_printf (stream, _("[with %s = "), sym->linkage_name ()); first = 0; } else { gdb_puts (", ", stream); stream->wrap_here (9); - fprintf_filtered (stream, "%s = ", sym->linkage_name ()); + gdb_printf (stream, "%s = ", sym->linkage_name ()); } c_print_type (sym->type (), "", stream, -1, 0, flags); @@ -935,7 +935,7 @@ output_access_specifier (struct ui_file *stream, { last_access = s_protected; print_spaces_filtered_with_print_options (level + 2, stream, flags); - fprintf_filtered (stream, "protected:\n"); + gdb_printf (stream, "protected:\n"); } } else if (is_private) @@ -944,7 +944,7 @@ output_access_specifier (struct ui_file *stream, { last_access = s_private; print_spaces_filtered_with_print_options (level + 2, stream, flags); - fprintf_filtered (stream, "private:\n"); + gdb_printf (stream, "private:\n"); } } else @@ -953,7 +953,7 @@ output_access_specifier (struct ui_file *stream, { last_access = s_public; print_spaces_filtered_with_print_options (level + 2, stream, flags); - fprintf_filtered (stream, "public:\n"); + gdb_printf (stream, "public:\n"); } } @@ -1061,11 +1061,11 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, c_type_print_modifier (type, stream, 0, 1, language); if (type->code () == TYPE_CODE_UNION) - fprintf_filtered (stream, "union "); + gdb_printf (stream, "union "); else if (type->is_declared_class ()) - fprintf_filtered (stream, "class "); + gdb_printf (stream, "class "); else - fprintf_filtered (stream, "struct "); + gdb_printf (stream, "struct "); /* Print the tag if it exists. The HP aCC compiler emits a spurious "{unnamed struct}"/"{unnamed union}"/"{unnamed @@ -1087,7 +1087,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, /* If we just printed a tag name, no need to print anything else. */ if (type->name () == NULL) - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); } else if (show > 0 || type->name () == NULL) { @@ -1117,18 +1117,18 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, local_flags.local_typedefs->recursively_update (type); } - fprintf_filtered (stream, "{\n"); + gdb_printf (stream, "{\n"); if (type->num_fields () == 0 && TYPE_NFN_FIELDS (type) == 0 && TYPE_TYPEDEF_FIELD_COUNT (type) == 0) { print_spaces_filtered_with_print_options (level + 4, stream, flags); if (type->is_stub ()) - fprintf_filtered (stream, _("%p[<incomplete type>%p]\n"), - metadata_style.style ().ptr (), nullptr); + gdb_printf (stream, _("%p[<incomplete type>%p]\n"), + metadata_style.style ().ptr (), nullptr); else - fprintf_filtered (stream, _("%p[<no data fields>%p]\n"), - metadata_style.style ().ptr (), nullptr); + gdb_printf (stream, _("%p[<no data fields>%p]\n"), + metadata_style.style ().ptr (), nullptr); } /* Start off with no specific section type, so we can print @@ -1177,7 +1177,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, print_spaces_filtered (level + 4, stream); if (is_static) - fprintf_filtered (stream, "static "); + gdb_printf (stream, "static "); int newshow = show - 1; @@ -1218,10 +1218,10 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, unnamed fields. This would lead to misleading results if the compiler does not put out fields for such things (I don't know what it does). */ - fprintf_filtered (stream, " : %d", - TYPE_FIELD_BITSIZE (type, i)); + gdb_printf (stream, " : %d", + TYPE_FIELD_BITSIZE (type, i)); } - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } /* If there are both fields and methods, put a blank line @@ -1242,7 +1242,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, real_len++; } if (real_len > 0 && section_type != s_none) - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); /* C++: print out the methods. */ for (int i = 0; i < len; i++) @@ -1278,16 +1278,16 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, print_spaces_filtered_with_print_options (level + 4, stream, flags); if (TYPE_FN_FIELD_VIRTUAL_P (f, j)) - fprintf_filtered (stream, "virtual "); + gdb_printf (stream, "virtual "); else if (TYPE_FN_FIELD_STATIC_P (f, j)) - fprintf_filtered (stream, "static "); + gdb_printf (stream, "static "); if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0) { /* Keep GDB from crashing here. */ - fprintf_filtered (stream, - _("%p[<undefined type>%p] %s;\n"), - metadata_style.style ().ptr (), nullptr, - TYPE_FN_FIELD_PHYSNAME (f, j)); + gdb_printf (stream, + _("%p[<undefined type>%p] %s;\n"), + metadata_style.style ().ptr (), nullptr, + TYPE_FN_FIELD_PHYSNAME (f, j)); break; } else if (!is_constructor /* Constructors don't @@ -1358,7 +1358,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, gdb_puts (demangled_no_class, stream); } - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } } @@ -1370,7 +1370,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, --semi_local_flags.print_nested_type_limit; if (type->num_fields () != 0 || TYPE_NFN_FIELDS (type) != 0) - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); for (int i = 0; i < TYPE_NESTED_TYPES_COUNT (type); ++i) { @@ -1379,7 +1379,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, c_print_type_no_offsets (TYPE_NESTED_TYPES_FIELD_TYPE (type, i), "", stream, show, level + 4, language, &semi_local_flags, podata); - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } } @@ -1389,7 +1389,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, { if (type->num_fields () != 0 || TYPE_NFN_FIELDS (type) != 0 || TYPE_NESTED_TYPES_COUNT (type) != 0) - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); for (int i = 0; i < TYPE_TYPEDEF_FIELD_COUNT (type); i++) { @@ -1408,7 +1408,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, } print_spaces_filtered_with_print_options (level + 4, stream, flags); - fprintf_filtered (stream, "typedef "); + gdb_printf (stream, "typedef "); /* We want to print typedefs with substitutions from the template parameters or globally-known @@ -1417,7 +1417,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, TYPE_TYPEDEF_FIELD_NAME (type, i), stream, show - 1, level + 4, language, &semi_local_flags, podata); - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } } @@ -1431,7 +1431,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, print_spaces_filtered (2, stream); } - fprintf_filtered (stream, "%*s}", level, ""); + gdb_printf (stream, "%*s}", level, ""); } } @@ -1488,16 +1488,16 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, if (language == language_c || language == language_minimal) { if (type->code () == TYPE_CODE_UNION) - fprintf_filtered (stream, "union "); + gdb_printf (stream, "union "); else if (type->code () == TYPE_CODE_STRUCT) { if (type->is_declared_class ()) - fprintf_filtered (stream, "class "); + gdb_printf (stream, "class "); else - fprintf_filtered (stream, "struct "); + gdb_printf (stream, "struct "); } else if (type->code () == TYPE_CODE_ENUM) - fprintf_filtered (stream, "enum "); + gdb_printf (stream, "enum "); } print_name_maybe_canonical (type->name (), flags, stream); @@ -1543,9 +1543,9 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, case TYPE_CODE_ENUM: c_type_print_modifier (type, stream, 0, 1, language); - fprintf_filtered (stream, "enum "); + gdb_printf (stream, "enum "); if (type->is_declared_class ()) - fprintf_filtered (stream, "class "); + gdb_printf (stream, "class "); /* Print the tag name if it exists. The aCC compiler emits a spurious "{unnamed struct}"/"{unnamed union}"/"{unnamed enum}" @@ -1565,7 +1565,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, /* If we just printed a tag name, no need to print anything else. */ if (type->name () == NULL) - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); } else if (show > 0 || type->name () == NULL) { @@ -1584,28 +1584,28 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, struct type *underlying = check_typedef (TYPE_TARGET_TYPE (type)); if (underlying->name () != NULL) - fprintf_filtered (stream, ": %s ", underlying->name ()); + gdb_printf (stream, ": %s ", underlying->name ()); } - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); len = type->num_fields (); for (i = 0; i < len; i++) { QUIT; if (i) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); fputs_styled (type->field (i).name (), variable_name_style.style (), stream); if (lastval != type->field (i).loc_enumval ()) { - fprintf_filtered (stream, " = %s", - plongest (type->field (i).loc_enumval ())); + gdb_printf (stream, " = %s", + plongest (type->field (i).loc_enumval ())); lastval = type->field (i).loc_enumval (); } lastval++; } - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } break; @@ -1616,24 +1616,24 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, local_flags.local_typedefs = NULL; c_type_print_modifier (type, stream, 0, 1, language); - fprintf_filtered (stream, "flag "); + gdb_printf (stream, "flag "); print_name_maybe_canonical (type->name (), flags, stream); if (show > 0) { gdb_puts (" ", stream); - fprintf_filtered (stream, "{\n"); + gdb_printf (stream, "{\n"); if (type->num_fields () == 0) { if (type->is_stub ()) - fprintf_filtered (stream, - _("%*s%p[<incomplete type>%p]\n"), - level + 4, "", - metadata_style.style ().ptr (), nullptr); + gdb_printf (stream, + _("%*s%p[<incomplete type>%p]\n"), + level + 4, "", + metadata_style.style ().ptr (), nullptr); else - fprintf_filtered (stream, - _("%*s%p[<no data fields>%p]\n"), - level + 4, "", - metadata_style.style ().ptr (), nullptr); + gdb_printf (stream, + _("%*s%p[<no data fields>%p]\n"), + level + 4, "", + metadata_style.style ().ptr (), nullptr); } len = type->num_fields (); for (i = 0; i < len; i++) @@ -1646,32 +1646,32 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, type->field (i).name (), stream, show, level + 4, language, &local_flags, podata); - fprintf_filtered (stream, " @%s", - plongest (type->field (i).loc_bitpos ())); + gdb_printf (stream, " @%s", + plongest (type->field (i).loc_bitpos ())); if (TYPE_FIELD_BITSIZE (type, i) > 1) { - fprintf_filtered (stream, "-%s", - plongest (type->field (i).loc_bitpos () - + TYPE_FIELD_BITSIZE (type, i) - - 1)); + gdb_printf (stream, "-%s", + plongest (type->field (i).loc_bitpos () + + TYPE_FIELD_BITSIZE (type, i) + - 1)); } - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } - fprintf_filtered (stream, "%*s}", level, ""); + gdb_printf (stream, "%*s}", level, ""); } } break; case TYPE_CODE_VOID: - fprintf_filtered (stream, "void"); + gdb_printf (stream, "void"); break; case TYPE_CODE_UNDEF: - fprintf_filtered (stream, _("struct <unknown>")); + gdb_printf (stream, _("struct <unknown>")); break; case TYPE_CODE_ERROR: - fprintf_filtered (stream, "%s", TYPE_ERROR_NAME (type)); + gdb_printf (stream, "%s", TYPE_ERROR_NAME (type)); break; case TYPE_CODE_RANGE: diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index c034704..9a860bf 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -221,7 +221,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype, current_language); if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } } @@ -298,18 +298,18 @@ c_value_print_array (struct value *val, else { unsigned int i = 0; - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); /* If this is a virtual function table, print the 0th entry specially, and the rest of the members normally. */ if (cp_is_vtbl_ptr_type (elttype)) { i = 1; - fprintf_filtered (stream, _("%d vtable entries"), - len - 1); + gdb_printf (stream, _("%d vtable entries"), + len - 1); } value_print_array_elements (val, stream, recurse, options, i); - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } } else @@ -365,7 +365,7 @@ c_value_print_struct (struct value *val, struct ui_file *stream, int recurse, struct type *type = check_typedef (value_type (val)); if (type->code () == TYPE_CODE_UNION && recurse && !options->unionprint) - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); else if (options->vtblprint && cp_is_vtbl_ptr_type (type)) { /* Print the unmangled name if desired. */ @@ -517,7 +517,7 @@ c_value_print (struct value *val, struct ui_file *stream, } /* Pointer to class, check real type of object. */ - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); if (value_entirely_available (val)) { @@ -542,19 +542,19 @@ c_value_print (struct value *val, struct ui_file *stream, type = value_type (val); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); } else { /* normal case */ - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (value_type (val), "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); } } if (!value_initialized (val)) - fprintf_filtered (stream, " [uninitialized] "); + gdb_printf (stream, " [uninitialized] "); if (options->objectprint && (type->code () == TYPE_CODE_STRUCT)) { @@ -572,15 +572,15 @@ c_value_print (struct value *val, struct ui_file *stream, && (TYPE_LENGTH (real_type) < TYPE_LENGTH (value_enclosing_type (val))))) val = value_cast (real_type, val); - fprintf_filtered (stream, "(%s%s) ", - real_type->name (), - full ? "" : _(" [incomplete object]")); + gdb_printf (stream, "(%s%s) ", + real_type->name (), + full ? "" : _(" [incomplete object]")); } else if (type != check_typedef (value_enclosing_type (val))) { /* No RTTI information, so let's do our best. */ - fprintf_filtered (stream, "(%s ?) ", - value_enclosing_type (val)->name ()); + gdb_printf (stream, "(%s ?) ", + value_enclosing_type (val)->name ()); val = value_cast (value_enclosing_type (val), val); } } diff --git a/gdb/charset.c b/gdb/charset.c index 84c60a4..74f742e 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -232,11 +232,11 @@ show_host_charset_name (struct ui_file *file, int from_tty, const char *value) { if (!strcmp (value, "auto")) - fprintf_filtered (file, - _("The host character set is \"auto; currently %s\".\n"), - auto_host_charset_name); + gdb_printf (file, + _("The host character set is \"auto; currently %s\".\n"), + auto_host_charset_name); else - fprintf_filtered (file, _("The host character set is \"%s\".\n"), value); + gdb_printf (file, _("The host character set is \"%s\".\n"), value); } static const char *target_charset_name = "auto"; @@ -245,13 +245,13 @@ show_target_charset_name (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (!strcmp (value, "auto")) - fprintf_filtered (file, - _("The target character set is \"auto; " - "currently %s\".\n"), - gdbarch_auto_charset (get_current_arch ())); + gdb_printf (file, + _("The target character set is \"auto; " + "currently %s\".\n"), + gdbarch_auto_charset (get_current_arch ())); else - fprintf_filtered (file, _("The target character set is \"%s\".\n"), - value); + gdb_printf (file, _("The target character set is \"%s\".\n"), + value); } static const char *target_wide_charset_name = "auto"; @@ -262,13 +262,13 @@ show_target_wide_charset_name (struct ui_file *file, const char *value) { if (!strcmp (value, "auto")) - fprintf_filtered (file, - _("The target wide character set is \"auto; " - "currently %s\".\n"), - gdbarch_auto_wide_charset (get_current_arch ())); + gdb_printf (file, + _("The target wide character set is \"auto; " + "currently %s\".\n"), + gdbarch_auto_wide_charset (get_current_arch ())); else - fprintf_filtered (file, _("The target wide character set is \"%s\".\n"), - value); + gdb_printf (file, _("The target wide character set is \"%s\".\n"), + value); } static const char * const default_charset_names[] = diff --git a/gdb/cli-out.c b/gdb/cli-out.c index 47b256b..f396aef 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -209,7 +209,7 @@ cli_ui_out::do_spaces (int numspaces) return; if (test_flags (unfiltered_output)) - fprintf_unfiltered (m_streams.back (), "%*s", numspaces, ""); + gdb_printf (m_streams.back (), "%*s", numspaces, ""); else print_spaces_filtered (numspaces, m_streams.back ()); } @@ -295,7 +295,7 @@ cli_ui_out::do_progress_start (const std::string &name, bool should_print) meter.name = name; if (!stream->isatty ()) { - fprintf_unfiltered (stream, "%s...", meter.name.c_str ()); + gdb_printf (stream, "%s...", meter.name.c_str ()); gdb_flush (stream); meter.printing = WORKING; } @@ -322,7 +322,7 @@ cli_ui_out::do_progress_notify (double howmuch) if (meter.printing == START) { - fprintf_unfiltered (stream, "%s\n", meter.name.c_str ()); + gdb_printf (stream, "%s\n", meter.name.c_str ()); gdb_flush (stream); meter.printing = WORKING; } @@ -340,10 +340,10 @@ cli_ui_out::do_progress_notify (double howmuch) int width = chars_per_line - 3; max = width * howmuch; - fprintf_unfiltered (stream, "\r["); + gdb_printf (stream, "\r["); for (i = 0; i < width; ++i) - fprintf_unfiltered (stream, i < max ? "#" : " "); - fprintf_unfiltered (stream, "]"); + gdb_printf (stream, i < max ? "#" : " "); + gdb_printf (stream, "]"); gdb_flush (stream); meter.printing = PROGRESS; } @@ -357,7 +357,7 @@ cli_ui_out::do_progress_end () if (!stream->isatty ()) { - fprintf_unfiltered (stream, "\n"); + gdb_printf (stream, "\n"); gdb_flush (stream); } else if (meter.printing == PROGRESS) @@ -365,10 +365,10 @@ cli_ui_out::do_progress_end () int i; int width = get_chars_per_line () - 3; - fprintf_unfiltered (stream, "\r"); + gdb_printf (stream, "\r"); for (i = 0; i < width + 2; ++i) - fprintf_unfiltered (stream, " "); - fprintf_unfiltered (stream, "\r"); + gdb_printf (stream, " "); + gdb_printf (stream, "\r"); gdb_flush (stream); } 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; } } diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c index c2dc3cd..16c1e04 100644 --- a/gdb/coff-pe-read.c +++ b/gdb/coff-pe-read.c @@ -174,10 +174,10 @@ add_pe_exported_sym (minimal_symbol_reader &reader, = string_printf ("%s!%s", dll_name, bare_name.c_str ()); if ((section_data->ms_type == mst_unknown) && debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog , _("Unknown section type for \"%s\"" - " for entry \"%s\" in dll \"%s\"\n"), - section_data->section_name.c_str (), sym_name, - dll_name); + gdb_printf (gdb_stdlog , _("Unknown section type for \"%s\"" + " for entry \"%s\" in dll \"%s\"\n"), + section_data->section_name.c_str (), sym_name, + dll_name); reader.record_with_info (qualified_name.c_str (), vma, section_data->ms_type, section_data->index); @@ -186,8 +186,8 @@ add_pe_exported_sym (minimal_symbol_reader &reader, reader.record_with_info (bare_name.c_str (), vma, section_data->ms_type, section_data->index); if (debug_coff_pe_read > 1) - fprintf_unfiltered (gdb_stdlog, _("Adding exported symbol \"%s\"" - " in dll \"%s\"\n"), sym_name, dll_name); + gdb_printf (gdb_stdlog, _("Adding exported symbol \"%s\"" + " in dll \"%s\"\n"), sym_name, dll_name); } /* Create a minimal symbol entry for an exported forward symbol. @@ -232,17 +232,17 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader, if (!msymbol.minsym) { if (debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("Unable to find function \"%s\" in" - " dll \"%s\", forward of \"%s\" in dll \"%s\"\n"), - forward_func_name, forward_dll_name, sym_name, - dll_name); + gdb_printf (gdb_stdlog, _("Unable to find function \"%s\" in" + " dll \"%s\", forward of \"%s\" in dll \"%s\"\n"), + forward_func_name, forward_dll_name, sym_name, + dll_name); return 0; } if (debug_coff_pe_read > 1) - fprintf_unfiltered (gdb_stdlog, _("Adding forwarded exported symbol" - " \"%s\" in dll \"%s\", pointing to \"%s\"\n"), - sym_name, dll_name, forward_qualified_name); + gdb_printf (gdb_stdlog, _("Adding forwarded exported symbol" + " \"%s\" in dll \"%s\", pointing to \"%s\"\n"), + sym_name, dll_name, forward_qualified_name); vma = BMSYMBOL_VALUE_ADDRESS (msymbol); msymtype = MSYMBOL_TYPE (msymbol.minsym); @@ -428,14 +428,14 @@ read_pe_exported_syms (minimal_symbol_reader &reader, if (strcmp (sname, ".edata") != 0) { if (debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("Export RVA for dll " - "\"%s\" is in section \"%s\"\n"), - dll_name, sname); + gdb_printf (gdb_stdlog, _("Export RVA for dll " + "\"%s\" is in section \"%s\"\n"), + dll_name, sname); } else if (export_opthdrrva != vaddr && debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("Wrong value of export RVA" - " for dll \"%s\": 0x%lx instead of 0x%lx\n"), - dll_name, export_opthdrrva, vaddr); + gdb_printf (gdb_stdlog, _("Wrong value of export RVA" + " for dll \"%s\": 0x%lx instead of 0x%lx\n"), + dll_name, export_opthdrrva, vaddr); expptr = fptr + (export_opthdrrva - vaddr); break; } @@ -532,8 +532,8 @@ read_pe_exported_syms (minimal_symbol_reader &reader, read_pe_truncate_name (dll_name); if (debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("DLL \"%s\" has %ld export entries," - " base=%ld\n"), dll_name, nexp, ordbase); + gdb_printf (gdb_stdlog, _("DLL \"%s\" has %ld export entries," + " base=%ld\n"), dll_name, nexp, ordbase); nbforward = 0; nbnormal = 0; /* Iterate through the list of symbols. */ @@ -605,16 +605,16 @@ read_pe_exported_syms (minimal_symbol_reader &reader, ++nbnormal; } else if (debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("Export name \"%s\" ord. %lu," - " RVA 0x%lx in dll \"%s\" not handled\n"), - funcname, ordinal, func_rva, dll_name); + gdb_printf (gdb_stdlog, _("Export name \"%s\" ord. %lu," + " RVA 0x%lx in dll \"%s\" not handled\n"), + funcname, ordinal, func_rva, dll_name); } } if (debug_coff_pe_read) - fprintf_unfiltered (gdb_stdlog, _("Finished reading \"%s\", exports %ld," - " forwards %ld, total %ld/%ld.\n"), dll_name, nbnormal, - nbforward, nbnormal + nbforward, nexp); + gdb_printf (gdb_stdlog, _("Finished reading \"%s\", exports %ld," + " forwards %ld, total %ld/%ld.\n"), dll_name, nbnormal, + nbforward, nbnormal + nbforward, nexp); } /* Extract from ABFD the offset of the .text section. @@ -686,7 +686,7 @@ static void show_debug_coff_pe_read (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Coff PE read debugging is %s.\n"), value); + gdb_printf (file, _("Coff PE read debugging is %s.\n"), value); } /* Adds "Set/show debug coff_pe_read" commands. */ diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index 52a7cc1..81356f0 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -161,7 +161,7 @@ print_one_macro (const char *name, const struct macro_definition *macro, /* None of -Wno-builtin-macro-redefined, #undef first or plain #define of the same value would avoid a warning. */ - fprintf_filtered (file, "#ifndef %s\n# define %s", name, name); + gdb_printf (file, "#ifndef %s\n# define %s", name, name); if (macro->kind == macro_function_like) { @@ -177,7 +177,7 @@ print_one_macro (const char *name, const struct macro_definition *macro, gdb_puts (")", file); } - fprintf_filtered (file, " %s\n#endif\n", macro->replacement); + gdb_printf (file, " %s\n#endif\n", macro->replacement); } /* Write macro definitions at PC to FILE. */ @@ -245,8 +245,8 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, switch (regtype->code ()) { case TYPE_CODE_PTR: - fprintf_filtered (stream, "__gdb_uintptr %s", - regname.c_str ()); + gdb_printf (stream, "__gdb_uintptr %s", + regname.c_str ()); break; case TYPE_CODE_INT: @@ -258,11 +258,11 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, { if (regtype->is_unsigned ()) gdb_puts ("unsigned ", stream); - fprintf_unfiltered (stream, - "int %s" - " __attribute__ ((__mode__(__%s__)))", - regname.c_str (), - mode); + gdb_printf (stream, + "int %s" + " __attribute__ ((__mode__(__%s__)))", + regname.c_str (), + mode); break; } } @@ -270,12 +270,12 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, /* Fall through. */ default: - fprintf_unfiltered (stream, - " unsigned char %s[%s]" - " __attribute__((__aligned__(" - "__BIGGEST_ALIGNMENT__)))", - regname.c_str (), - pulongest (TYPE_LENGTH (regtype))); + gdb_printf (stream, + " unsigned char %s[%s]" + " __attribute__((__aligned__(" + "__BIGGEST_ALIGNMENT__)))", + regname.c_str (), + pulongest (TYPE_LENGTH (regtype))); } gdb_puts (";\n", stream); } @@ -393,15 +393,15 @@ struct c_add_input { case COMPILE_I_PRINT_ADDRESS_SCOPE: case COMPILE_I_PRINT_VALUE_SCOPE: - fprintf_unfiltered (buf, - "__auto_type " COMPILE_I_EXPR_VAL " = %s;\n" - "typeof (%s) *" COMPILE_I_EXPR_PTR_TYPE ";\n" - "memcpy (" COMPILE_I_PRINT_OUT_ARG ", %s" - COMPILE_I_EXPR_VAL ",\n" - "sizeof (*" COMPILE_I_EXPR_PTR_TYPE "));\n" - , input, input, - (type == COMPILE_I_PRINT_ADDRESS_SCOPE - ? "&" : "")); + gdb_printf (buf, + "__auto_type " COMPILE_I_EXPR_VAL " = %s;\n" + "typeof (%s) *" COMPILE_I_EXPR_PTR_TYPE ";\n" + "memcpy (" COMPILE_I_PRINT_OUT_ARG ", %s" + COMPILE_I_EXPR_VAL ",\n" + "sizeof (*" COMPILE_I_EXPR_PTR_TYPE "));\n" + , input, input, + (type == COMPILE_I_PRINT_ADDRESS_SCOPE + ? "&" : "")); break; default: @@ -494,7 +494,7 @@ struct cplus_add_input { case COMPILE_I_PRINT_VALUE_SCOPE: case COMPILE_I_PRINT_ADDRESS_SCOPE: - fprintf_unfiltered + gdb_printf (buf, /* "auto" strips ref- and cv- qualifiers, so we need to also strip those from COMPILE_I_EXPR_PTR_TYPE. */ diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index bb15602..d422c46 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -241,17 +241,17 @@ convert_symbol_sym (compile_c_instance *context, const char *identifier, && global_sym.block != block_static_block (global_sym.block)) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": global symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": global symbol\n", + identifier); convert_one_symbol (context, global_sym, 1, 0); } } if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": local symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": local symbol\n", + identifier); convert_one_symbol (context, sym, 0, is_local_symbol); } @@ -373,9 +373,9 @@ gcc_convert_symbol (void *datum, } if (compile_debug && !found) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": lookup_symbol failed\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": lookup_symbol failed\n", + identifier); return; } @@ -401,9 +401,9 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, if (sym != NULL && sym->aclass () == LOC_BLOCK) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": full symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": full symbol\n", + identifier); result = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)); if (sym->type ()->is_gnu_ifunc ()) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); @@ -417,10 +417,10 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, if (msym.minsym != NULL) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": minimal " - "symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": minimal " + "symbol\n", + identifier); result = BMSYMBOL_VALUE_ADDRESS (msym); if (MSYMBOL_TYPE (msym.minsym) == mst_text_gnu_ifunc) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); @@ -435,9 +435,9 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, } if (compile_debug && !found) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": failed\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": failed\n", + identifier); return result; } diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 33febac..3657c84 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -253,17 +253,17 @@ convert_symbol_sym (compile_cplus_instance *instance, && global_sym.block != block_static_block (global_sym.block)) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": global symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": global symbol\n", + identifier); convert_one_symbol (instance, global_sym, true, false); } } if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": local symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": local symbol\n", + identifier); convert_one_symbol (instance, sym, false, is_local_symbol); } @@ -337,8 +337,8 @@ gcc_cplus_convert_symbol (void *datum, const char *identifier) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "got oracle request for \"%s\"\n", identifier); + gdb_printf (gdb_stdlog, + "got oracle request for \"%s\"\n", identifier); bool found = false; compile_cplus_instance *instance = (compile_cplus_instance *) datum; @@ -396,18 +396,18 @@ gcc_cplus_convert_symbol (void *datum, } if (compile_debug && !found) - fprintf_unfiltered (gdb_stdlog, - "gcc_convert_symbol \"%s\": lookup_symbol failed\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_convert_symbol \"%s\": lookup_symbol failed\n", + identifier); if (compile_debug) { if (found) - fprintf_unfiltered (gdb_stdlog, "found type for %s\n", identifier); + gdb_printf (gdb_stdlog, "found type for %s\n", identifier); else { - fprintf_unfiltered (gdb_stdlog, "did not find type for %s\n", - identifier); + gdb_printf (gdb_stdlog, "did not find type for %s\n", + identifier); } } @@ -425,8 +425,8 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, int found = 0; if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "got oracle request for address of %s\n", identifier); + gdb_printf (gdb_stdlog, + "got oracle request for address of %s\n", identifier); /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ @@ -438,9 +438,9 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, if (sym != nullptr && sym->aclass () == LOC_BLOCK) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": full symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": full symbol\n", + identifier); result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); if (sym->type ()->is_gnu_ifunc ()) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); @@ -454,10 +454,10 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, if (msym.minsym != nullptr) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": minimal " - "symbol\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": minimal " + "symbol\n", + identifier); result = BMSYMBOL_VALUE_ADDRESS (msym); if (MSYMBOL_TYPE (msym.minsym) == mst_text_gnu_ifunc) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); @@ -472,17 +472,17 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, } if (compile_debug && !found) - fprintf_unfiltered (gdb_stdlog, - "gcc_symbol_address \"%s\": failed\n", - identifier); + gdb_printf (gdb_stdlog, + "gcc_symbol_address \"%s\": failed\n", + identifier); if (compile_debug) { if (found) - fprintf_unfiltered (gdb_stdlog, "found address for %s!\n", identifier); + gdb_printf (gdb_stdlog, "found address for %s!\n", identifier); else - fprintf_unfiltered (gdb_stdlog, - "did not find address for %s\n", identifier); + gdb_printf (gdb_stdlog, + "did not find address for %s\n", identifier); } return result; diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 2b1b01e..616f2c2 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -258,8 +258,8 @@ compile_cplus_instance::enter_scope (compile_scope &&new_scope) { if (debug_compile_cplus_scopes) { - fprintf_unfiltered (gdb_stdlog, "entering new scope %s\n", - host_address_to_string (&m_scopes.back ())); + gdb_printf (gdb_stdlog, "entering new scope %s\n", + host_address_to_string (&m_scopes.back ())); } /* Push the global namespace. */ @@ -284,8 +284,8 @@ compile_cplus_instance::enter_scope (compile_scope &&new_scope) { if (debug_compile_cplus_scopes) { - fprintf_unfiltered (gdb_stdlog, "staying in current scope -- " - "scopes are identical\n"); + gdb_printf (gdb_stdlog, "staying in current scope -- " + "scopes are identical\n"); } } } @@ -305,8 +305,8 @@ compile_cplus_instance::leave_scope () { if (debug_compile_cplus_scopes) { - fprintf_unfiltered (gdb_stdlog, "leaving scope %s\n", - host_address_to_string (¤t)); + gdb_printf (gdb_stdlog, "leaving scope %s\n", + host_address_to_string (¤t)); } /* Pop namespaces. */ @@ -324,8 +324,8 @@ compile_cplus_instance::leave_scope () else { if (debug_compile_cplus_scopes) - fprintf_unfiltered (gdb_stdlog, - "identical scopes -- not leaving scope\n"); + gdb_printf (gdb_stdlog, + "identical scopes -- not leaving scope\n"); } } @@ -1239,7 +1239,7 @@ compile_cplus_instance::gcc_cplus_leave_scope static void compile_cplus_debug_output_1 (ULONGEST arg) { - fprintf_unfiltered (gdb_stdlog, "%s", pulongest (arg)); + gdb_printf (gdb_stdlog, "%s", pulongest (arg)); } static void @@ -1363,7 +1363,7 @@ gcc_cp_plugin::build_decl (const char *debug_decltype, const char *name, const char *filename, unsigned int line_number) { if (debug_compile_cplus_types) - fprintf_unfiltered (gdb_stdlog, "<%s> ", debug_decltype); + gdb_printf (gdb_stdlog, "<%s> ", debug_decltype); return build_decl (name, sym_kind, sym_type, substitution_name, address, filename, line_number); @@ -1375,7 +1375,7 @@ gcc_cp_plugin::start_class_type (const char *debug_name, gcc_decl typedecl, const char *filename, unsigned int line_number) { if (debug_compile_cplus_types) - fprintf_unfiltered (gdb_stdlog, "<%s> ", debug_name); + gdb_printf (gdb_stdlog, "<%s> ", debug_name); return start_class_type (typedecl, base_classes, filename, line_number); } @@ -1385,7 +1385,7 @@ gcc_cp_plugin::finish_class_type (const char *debug_name, unsigned long size_in_bytes) { if (debug_compile_cplus_types) - fprintf_unfiltered (gdb_stdlog, "<%s> ", debug_name); + gdb_printf (gdb_stdlog, "<%s> ", debug_name); return finish_class_type (size_in_bytes); } @@ -1394,7 +1394,7 @@ int gcc_cp_plugin::pop_binding_level (const char *debug_name) { if (debug_compile_cplus_types) - fprintf_unfiltered (gdb_stdlog, "<%s> ", debug_name); + gdb_printf (gdb_stdlog, "<%s> ", debug_name); return pop_binding_level (); } diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c index ba29d02..3ce0bfa 100644 --- a/gdb/compile/compile-loc2c.c +++ b/gdb/compile/compile-loc2c.c @@ -435,9 +435,9 @@ compute_stack_depth (enum bfd_endian byte_order, unsigned int addr_size, static void push (int indent, string_file *stream, ULONGEST l) { - fprintf_filtered (stream, - "%*s__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR ") %s;\n", - indent, "", hex_string (l)); + gdb_printf (stream, + "%*s__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR ") %s;\n", + indent, "", hex_string (l)); } /* Emit code to push an arbitrary expression. This works like @@ -451,13 +451,13 @@ pushf (int indent, string_file *stream, const char *format, ...) { va_list args; - fprintf_filtered (stream, "%*s__gdb_stack[__gdb_tos + 1] = ", indent, ""); + gdb_printf (stream, "%*s__gdb_stack[__gdb_tos + 1] = ", indent, ""); va_start (args, format); stream->vprintf (format, args); va_end (args); stream->puts (";\n"); - fprintf_filtered (stream, "%*s++__gdb_tos;\n", indent, ""); + gdb_printf (stream, "%*s++__gdb_tos;\n", indent, ""); } /* Emit code for a unary expression -- one which operates in-place on @@ -471,7 +471,7 @@ unary (int indent, string_file *stream, const char *format, ...) { va_list args; - fprintf_filtered (stream, "%*s__gdb_stack[__gdb_tos] = ", indent, ""); + gdb_printf (stream, "%*s__gdb_stack[__gdb_tos] = ", indent, ""); va_start (args, format); stream->vprintf (format, args); va_end (args); @@ -488,12 +488,12 @@ binary (int indent, string_file *stream, const char *format, ...) { va_list args; - fprintf_filtered (stream, "%*s__gdb_stack[__gdb_tos - 1] = ", indent, ""); + gdb_printf (stream, "%*s__gdb_stack[__gdb_tos - 1] = ", indent, ""); va_start (args, format); stream->vprintf (format, args); va_end (args); stream->puts (";\n"); - fprintf_filtered (stream, "%*s--__gdb_tos;\n", indent, ""); + gdb_printf (stream, "%*s--__gdb_tos;\n", indent, ""); } /* Print the name of a label given its "SCOPE", an arbitrary integer @@ -614,9 +614,9 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, ++scope; - fprintf_filtered (stream, "%*s__attribute__ ((unused)) %s %s;\n", - indent, "", type_name, result_name); - fprintf_filtered (stream, "%*s{\n", indent, ""); + gdb_printf (stream, "%*s__attribute__ ((unused)) %s %s;\n", + indent, "", type_name, result_name); + gdb_printf (stream, "%*s{\n", indent, ""); indent += 2; stack_depth = compute_stack_depth (byte_order, addr_size, @@ -652,19 +652,19 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, "compiled code."), sym->print_name ()); - fprintf_filtered (stream, "%*s%s = %s;\n", - indent, "", result_name, - core_addr_to_string (value_address (val))); - fprintf_filtered (stream, "%*s}\n", indent - 2, ""); + gdb_printf (stream, "%*s%s = %s;\n", + indent, "", result_name, + core_addr_to_string (value_address (val))); + gdb_printf (stream, "%*s}\n", indent - 2, ""); return; } - fprintf_filtered (stream, "%*s" GCC_UINTPTR " __gdb_stack[%d];\n", - indent, "", stack_depth); + gdb_printf (stream, "%*s" GCC_UINTPTR " __gdb_stack[%d];\n", + indent, "", stack_depth); if (need_tempvar) - fprintf_filtered (stream, "%*s" GCC_UINTPTR " __gdb_tmp;\n", indent, ""); - fprintf_filtered (stream, "%*sint __gdb_tos = -1;\n", indent, ""); + gdb_printf (stream, "%*s" GCC_UINTPTR " __gdb_tmp;\n", indent, ""); + gdb_printf (stream, "%*sint __gdb_tos = -1;\n", indent, ""); if (initial != NULL) pushf (indent, stream, "%s", core_addr_to_string (*initial)); @@ -684,8 +684,8 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, stream->printf ("/* %s */\n", get_DW_OP_name (op)); /* This is handy for debugging the generated code: - fprintf_filtered (stream, "if (__gdb_tos != %d) abort ();\n", - (int) info[op_ptr - base].depth - 1); + gdb_printf (stream, "if (__gdb_tos != %d) abort ();\n", + (int) info[op_ptr - base].depth - 1); */ ++op_ptr; @@ -923,7 +923,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, break; case DW_OP_drop: - fprintf_filtered (stream, "%*s--__gdb_tos;\n", indent, ""); + gdb_printf (stream, "%*s--__gdb_tos;\n", indent, ""); break; case DW_OP_pick: @@ -933,16 +933,16 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, break; case DW_OP_swap: - fprintf_filtered (stream, - "%*s__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n", - indent, ""); - fprintf_filtered (stream, - "%*s__gdb_stack[__gdb_tos - 1] = " - "__gdb_stack[__gdb_tos];\n", - indent, ""); - fprintf_filtered (stream, ("%*s__gdb_stack[__gdb_tos] = " - "__gdb_tmp;\n"), - indent, ""); + gdb_printf (stream, + "%*s__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n", + indent, ""); + gdb_printf (stream, + "%*s__gdb_stack[__gdb_tos - 1] = " + "__gdb_stack[__gdb_tos];\n", + indent, ""); + gdb_printf (stream, ("%*s__gdb_stack[__gdb_tos] = " + "__gdb_tmp;\n"), + indent, ""); break; case DW_OP_over: @@ -950,20 +950,20 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, break; case DW_OP_rot: - fprintf_filtered (stream, ("%*s__gdb_tmp = " - "__gdb_stack[__gdb_tos];\n"), - indent, ""); - fprintf_filtered (stream, - "%*s__gdb_stack[__gdb_tos] = " - "__gdb_stack[__gdb_tos - 1];\n", - indent, ""); - fprintf_filtered (stream, - "%*s__gdb_stack[__gdb_tos - 1] = " - "__gdb_stack[__gdb_tos -2];\n", - indent, ""); - fprintf_filtered (stream, "%*s__gdb_stack[__gdb_tos - 2] = " - "__gdb_tmp;\n", - indent, ""); + gdb_printf (stream, ("%*s__gdb_tmp = " + "__gdb_stack[__gdb_tos];\n"), + indent, ""); + gdb_printf (stream, + "%*s__gdb_stack[__gdb_tos] = " + "__gdb_stack[__gdb_tos - 1];\n", + indent, ""); + gdb_printf (stream, + "%*s__gdb_stack[__gdb_tos - 1] = " + "__gdb_stack[__gdb_tos -2];\n", + indent, ""); + gdb_printf (stream, "%*s__gdb_stack[__gdb_tos - 2] = " + "__gdb_tmp;\n", + indent, ""); break; case DW_OP_deref: @@ -984,11 +984,11 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, /* Cast to a pointer of the desired type, then dereference. */ - fprintf_filtered (stream, - "%*s__gdb_stack[__gdb_tos] = " - "*((__gdb_int_%s *) " - "__gdb_stack[__gdb_tos]);\n", - indent, "", mode); + gdb_printf (stream, + "%*s__gdb_stack[__gdb_tos] = " + "*((__gdb_int_%s *) " + "__gdb_stack[__gdb_tos]);\n", + indent, "", mode); } break; @@ -1110,7 +1110,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, case DW_OP_skip: offset = extract_signed_integer (op_ptr, 2, byte_order); op_ptr += 2; - fprintf_filtered (stream, "%*sgoto ", indent, ""); + gdb_printf (stream, "%*sgoto ", indent, ""); print_label (stream, scope, op_ptr + offset - base); stream->puts (";\n"); break; @@ -1118,10 +1118,10 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, case DW_OP_bra: offset = extract_signed_integer (op_ptr, 2, byte_order); op_ptr += 2; - fprintf_filtered (stream, - "%*sif ((( " GCC_INTPTR - ") __gdb_stack[__gdb_tos--]) != 0) goto ", - indent, ""); + gdb_printf (stream, + "%*sif ((( " GCC_INTPTR + ") __gdb_stack[__gdb_tos--]) != 0) goto ", + indent, ""); print_label (stream, scope, op_ptr + offset - base); stream->puts (";\n"); break; @@ -1134,9 +1134,9 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, } } - fprintf_filtered (stream, "%*s%s = __gdb_stack[__gdb_tos];\n", - indent, "", result_name); - fprintf_filtered (stream, "%*s}\n", indent - 2, ""); + gdb_printf (stream, "%*s%s = __gdb_stack[__gdb_tos];\n", + indent, "", result_name); + gdb_printf (stream, "%*s}\n", indent - 2, ""); } /* See compile.h. */ diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index 073f2fe..b62a841 100644 --- a/gdb/compile/compile-object-load.c +++ b/gdb/compile/compile-object-load.c @@ -126,13 +126,13 @@ setup_sections_data::setup_one_section (asection *sect) prot |= GDB_MMAP_PROT_EXEC; if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "module \"%s\" section \"%s\" size %s prot %u\n", - bfd_get_filename (m_bfd), - bfd_section_name (sect), - paddress (target_gdbarch (), - bfd_section_size (sect)), - prot); + gdb_printf (gdb_stdlog, + "module \"%s\" section \"%s\" size %s prot %u\n", + bfd_get_filename (m_bfd), + bfd_section_name (sect), + paddress (target_gdbarch (), + bfd_section_size (sect)), + prot); } else prot = -1; @@ -149,11 +149,11 @@ setup_sections_data::setup_one_section (asection *sect) m_last_prot); munmap_list.add (addr, m_last_size); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "allocated %s bytes at %s prot %u\n", - paddress (target_gdbarch (), m_last_size), - paddress (target_gdbarch (), addr), - m_last_prot); + gdb_printf (gdb_stdlog, + "allocated %s bytes at %s prot %u\n", + paddress (target_gdbarch (), m_last_size), + paddress (target_gdbarch (), addr), + m_last_prot); } else addr = 0; @@ -713,9 +713,9 @@ compile_object_load (const compile_file_names &file_names, if (strcmp (sym->name, "_GLOBAL_OFFSET_TABLE_") == 0) { if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "ELF symbol \"%s\" relocated to zero\n", - sym->name); + gdb_printf (gdb_stdlog, + "ELF symbol \"%s\" relocated to zero\n", + sym->name); /* It seems to be a GCC bug, with -mcmodel=large there should be no need for _GLOBAL_OFFSET_TABLE_. Together with -fPIE the data @@ -757,10 +757,10 @@ compile_object_load (const compile_file_names &file_names, sym->value = 0x8000; bfd_set_gp_value(abfd.get(), toc_fallback->vma); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "Connectiong ELF symbol \"%s\" to the .toc section (%s)\n", - sym->name, - paddress (target_gdbarch (), sym->value)); + gdb_printf (gdb_stdlog, + "Connectiong ELF symbol \"%s\" to the .toc section (%s)\n", + sym->name, + paddress (target_gdbarch (), sym->value)); continue; } @@ -773,20 +773,20 @@ compile_object_load (const compile_file_names &file_names, case mst_data: sym->value = BMSYMBOL_VALUE_ADDRESS (bmsym); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "ELF mst_text symbol \"%s\" relocated to %s\n", - sym->name, - paddress (target_gdbarch (), sym->value)); + gdb_printf (gdb_stdlog, + "ELF mst_text symbol \"%s\" relocated to %s\n", + sym->name, + paddress (target_gdbarch (), sym->value)); break; case mst_text_gnu_ifunc: sym->value = gnu_ifunc_resolve_addr (target_gdbarch (), BMSYMBOL_VALUE_ADDRESS (bmsym)); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "ELF mst_text_gnu_ifunc symbol \"%s\" " - "relocated to %s\n", - sym->name, - paddress (target_gdbarch (), sym->value)); + gdb_printf (gdb_stdlog, + "ELF mst_text_gnu_ifunc symbol \"%s\" " + "relocated to %s\n", + sym->name, + paddress (target_gdbarch (), sym->value)); break; default: warning (_("Could not find symbol \"%s\" " @@ -812,11 +812,11 @@ compile_object_load (const compile_file_names &file_names, gdb_assert (regs_addr != 0); setup_sections_data.munmap_list.add (regs_addr, TYPE_LENGTH (regs_type)); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "allocated %s bytes at %s for registers\n", - paddress (target_gdbarch (), - TYPE_LENGTH (regs_type)), - paddress (target_gdbarch (), regs_addr)); + gdb_printf (gdb_stdlog, + "allocated %s bytes at %s for registers\n", + paddress (target_gdbarch (), + TYPE_LENGTH (regs_type)), + paddress (target_gdbarch (), regs_addr)); store_regs (regs_type, regs_addr); } @@ -835,11 +835,11 @@ compile_object_load (const compile_file_names &file_names, setup_sections_data.munmap_list.add (out_value_addr, TYPE_LENGTH (out_value_type)); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, - "allocated %s bytes at %s for printed value\n", - paddress (target_gdbarch (), - TYPE_LENGTH (out_value_type)), - paddress (target_gdbarch (), out_value_addr)); + gdb_printf (gdb_stdlog, + "allocated %s bytes at %s for printed value\n", + paddress (target_gdbarch (), + TYPE_LENGTH (out_value_type)), + paddress (target_gdbarch (), out_value_addr)); } compile_module_up retval (new struct compile_module); diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 42df80e..7983d1d 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -233,7 +233,7 @@ static void show_compile_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Compile debugging is %s.\n"), value); + gdb_printf (file, _("Compile debugging is %s.\n"), value); } @@ -530,9 +530,9 @@ static void show_compile_args (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Compile command command-line arguments " - "are \"%s\".\n"), - value); + gdb_printf (file, _("Compile command command-line arguments " + "are \"%s\".\n"), + value); } /* String for 'set compile-gcc' and 'show compile-gcc'. */ @@ -544,8 +544,8 @@ static void show_compile_gcc (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Compile command GCC driver filename is \"%s\".\n"), - value); + gdb_printf (file, _("Compile command GCC driver filename is \"%s\".\n"), + value); } /* Return DW_AT_producer parsed for get_selected_frame () (if any). @@ -708,7 +708,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string, = current_language->compute_program (compiler.get (), input, gdbarch, expr_block, expr_pc); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, "debug output:\n\n%s", code.c_str ()); + gdb_printf (gdb_stdlog, "debug output:\n\n%s", code.c_str ()); compiler->set_verbose (compile_debug); @@ -747,10 +747,10 @@ compile_to_object (struct command_line *cmd, const char *cmd_string, { int argi; - fprintf_unfiltered (gdb_stdlog, "Passing %d compiler options:\n", argc); + gdb_printf (gdb_stdlog, "Passing %d compiler options:\n", argc); for (argi = 0; argi < argc; argi++) - fprintf_unfiltered (gdb_stdlog, "Compiler option %d: <%s>\n", - argi, argv[argi]); + gdb_printf (gdb_stdlog, "Compiler option %d: <%s>\n", + argi, argv[argi]); } compile_file_names fnames = get_new_file_names (); @@ -769,8 +769,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string, } if (compile_debug) - fprintf_unfiltered (gdb_stdlog, "source file produced: %s\n\n", - fnames.source_file ()); + gdb_printf (gdb_stdlog, "source file produced: %s\n\n", + fnames.source_file ()); /* If we don't do this, then GDB simply exits when the compiler dies. */ @@ -783,8 +783,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string, error (_("Compilation failed.")); if (compile_debug) - fprintf_unfiltered (gdb_stdlog, "object file produced: %s\n\n", - fnames.object_file ()); + gdb_printf (gdb_stdlog, "object file produced: %s\n\n", + fnames.object_file ()); /* Keep the source file. */ source_remover->keep (); diff --git a/gdb/complaints.c b/gdb/complaints.c index b1757d4..122f2c2 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -70,9 +70,9 @@ static void complaints_show_value (struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, _("Max number of complaints about incorrect" - " symbols is %s.\n"), - value); + gdb_printf (file, _("Max number of complaints about incorrect" + " symbols is %s.\n"), + value); } #if GDB_SELF_TEST diff --git a/gdb/copying.awk b/gdb/copying.awk index 702a6b4..bbeb266 100644 --- a/gdb/copying.awk +++ b/gdb/copying.awk @@ -21,11 +21,11 @@ BEGIN { NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ { if ($0 ~ //) { - printf " printf_filtered (\"\\n\");\n"; + printf " gdb_printf (\"\\n\");\n"; } else if ($0 !~ /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/) { - printf " printf_filtered (\""; + printf " gdb_printf (\""; for (i = 1; i < NF; i++) printf "%s\\\"", $i; printf "%s\\n\");\n", $NF; @@ -41,7 +41,7 @@ NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ { /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{ if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/)) { - printf " printf_filtered (\""; + printf " gdb_printf (\""; for (i = 1; i < NF; i++) printf "%s\\\"", $i; printf "%s\\n\");\n", $NF; diff --git a/gdb/copying.c b/gdb/copying.c index 6318345..a66a55b 100644 --- a/gdb/copying.c +++ b/gdb/copying.c @@ -13,631 +13,631 @@ static void show_warranty_command (const char *, int); static void show_copying_command (const char *ignore, int from_tty) { - printf_filtered (" GNU GENERAL PUBLIC LICENSE\n"); - printf_filtered (" Version 3, 29 June 2007\n"); - printf_filtered ("\n"); - printf_filtered (" Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n"); - printf_filtered (" Everyone is permitted to copy and distribute verbatim copies\n"); - printf_filtered (" of this license document, but changing it is not allowed.\n"); - printf_filtered ("\n"); - printf_filtered (" Preamble\n"); - printf_filtered ("\n"); - printf_filtered (" The GNU General Public License is a free, copyleft license for\n"); - printf_filtered ("software and other kinds of works.\n"); - printf_filtered ("\n"); - printf_filtered (" The licenses for most software and other practical works are designed\n"); - printf_filtered ("to take away your freedom to share and change the works. By contrast,\n"); - printf_filtered ("the GNU General Public License is intended to guarantee your freedom to\n"); - printf_filtered ("share and change all versions of a program--to make sure it remains free\n"); - printf_filtered ("software for all its users. We, the Free Software Foundation, use the\n"); - printf_filtered ("GNU General Public License for most of our software; it applies also to\n"); - printf_filtered ("any other work released this way by its authors. You can apply it to\n"); - printf_filtered ("your programs, too.\n"); - printf_filtered ("\n"); - printf_filtered (" When we speak of free software, we are referring to freedom, not\n"); - printf_filtered ("price. Our General Public Licenses are designed to make sure that you\n"); - printf_filtered ("have the freedom to distribute copies of free software (and charge for\n"); - printf_filtered ("them if you wish), that you receive source code or can get it if you\n"); - printf_filtered ("want it, that you can change the software or use pieces of it in new\n"); - printf_filtered ("free programs, and that you know you can do these things.\n"); - printf_filtered ("\n"); - printf_filtered (" To protect your rights, we need to prevent others from denying you\n"); - printf_filtered ("these rights or asking you to surrender the rights. Therefore, you have\n"); - printf_filtered ("certain responsibilities if you distribute copies of the software, or if\n"); - printf_filtered ("you modify it: responsibilities to respect the freedom of others.\n"); - printf_filtered ("\n"); - printf_filtered (" For example, if you distribute copies of such a program, whether\n"); - printf_filtered ("gratis or for a fee, you must pass on to the recipients the same\n"); - printf_filtered ("freedoms that you received. You must make sure that they, too, receive\n"); - printf_filtered ("or can get the source code. And you must show them these terms so they\n"); - printf_filtered ("know their rights.\n"); - printf_filtered ("\n"); - printf_filtered (" Developers that use the GNU GPL protect your rights with two steps:\n"); - printf_filtered ("(1) assert copyright on the software, and (2) offer you this License\n"); - printf_filtered ("giving you legal permission to copy, distribute and/or modify it.\n"); - printf_filtered ("\n"); - printf_filtered (" For the developers' and authors' protection, the GPL clearly explains\n"); - printf_filtered ("that there is no warranty for this free software. For both users' and\n"); - printf_filtered ("authors' sake, the GPL requires that modified versions be marked as\n"); - printf_filtered ("changed, so that their problems will not be attributed erroneously to\n"); - printf_filtered ("authors of previous versions.\n"); - printf_filtered ("\n"); - printf_filtered (" Some devices are designed to deny users access to install or run\n"); - printf_filtered ("modified versions of the software inside them, although the manufacturer\n"); - printf_filtered ("can do so. This is fundamentally incompatible with the aim of\n"); - printf_filtered ("protecting users' freedom to change the software. The systematic\n"); - printf_filtered ("pattern of such abuse occurs in the area of products for individuals to\n"); - printf_filtered ("use, which is precisely where it is most unacceptable. Therefore, we\n"); - printf_filtered ("have designed this version of the GPL to prohibit the practice for those\n"); - printf_filtered ("products. If such problems arise substantially in other domains, we\n"); - printf_filtered ("stand ready to extend this provision to those domains in future versions\n"); - printf_filtered ("of the GPL, as needed to protect the freedom of users.\n"); - printf_filtered ("\n"); - printf_filtered (" Finally, every program is threatened constantly by software patents.\n"); - printf_filtered ("States should not allow patents to restrict development and use of\n"); - printf_filtered ("software on general-purpose computers, but in those that do, we wish to\n"); - printf_filtered ("avoid the special danger that patents applied to a free program could\n"); - printf_filtered ("make it effectively proprietary. To prevent this, the GPL assures that\n"); - printf_filtered ("patents cannot be used to render the program non-free.\n"); - printf_filtered ("\n"); - printf_filtered (" The precise terms and conditions for copying, distribution and\n"); - printf_filtered ("modification follow.\n"); - printf_filtered ("\n"); - printf_filtered (" TERMS AND CONDITIONS\n"); - printf_filtered ("\n"); - printf_filtered (" 0. Definitions.\n"); - printf_filtered ("\n"); - printf_filtered (" \"This License\" refers to version 3 of the GNU General Public License.\n"); - printf_filtered ("\n"); - printf_filtered (" \"Copyright\" also means copyright-like laws that apply to other kinds of\n"); - printf_filtered ("works, such as semiconductor masks.\n"); - printf_filtered ("\n"); - printf_filtered (" \"The Program\" refers to any copyrightable work licensed under this\n"); - printf_filtered ("License. Each licensee is addressed as \"you\". \"Licensees\" and\n"); - printf_filtered ("\"recipients\" may be individuals or organizations.\n"); - printf_filtered ("\n"); - printf_filtered (" To \"modify\" a work means to copy from or adapt all or part of the work\n"); - printf_filtered ("in a fashion requiring copyright permission, other than the making of an\n"); - printf_filtered ("exact copy. The resulting work is called a \"modified version\" of the\n"); - printf_filtered ("earlier work or a work \"based on\" the earlier work.\n"); - printf_filtered ("\n"); - printf_filtered (" A \"covered work\" means either the unmodified Program or a work based\n"); - printf_filtered ("on the Program.\n"); - printf_filtered ("\n"); - printf_filtered (" To \"propagate\" a work means to do anything with it that, without\n"); - printf_filtered ("permission, would make you directly or secondarily liable for\n"); - printf_filtered ("infringement under applicable copyright law, except executing it on a\n"); - printf_filtered ("computer or modifying a private copy. Propagation includes copying,\n"); - printf_filtered ("distribution (with or without modification), making available to the\n"); - printf_filtered ("public, and in some countries other activities as well.\n"); - printf_filtered ("\n"); - printf_filtered (" To \"convey\" a work means any kind of propagation that enables other\n"); - printf_filtered ("parties to make or receive copies. Mere interaction with a user through\n"); - printf_filtered ("a computer network, with no transfer of a copy, is not conveying.\n"); - printf_filtered ("\n"); - printf_filtered (" An interactive user interface displays \"Appropriate Legal Notices\"\n"); - printf_filtered ("to the extent that it includes a convenient and prominently visible\n"); - printf_filtered ("feature that (1) displays an appropriate copyright notice, and (2)\n"); - printf_filtered ("tells the user that there is no warranty for the work (except to the\n"); - printf_filtered ("extent that warranties are provided), that licensees may convey the\n"); - printf_filtered ("work under this License, and how to view a copy of this License. If\n"); - printf_filtered ("the interface presents a list of user commands or options, such as a\n"); - printf_filtered ("menu, a prominent item in the list meets this criterion.\n"); - printf_filtered ("\n"); - printf_filtered (" 1. Source Code.\n"); - printf_filtered ("\n"); - printf_filtered (" The \"source code\" for a work means the preferred form of the work\n"); - printf_filtered ("for making modifications to it. \"Object code\" means any non-source\n"); - printf_filtered ("form of a work.\n"); - printf_filtered ("\n"); - printf_filtered (" A \"Standard Interface\" means an interface that either is an official\n"); - printf_filtered ("standard defined by a recognized standards body, or, in the case of\n"); - printf_filtered ("interfaces specified for a particular programming language, one that\n"); - printf_filtered ("is widely used among developers working in that language.\n"); - printf_filtered ("\n"); - printf_filtered (" The \"System Libraries\" of an executable work include anything, other\n"); - printf_filtered ("than the work as a whole, that (a) is included in the normal form of\n"); - printf_filtered ("packaging a Major Component, but which is not part of that Major\n"); - printf_filtered ("Component, and (b) serves only to enable use of the work with that\n"); - printf_filtered ("Major Component, or to implement a Standard Interface for which an\n"); - printf_filtered ("implementation is available to the public in source code form. A\n"); - printf_filtered ("\"Major Component\", in this context, means a major essential component\n"); - printf_filtered ("(kernel, window system, and so on) of the specific operating system\n"); - printf_filtered ("(if any) on which the executable work runs, or a compiler used to\n"); - printf_filtered ("produce the work, or an object code interpreter used to run it.\n"); - printf_filtered ("\n"); - printf_filtered (" The \"Corresponding Source\" for a work in object code form means all\n"); - printf_filtered ("the source code needed to generate, install, and (for an executable\n"); - printf_filtered ("work) run the object code and to modify the work, including scripts to\n"); - printf_filtered ("control those activities. However, it does not include the work's\n"); - printf_filtered ("System Libraries, or general-purpose tools or generally available free\n"); - printf_filtered ("programs which are used unmodified in performing those activities but\n"); - printf_filtered ("which are not part of the work. For example, Corresponding Source\n"); - printf_filtered ("includes interface definition files associated with source files for\n"); - printf_filtered ("the work, and the source code for shared libraries and dynamically\n"); - printf_filtered ("linked subprograms that the work is specifically designed to require,\n"); - printf_filtered ("such as by intimate data communication or control flow between those\n"); - printf_filtered ("subprograms and other parts of the work.\n"); - printf_filtered ("\n"); - printf_filtered (" The Corresponding Source need not include anything that users\n"); - printf_filtered ("can regenerate automatically from other parts of the Corresponding\n"); - printf_filtered ("Source.\n"); - printf_filtered ("\n"); - printf_filtered (" The Corresponding Source for a work in source code form is that\n"); - printf_filtered ("same work.\n"); - printf_filtered ("\n"); - printf_filtered (" 2. Basic Permissions.\n"); - printf_filtered ("\n"); - printf_filtered (" All rights granted under this License are granted for the term of\n"); - printf_filtered ("copyright on the Program, and are irrevocable provided the stated\n"); - printf_filtered ("conditions are met. This License explicitly affirms your unlimited\n"); - printf_filtered ("permission to run the unmodified Program. The output from running a\n"); - printf_filtered ("covered work is covered by this License only if the output, given its\n"); - printf_filtered ("content, constitutes a covered work. This License acknowledges your\n"); - printf_filtered ("rights of fair use or other equivalent, as provided by copyright law.\n"); - printf_filtered ("\n"); - printf_filtered (" You may make, run and propagate covered works that you do not\n"); - printf_filtered ("convey, without conditions so long as your license otherwise remains\n"); - printf_filtered ("in force. You may convey covered works to others for the sole purpose\n"); - printf_filtered ("of having them make modifications exclusively for you, or provide you\n"); - printf_filtered ("with facilities for running those works, provided that you comply with\n"); - printf_filtered ("the terms of this License in conveying all material for which you do\n"); - printf_filtered ("not control copyright. Those thus making or running the covered works\n"); - printf_filtered ("for you must do so exclusively on your behalf, under your direction\n"); - printf_filtered ("and control, on terms that prohibit them from making any copies of\n"); - printf_filtered ("your copyrighted material outside their relationship with you.\n"); - printf_filtered ("\n"); - printf_filtered (" Conveying under any other circumstances is permitted solely under\n"); - printf_filtered ("the conditions stated below. Sublicensing is not allowed; section 10\n"); - printf_filtered ("makes it unnecessary.\n"); - printf_filtered ("\n"); - printf_filtered (" 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n"); - printf_filtered ("\n"); - printf_filtered (" No covered work shall be deemed part of an effective technological\n"); - printf_filtered ("measure under any applicable law fulfilling obligations under article\n"); - printf_filtered ("11 of the WIPO copyright treaty adopted on 20 December 1996, or\n"); - printf_filtered ("similar laws prohibiting or restricting circumvention of such\n"); - printf_filtered ("measures.\n"); - printf_filtered ("\n"); - printf_filtered (" When you convey a covered work, you waive any legal power to forbid\n"); - printf_filtered ("circumvention of technological measures to the extent such circumvention\n"); - printf_filtered ("is effected by exercising rights under this License with respect to\n"); - printf_filtered ("the covered work, and you disclaim any intention to limit operation or\n"); - printf_filtered ("modification of the work as a means of enforcing, against the work's\n"); - printf_filtered ("users, your or third parties' legal rights to forbid circumvention of\n"); - printf_filtered ("technological measures.\n"); - printf_filtered ("\n"); - printf_filtered (" 4. Conveying Verbatim Copies.\n"); - printf_filtered ("\n"); - printf_filtered (" You may convey verbatim copies of the Program's source code as you\n"); - printf_filtered ("receive it, in any medium, provided that you conspicuously and\n"); - printf_filtered ("appropriately publish on each copy an appropriate copyright notice;\n"); - printf_filtered ("keep intact all notices stating that this License and any\n"); - printf_filtered ("non-permissive terms added in accord with section 7 apply to the code;\n"); - printf_filtered ("keep intact all notices of the absence of any warranty; and give all\n"); - printf_filtered ("recipients a copy of this License along with the Program.\n"); - printf_filtered ("\n"); - printf_filtered (" You may charge any price or no price for each copy that you convey,\n"); - printf_filtered ("and you may offer support or warranty protection for a fee.\n"); - printf_filtered ("\n"); - printf_filtered (" 5. Conveying Modified Source Versions.\n"); - printf_filtered ("\n"); - printf_filtered (" You may convey a work based on the Program, or the modifications to\n"); - printf_filtered ("produce it from the Program, in the form of source code under the\n"); - printf_filtered ("terms of section 4, provided that you also meet all of these conditions:\n"); - printf_filtered ("\n"); - printf_filtered (" a) The work must carry prominent notices stating that you modified\n"); - printf_filtered (" it, and giving a relevant date.\n"); - printf_filtered ("\n"); - printf_filtered (" b) The work must carry prominent notices stating that it is\n"); - printf_filtered (" released under this License and any conditions added under section\n"); - printf_filtered (" 7. This requirement modifies the requirement in section 4 to\n"); - printf_filtered (" \"keep intact all notices\".\n"); - printf_filtered ("\n"); - printf_filtered (" c) You must license the entire work, as a whole, under this\n"); - printf_filtered (" License to anyone who comes into possession of a copy. This\n"); - printf_filtered (" License will therefore apply, along with any applicable section 7\n"); - printf_filtered (" additional terms, to the whole of the work, and all its parts,\n"); - printf_filtered (" regardless of how they are packaged. This License gives no\n"); - printf_filtered (" permission to license the work in any other way, but it does not\n"); - printf_filtered (" invalidate such permission if you have separately received it.\n"); - printf_filtered ("\n"); - printf_filtered (" d) If the work has interactive user interfaces, each must display\n"); - printf_filtered (" Appropriate Legal Notices; however, if the Program has interactive\n"); - printf_filtered (" interfaces that do not display Appropriate Legal Notices, your\n"); - printf_filtered (" work need not make them do so.\n"); - printf_filtered ("\n"); - printf_filtered (" A compilation of a covered work with other separate and independent\n"); - printf_filtered ("works, which are not by their nature extensions of the covered work,\n"); - printf_filtered ("and which are not combined with it such as to form a larger program,\n"); - printf_filtered ("in or on a volume of a storage or distribution medium, is called an\n"); - printf_filtered ("\"aggregate\" if the compilation and its resulting copyright are not\n"); - printf_filtered ("used to limit the access or legal rights of the compilation's users\n"); - printf_filtered ("beyond what the individual works permit. Inclusion of a covered work\n"); - printf_filtered ("in an aggregate does not cause this License to apply to the other\n"); - printf_filtered ("parts of the aggregate.\n"); - printf_filtered ("\n"); - printf_filtered (" 6. Conveying Non-Source Forms.\n"); - printf_filtered ("\n"); - printf_filtered (" You may convey a covered work in object code form under the terms\n"); - printf_filtered ("of sections 4 and 5, provided that you also convey the\n"); - printf_filtered ("machine-readable Corresponding Source under the terms of this License,\n"); - printf_filtered ("in one of these ways:\n"); - printf_filtered ("\n"); - printf_filtered (" a) Convey the object code in, or embodied in, a physical product\n"); - printf_filtered (" (including a physical distribution medium), accompanied by the\n"); - printf_filtered (" Corresponding Source fixed on a durable physical medium\n"); - printf_filtered (" customarily used for software interchange.\n"); - printf_filtered ("\n"); - printf_filtered (" b) Convey the object code in, or embodied in, a physical product\n"); - printf_filtered (" (including a physical distribution medium), accompanied by a\n"); - printf_filtered (" written offer, valid for at least three years and valid for as\n"); - printf_filtered (" long as you offer spare parts or customer support for that product\n"); - printf_filtered (" model, to give anyone who possesses the object code either (1) a\n"); - printf_filtered (" copy of the Corresponding Source for all the software in the\n"); - printf_filtered (" product that is covered by this License, on a durable physical\n"); - printf_filtered (" medium customarily used for software interchange, for a price no\n"); - printf_filtered (" more than your reasonable cost of physically performing this\n"); - printf_filtered (" conveying of source, or (2) access to copy the\n"); - printf_filtered (" Corresponding Source from a network server at no charge.\n"); - printf_filtered ("\n"); - printf_filtered (" c) Convey individual copies of the object code with a copy of the\n"); - printf_filtered (" written offer to provide the Corresponding Source. This\n"); - printf_filtered (" alternative is allowed only occasionally and noncommercially, and\n"); - printf_filtered (" only if you received the object code with such an offer, in accord\n"); - printf_filtered (" with subsection 6b.\n"); - printf_filtered ("\n"); - printf_filtered (" d) Convey the object code by offering access from a designated\n"); - printf_filtered (" place (gratis or for a charge), and offer equivalent access to the\n"); - printf_filtered (" Corresponding Source in the same way through the same place at no\n"); - printf_filtered (" further charge. You need not require recipients to copy the\n"); - printf_filtered (" Corresponding Source along with the object code. If the place to\n"); - printf_filtered (" copy the object code is a network server, the Corresponding Source\n"); - printf_filtered (" may be on a different server (operated by you or a third party)\n"); - printf_filtered (" that supports equivalent copying facilities, provided you maintain\n"); - printf_filtered (" clear directions next to the object code saying where to find the\n"); - printf_filtered (" Corresponding Source. Regardless of what server hosts the\n"); - printf_filtered (" Corresponding Source, you remain obligated to ensure that it is\n"); - printf_filtered (" available for as long as needed to satisfy these requirements.\n"); - printf_filtered ("\n"); - printf_filtered (" e) Convey the object code using peer-to-peer transmission, provided\n"); - printf_filtered (" you inform other peers where the object code and Corresponding\n"); - printf_filtered (" Source of the work are being offered to the general public at no\n"); - printf_filtered (" charge under subsection 6d.\n"); - printf_filtered ("\n"); - printf_filtered (" A separable portion of the object code, whose source code is excluded\n"); - printf_filtered ("from the Corresponding Source as a System Library, need not be\n"); - printf_filtered ("included in conveying the object code work.\n"); - printf_filtered ("\n"); - printf_filtered (" A \"User Product\" is either (1) a \"consumer product\", which means any\n"); - printf_filtered ("tangible personal property which is normally used for personal, family,\n"); - printf_filtered ("or household purposes, or (2) anything designed or sold for incorporation\n"); - printf_filtered ("into a dwelling. In determining whether a product is a consumer product,\n"); - printf_filtered ("doubtful cases shall be resolved in favor of coverage. For a particular\n"); - printf_filtered ("product received by a particular user, \"normally used\" refers to a\n"); - printf_filtered ("typical or common use of that class of product, regardless of the status\n"); - printf_filtered ("of the particular user or of the way in which the particular user\n"); - printf_filtered ("actually uses, or expects or is expected to use, the product. A product\n"); - printf_filtered ("is a consumer product regardless of whether the product has substantial\n"); - printf_filtered ("commercial, industrial or non-consumer uses, unless such uses represent\n"); - printf_filtered ("the only significant mode of use of the product.\n"); - printf_filtered ("\n"); - printf_filtered (" \"Installation Information\" for a User Product means any methods,\n"); - printf_filtered ("procedures, authorization keys, or other information required to install\n"); - printf_filtered ("and execute modified versions of a covered work in that User Product from\n"); - printf_filtered ("a modified version of its Corresponding Source. The information must\n"); - printf_filtered ("suffice to ensure that the continued functioning of the modified object\n"); - printf_filtered ("code is in no case prevented or interfered with solely because\n"); - printf_filtered ("modification has been made.\n"); - printf_filtered ("\n"); - printf_filtered (" If you convey an object code work under this section in, or with, or\n"); - printf_filtered ("specifically for use in, a User Product, and the conveying occurs as\n"); - printf_filtered ("part of a transaction in which the right of possession and use of the\n"); - printf_filtered ("User Product is transferred to the recipient in perpetuity or for a\n"); - printf_filtered ("fixed term (regardless of how the transaction is characterized), the\n"); - printf_filtered ("Corresponding Source conveyed under this section must be accompanied\n"); - printf_filtered ("by the Installation Information. But this requirement does not apply\n"); - printf_filtered ("if neither you nor any third party retains the ability to install\n"); - printf_filtered ("modified object code on the User Product (for example, the work has\n"); - printf_filtered ("been installed in ROM).\n"); - printf_filtered ("\n"); - printf_filtered (" The requirement to provide Installation Information does not include a\n"); - printf_filtered ("requirement to continue to provide support service, warranty, or updates\n"); - printf_filtered ("for a work that has been modified or installed by the recipient, or for\n"); - printf_filtered ("the User Product in which it has been modified or installed. Access to a\n"); - printf_filtered ("network may be denied when the modification itself materially and\n"); - printf_filtered ("adversely affects the operation of the network or violates the rules and\n"); - printf_filtered ("protocols for communication across the network.\n"); - printf_filtered ("\n"); - printf_filtered (" Corresponding Source conveyed, and Installation Information provided,\n"); - printf_filtered ("in accord with this section must be in a format that is publicly\n"); - printf_filtered ("documented (and with an implementation available to the public in\n"); - printf_filtered ("source code form), and must require no special password or key for\n"); - printf_filtered ("unpacking, reading or copying.\n"); - printf_filtered ("\n"); - printf_filtered (" 7. Additional Terms.\n"); - printf_filtered ("\n"); - printf_filtered (" \"Additional permissions\" are terms that supplement the terms of this\n"); - printf_filtered ("License by making exceptions from one or more of its conditions.\n"); - printf_filtered ("Additional permissions that are applicable to the entire Program shall\n"); - printf_filtered ("be treated as though they were included in this License, to the extent\n"); - printf_filtered ("that they are valid under applicable law. If additional permissions\n"); - printf_filtered ("apply only to part of the Program, that part may be used separately\n"); - printf_filtered ("under those permissions, but the entire Program remains governed by\n"); - printf_filtered ("this License without regard to the additional permissions.\n"); - printf_filtered ("\n"); - printf_filtered (" When you convey a copy of a covered work, you may at your option\n"); - printf_filtered ("remove any additional permissions from that copy, or from any part of\n"); - printf_filtered ("it. (Additional permissions may be written to require their own\n"); - printf_filtered ("removal in certain cases when you modify the work.) You may place\n"); - printf_filtered ("additional permissions on material, added by you to a covered work,\n"); - printf_filtered ("for which you have or can give appropriate copyright permission.\n"); - printf_filtered ("\n"); - printf_filtered (" Notwithstanding any other provision of this License, for material you\n"); - printf_filtered ("add to a covered work, you may (if authorized by the copyright holders of\n"); - printf_filtered ("that material) supplement the terms of this License with terms:\n"); - printf_filtered ("\n"); - printf_filtered (" a) Disclaiming warranty or limiting liability differently from the\n"); - printf_filtered (" terms of sections 15 and 16 of this License; or\n"); - printf_filtered ("\n"); - printf_filtered (" b) Requiring preservation of specified reasonable legal notices or\n"); - printf_filtered (" author attributions in that material or in the Appropriate Legal\n"); - printf_filtered (" Notices displayed by works containing it; or\n"); - printf_filtered ("\n"); - printf_filtered (" c) Prohibiting misrepresentation of the origin of that material, or\n"); - printf_filtered (" requiring that modified versions of such material be marked in\n"); - printf_filtered (" reasonable ways as different from the original version; or\n"); - printf_filtered ("\n"); - printf_filtered (" d) Limiting the use for publicity purposes of names of licensors or\n"); - printf_filtered (" authors of the material; or\n"); - printf_filtered ("\n"); - printf_filtered (" e) Declining to grant rights under trademark law for use of some\n"); - printf_filtered (" trade names, trademarks, or service marks; or\n"); - printf_filtered ("\n"); - printf_filtered (" f) Requiring indemnification of licensors and authors of that\n"); - printf_filtered (" material by anyone who conveys the material (or modified versions of\n"); - printf_filtered (" it) with contractual assumptions of liability to the recipient, for\n"); - printf_filtered (" any liability that these contractual assumptions directly impose on\n"); - printf_filtered (" those licensors and authors.\n"); - printf_filtered ("\n"); - printf_filtered (" All other non-permissive additional terms are considered \"further\n"); - printf_filtered ("restrictions\" within the meaning of section 10. If the Program as you\n"); - printf_filtered ("received it, or any part of it, contains a notice stating that it is\n"); - printf_filtered ("governed by this License along with a term that is a further\n"); - printf_filtered ("restriction, you may remove that term. If a license document contains\n"); - printf_filtered ("a further restriction but permits relicensing or conveying under this\n"); - printf_filtered ("License, you may add to a covered work material governed by the terms\n"); - printf_filtered ("of that license document, provided that the further restriction does\n"); - printf_filtered ("not survive such relicensing or conveying.\n"); - printf_filtered ("\n"); - printf_filtered (" If you add terms to a covered work in accord with this section, you\n"); - printf_filtered ("must place, in the relevant source files, a statement of the\n"); - printf_filtered ("additional terms that apply to those files, or a notice indicating\n"); - printf_filtered ("where to find the applicable terms.\n"); - printf_filtered ("\n"); - printf_filtered (" Additional terms, permissive or non-permissive, may be stated in the\n"); - printf_filtered ("form of a separately written license, or stated as exceptions;\n"); - printf_filtered ("the above requirements apply either way.\n"); - printf_filtered ("\n"); - printf_filtered (" 8. Termination.\n"); - printf_filtered ("\n"); - printf_filtered (" You may not propagate or modify a covered work except as expressly\n"); - printf_filtered ("provided under this License. Any attempt otherwise to propagate or\n"); - printf_filtered ("modify it is void, and will automatically terminate your rights under\n"); - printf_filtered ("this License (including any patent licenses granted under the third\n"); - printf_filtered ("paragraph of section 11).\n"); - printf_filtered ("\n"); - printf_filtered (" However, if you cease all violation of this License, then your\n"); - printf_filtered ("license from a particular copyright holder is reinstated (a)\n"); - printf_filtered ("provisionally, unless and until the copyright holder explicitly and\n"); - printf_filtered ("finally terminates your license, and (b) permanently, if the copyright\n"); - printf_filtered ("holder fails to notify you of the violation by some reasonable means\n"); - printf_filtered ("prior to 60 days after the cessation.\n"); - printf_filtered ("\n"); - printf_filtered (" Moreover, your license from a particular copyright holder is\n"); - printf_filtered ("reinstated permanently if the copyright holder notifies you of the\n"); - printf_filtered ("violation by some reasonable means, this is the first time you have\n"); - printf_filtered ("received notice of violation of this License (for any work) from that\n"); - printf_filtered ("copyright holder, and you cure the violation prior to 30 days after\n"); - printf_filtered ("your receipt of the notice.\n"); - printf_filtered ("\n"); - printf_filtered (" Termination of your rights under this section does not terminate the\n"); - printf_filtered ("licenses of parties who have received copies or rights from you under\n"); - printf_filtered ("this License. If your rights have been terminated and not permanently\n"); - printf_filtered ("reinstated, you do not qualify to receive new licenses for the same\n"); - printf_filtered ("material under section 10.\n"); - printf_filtered ("\n"); - printf_filtered (" 9. Acceptance Not Required for Having Copies.\n"); - printf_filtered ("\n"); - printf_filtered (" You are not required to accept this License in order to receive or\n"); - printf_filtered ("run a copy of the Program. Ancillary propagation of a covered work\n"); - printf_filtered ("occurring solely as a consequence of using peer-to-peer transmission\n"); - printf_filtered ("to receive a copy likewise does not require acceptance. However,\n"); - printf_filtered ("nothing other than this License grants you permission to propagate or\n"); - printf_filtered ("modify any covered work. These actions infringe copyright if you do\n"); - printf_filtered ("not accept this License. Therefore, by modifying or propagating a\n"); - printf_filtered ("covered work, you indicate your acceptance of this License to do so.\n"); - printf_filtered ("\n"); - printf_filtered (" 10. Automatic Licensing of Downstream Recipients.\n"); - printf_filtered ("\n"); - printf_filtered (" Each time you convey a covered work, the recipient automatically\n"); - printf_filtered ("receives a license from the original licensors, to run, modify and\n"); - printf_filtered ("propagate that work, subject to this License. You are not responsible\n"); - printf_filtered ("for enforcing compliance by third parties with this License.\n"); - printf_filtered ("\n"); - printf_filtered (" An \"entity transaction\" is a transaction transferring control of an\n"); - printf_filtered ("organization, or substantially all assets of one, or subdividing an\n"); - printf_filtered ("organization, or merging organizations. If propagation of a covered\n"); - printf_filtered ("work results from an entity transaction, each party to that\n"); - printf_filtered ("transaction who receives a copy of the work also receives whatever\n"); - printf_filtered ("licenses to the work the party's predecessor in interest had or could\n"); - printf_filtered ("give under the previous paragraph, plus a right to possession of the\n"); - printf_filtered ("Corresponding Source of the work from the predecessor in interest, if\n"); - printf_filtered ("the predecessor has it or can get it with reasonable efforts.\n"); - printf_filtered ("\n"); - printf_filtered (" You may not impose any further restrictions on the exercise of the\n"); - printf_filtered ("rights granted or affirmed under this License. For example, you may\n"); - printf_filtered ("not impose a license fee, royalty, or other charge for exercise of\n"); - printf_filtered ("rights granted under this License, and you may not initiate litigation\n"); - printf_filtered ("(including a cross-claim or counterclaim in a lawsuit) alleging that\n"); - printf_filtered ("any patent claim is infringed by making, using, selling, offering for\n"); - printf_filtered ("sale, or importing the Program or any portion of it.\n"); - printf_filtered ("\n"); - printf_filtered (" 11. Patents.\n"); - printf_filtered ("\n"); - printf_filtered (" A \"contributor\" is a copyright holder who authorizes use under this\n"); - printf_filtered ("License of the Program or a work on which the Program is based. The\n"); - printf_filtered ("work thus licensed is called the contributor's \"contributor version\".\n"); - printf_filtered ("\n"); - printf_filtered (" A contributor's \"essential patent claims\" are all patent claims\n"); - printf_filtered ("owned or controlled by the contributor, whether already acquired or\n"); - printf_filtered ("hereafter acquired, that would be infringed by some manner, permitted\n"); - printf_filtered ("by this License, of making, using, or selling its contributor version,\n"); - printf_filtered ("but do not include claims that would be infringed only as a\n"); - printf_filtered ("consequence of further modification of the contributor version. For\n"); - printf_filtered ("purposes of this definition, \"control\" includes the right to grant\n"); - printf_filtered ("patent sublicenses in a manner consistent with the requirements of\n"); - printf_filtered ("this License.\n"); - printf_filtered ("\n"); - printf_filtered (" Each contributor grants you a non-exclusive, worldwide, royalty-free\n"); - printf_filtered ("patent license under the contributor's essential patent claims, to\n"); - printf_filtered ("make, use, sell, offer for sale, import and otherwise run, modify and\n"); - printf_filtered ("propagate the contents of its contributor version.\n"); - printf_filtered ("\n"); - printf_filtered (" In the following three paragraphs, a \"patent license\" is any express\n"); - printf_filtered ("agreement or commitment, however denominated, not to enforce a patent\n"); - printf_filtered ("(such as an express permission to practice a patent or covenant not to\n"); - printf_filtered ("sue for patent infringement). To \"grant\" such a patent license to a\n"); - printf_filtered ("party means to make such an agreement or commitment not to enforce a\n"); - printf_filtered ("patent against the party.\n"); - printf_filtered ("\n"); - printf_filtered (" If you convey a covered work, knowingly relying on a patent license,\n"); - printf_filtered ("and the Corresponding Source of the work is not available for anyone\n"); - printf_filtered ("to copy, free of charge and under the terms of this License, through a\n"); - printf_filtered ("publicly available network server or other readily accessible means,\n"); - printf_filtered ("then you must either (1) cause the Corresponding Source to be so\n"); - printf_filtered ("available, or (2) arrange to deprive yourself of the benefit of the\n"); - printf_filtered ("patent license for this particular work, or (3) arrange, in a manner\n"); - printf_filtered ("consistent with the requirements of this License, to extend the patent\n"); - printf_filtered ("license to downstream recipients. \"Knowingly relying\" means you have\n"); - printf_filtered ("actual knowledge that, but for the patent license, your conveying the\n"); - printf_filtered ("covered work in a country, or your recipient's use of the covered work\n"); - printf_filtered ("in a country, would infringe one or more identifiable patents in that\n"); - printf_filtered ("country that you have reason to believe are valid.\n"); - printf_filtered ("\n"); - printf_filtered (" If, pursuant to or in connection with a single transaction or\n"); - printf_filtered ("arrangement, you convey, or propagate by procuring conveyance of, a\n"); - printf_filtered ("covered work, and grant a patent license to some of the parties\n"); - printf_filtered ("receiving the covered work authorizing them to use, propagate, modify\n"); - printf_filtered ("or convey a specific copy of the covered work, then the patent license\n"); - printf_filtered ("you grant is automatically extended to all recipients of the covered\n"); - printf_filtered ("work and works based on it.\n"); - printf_filtered ("\n"); - printf_filtered (" A patent license is \"discriminatory\" if it does not include within\n"); - printf_filtered ("the scope of its coverage, prohibits the exercise of, or is\n"); - printf_filtered ("conditioned on the non-exercise of one or more of the rights that are\n"); - printf_filtered ("specifically granted under this License. You may not convey a covered\n"); - printf_filtered ("work if you are a party to an arrangement with a third party that is\n"); - printf_filtered ("in the business of distributing software, under which you make payment\n"); - printf_filtered ("to the third party based on the extent of your activity of conveying\n"); - printf_filtered ("the work, and under which the third party grants, to any of the\n"); - printf_filtered ("parties who would receive the covered work from you, a discriminatory\n"); - printf_filtered ("patent license (a) in connection with copies of the covered work\n"); - printf_filtered ("conveyed by you (or copies made from those copies), or (b) primarily\n"); - printf_filtered ("for and in connection with specific products or compilations that\n"); - printf_filtered ("contain the covered work, unless you entered into that arrangement,\n"); - printf_filtered ("or that patent license was granted, prior to 28 March 2007.\n"); - printf_filtered ("\n"); - printf_filtered (" Nothing in this License shall be construed as excluding or limiting\n"); - printf_filtered ("any implied license or other defenses to infringement that may\n"); - printf_filtered ("otherwise be available to you under applicable patent law.\n"); - printf_filtered ("\n"); - printf_filtered (" 12. No Surrender of Others' Freedom.\n"); - printf_filtered ("\n"); - printf_filtered (" If conditions are imposed on you (whether by court order, agreement or\n"); - printf_filtered ("otherwise) that contradict the conditions of this License, they do not\n"); - printf_filtered ("excuse you from the conditions of this License. If you cannot convey a\n"); - printf_filtered ("covered work so as to satisfy simultaneously your obligations under this\n"); - printf_filtered ("License and any other pertinent obligations, then as a consequence you may\n"); - printf_filtered ("not convey it at all. For example, if you agree to terms that obligate you\n"); - printf_filtered ("to collect a royalty for further conveying from those to whom you convey\n"); - printf_filtered ("the Program, the only way you could satisfy both those terms and this\n"); - printf_filtered ("License would be to refrain entirely from conveying the Program.\n"); - printf_filtered ("\n"); - printf_filtered (" 13. Use with the GNU Affero General Public License.\n"); - printf_filtered ("\n"); - printf_filtered (" Notwithstanding any other provision of this License, you have\n"); - printf_filtered ("permission to link or combine any covered work with a work licensed\n"); - printf_filtered ("under version 3 of the GNU Affero General Public License into a single\n"); - printf_filtered ("combined work, and to convey the resulting work. The terms of this\n"); - printf_filtered ("License will continue to apply to the part which is the covered work,\n"); - printf_filtered ("but the special requirements of the GNU Affero General Public License,\n"); - printf_filtered ("section 13, concerning interaction through a network will apply to the\n"); - printf_filtered ("combination as such.\n"); - printf_filtered ("\n"); - printf_filtered (" 14. Revised Versions of this License.\n"); - printf_filtered ("\n"); - printf_filtered (" The Free Software Foundation may publish revised and/or new versions of\n"); - printf_filtered ("the GNU General Public License from time to time. Such new versions will\n"); - printf_filtered ("be similar in spirit to the present version, but may differ in detail to\n"); - printf_filtered ("address new problems or concerns.\n"); - printf_filtered ("\n"); - printf_filtered (" Each version is given a distinguishing version number. If the\n"); - printf_filtered ("Program specifies that a certain numbered version of the GNU General\n"); - printf_filtered ("Public License \"or any later version\" applies to it, you have the\n"); - printf_filtered ("option of following the terms and conditions either of that numbered\n"); - printf_filtered ("version or of any later version published by the Free Software\n"); - printf_filtered ("Foundation. If the Program does not specify a version number of the\n"); - printf_filtered ("GNU General Public License, you may choose any version ever published\n"); - printf_filtered ("by the Free Software Foundation.\n"); - printf_filtered ("\n"); - printf_filtered (" If the Program specifies that a proxy can decide which future\n"); - printf_filtered ("versions of the GNU General Public License can be used, that proxy's\n"); - printf_filtered ("public statement of acceptance of a version permanently authorizes you\n"); - printf_filtered ("to choose that version for the Program.\n"); - printf_filtered ("\n"); - printf_filtered (" Later license versions may give you additional or different\n"); - printf_filtered ("permissions. However, no additional obligations are imposed on any\n"); - printf_filtered ("author or copyright holder as a result of your choosing to follow a\n"); - printf_filtered ("later version.\n"); - printf_filtered ("\n"); + gdb_printf (" GNU GENERAL PUBLIC LICENSE\n"); + gdb_printf (" Version 3, 29 June 2007\n"); + gdb_printf ("\n"); + gdb_printf (" Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n"); + gdb_printf (" Everyone is permitted to copy and distribute verbatim copies\n"); + gdb_printf (" of this license document, but changing it is not allowed.\n"); + gdb_printf ("\n"); + gdb_printf (" Preamble\n"); + gdb_printf ("\n"); + gdb_printf (" The GNU General Public License is a free, copyleft license for\n"); + gdb_printf ("software and other kinds of works.\n"); + gdb_printf ("\n"); + gdb_printf (" The licenses for most software and other practical works are designed\n"); + gdb_printf ("to take away your freedom to share and change the works. By contrast,\n"); + gdb_printf ("the GNU General Public License is intended to guarantee your freedom to\n"); + gdb_printf ("share and change all versions of a program--to make sure it remains free\n"); + gdb_printf ("software for all its users. We, the Free Software Foundation, use the\n"); + gdb_printf ("GNU General Public License for most of our software; it applies also to\n"); + gdb_printf ("any other work released this way by its authors. You can apply it to\n"); + gdb_printf ("your programs, too.\n"); + gdb_printf ("\n"); + gdb_printf (" When we speak of free software, we are referring to freedom, not\n"); + gdb_printf ("price. Our General Public Licenses are designed to make sure that you\n"); + gdb_printf ("have the freedom to distribute copies of free software (and charge for\n"); + gdb_printf ("them if you wish), that you receive source code or can get it if you\n"); + gdb_printf ("want it, that you can change the software or use pieces of it in new\n"); + gdb_printf ("free programs, and that you know you can do these things.\n"); + gdb_printf ("\n"); + gdb_printf (" To protect your rights, we need to prevent others from denying you\n"); + gdb_printf ("these rights or asking you to surrender the rights. Therefore, you have\n"); + gdb_printf ("certain responsibilities if you distribute copies of the software, or if\n"); + gdb_printf ("you modify it: responsibilities to respect the freedom of others.\n"); + gdb_printf ("\n"); + gdb_printf (" For example, if you distribute copies of such a program, whether\n"); + gdb_printf ("gratis or for a fee, you must pass on to the recipients the same\n"); + gdb_printf ("freedoms that you received. You must make sure that they, too, receive\n"); + gdb_printf ("or can get the source code. And you must show them these terms so they\n"); + gdb_printf ("know their rights.\n"); + gdb_printf ("\n"); + gdb_printf (" Developers that use the GNU GPL protect your rights with two steps:\n"); + gdb_printf ("(1) assert copyright on the software, and (2) offer you this License\n"); + gdb_printf ("giving you legal permission to copy, distribute and/or modify it.\n"); + gdb_printf ("\n"); + gdb_printf (" For the developers' and authors' protection, the GPL clearly explains\n"); + gdb_printf ("that there is no warranty for this free software. For both users' and\n"); + gdb_printf ("authors' sake, the GPL requires that modified versions be marked as\n"); + gdb_printf ("changed, so that their problems will not be attributed erroneously to\n"); + gdb_printf ("authors of previous versions.\n"); + gdb_printf ("\n"); + gdb_printf (" Some devices are designed to deny users access to install or run\n"); + gdb_printf ("modified versions of the software inside them, although the manufacturer\n"); + gdb_printf ("can do so. This is fundamentally incompatible with the aim of\n"); + gdb_printf ("protecting users' freedom to change the software. The systematic\n"); + gdb_printf ("pattern of such abuse occurs in the area of products for individuals to\n"); + gdb_printf ("use, which is precisely where it is most unacceptable. Therefore, we\n"); + gdb_printf ("have designed this version of the GPL to prohibit the practice for those\n"); + gdb_printf ("products. If such problems arise substantially in other domains, we\n"); + gdb_printf ("stand ready to extend this provision to those domains in future versions\n"); + gdb_printf ("of the GPL, as needed to protect the freedom of users.\n"); + gdb_printf ("\n"); + gdb_printf (" Finally, every program is threatened constantly by software patents.\n"); + gdb_printf ("States should not allow patents to restrict development and use of\n"); + gdb_printf ("software on general-purpose computers, but in those that do, we wish to\n"); + gdb_printf ("avoid the special danger that patents applied to a free program could\n"); + gdb_printf ("make it effectively proprietary. To prevent this, the GPL assures that\n"); + gdb_printf ("patents cannot be used to render the program non-free.\n"); + gdb_printf ("\n"); + gdb_printf (" The precise terms and conditions for copying, distribution and\n"); + gdb_printf ("modification follow.\n"); + gdb_printf ("\n"); + gdb_printf (" TERMS AND CONDITIONS\n"); + gdb_printf ("\n"); + gdb_printf (" 0. Definitions.\n"); + gdb_printf ("\n"); + gdb_printf (" \"This License\" refers to version 3 of the GNU General Public License.\n"); + gdb_printf ("\n"); + gdb_printf (" \"Copyright\" also means copyright-like laws that apply to other kinds of\n"); + gdb_printf ("works, such as semiconductor masks.\n"); + gdb_printf ("\n"); + gdb_printf (" \"The Program\" refers to any copyrightable work licensed under this\n"); + gdb_printf ("License. Each licensee is addressed as \"you\". \"Licensees\" and\n"); + gdb_printf ("\"recipients\" may be individuals or organizations.\n"); + gdb_printf ("\n"); + gdb_printf (" To \"modify\" a work means to copy from or adapt all or part of the work\n"); + gdb_printf ("in a fashion requiring copyright permission, other than the making of an\n"); + gdb_printf ("exact copy. The resulting work is called a \"modified version\" of the\n"); + gdb_printf ("earlier work or a work \"based on\" the earlier work.\n"); + gdb_printf ("\n"); + gdb_printf (" A \"covered work\" means either the unmodified Program or a work based\n"); + gdb_printf ("on the Program.\n"); + gdb_printf ("\n"); + gdb_printf (" To \"propagate\" a work means to do anything with it that, without\n"); + gdb_printf ("permission, would make you directly or secondarily liable for\n"); + gdb_printf ("infringement under applicable copyright law, except executing it on a\n"); + gdb_printf ("computer or modifying a private copy. Propagation includes copying,\n"); + gdb_printf ("distribution (with or without modification), making available to the\n"); + gdb_printf ("public, and in some countries other activities as well.\n"); + gdb_printf ("\n"); + gdb_printf (" To \"convey\" a work means any kind of propagation that enables other\n"); + gdb_printf ("parties to make or receive copies. Mere interaction with a user through\n"); + gdb_printf ("a computer network, with no transfer of a copy, is not conveying.\n"); + gdb_printf ("\n"); + gdb_printf (" An interactive user interface displays \"Appropriate Legal Notices\"\n"); + gdb_printf ("to the extent that it includes a convenient and prominently visible\n"); + gdb_printf ("feature that (1) displays an appropriate copyright notice, and (2)\n"); + gdb_printf ("tells the user that there is no warranty for the work (except to the\n"); + gdb_printf ("extent that warranties are provided), that licensees may convey the\n"); + gdb_printf ("work under this License, and how to view a copy of this License. If\n"); + gdb_printf ("the interface presents a list of user commands or options, such as a\n"); + gdb_printf ("menu, a prominent item in the list meets this criterion.\n"); + gdb_printf ("\n"); + gdb_printf (" 1. Source Code.\n"); + gdb_printf ("\n"); + gdb_printf (" The \"source code\" for a work means the preferred form of the work\n"); + gdb_printf ("for making modifications to it. \"Object code\" means any non-source\n"); + gdb_printf ("form of a work.\n"); + gdb_printf ("\n"); + gdb_printf (" A \"Standard Interface\" means an interface that either is an official\n"); + gdb_printf ("standard defined by a recognized standards body, or, in the case of\n"); + gdb_printf ("interfaces specified for a particular programming language, one that\n"); + gdb_printf ("is widely used among developers working in that language.\n"); + gdb_printf ("\n"); + gdb_printf (" The \"System Libraries\" of an executable work include anything, other\n"); + gdb_printf ("than the work as a whole, that (a) is included in the normal form of\n"); + gdb_printf ("packaging a Major Component, but which is not part of that Major\n"); + gdb_printf ("Component, and (b) serves only to enable use of the work with that\n"); + gdb_printf ("Major Component, or to implement a Standard Interface for which an\n"); + gdb_printf ("implementation is available to the public in source code form. A\n"); + gdb_printf ("\"Major Component\", in this context, means a major essential component\n"); + gdb_printf ("(kernel, window system, and so on) of the specific operating system\n"); + gdb_printf ("(if any) on which the executable work runs, or a compiler used to\n"); + gdb_printf ("produce the work, or an object code interpreter used to run it.\n"); + gdb_printf ("\n"); + gdb_printf (" The \"Corresponding Source\" for a work in object code form means all\n"); + gdb_printf ("the source code needed to generate, install, and (for an executable\n"); + gdb_printf ("work) run the object code and to modify the work, including scripts to\n"); + gdb_printf ("control those activities. However, it does not include the work's\n"); + gdb_printf ("System Libraries, or general-purpose tools or generally available free\n"); + gdb_printf ("programs which are used unmodified in performing those activities but\n"); + gdb_printf ("which are not part of the work. For example, Corresponding Source\n"); + gdb_printf ("includes interface definition files associated with source files for\n"); + gdb_printf ("the work, and the source code for shared libraries and dynamically\n"); + gdb_printf ("linked subprograms that the work is specifically designed to require,\n"); + gdb_printf ("such as by intimate data communication or control flow between those\n"); + gdb_printf ("subprograms and other parts of the work.\n"); + gdb_printf ("\n"); + gdb_printf (" The Corresponding Source need not include anything that users\n"); + gdb_printf ("can regenerate automatically from other parts of the Corresponding\n"); + gdb_printf ("Source.\n"); + gdb_printf ("\n"); + gdb_printf (" The Corresponding Source for a work in source code form is that\n"); + gdb_printf ("same work.\n"); + gdb_printf ("\n"); + gdb_printf (" 2. Basic Permissions.\n"); + gdb_printf ("\n"); + gdb_printf (" All rights granted under this License are granted for the term of\n"); + gdb_printf ("copyright on the Program, and are irrevocable provided the stated\n"); + gdb_printf ("conditions are met. This License explicitly affirms your unlimited\n"); + gdb_printf ("permission to run the unmodified Program. The output from running a\n"); + gdb_printf ("covered work is covered by this License only if the output, given its\n"); + gdb_printf ("content, constitutes a covered work. This License acknowledges your\n"); + gdb_printf ("rights of fair use or other equivalent, as provided by copyright law.\n"); + gdb_printf ("\n"); + gdb_printf (" You may make, run and propagate covered works that you do not\n"); + gdb_printf ("convey, without conditions so long as your license otherwise remains\n"); + gdb_printf ("in force. You may convey covered works to others for the sole purpose\n"); + gdb_printf ("of having them make modifications exclusively for you, or provide you\n"); + gdb_printf ("with facilities for running those works, provided that you comply with\n"); + gdb_printf ("the terms of this License in conveying all material for which you do\n"); + gdb_printf ("not control copyright. Those thus making or running the covered works\n"); + gdb_printf ("for you must do so exclusively on your behalf, under your direction\n"); + gdb_printf ("and control, on terms that prohibit them from making any copies of\n"); + gdb_printf ("your copyrighted material outside their relationship with you.\n"); + gdb_printf ("\n"); + gdb_printf (" Conveying under any other circumstances is permitted solely under\n"); + gdb_printf ("the conditions stated below. Sublicensing is not allowed; section 10\n"); + gdb_printf ("makes it unnecessary.\n"); + gdb_printf ("\n"); + gdb_printf (" 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n"); + gdb_printf ("\n"); + gdb_printf (" No covered work shall be deemed part of an effective technological\n"); + gdb_printf ("measure under any applicable law fulfilling obligations under article\n"); + gdb_printf ("11 of the WIPO copyright treaty adopted on 20 December 1996, or\n"); + gdb_printf ("similar laws prohibiting or restricting circumvention of such\n"); + gdb_printf ("measures.\n"); + gdb_printf ("\n"); + gdb_printf (" When you convey a covered work, you waive any legal power to forbid\n"); + gdb_printf ("circumvention of technological measures to the extent such circumvention\n"); + gdb_printf ("is effected by exercising rights under this License with respect to\n"); + gdb_printf ("the covered work, and you disclaim any intention to limit operation or\n"); + gdb_printf ("modification of the work as a means of enforcing, against the work's\n"); + gdb_printf ("users, your or third parties' legal rights to forbid circumvention of\n"); + gdb_printf ("technological measures.\n"); + gdb_printf ("\n"); + gdb_printf (" 4. Conveying Verbatim Copies.\n"); + gdb_printf ("\n"); + gdb_printf (" You may convey verbatim copies of the Program's source code as you\n"); + gdb_printf ("receive it, in any medium, provided that you conspicuously and\n"); + gdb_printf ("appropriately publish on each copy an appropriate copyright notice;\n"); + gdb_printf ("keep intact all notices stating that this License and any\n"); + gdb_printf ("non-permissive terms added in accord with section 7 apply to the code;\n"); + gdb_printf ("keep intact all notices of the absence of any warranty; and give all\n"); + gdb_printf ("recipients a copy of this License along with the Program.\n"); + gdb_printf ("\n"); + gdb_printf (" You may charge any price or no price for each copy that you convey,\n"); + gdb_printf ("and you may offer support or warranty protection for a fee.\n"); + gdb_printf ("\n"); + gdb_printf (" 5. Conveying Modified Source Versions.\n"); + gdb_printf ("\n"); + gdb_printf (" You may convey a work based on the Program, or the modifications to\n"); + gdb_printf ("produce it from the Program, in the form of source code under the\n"); + gdb_printf ("terms of section 4, provided that you also meet all of these conditions:\n"); + gdb_printf ("\n"); + gdb_printf (" a) The work must carry prominent notices stating that you modified\n"); + gdb_printf (" it, and giving a relevant date.\n"); + gdb_printf ("\n"); + gdb_printf (" b) The work must carry prominent notices stating that it is\n"); + gdb_printf (" released under this License and any conditions added under section\n"); + gdb_printf (" 7. This requirement modifies the requirement in section 4 to\n"); + gdb_printf (" \"keep intact all notices\".\n"); + gdb_printf ("\n"); + gdb_printf (" c) You must license the entire work, as a whole, under this\n"); + gdb_printf (" License to anyone who comes into possession of a copy. This\n"); + gdb_printf (" License will therefore apply, along with any applicable section 7\n"); + gdb_printf (" additional terms, to the whole of the work, and all its parts,\n"); + gdb_printf (" regardless of how they are packaged. This License gives no\n"); + gdb_printf (" permission to license the work in any other way, but it does not\n"); + gdb_printf (" invalidate such permission if you have separately received it.\n"); + gdb_printf ("\n"); + gdb_printf (" d) If the work has interactive user interfaces, each must display\n"); + gdb_printf (" Appropriate Legal Notices; however, if the Program has interactive\n"); + gdb_printf (" interfaces that do not display Appropriate Legal Notices, your\n"); + gdb_printf (" work need not make them do so.\n"); + gdb_printf ("\n"); + gdb_printf (" A compilation of a covered work with other separate and independent\n"); + gdb_printf ("works, which are not by their nature extensions of the covered work,\n"); + gdb_printf ("and which are not combined with it such as to form a larger program,\n"); + gdb_printf ("in or on a volume of a storage or distribution medium, is called an\n"); + gdb_printf ("\"aggregate\" if the compilation and its resulting copyright are not\n"); + gdb_printf ("used to limit the access or legal rights of the compilation's users\n"); + gdb_printf ("beyond what the individual works permit. Inclusion of a covered work\n"); + gdb_printf ("in an aggregate does not cause this License to apply to the other\n"); + gdb_printf ("parts of the aggregate.\n"); + gdb_printf ("\n"); + gdb_printf (" 6. Conveying Non-Source Forms.\n"); + gdb_printf ("\n"); + gdb_printf (" You may convey a covered work in object code form under the terms\n"); + gdb_printf ("of sections 4 and 5, provided that you also convey the\n"); + gdb_printf ("machine-readable Corresponding Source under the terms of this License,\n"); + gdb_printf ("in one of these ways:\n"); + gdb_printf ("\n"); + gdb_printf (" a) Convey the object code in, or embodied in, a physical product\n"); + gdb_printf (" (including a physical distribution medium), accompanied by the\n"); + gdb_printf (" Corresponding Source fixed on a durable physical medium\n"); + gdb_printf (" customarily used for software interchange.\n"); + gdb_printf ("\n"); + gdb_printf (" b) Convey the object code in, or embodied in, a physical product\n"); + gdb_printf (" (including a physical distribution medium), accompanied by a\n"); + gdb_printf (" written offer, valid for at least three years and valid for as\n"); + gdb_printf (" long as you offer spare parts or customer support for that product\n"); + gdb_printf (" model, to give anyone who possesses the object code either (1) a\n"); + gdb_printf (" copy of the Corresponding Source for all the software in the\n"); + gdb_printf (" product that is covered by this License, on a durable physical\n"); + gdb_printf (" medium customarily used for software interchange, for a price no\n"); + gdb_printf (" more than your reasonable cost of physically performing this\n"); + gdb_printf (" conveying of source, or (2) access to copy the\n"); + gdb_printf (" Corresponding Source from a network server at no charge.\n"); + gdb_printf ("\n"); + gdb_printf (" c) Convey individual copies of the object code with a copy of the\n"); + gdb_printf (" written offer to provide the Corresponding Source. This\n"); + gdb_printf (" alternative is allowed only occasionally and noncommercially, and\n"); + gdb_printf (" only if you received the object code with such an offer, in accord\n"); + gdb_printf (" with subsection 6b.\n"); + gdb_printf ("\n"); + gdb_printf (" d) Convey the object code by offering access from a designated\n"); + gdb_printf (" place (gratis or for a charge), and offer equivalent access to the\n"); + gdb_printf (" Corresponding Source in the same way through the same place at no\n"); + gdb_printf (" further charge. You need not require recipients to copy the\n"); + gdb_printf (" Corresponding Source along with the object code. If the place to\n"); + gdb_printf (" copy the object code is a network server, the Corresponding Source\n"); + gdb_printf (" may be on a different server (operated by you or a third party)\n"); + gdb_printf (" that supports equivalent copying facilities, provided you maintain\n"); + gdb_printf (" clear directions next to the object code saying where to find the\n"); + gdb_printf (" Corresponding Source. Regardless of what server hosts the\n"); + gdb_printf (" Corresponding Source, you remain obligated to ensure that it is\n"); + gdb_printf (" available for as long as needed to satisfy these requirements.\n"); + gdb_printf ("\n"); + gdb_printf (" e) Convey the object code using peer-to-peer transmission, provided\n"); + gdb_printf (" you inform other peers where the object code and Corresponding\n"); + gdb_printf (" Source of the work are being offered to the general public at no\n"); + gdb_printf (" charge under subsection 6d.\n"); + gdb_printf ("\n"); + gdb_printf (" A separable portion of the object code, whose source code is excluded\n"); + gdb_printf ("from the Corresponding Source as a System Library, need not be\n"); + gdb_printf ("included in conveying the object code work.\n"); + gdb_printf ("\n"); + gdb_printf (" A \"User Product\" is either (1) a \"consumer product\", which means any\n"); + gdb_printf ("tangible personal property which is normally used for personal, family,\n"); + gdb_printf ("or household purposes, or (2) anything designed or sold for incorporation\n"); + gdb_printf ("into a dwelling. In determining whether a product is a consumer product,\n"); + gdb_printf ("doubtful cases shall be resolved in favor of coverage. For a particular\n"); + gdb_printf ("product received by a particular user, \"normally used\" refers to a\n"); + gdb_printf ("typical or common use of that class of product, regardless of the status\n"); + gdb_printf ("of the particular user or of the way in which the particular user\n"); + gdb_printf ("actually uses, or expects or is expected to use, the product. A product\n"); + gdb_printf ("is a consumer product regardless of whether the product has substantial\n"); + gdb_printf ("commercial, industrial or non-consumer uses, unless such uses represent\n"); + gdb_printf ("the only significant mode of use of the product.\n"); + gdb_printf ("\n"); + gdb_printf (" \"Installation Information\" for a User Product means any methods,\n"); + gdb_printf ("procedures, authorization keys, or other information required to install\n"); + gdb_printf ("and execute modified versions of a covered work in that User Product from\n"); + gdb_printf ("a modified version of its Corresponding Source. The information must\n"); + gdb_printf ("suffice to ensure that the continued functioning of the modified object\n"); + gdb_printf ("code is in no case prevented or interfered with solely because\n"); + gdb_printf ("modification has been made.\n"); + gdb_printf ("\n"); + gdb_printf (" If you convey an object code work under this section in, or with, or\n"); + gdb_printf ("specifically for use in, a User Product, and the conveying occurs as\n"); + gdb_printf ("part of a transaction in which the right of possession and use of the\n"); + gdb_printf ("User Product is transferred to the recipient in perpetuity or for a\n"); + gdb_printf ("fixed term (regardless of how the transaction is characterized), the\n"); + gdb_printf ("Corresponding Source conveyed under this section must be accompanied\n"); + gdb_printf ("by the Installation Information. But this requirement does not apply\n"); + gdb_printf ("if neither you nor any third party retains the ability to install\n"); + gdb_printf ("modified object code on the User Product (for example, the work has\n"); + gdb_printf ("been installed in ROM).\n"); + gdb_printf ("\n"); + gdb_printf (" The requirement to provide Installation Information does not include a\n"); + gdb_printf ("requirement to continue to provide support service, warranty, or updates\n"); + gdb_printf ("for a work that has been modified or installed by the recipient, or for\n"); + gdb_printf ("the User Product in which it has been modified or installed. Access to a\n"); + gdb_printf ("network may be denied when the modification itself materially and\n"); + gdb_printf ("adversely affects the operation of the network or violates the rules and\n"); + gdb_printf ("protocols for communication across the network.\n"); + gdb_printf ("\n"); + gdb_printf (" Corresponding Source conveyed, and Installation Information provided,\n"); + gdb_printf ("in accord with this section must be in a format that is publicly\n"); + gdb_printf ("documented (and with an implementation available to the public in\n"); + gdb_printf ("source code form), and must require no special password or key for\n"); + gdb_printf ("unpacking, reading or copying.\n"); + gdb_printf ("\n"); + gdb_printf (" 7. Additional Terms.\n"); + gdb_printf ("\n"); + gdb_printf (" \"Additional permissions\" are terms that supplement the terms of this\n"); + gdb_printf ("License by making exceptions from one or more of its conditions.\n"); + gdb_printf ("Additional permissions that are applicable to the entire Program shall\n"); + gdb_printf ("be treated as though they were included in this License, to the extent\n"); + gdb_printf ("that they are valid under applicable law. If additional permissions\n"); + gdb_printf ("apply only to part of the Program, that part may be used separately\n"); + gdb_printf ("under those permissions, but the entire Program remains governed by\n"); + gdb_printf ("this License without regard to the additional permissions.\n"); + gdb_printf ("\n"); + gdb_printf (" When you convey a copy of a covered work, you may at your option\n"); + gdb_printf ("remove any additional permissions from that copy, or from any part of\n"); + gdb_printf ("it. (Additional permissions may be written to require their own\n"); + gdb_printf ("removal in certain cases when you modify the work.) You may place\n"); + gdb_printf ("additional permissions on material, added by you to a covered work,\n"); + gdb_printf ("for which you have or can give appropriate copyright permission.\n"); + gdb_printf ("\n"); + gdb_printf (" Notwithstanding any other provision of this License, for material you\n"); + gdb_printf ("add to a covered work, you may (if authorized by the copyright holders of\n"); + gdb_printf ("that material) supplement the terms of this License with terms:\n"); + gdb_printf ("\n"); + gdb_printf (" a) Disclaiming warranty or limiting liability differently from the\n"); + gdb_printf (" terms of sections 15 and 16 of this License; or\n"); + gdb_printf ("\n"); + gdb_printf (" b) Requiring preservation of specified reasonable legal notices or\n"); + gdb_printf (" author attributions in that material or in the Appropriate Legal\n"); + gdb_printf (" Notices displayed by works containing it; or\n"); + gdb_printf ("\n"); + gdb_printf (" c) Prohibiting misrepresentation of the origin of that material, or\n"); + gdb_printf (" requiring that modified versions of such material be marked in\n"); + gdb_printf (" reasonable ways as different from the original version; or\n"); + gdb_printf ("\n"); + gdb_printf (" d) Limiting the use for publicity purposes of names of licensors or\n"); + gdb_printf (" authors of the material; or\n"); + gdb_printf ("\n"); + gdb_printf (" e) Declining to grant rights under trademark law for use of some\n"); + gdb_printf (" trade names, trademarks, or service marks; or\n"); + gdb_printf ("\n"); + gdb_printf (" f) Requiring indemnification of licensors and authors of that\n"); + gdb_printf (" material by anyone who conveys the material (or modified versions of\n"); + gdb_printf (" it) with contractual assumptions of liability to the recipient, for\n"); + gdb_printf (" any liability that these contractual assumptions directly impose on\n"); + gdb_printf (" those licensors and authors.\n"); + gdb_printf ("\n"); + gdb_printf (" All other non-permissive additional terms are considered \"further\n"); + gdb_printf ("restrictions\" within the meaning of section 10. If the Program as you\n"); + gdb_printf ("received it, or any part of it, contains a notice stating that it is\n"); + gdb_printf ("governed by this License along with a term that is a further\n"); + gdb_printf ("restriction, you may remove that term. If a license document contains\n"); + gdb_printf ("a further restriction but permits relicensing or conveying under this\n"); + gdb_printf ("License, you may add to a covered work material governed by the terms\n"); + gdb_printf ("of that license document, provided that the further restriction does\n"); + gdb_printf ("not survive such relicensing or conveying.\n"); + gdb_printf ("\n"); + gdb_printf (" If you add terms to a covered work in accord with this section, you\n"); + gdb_printf ("must place, in the relevant source files, a statement of the\n"); + gdb_printf ("additional terms that apply to those files, or a notice indicating\n"); + gdb_printf ("where to find the applicable terms.\n"); + gdb_printf ("\n"); + gdb_printf (" Additional terms, permissive or non-permissive, may be stated in the\n"); + gdb_printf ("form of a separately written license, or stated as exceptions;\n"); + gdb_printf ("the above requirements apply either way.\n"); + gdb_printf ("\n"); + gdb_printf (" 8. Termination.\n"); + gdb_printf ("\n"); + gdb_printf (" You may not propagate or modify a covered work except as expressly\n"); + gdb_printf ("provided under this License. Any attempt otherwise to propagate or\n"); + gdb_printf ("modify it is void, and will automatically terminate your rights under\n"); + gdb_printf ("this License (including any patent licenses granted under the third\n"); + gdb_printf ("paragraph of section 11).\n"); + gdb_printf ("\n"); + gdb_printf (" However, if you cease all violation of this License, then your\n"); + gdb_printf ("license from a particular copyright holder is reinstated (a)\n"); + gdb_printf ("provisionally, unless and until the copyright holder explicitly and\n"); + gdb_printf ("finally terminates your license, and (b) permanently, if the copyright\n"); + gdb_printf ("holder fails to notify you of the violation by some reasonable means\n"); + gdb_printf ("prior to 60 days after the cessation.\n"); + gdb_printf ("\n"); + gdb_printf (" Moreover, your license from a particular copyright holder is\n"); + gdb_printf ("reinstated permanently if the copyright holder notifies you of the\n"); + gdb_printf ("violation by some reasonable means, this is the first time you have\n"); + gdb_printf ("received notice of violation of this License (for any work) from that\n"); + gdb_printf ("copyright holder, and you cure the violation prior to 30 days after\n"); + gdb_printf ("your receipt of the notice.\n"); + gdb_printf ("\n"); + gdb_printf (" Termination of your rights under this section does not terminate the\n"); + gdb_printf ("licenses of parties who have received copies or rights from you under\n"); + gdb_printf ("this License. If your rights have been terminated and not permanently\n"); + gdb_printf ("reinstated, you do not qualify to receive new licenses for the same\n"); + gdb_printf ("material under section 10.\n"); + gdb_printf ("\n"); + gdb_printf (" 9. Acceptance Not Required for Having Copies.\n"); + gdb_printf ("\n"); + gdb_printf (" You are not required to accept this License in order to receive or\n"); + gdb_printf ("run a copy of the Program. Ancillary propagation of a covered work\n"); + gdb_printf ("occurring solely as a consequence of using peer-to-peer transmission\n"); + gdb_printf ("to receive a copy likewise does not require acceptance. However,\n"); + gdb_printf ("nothing other than this License grants you permission to propagate or\n"); + gdb_printf ("modify any covered work. These actions infringe copyright if you do\n"); + gdb_printf ("not accept this License. Therefore, by modifying or propagating a\n"); + gdb_printf ("covered work, you indicate your acceptance of this License to do so.\n"); + gdb_printf ("\n"); + gdb_printf (" 10. Automatic Licensing of Downstream Recipients.\n"); + gdb_printf ("\n"); + gdb_printf (" Each time you convey a covered work, the recipient automatically\n"); + gdb_printf ("receives a license from the original licensors, to run, modify and\n"); + gdb_printf ("propagate that work, subject to this License. You are not responsible\n"); + gdb_printf ("for enforcing compliance by third parties with this License.\n"); + gdb_printf ("\n"); + gdb_printf (" An \"entity transaction\" is a transaction transferring control of an\n"); + gdb_printf ("organization, or substantially all assets of one, or subdividing an\n"); + gdb_printf ("organization, or merging organizations. If propagation of a covered\n"); + gdb_printf ("work results from an entity transaction, each party to that\n"); + gdb_printf ("transaction who receives a copy of the work also receives whatever\n"); + gdb_printf ("licenses to the work the party's predecessor in interest had or could\n"); + gdb_printf ("give under the previous paragraph, plus a right to possession of the\n"); + gdb_printf ("Corresponding Source of the work from the predecessor in interest, if\n"); + gdb_printf ("the predecessor has it or can get it with reasonable efforts.\n"); + gdb_printf ("\n"); + gdb_printf (" You may not impose any further restrictions on the exercise of the\n"); + gdb_printf ("rights granted or affirmed under this License. For example, you may\n"); + gdb_printf ("not impose a license fee, royalty, or other charge for exercise of\n"); + gdb_printf ("rights granted under this License, and you may not initiate litigation\n"); + gdb_printf ("(including a cross-claim or counterclaim in a lawsuit) alleging that\n"); + gdb_printf ("any patent claim is infringed by making, using, selling, offering for\n"); + gdb_printf ("sale, or importing the Program or any portion of it.\n"); + gdb_printf ("\n"); + gdb_printf (" 11. Patents.\n"); + gdb_printf ("\n"); + gdb_printf (" A \"contributor\" is a copyright holder who authorizes use under this\n"); + gdb_printf ("License of the Program or a work on which the Program is based. The\n"); + gdb_printf ("work thus licensed is called the contributor's \"contributor version\".\n"); + gdb_printf ("\n"); + gdb_printf (" A contributor's \"essential patent claims\" are all patent claims\n"); + gdb_printf ("owned or controlled by the contributor, whether already acquired or\n"); + gdb_printf ("hereafter acquired, that would be infringed by some manner, permitted\n"); + gdb_printf ("by this License, of making, using, or selling its contributor version,\n"); + gdb_printf ("but do not include claims that would be infringed only as a\n"); + gdb_printf ("consequence of further modification of the contributor version. For\n"); + gdb_printf ("purposes of this definition, \"control\" includes the right to grant\n"); + gdb_printf ("patent sublicenses in a manner consistent with the requirements of\n"); + gdb_printf ("this License.\n"); + gdb_printf ("\n"); + gdb_printf (" Each contributor grants you a non-exclusive, worldwide, royalty-free\n"); + gdb_printf ("patent license under the contributor's essential patent claims, to\n"); + gdb_printf ("make, use, sell, offer for sale, import and otherwise run, modify and\n"); + gdb_printf ("propagate the contents of its contributor version.\n"); + gdb_printf ("\n"); + gdb_printf (" In the following three paragraphs, a \"patent license\" is any express\n"); + gdb_printf ("agreement or commitment, however denominated, not to enforce a patent\n"); + gdb_printf ("(such as an express permission to practice a patent or covenant not to\n"); + gdb_printf ("sue for patent infringement). To \"grant\" such a patent license to a\n"); + gdb_printf ("party means to make such an agreement or commitment not to enforce a\n"); + gdb_printf ("patent against the party.\n"); + gdb_printf ("\n"); + gdb_printf (" If you convey a covered work, knowingly relying on a patent license,\n"); + gdb_printf ("and the Corresponding Source of the work is not available for anyone\n"); + gdb_printf ("to copy, free of charge and under the terms of this License, through a\n"); + gdb_printf ("publicly available network server or other readily accessible means,\n"); + gdb_printf ("then you must either (1) cause the Corresponding Source to be so\n"); + gdb_printf ("available, or (2) arrange to deprive yourself of the benefit of the\n"); + gdb_printf ("patent license for this particular work, or (3) arrange, in a manner\n"); + gdb_printf ("consistent with the requirements of this License, to extend the patent\n"); + gdb_printf ("license to downstream recipients. \"Knowingly relying\" means you have\n"); + gdb_printf ("actual knowledge that, but for the patent license, your conveying the\n"); + gdb_printf ("covered work in a country, or your recipient's use of the covered work\n"); + gdb_printf ("in a country, would infringe one or more identifiable patents in that\n"); + gdb_printf ("country that you have reason to believe are valid.\n"); + gdb_printf ("\n"); + gdb_printf (" If, pursuant to or in connection with a single transaction or\n"); + gdb_printf ("arrangement, you convey, or propagate by procuring conveyance of, a\n"); + gdb_printf ("covered work, and grant a patent license to some of the parties\n"); + gdb_printf ("receiving the covered work authorizing them to use, propagate, modify\n"); + gdb_printf ("or convey a specific copy of the covered work, then the patent license\n"); + gdb_printf ("you grant is automatically extended to all recipients of the covered\n"); + gdb_printf ("work and works based on it.\n"); + gdb_printf ("\n"); + gdb_printf (" A patent license is \"discriminatory\" if it does not include within\n"); + gdb_printf ("the scope of its coverage, prohibits the exercise of, or is\n"); + gdb_printf ("conditioned on the non-exercise of one or more of the rights that are\n"); + gdb_printf ("specifically granted under this License. You may not convey a covered\n"); + gdb_printf ("work if you are a party to an arrangement with a third party that is\n"); + gdb_printf ("in the business of distributing software, under which you make payment\n"); + gdb_printf ("to the third party based on the extent of your activity of conveying\n"); + gdb_printf ("the work, and under which the third party grants, to any of the\n"); + gdb_printf ("parties who would receive the covered work from you, a discriminatory\n"); + gdb_printf ("patent license (a) in connection with copies of the covered work\n"); + gdb_printf ("conveyed by you (or copies made from those copies), or (b) primarily\n"); + gdb_printf ("for and in connection with specific products or compilations that\n"); + gdb_printf ("contain the covered work, unless you entered into that arrangement,\n"); + gdb_printf ("or that patent license was granted, prior to 28 March 2007.\n"); + gdb_printf ("\n"); + gdb_printf (" Nothing in this License shall be construed as excluding or limiting\n"); + gdb_printf ("any implied license or other defenses to infringement that may\n"); + gdb_printf ("otherwise be available to you under applicable patent law.\n"); + gdb_printf ("\n"); + gdb_printf (" 12. No Surrender of Others' Freedom.\n"); + gdb_printf ("\n"); + gdb_printf (" If conditions are imposed on you (whether by court order, agreement or\n"); + gdb_printf ("otherwise) that contradict the conditions of this License, they do not\n"); + gdb_printf ("excuse you from the conditions of this License. If you cannot convey a\n"); + gdb_printf ("covered work so as to satisfy simultaneously your obligations under this\n"); + gdb_printf ("License and any other pertinent obligations, then as a consequence you may\n"); + gdb_printf ("not convey it at all. For example, if you agree to terms that obligate you\n"); + gdb_printf ("to collect a royalty for further conveying from those to whom you convey\n"); + gdb_printf ("the Program, the only way you could satisfy both those terms and this\n"); + gdb_printf ("License would be to refrain entirely from conveying the Program.\n"); + gdb_printf ("\n"); + gdb_printf (" 13. Use with the GNU Affero General Public License.\n"); + gdb_printf ("\n"); + gdb_printf (" Notwithstanding any other provision of this License, you have\n"); + gdb_printf ("permission to link or combine any covered work with a work licensed\n"); + gdb_printf ("under version 3 of the GNU Affero General Public License into a single\n"); + gdb_printf ("combined work, and to convey the resulting work. The terms of this\n"); + gdb_printf ("License will continue to apply to the part which is the covered work,\n"); + gdb_printf ("but the special requirements of the GNU Affero General Public License,\n"); + gdb_printf ("section 13, concerning interaction through a network will apply to the\n"); + gdb_printf ("combination as such.\n"); + gdb_printf ("\n"); + gdb_printf (" 14. Revised Versions of this License.\n"); + gdb_printf ("\n"); + gdb_printf (" The Free Software Foundation may publish revised and/or new versions of\n"); + gdb_printf ("the GNU General Public License from time to time. Such new versions will\n"); + gdb_printf ("be similar in spirit to the present version, but may differ in detail to\n"); + gdb_printf ("address new problems or concerns.\n"); + gdb_printf ("\n"); + gdb_printf (" Each version is given a distinguishing version number. If the\n"); + gdb_printf ("Program specifies that a certain numbered version of the GNU General\n"); + gdb_printf ("Public License \"or any later version\" applies to it, you have the\n"); + gdb_printf ("option of following the terms and conditions either of that numbered\n"); + gdb_printf ("version or of any later version published by the Free Software\n"); + gdb_printf ("Foundation. If the Program does not specify a version number of the\n"); + gdb_printf ("GNU General Public License, you may choose any version ever published\n"); + gdb_printf ("by the Free Software Foundation.\n"); + gdb_printf ("\n"); + gdb_printf (" If the Program specifies that a proxy can decide which future\n"); + gdb_printf ("versions of the GNU General Public License can be used, that proxy's\n"); + gdb_printf ("public statement of acceptance of a version permanently authorizes you\n"); + gdb_printf ("to choose that version for the Program.\n"); + gdb_printf ("\n"); + gdb_printf (" Later license versions may give you additional or different\n"); + gdb_printf ("permissions. However, no additional obligations are imposed on any\n"); + gdb_printf ("author or copyright holder as a result of your choosing to follow a\n"); + gdb_printf ("later version.\n"); + gdb_printf ("\n"); } static void show_warranty_command (const char *ignore, int from_tty) { - printf_filtered (" 15. Disclaimer of Warranty.\n"); - printf_filtered ("\n"); - printf_filtered (" THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n"); - printf_filtered ("APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n"); - printf_filtered ("HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\n"); - printf_filtered ("OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n"); - printf_filtered ("THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"); - printf_filtered ("PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n"); - printf_filtered ("IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n"); - printf_filtered ("ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"); - printf_filtered ("\n"); - printf_filtered (" 16. Limitation of Liability.\n"); - printf_filtered ("\n"); - printf_filtered (" IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"); - printf_filtered ("WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n"); - printf_filtered ("THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n"); - printf_filtered ("GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n"); - printf_filtered ("USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n"); - printf_filtered ("DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n"); - printf_filtered ("PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n"); - printf_filtered ("EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n"); - printf_filtered ("SUCH DAMAGES.\n"); - printf_filtered ("\n"); - printf_filtered (" 17. Interpretation of Sections 15 and 16.\n"); - printf_filtered ("\n"); - printf_filtered (" If the disclaimer of warranty and limitation of liability provided\n"); - printf_filtered ("above cannot be given local legal effect according to their terms,\n"); - printf_filtered ("reviewing courts shall apply local law that most closely approximates\n"); - printf_filtered ("an absolute waiver of all civil liability in connection with the\n"); - printf_filtered ("Program, unless a warranty or assumption of liability accompanies a\n"); - printf_filtered ("copy of the Program in return for a fee.\n"); - printf_filtered ("\n"); + gdb_printf (" 15. Disclaimer of Warranty.\n"); + gdb_printf ("\n"); + gdb_printf (" THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n"); + gdb_printf ("APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n"); + gdb_printf ("HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\n"); + gdb_printf ("OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n"); + gdb_printf ("THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"); + gdb_printf ("PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n"); + gdb_printf ("IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n"); + gdb_printf ("ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"); + gdb_printf ("\n"); + gdb_printf (" 16. Limitation of Liability.\n"); + gdb_printf ("\n"); + gdb_printf (" IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"); + gdb_printf ("WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n"); + gdb_printf ("THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n"); + gdb_printf ("GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n"); + gdb_printf ("USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n"); + gdb_printf ("DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n"); + gdb_printf ("PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n"); + gdb_printf ("EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n"); + gdb_printf ("SUCH DAMAGES.\n"); + gdb_printf ("\n"); + gdb_printf (" 17. Interpretation of Sections 15 and 16.\n"); + gdb_printf ("\n"); + gdb_printf (" If the disclaimer of warranty and limitation of liability provided\n"); + gdb_printf ("above cannot be given local legal effect according to their terms,\n"); + gdb_printf ("reviewing courts shall apply local law that most closely approximates\n"); + gdb_printf ("an absolute waiver of all civil liability in connection with the\n"); + gdb_printf ("Program, unless a warranty or assumption of liability accompanies a\n"); + gdb_printf ("copy of the Program in return for a fee.\n"); + gdb_printf ("\n"); } void _initialize_copying (); diff --git a/gdb/corefile.c b/gdb/corefile.c index 61f60bb..71f8157 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -401,8 +401,8 @@ show_gnutarget_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The current BFD target is \"%s\".\n"), value); + gdb_printf (file, + _("The current BFD target is \"%s\".\n"), value); } static void diff --git a/gdb/corelow.c b/gdb/corelow.c index 42c43db..a23dc81 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -380,7 +380,7 @@ static void maybe_say_no_core_file_now (int from_tty) { if (from_tty) - printf_filtered (_("No core file now.\n")); + gdb_printf (_("No core file now.\n")); } /* Backward compatibility with old way of specifying core files. */ @@ -571,7 +571,7 @@ core_target_open (const char *arg, int from_tty) p = bfd_core_file_failing_command (core_bfd); if (p) - printf_filtered (_("Core was generated by `%s'.\n"), p); + gdb_printf (_("Core was generated by `%s'.\n"), p); /* Clearing any previous state of convenience variables. */ clear_exit_convenience_vars (); @@ -593,11 +593,11 @@ core_target_open (const char *arg, int from_tty) siggy) : gdb_signal_from_host (siggy)); - printf_filtered (_("Program terminated with signal %s, %s"), - gdb_signal_to_name (sig), gdb_signal_to_string (sig)); + gdb_printf (_("Program terminated with signal %s, %s"), + gdb_signal_to_name (sig), gdb_signal_to_string (sig)); if (gdbarch_report_signal_info_p (core_gdbarch)) gdbarch_report_signal_info (core_gdbarch, current_uiout, sig); - printf_filtered (_(".\n")); + gdb_printf (_(".\n")); /* Set the value of the internal variable $_exitsignal, which holds the signal uncaught by the inferior. */ @@ -760,8 +760,8 @@ core_target::fetch_registers (struct regcache *regcache, int regno) if (!(m_core_gdbarch != nullptr && gdbarch_iterate_over_regset_sections_p (m_core_gdbarch))) { - fprintf_filtered (gdb_stderr, - "Can't fetch registers from this type of core file\n"); + gdb_printf (gdb_stderr, + "Can't fetch registers from this type of core file\n"); return; } @@ -1179,20 +1179,20 @@ core_target::info_proc_mappings (struct gdbarch *gdbarch) { if (!m_core_file_mappings.empty ()) { - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (gdbarch_addr_bit (gdbarch) == 32) { - printf_filtered ("\t%10s %10s %10s %10s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "objfile"); + gdb_printf ("\t%10s %10s %10s %10s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "objfile"); } else { - printf_filtered (" %18s %18s %10s %10s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "objfile"); + gdb_printf (" %18s %18s %10s %10s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "objfile"); } } @@ -1204,19 +1204,19 @@ core_target::info_proc_mappings (struct gdbarch *gdbarch) const char *filename = bfd_get_filename (tsp.the_bfd_section->owner); if (gdbarch_addr_bit (gdbarch) == 32) - printf_filtered ("\t%10s %10s %10s %10s %s\n", - paddress (gdbarch, start), - paddress (gdbarch, end), - hex_string (end - start), - hex_string (file_ofs), - filename); + gdb_printf ("\t%10s %10s %10s %10s %s\n", + paddress (gdbarch, start), + paddress (gdbarch, end), + hex_string (end - start), + hex_string (file_ofs), + filename); else - printf_filtered (" %18s %18s %10s %10s %s\n", - paddress (gdbarch, start), - paddress (gdbarch, end), - hex_string (end - start), - hex_string (file_ofs), - filename); + gdb_printf (" %18s %18s %10s %10s %s\n", + paddress (gdbarch, start), + paddress (gdbarch, end), + hex_string (end - start), + hex_string (file_ofs), + filename); } } diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index 18238db..3ac19fa 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -509,11 +509,11 @@ cp_lookup_symbol_imports_or_template (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template" - " (%s, %s, %s, %s)\n", - scope, name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template" + " (%s, %s, %s, %s)\n", + scope, name, host_address_to_string (block), + domain_name (domain)); } if (function != NULL && function->language () == language_cplus) @@ -531,10 +531,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template" - " (...) = %s\n", - host_address_to_string (sym)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template" + " (...) = %s\n", + host_address_to_string (sym)); } return (struct block_symbol) {sym, block}; } @@ -576,7 +576,7 @@ cp_lookup_symbol_imports_or_template (const char *scope, { if (symbol_lookup_debug) { - fprintf_unfiltered + gdb_printf (gdb_stdlog, "cp_lookup_symbol_imports_or_template (...) = %s\n", host_address_to_string (sym)); @@ -590,10 +590,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, result = cp_lookup_symbol_via_imports (scope, name, block, domain, 0, 1, 1); if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template (...) = %s\n", - result.symbol != NULL - ? host_address_to_string (result.symbol) : "NULL"); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template (...) = %s\n", + result.symbol != NULL + ? host_address_to_string (result.symbol) : "NULL"); } return result; } @@ -636,10 +636,10 @@ cp_lookup_symbol_namespace (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_namespace (%s, %s, %s, %s)\n", - scope, name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_namespace (%s, %s, %s, %s)\n", + scope, name, host_address_to_string (block), + domain_name (domain)); } /* First, try to find the symbol in the given namespace. */ @@ -651,10 +651,10 @@ cp_lookup_symbol_namespace (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_namespace (...) = %s\n", - sym.symbol != NULL - ? host_address_to_string (sym.symbol) : "NULL"); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_namespace (...) = %s\n", + sym.symbol != NULL + ? host_address_to_string (sym.symbol) : "NULL"); } return sym; } @@ -742,11 +742,11 @@ cp_lookup_symbol_nonlocal (const struct language_defn *langdef, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_non_local" - " (%s, %s (scope %s), %s)\n", - name, host_address_to_string (block), scope, - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_non_local" + " (%s, %s (scope %s), %s)\n", + name, host_address_to_string (block), scope, + domain_name (domain)); } /* First, try to find the symbol in the given namespace, and all @@ -759,11 +759,11 @@ cp_lookup_symbol_nonlocal (const struct language_defn *langdef, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_nonlocal (...) = %s\n", - (sym.symbol != NULL - ? host_address_to_string (sym.symbol) - : "NULL")); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_nonlocal (...) = %s\n", + (sym.symbol != NULL + ? host_address_to_string (sym.symbol) + : "NULL")); } return sym; } @@ -920,11 +920,11 @@ cp_lookup_nested_symbol (struct type *parent_type, { const char *type_name = saved_parent_type->name (); - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (%s, %s, %s, %s)\n", - type_name != NULL ? type_name : "unnamed", - nested_name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (%s, %s, %s, %s)\n", + type_name != NULL ? type_name : "unnamed", + nested_name, host_address_to_string (block), + domain_name (domain)); } switch (parent_type->code ()) @@ -956,11 +956,11 @@ cp_lookup_nested_symbol (struct type *parent_type, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (...) = %s\n", - (sym.symbol != NULL - ? host_address_to_string (sym.symbol) - : "NULL")); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (...) = %s\n", + (sym.symbol != NULL + ? host_address_to_string (sym.symbol) + : "NULL")); } return sym; } @@ -969,9 +969,9 @@ cp_lookup_nested_symbol (struct type *parent_type, case TYPE_CODE_METHOD: if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (...) = NULL" - " (func/method)\n"); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (...) = NULL" + " (func/method)\n"); } return {}; @@ -1058,7 +1058,7 @@ cp_lookup_transparent_type_loop (const char *name, static void maintenance_cplus_namespace (const char *args, int from_tty) { - printf_filtered (_("The `maint namespace' command was removed.\n")); + gdb_printf (_("The `maint namespace' command was removed.\n")); } void _initialize_cp_namespace (); diff --git a/gdb/cp-support.c b/gdb/cp-support.c index af5c303..78015d4 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1583,9 +1583,9 @@ report_failed_demangle (const char *name, bool core_dump_allowed, begin_line (); if (core_dump_allowed) - fprintf_unfiltered (gdb_stderr, - _("%s\nAttempting to dump core.\n"), - long_msg.c_str ()); + gdb_printf (gdb_stderr, + _("%s\nAttempting to dump core.\n"), + long_msg.c_str ()); else warn_cant_dump_core (long_msg.c_str ()); @@ -2191,7 +2191,7 @@ first_component_command (const char *arg, int from_tty) memcpy (prefix, arg, len); prefix[len] = '\0'; - printf_filtered ("%s\n", prefix); + gdb_printf ("%s\n", prefix); } /* Implement "info vtbl". */ diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 07e0492..92b5f44 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -150,7 +150,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, } } - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); len = type->num_fields (); n_baseclasses = TYPE_N_BASECLASSES (type); @@ -206,7 +206,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, { if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); gdb_puts ("members of ", stream); gdb_puts (type->name (), stream); @@ -217,7 +217,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else @@ -373,12 +373,12 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } } /* if there are data fields */ - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } /* Special val_print routine to avoid printing multiple copies of @@ -478,7 +478,7 @@ cp_print_value (struct value *val, struct ui_file *stream, /* Now do the printing. */ if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } gdb_puts ("<", stream); @@ -691,7 +691,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type, if (val == -1) { - fprintf_filtered (stream, "NULL"); + gdb_printf (stream, "NULL"); return; } @@ -707,12 +707,12 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type, gdb_puts (name, stream); else c_type_print_base (self_type, stream, 0, 0, &type_print_raw_options); - fprintf_filtered (stream, "::"); + gdb_printf (stream, "::"); fputs_styled (self_type->field (fieldno).name (), variable_name_style.style (), stream); } else - fprintf_filtered (stream, "%ld", (long) val); + gdb_printf (stream, "%ld", (long) val); } #if GDB_SELF_TEST diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 9698d32..898d277 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -3792,7 +3792,7 @@ cris_supply_gregset (const struct regset *regset, struct regcache *regcache, (char *)®p[ERP_REGNUM]); if (*(char *)®p[ERP_REGNUM] & 0x1) - fprintf_unfiltered (gdb_stderr, "Warning: PC in delay slot\n"); + gdb_printf (gdb_stderr, "Warning: PC in delay slot\n"); } } @@ -3863,12 +3863,12 @@ cris_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch); if (tdep != NULL) { - fprintf_filtered (file, "cris_dump_tdep: tdep->cris_version = %i\n", - tdep->cris_version); - fprintf_filtered (file, "cris_dump_tdep: tdep->cris_mode = %s\n", - tdep->cris_mode); - fprintf_filtered (file, "cris_dump_tdep: tdep->cris_dwarf2_cfi = %i\n", - tdep->cris_dwarf2_cfi); + gdb_printf (file, "cris_dump_tdep: tdep->cris_version = %i\n", + tdep->cris_version); + gdb_printf (file, "cris_dump_tdep: tdep->cris_mode = %s\n", + tdep->cris_mode); + gdb_printf (file, "cris_dump_tdep: tdep->cris_dwarf2_cfi = %i\n", + tdep->cris_dwarf2_cfi); } } diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index 0d0381c..09e8fc5 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -72,10 +72,10 @@ static struct reggroup *prof_reggroup; static void print_savedreg_msg (int regno, int offsets[], bool print_continuing) { - fprintf_unfiltered (gdb_stdlog, "csky: r%d saved at offset 0x%x\n", - regno, offsets[regno]); + gdb_printf (gdb_stdlog, "csky: r%d saved at offset 0x%x\n", + regno, offsets[regno]); if (print_continuing) - fprintf_unfiltered (gdb_stdlog, "csky: continuing\n"); + gdb_printf (gdb_stdlog, "csky: continuing\n"); } /* Check whether the instruction at ADDR is 16-bit or not. */ @@ -342,10 +342,10 @@ csky_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: struct return in %s = %s\n", - gdbarch_register_name (gdbarch, argreg), - paddress (gdbarch, struct_addr)); + gdb_printf (gdb_stdlog, + "csky: struct return in %s = %s\n", + gdbarch_register_name (gdbarch, argreg), + paddress (gdbarch, struct_addr)); } regcache_cooked_write_unsigned (regcache, argreg, struct_addr); argreg++; @@ -533,10 +533,10 @@ csky_analyze_prologue (struct gdbarch *gdbarch, saved (and where). */ if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: Scanning prologue: start_pc = 0x%x," - "limit_pc = 0x%x\n", (unsigned int) start_pc, - (unsigned int) limit_pc); + gdb_printf (gdb_stdlog, + "csky: Scanning prologue: start_pc = 0x%x," + "limit_pc = 0x%x\n", (unsigned int) start_pc, + (unsigned int) limit_pc); } /* Default to 16 bit instruction. */ @@ -557,9 +557,9 @@ csky_analyze_prologue (struct gdbarch *gdbarch, int offset = CSKY_32_SUBI_IMM (insn); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: got subi sp,%d; continuing\n", - offset); + gdb_printf (gdb_stdlog, + "csky: got subi sp,%d; continuing\n", + offset); } stacksize += offset; continue; @@ -583,10 +583,10 @@ csky_analyze_prologue (struct gdbarch *gdbarch, reg_count = CSKY_32_STM_SIZE (insn); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: got stm r%d-r%d,(sp)\n", - start_register, - start_register + reg_count); + gdb_printf (gdb_stdlog, + "csky: got stm r%d-r%d,(sp)\n", + start_register, + start_register + reg_count); } for (rn = start_register, offset = 0; @@ -596,15 +596,15 @@ csky_analyze_prologue (struct gdbarch *gdbarch, register_offsets[rn] = stacksize - offset; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: r%d saved at 0x%x" - " (offset %d)\n", - rn, register_offsets[rn], - offset); + gdb_printf (gdb_stdlog, + "csky: r%d saved at 0x%x" + " (offset %d)\n", + rn, register_offsets[rn], + offset); } } if (csky_debug) - fprintf_unfiltered (gdb_stdlog, "csky: continuing\n"); + gdb_printf (gdb_stdlog, "csky: continuing\n"); continue; } /* stw ry,(sp,disp). */ @@ -814,19 +814,19 @@ csky_analyze_prologue (struct gdbarch *gdbarch, stacksize += num * 4; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: push regs_array: r16-r%d\n", - 16 + num - 1); + gdb_printf (gdb_stdlog, + "csky: push regs_array: r16-r%d\n", + 16 + num - 1); } for (rn = 16; rn <= 16 + num - 1; rn++) { register_offsets[rn] = stacksize - tmp; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: r%d saved at 0x%x" - " (offset %d)\n", rn, - register_offsets[rn], tmp); + gdb_printf (gdb_stdlog, + "csky: r%d saved at 0x%x" + " (offset %d)\n", rn, + register_offsets[rn], tmp); } tmp += 4; } @@ -845,19 +845,19 @@ csky_analyze_prologue (struct gdbarch *gdbarch, stacksize += num * 4; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: push regs_array: r4-r%d\n", - 4 + num - 1); + gdb_printf (gdb_stdlog, + "csky: push regs_array: r4-r%d\n", + 4 + num - 1); } for (rn = 4; rn <= 4 + num - 1; rn++) { register_offsets[rn] = stacksize - tmp; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: r%d saved at 0x%x" - " (offset %d)\n", rn, - register_offsets[rn], tmp); + gdb_printf (gdb_stdlog, + "csky: r%d saved at 0x%x" + " (offset %d)\n", rn, + register_offsets[rn], tmp); } tmp += 4; } @@ -865,7 +865,7 @@ csky_analyze_prologue (struct gdbarch *gdbarch, framesize = stacksize; if (csky_debug) - fprintf_unfiltered (gdb_stdlog, "csky: continuing\n"); + gdb_printf (gdb_stdlog, "csky: continuing\n"); continue; } else if (CSKY_32_IS_LRW4 (insn) || CSKY_32_IS_MOVI4 (insn) @@ -877,8 +877,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: looking at large frame\n"); + gdb_printf (gdb_stdlog, + "csky: looking at large frame\n"); } if (CSKY_32_IS_LRW4 (insn)) { @@ -900,12 +900,12 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: base stacksize=0x%x\n", adjust); + gdb_printf (gdb_stdlog, + "csky: base stacksize=0x%x\n", adjust); /* May have zero or more insns which modify r4. */ - fprintf_unfiltered (gdb_stdlog, - "csky: looking for r4 adjusters...\n"); + gdb_printf (gdb_stdlog, + "csky: looking for r4 adjusters...\n"); } offset = 4; @@ -918,8 +918,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust += imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: addi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: addi r4,%d\n", imm); } } else if (CSKY_32_IS_SUBI4 (insn2)) @@ -928,8 +928,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust -= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: subi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: subi r4,%d\n", imm); } } else if (CSKY_32_IS_NOR4 (insn2)) @@ -937,8 +937,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust = ~adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: nor r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: nor r4,r4,r4\n"); } } else if (CSKY_32_IS_ROTLI4 (insn2)) @@ -949,8 +949,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= temp; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: rotli r4,r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: rotli r4,r4,%d\n", imm); } } else if (CSKY_32_IS_LISI4 (insn2)) @@ -959,8 +959,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust <<= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: lsli r4,r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: lsli r4,r4,%d\n", imm); } } else if (CSKY_32_IS_BSETI4 (insn2)) @@ -969,8 +969,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= (1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bseti r4,r4 %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bseti r4,r4 %d\n", imm); } } else if (CSKY_32_IS_BCLRI4 (insn2)) @@ -979,8 +979,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust &= ~(1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bclri r4,r4 %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bclri r4,r4 %d\n", imm); } } else if (CSKY_32_IS_IXH4 (insn2)) @@ -988,8 +988,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust *= 3; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: ixh r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: ixh r4,r4,r4\n"); } } else if (CSKY_32_IS_IXW4 (insn2)) @@ -997,8 +997,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust *= 5; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: ixw r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: ixw r4,r4,r4\n"); } } else if (CSKY_16_IS_ADDI4 (insn2)) @@ -1007,8 +1007,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust += imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: addi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: addi r4,%d\n", imm); } } else if (CSKY_16_IS_SUBI4 (insn2)) @@ -1017,8 +1017,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust -= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: subi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: subi r4,%d\n", imm); } } else if (CSKY_16_IS_NOR4 (insn2)) @@ -1026,8 +1026,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust = ~adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: nor r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: nor r4,r4\n"); } } else if (CSKY_16_IS_BSETI4 (insn2)) @@ -1036,8 +1036,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= (1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bseti r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bseti r4, %d\n", imm); } } else if (CSKY_16_IS_BCLRI4 (insn2)) @@ -1046,8 +1046,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust &= ~(1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bclri r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bclri r4, %d\n", imm); } } else if (CSKY_16_IS_LSLI4 (insn2)) @@ -1056,8 +1056,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust <<= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: lsli r4,r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: lsli r4,r4, %d\n", imm); } } @@ -1067,8 +1067,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, "csky: done looking for" - " r4 adjusters\n"); + gdb_printf (gdb_stdlog, "csky: done looking for" + " r4 adjusters\n"); } /* If the next insn adjusts the stack pointer, we keep @@ -1080,14 +1080,14 @@ csky_analyze_prologue (struct gdbarch *gdbarch, stacksize += adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: found stack adjustment of" - " 0x%x bytes.\n", adjust); - fprintf_unfiltered (gdb_stdlog, - "csky: skipping to new address %s\n", - core_addr_to_string_nz (addr)); - fprintf_unfiltered (gdb_stdlog, - "csky: continuing\n"); + gdb_printf (gdb_stdlog, + "csky: found stack adjustment of" + " 0x%x bytes.\n", adjust); + gdb_printf (gdb_stdlog, + "csky: skipping to new address %s\n", + core_addr_to_string_nz (addr)); + gdb_printf (gdb_stdlog, + "csky: continuing\n"); } continue; } @@ -1096,9 +1096,9 @@ csky_analyze_prologue (struct gdbarch *gdbarch, anything. */ if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: no subu sp,sp,r4; NOT altering" - " stacksize.\n"); + gdb_printf (gdb_stdlog, + "csky: no subu sp,sp,r4; NOT altering" + " stacksize.\n"); } break; } @@ -1113,9 +1113,9 @@ csky_analyze_prologue (struct gdbarch *gdbarch, int offset = CSKY_16_SUBI_IMM (insn); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: got subi r0,%d; continuing\n", - offset); + gdb_printf (gdb_stdlog, + "csky: got subi r0,%d; continuing\n", + offset); } stacksize += offset; continue; @@ -1160,19 +1160,19 @@ csky_analyze_prologue (struct gdbarch *gdbarch, offset += num * 4; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: push regs_array: r4-r%d\n", - 4 + num - 1); + gdb_printf (gdb_stdlog, + "csky: push regs_array: r4-r%d\n", + 4 + num - 1); } for (rn = 4; rn <= 4 + num - 1; rn++) { register_offsets[rn] = stacksize - tmp; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: r%d saved at 0x%x" - " (offset %d)\n", rn, - register_offsets[rn], offset); + gdb_printf (gdb_stdlog, + "csky: r%d saved at 0x%x" + " (offset %d)\n", rn, + register_offsets[rn], offset); } tmp += 4; } @@ -1180,7 +1180,7 @@ csky_analyze_prologue (struct gdbarch *gdbarch, framesize = stacksize; if (csky_debug) - fprintf_unfiltered (gdb_stdlog, "csky: continuing\n"); + gdb_printf (gdb_stdlog, "csky: continuing\n"); continue; } else if (CSKY_16_IS_LRW4 (insn) || CSKY_16_IS_MOVI4 (insn)) @@ -1190,8 +1190,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: looking at large frame\n"); + gdb_printf (gdb_stdlog, + "csky: looking at large frame\n"); } if (CSKY_16_IS_LRW4 (insn)) { @@ -1209,15 +1209,15 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: base stacksize=0x%x\n", adjust); + gdb_printf (gdb_stdlog, + "csky: base stacksize=0x%x\n", adjust); } /* May have zero or more instructions which modify r4. */ if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: looking for r4 adjusters...\n"); + gdb_printf (gdb_stdlog, + "csky: looking for r4 adjusters...\n"); } int offset = 2; insn_len = csky_get_insn (gdbarch, addr + offset, &insn2); @@ -1229,8 +1229,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust += imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: addi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: addi r4,%d\n", imm); } } else if (CSKY_32_IS_SUBI4 (insn2)) @@ -1239,8 +1239,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust -= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: subi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: subi r4,%d\n", imm); } } else if (CSKY_32_IS_NOR4 (insn2)) @@ -1248,8 +1248,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust = ~adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: nor r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: nor r4,r4,r4\n"); } } else if (CSKY_32_IS_ROTLI4 (insn2)) @@ -1260,8 +1260,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= temp; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: rotli r4,r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: rotli r4,r4,%d\n", imm); } } else if (CSKY_32_IS_LISI4 (insn2)) @@ -1270,8 +1270,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust <<= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: lsli r4,r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: lsli r4,r4,%d\n", imm); } } else if (CSKY_32_IS_BSETI4 (insn2)) @@ -1280,8 +1280,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= (1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bseti r4,r4 %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bseti r4,r4 %d\n", imm); } } else if (CSKY_32_IS_BCLRI4 (insn2)) @@ -1290,8 +1290,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust &= ~(1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bclri r4,r4 %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bclri r4,r4 %d\n", imm); } } else if (CSKY_32_IS_IXH4 (insn2)) @@ -1299,8 +1299,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust *= 3; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: ixh r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: ixh r4,r4,r4\n"); } } else if (CSKY_32_IS_IXW4 (insn2)) @@ -1308,8 +1308,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust *= 5; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: ixw r4,r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: ixw r4,r4,r4\n"); } } else if (CSKY_16_IS_ADDI4 (insn2)) @@ -1318,8 +1318,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust += imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: addi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: addi r4,%d\n", imm); } } else if (CSKY_16_IS_SUBI4 (insn2)) @@ -1328,8 +1328,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust -= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: subi r4,%d\n", imm); + gdb_printf (gdb_stdlog, + "csky: subi r4,%d\n", imm); } } else if (CSKY_16_IS_NOR4 (insn2)) @@ -1337,8 +1337,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust = ~adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: nor r4,r4\n"); + gdb_printf (gdb_stdlog, + "csky: nor r4,r4\n"); } } else if (CSKY_16_IS_BSETI4 (insn2)) @@ -1347,8 +1347,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust |= (1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bseti r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bseti r4, %d\n", imm); } } else if (CSKY_16_IS_BCLRI4 (insn2)) @@ -1357,8 +1357,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust &= ~(1 << imm); if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: bclri r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: bclri r4, %d\n", imm); } } else if (CSKY_16_IS_LSLI4 (insn2)) @@ -1367,8 +1367,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, adjust <<= imm; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, - "csky: lsli r4,r4, %d\n", imm); + gdb_printf (gdb_stdlog, + "csky: lsli r4,r4, %d\n", imm); } } @@ -1378,8 +1378,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, "csky: " - "done looking for r4 adjusters\n"); + gdb_printf (gdb_stdlog, "csky: " + "done looking for r4 adjusters\n"); } /* If the next instruction adjusts the stack pointer, we keep @@ -1391,13 +1391,13 @@ csky_analyze_prologue (struct gdbarch *gdbarch, stacksize += adjust; if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, "csky: " - "found stack adjustment of 0x%x" - " bytes.\n", adjust); - fprintf_unfiltered (gdb_stdlog, "csky: " - "skipping to new address %s\n", - core_addr_to_string_nz (addr)); - fprintf_unfiltered (gdb_stdlog, "csky: continuing\n"); + gdb_printf (gdb_stdlog, "csky: " + "found stack adjustment of 0x%x" + " bytes.\n", adjust); + gdb_printf (gdb_stdlog, "csky: " + "skipping to new address %s\n", + core_addr_to_string_nz (addr)); + gdb_printf (gdb_stdlog, "csky: continuing\n"); } continue; } @@ -1406,8 +1406,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, anything. */ if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, "csky: no subu sp,r4; " - "NOT altering stacksize.\n"); + gdb_printf (gdb_stdlog, "csky: no subu sp,r4; " + "NOT altering stacksize.\n"); } break; } @@ -1416,8 +1416,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch, /* This is not a prologue instruction, so stop here. */ if (csky_debug) { - fprintf_unfiltered (gdb_stdlog, "csky: insn is not a prologue" - " insn -- ending scan\n"); + gdb_printf (gdb_stdlog, "csky: insn is not a prologue" + " insn -- ending scan\n"); } break; } @@ -1455,12 +1455,12 @@ csky_analyze_prologue (struct gdbarch *gdbarch, { CORE_ADDR rn_value = read_memory_unsigned_integer ( this_cache->saved_regs[rn].addr (), 4, byte_order); - fprintf_unfiltered (gdb_stdlog, "Saved register %s " - "stored at 0x%08lx, value=0x%08lx\n", - csky_register_names[rn], - (unsigned long) - this_cache->saved_regs[rn].addr (), - (unsigned long) rn_value); + gdb_printf (gdb_stdlog, "Saved register %s " + "stored at 0x%08lx, value=0x%08lx\n", + csky_register_names[rn], + (unsigned long) + this_cache->saved_regs[rn].addr (), + (unsigned long) rn_value); } } } diff --git a/gdb/ctfread.c b/gdb/ctfread.c index 5d965bb..585c664 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -1398,7 +1398,7 @@ ctf_psymtab::read_symtab (struct objfile *objfile) { if (info_verbose) { - printf_filtered (_("Reading in CTF data for %s..."), filename); + gdb_printf (_("Reading in CTF data for %s..."), filename); gdb_flush (gdb_stdout); } @@ -1417,7 +1417,7 @@ ctf_psymtab::read_symtab (struct objfile *objfile) /* Finish up the debug error message. */ if (info_verbose) - printf_filtered (_("done.\n")); + gdb_printf (_("done.\n")); } } @@ -1601,7 +1601,7 @@ build_ctf_archive_member (ctf_dict_t *ctf, const char *name, void *arg) if (info_verbose) { - printf_filtered (_("Scanning archive member %s..."), name); + gdb_printf (_("Scanning archive member %s..."), name); gdb_flush (gdb_stdout); } diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c index 8d00d66..15a34a9 100644 --- a/gdb/darwin-nat-info.c +++ b/gdb/darwin-nat-info.c @@ -54,12 +54,12 @@ } while (0) #define PRINT_FIELD(structure, field) \ - printf_filtered(_(#field":\t%#lx\n"), (unsigned long) (structure)->field) + gdb_printf(_(#field":\t%#lx\n"), (unsigned long) (structure)->field) #define PRINT_TV_FIELD(structure, field) \ - printf_filtered(_(#field":\t%u.%06u sec\n"), \ - (unsigned) (structure)->field.seconds, \ - (unsigned) (structure)->field.microseconds) + gdb_printf(_(#field":\t%u.%06u sec\n"), \ + (unsigned) (structure)->field.seconds, \ + (unsigned) (structure)->field.microseconds) #define task_self mach_task_self #define task_by_unix_pid task_for_pid @@ -83,7 +83,7 @@ info_mach_tasks_command (const char *args, int from_tty) sysctl (sysControl, 3, procInfo, &length, NULL, 0); count = (length / sizeof (struct kinfo_proc)); - printf_filtered (_("%d processes:\n"), count); + gdb_printf (_("%d processes:\n"), count); for (index = 0; index < count; ++index) { kern_return_t result; @@ -94,15 +94,15 @@ info_mach_tasks_command (const char *args, int from_tty) &taskPort); if (KERN_SUCCESS == result) { - printf_filtered (_(" %s is %d has task %#x\n"), - procInfo[index].kp_proc.p_comm, - procInfo[index].kp_proc.p_pid, taskPort); + gdb_printf (_(" %s is %d has task %#x\n"), + procInfo[index].kp_proc.p_comm, + procInfo[index].kp_proc.p_pid, taskPort); } else { - printf_filtered (_(" %s is %d unknown task port\n"), - procInfo[index].kp_proc.p_comm, - procInfo[index].kp_proc.p_pid); + gdb_printf (_(" %s is %d unknown task port\n"), + procInfo[index].kp_proc.p_comm, + procInfo[index].kp_proc.p_pid); } } @@ -118,7 +118,7 @@ get_task_from_args (const char *args) if (args == NULL || *args == 0) { if (inferior_ptid == null_ptid) - printf_filtered (_("No inferior running\n")); + gdb_printf (_("No inferior running\n")); darwin_inferior *priv = get_darwin_inferior (current_inferior ()); @@ -129,7 +129,7 @@ get_task_from_args (const char *args) task = strtoul (args, &eptr, 0); if (*eptr) { - printf_filtered (_("cannot parse task id '%s'\n"), args); + gdb_printf (_("cannot parse task id '%s'\n"), args); return TASK_NULL; } return task; @@ -153,7 +153,7 @@ info_mach_task_command (const char *args, int from_tty) if (task == TASK_NULL) return; - printf_filtered (_("TASK_BASIC_INFO for 0x%x:\n"), task); + gdb_printf (_("TASK_BASIC_INFO for 0x%x:\n"), task); info_count = TASK_BASIC_INFO_COUNT; result = task_info (task, TASK_BASIC_INFO, @@ -165,7 +165,7 @@ info_mach_task_command (const char *args, int from_tty) PRINT_FIELD (&task_info_data.basic, resident_size); PRINT_TV_FIELD (&task_info_data.basic, user_time); PRINT_TV_FIELD (&task_info_data.basic, system_time); - printf_filtered (_("\nTASK_EVENTS_INFO:\n")); + gdb_printf (_("\nTASK_EVENTS_INFO:\n")); info_count = TASK_EVENTS_INFO_COUNT; result = task_info (task, TASK_EVENTS_INFO, @@ -181,7 +181,7 @@ info_mach_task_command (const char *args, int from_tty) PRINT_FIELD (&task_info_data.events, cow_faults); PRINT_FIELD (&task_info_data.events, messages_sent); PRINT_FIELD (&task_info_data.events, messages_received); - printf_filtered (_("\nTASK_THREAD_TIMES_INFO:\n")); + gdb_printf (_("\nTASK_THREAD_TIMES_INFO:\n")); info_count = TASK_THREAD_TIMES_INFO_COUNT; result = task_info (task, TASK_THREAD_TIMES_INFO, @@ -211,8 +211,8 @@ info_mach_ports_command (const char *args, int from_tty) gdb_assert (name_count == type_count); - printf_filtered (_("Ports for task 0x%x:\n"), task); - printf_filtered (_("port type\n")); + gdb_printf (_("Ports for task 0x%x:\n"), task); + gdb_printf (_("port type\n")); for (index = 0; index < name_count; ++index) { mach_port_t port = names[index]; @@ -232,47 +232,47 @@ info_mach_ports_command (const char *args, int from_tty) {MACH_PORT_TYPE_DEAD_NAME, "dead", MACH_PORT_RIGHT_DEAD_NAME} }; - printf_filtered (_("%04x: %08x "), port, types[index]); + gdb_printf (_("%04x: %08x "), port, types[index]); for (j = 0; j < sizeof(descrs) / sizeof(*descrs); j++) if (types[index] & descrs[j].type) { mach_port_urefs_t ref; kern_return_t ret; - printf_filtered (_(" %s("), descrs[j].name); + gdb_printf (_(" %s("), descrs[j].name); ret = mach_port_get_refs (task, port, descrs[j].right, &ref); if (ret != KERN_SUCCESS) - printf_filtered (_("??")); + gdb_printf (_("??")); else - printf_filtered (_("%u"), ref); - printf_filtered (_(" refs)")); + gdb_printf (_("%u"), ref); + gdb_printf (_(" refs)")); } if (task == task_self ()) { if (port == task_self()) - printf_filtered (_(" gdb-task")); + gdb_printf (_(" gdb-task")); else if (port == darwin_host_self) - printf_filtered (_(" host-self")); + gdb_printf (_(" host-self")); else if (port == darwin_ex_port) - printf_filtered (_(" gdb-exception")); + gdb_printf (_(" gdb-exception")); else if (port == darwin_port_set) - printf_filtered (_(" gdb-port_set")); + gdb_printf (_(" gdb-port_set")); else if (inferior_ptid != null_ptid) { struct inferior *inf = current_inferior (); darwin_inferior *priv = get_darwin_inferior (inf); if (port == priv->task) - printf_filtered (_(" inferior-task")); + gdb_printf (_(" inferior-task")); else if (port == priv->notify_port) - printf_filtered (_(" inferior-notify")); + gdb_printf (_(" inferior-notify")); else { for (int k = 0; k < priv->exception_info.count; k++) if (port == priv->exception_info.ports[k]) { - printf_filtered (_(" inferior-excp-port")); + gdb_printf (_(" inferior-excp-port")); break; } @@ -280,8 +280,8 @@ info_mach_ports_command (const char *args, int from_tty) { if (port == t->gdb_port) { - printf_filtered (_(" inferior-thread for 0x%x"), - priv->task); + gdb_printf (_(" inferior-thread for 0x%x"), + priv->task); break; } } @@ -289,7 +289,7 @@ info_mach_ports_command (const char *args, int from_tty) } } } - printf_filtered (_("\n")); + gdb_printf (_("\n")); } vm_deallocate (task_self (), (vm_address_t) names, @@ -310,18 +310,18 @@ darwin_debug_port_info (task_t task, mach_port_t port) (task, port, MACH_PORT_RECEIVE_STATUS, (mach_port_info_t)&status, &len); MACH_CHECK_ERROR (kret); - printf_filtered (_("Port 0x%lx in task 0x%lx:\n"), (unsigned long) port, - (unsigned long) task); - printf_filtered (_(" port set: 0x%x\n"), status.mps_pset); - printf_filtered (_(" seqno: 0x%x\n"), status.mps_seqno); - printf_filtered (_(" mscount: 0x%x\n"), status.mps_mscount); - printf_filtered (_(" qlimit: 0x%x\n"), status.mps_qlimit); - printf_filtered (_(" msgcount: 0x%x\n"), status.mps_msgcount); - printf_filtered (_(" sorights: 0x%x\n"), status.mps_sorights); - printf_filtered (_(" srights: 0x%x\n"), status.mps_srights); - printf_filtered (_(" pdrequest: 0x%x\n"), status.mps_pdrequest); - printf_filtered (_(" nsrequest: 0x%x\n"), status.mps_nsrequest); - printf_filtered (_(" flags: 0x%x\n"), status.mps_flags); + gdb_printf (_("Port 0x%lx in task 0x%lx:\n"), (unsigned long) port, + (unsigned long) task); + gdb_printf (_(" port set: 0x%x\n"), status.mps_pset); + gdb_printf (_(" seqno: 0x%x\n"), status.mps_seqno); + gdb_printf (_(" mscount: 0x%x\n"), status.mps_mscount); + gdb_printf (_(" qlimit: 0x%x\n"), status.mps_qlimit); + gdb_printf (_(" msgcount: 0x%x\n"), status.mps_msgcount); + gdb_printf (_(" sorights: 0x%x\n"), status.mps_sorights); + gdb_printf (_(" srights: 0x%x\n"), status.mps_srights); + gdb_printf (_(" pdrequest: 0x%x\n"), status.mps_pdrequest); + gdb_printf (_(" nsrequest: 0x%x\n"), status.mps_nsrequest); + gdb_printf (_(" flags: 0x%x\n"), status.mps_flags); } static void @@ -352,10 +352,10 @@ info_mach_threads_command (const char *args, int from_tty) result = task_threads (task, &threads, &thread_count); MACH_CHECK_ERROR (result); - printf_filtered (_("Threads in task %#x:\n"), task); + gdb_printf (_("Threads in task %#x:\n"), task); for (i = 0; i < thread_count; ++i) { - printf_filtered (_(" %#x\n"), threads[i]); + gdb_printf (_(" %#x\n"), threads[i]); mach_port_deallocate (task_self (), threads[i]); } @@ -378,7 +378,7 @@ info_mach_thread_command (const char *args, int from_tty) CHECK_ARGS (_("Thread"), args); sscanf (args, "0x%x", &thread); - printf_filtered (_("THREAD_BASIC_INFO\n")); + gdb_printf (_("THREAD_BASIC_INFO\n")); info_count = THREAD_BASIC_INFO_COUNT; result = thread_info (thread, THREAD_BASIC_INFO, @@ -526,7 +526,7 @@ darwin_debug_regions (task_t task, mach_vm_address_t address, int max) (vm_region_info_t) &info, &count, &object_name); if (kret != KERN_SUCCESS) { - printf_filtered (_("No memory regions.")); + gdb_printf (_("No memory regions.")); return; } memcpy (&prev_info, &info, sizeof (vm_region_basic_info_data_64_t)); @@ -570,19 +570,19 @@ darwin_debug_regions (task_t task, mach_vm_address_t address, int max) if (print) { - printf_filtered (_("%s-%s %s/%s %s %s %s"), - paddress (target_gdbarch (), prev_address), - paddress (target_gdbarch (), prev_address + prev_size), - unparse_protection (prev_info.protection), - unparse_protection (prev_info.max_protection), - unparse_inheritance (prev_info.inheritance), - prev_info.shared ? _("shrd") : _("priv"), - prev_info.reserved ? _("reserved") : _("not-rsvd")); + gdb_printf (_("%s-%s %s/%s %s %s %s"), + paddress (target_gdbarch (), prev_address), + paddress (target_gdbarch (), prev_address + prev_size), + unparse_protection (prev_info.protection), + unparse_protection (prev_info.max_protection), + unparse_inheritance (prev_info.inheritance), + prev_info.shared ? _("shrd") : _("priv"), + prev_info.reserved ? _("reserved") : _("not-rsvd")); if (nsubregions > 1) - printf_filtered (_(" (%d sub-rgn)"), nsubregions); + gdb_printf (_(" (%d sub-rgn)"), nsubregions); - printf_filtered (_("\n")); + gdb_printf (_("\n")); prev_address = address; prev_size = size; @@ -743,48 +743,48 @@ disp_exception (const darwin_exception_info *info) { int i; - printf_filtered (_("%d exceptions:\n"), info->count); + gdb_printf (_("%d exceptions:\n"), info->count); for (i = 0; i < info->count; i++) { exception_mask_t mask = info->masks[i]; - printf_filtered (_("port 0x%04x, behavior: "), info->ports[i]); + gdb_printf (_("port 0x%04x, behavior: "), info->ports[i]); switch (info->behaviors[i]) { case EXCEPTION_DEFAULT: - printf_filtered (_("default")); + gdb_printf (_("default")); break; case EXCEPTION_STATE: - printf_filtered (_("state")); + gdb_printf (_("state")); break; case EXCEPTION_STATE_IDENTITY: - printf_filtered (_("state-identity")); + gdb_printf (_("state-identity")); break; default: - printf_filtered (_("0x%x"), info->behaviors[i]); + gdb_printf (_("0x%x"), info->behaviors[i]); } - printf_filtered (_(", masks:")); + gdb_printf (_(", masks:")); if (mask & EXC_MASK_BAD_ACCESS) - printf_filtered (_(" BAD_ACCESS")); + gdb_printf (_(" BAD_ACCESS")); if (mask & EXC_MASK_BAD_INSTRUCTION) - printf_filtered (_(" BAD_INSTRUCTION")); + gdb_printf (_(" BAD_INSTRUCTION")); if (mask & EXC_MASK_ARITHMETIC) - printf_filtered (_(" ARITHMETIC")); + gdb_printf (_(" ARITHMETIC")); if (mask & EXC_MASK_EMULATION) - printf_filtered (_(" EMULATION")); + gdb_printf (_(" EMULATION")); if (mask & EXC_MASK_SOFTWARE) - printf_filtered (_(" SOFTWARE")); + gdb_printf (_(" SOFTWARE")); if (mask & EXC_MASK_BREAKPOINT) - printf_filtered (_(" BREAKPOINT")); + gdb_printf (_(" BREAKPOINT")); if (mask & EXC_MASK_SYSCALL) - printf_filtered (_(" SYSCALL")); + gdb_printf (_(" SYSCALL")); if (mask & EXC_MASK_MACH_SYSCALL) - printf_filtered (_(" MACH_SYSCALL")); + gdb_printf (_(" MACH_SYSCALL")); if (mask & EXC_MASK_RPC_ALERT) - printf_filtered (_(" RPC_ALERT")); + gdb_printf (_(" RPC_ALERT")); if (mask & EXC_MASK_CRASH) - printf_filtered (_(" CRASH")); - printf_filtered (_("\n")); + gdb_printf (_(" CRASH")); + gdb_printf (_("\n")); } } @@ -801,7 +801,7 @@ info_mach_exceptions_command (const char *args, int from_tty) if (strcmp (args, "saved") == 0) { if (inferior_ptid == null_ptid) - printf_filtered (_("No inferior running\n")); + gdb_printf (_("No inferior running\n")); darwin_inferior *priv = get_darwin_inferior (current_inferior ()); @@ -825,7 +825,7 @@ info_mach_exceptions_command (const char *args, int from_tty) struct inferior *inf; if (inferior_ptid == null_ptid) - printf_filtered (_("No inferior running\n")); + gdb_printf (_("No inferior running\n")); inf = current_inferior (); darwin_inferior *priv = get_darwin_inferior (inf); diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index adbe747..60d315b 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -169,7 +169,7 @@ inferior_debug (int level, const char *fmt, ...) return; va_start (ap, fmt); - fprintf_unfiltered (gdb_stdlog, _("[%d inferior]: "), getpid ()); + gdb_printf (gdb_stdlog, _("[%d inferior]: "), getpid ()); vfprintf_unfiltered (gdb_stdlog, fmt, ap); va_end (ap); } @@ -459,20 +459,20 @@ darwin_resume_inferior (struct inferior *inf) static void darwin_dump_message (mach_msg_header_t *hdr, int disp_body) { - fprintf_unfiltered (gdb_stdlog, - _("message header:\n")); - fprintf_unfiltered (gdb_stdlog, - _(" bits: 0x%x\n"), hdr->msgh_bits); - fprintf_unfiltered (gdb_stdlog, - _(" size: 0x%x\n"), hdr->msgh_size); - fprintf_unfiltered (gdb_stdlog, - _(" remote-port: 0x%x\n"), hdr->msgh_remote_port); - fprintf_unfiltered (gdb_stdlog, - _(" local-port: 0x%x\n"), hdr->msgh_local_port); - fprintf_unfiltered (gdb_stdlog, - _(" reserved: 0x%x\n"), hdr->msgh_reserved); - fprintf_unfiltered (gdb_stdlog, - _(" id: 0x%x\n"), hdr->msgh_id); + gdb_printf (gdb_stdlog, + _("message header:\n")); + gdb_printf (gdb_stdlog, + _(" bits: 0x%x\n"), hdr->msgh_bits); + gdb_printf (gdb_stdlog, + _(" size: 0x%x\n"), hdr->msgh_size); + gdb_printf (gdb_stdlog, + _(" remote-port: 0x%x\n"), hdr->msgh_remote_port); + gdb_printf (gdb_stdlog, + _(" local-port: 0x%x\n"), hdr->msgh_local_port); + gdb_printf (gdb_stdlog, + _(" reserved: 0x%x\n"), hdr->msgh_reserved); + gdb_printf (gdb_stdlog, + _(" id: 0x%x\n"), hdr->msgh_id); if (disp_body) { @@ -491,24 +491,24 @@ darwin_dump_message (mach_msg_header_t *hdr, int disp_body) (mach_msg_port_descriptor_t *)(bod + 1); int k; NDR_record_t *ndr; - fprintf_unfiltered (gdb_stdlog, - _("body: descriptor_count=%u\n"), - bod->msgh_descriptor_count); + gdb_printf (gdb_stdlog, + _("body: descriptor_count=%u\n"), + bod->msgh_descriptor_count); data += sizeof (mach_msg_body_t); size -= sizeof (mach_msg_body_t); for (k = 0; k < bod->msgh_descriptor_count; k++) switch (desc[k].type) { case MACH_MSG_PORT_DESCRIPTOR: - fprintf_unfiltered + gdb_printf (gdb_stdlog, _(" descr %d: type=%u (port) name=0x%x, dispo=%d\n"), k, desc[k].type, desc[k].name, desc[k].disposition); break; default: - fprintf_unfiltered (gdb_stdlog, - _(" descr %d: type=%u\n"), - k, desc[k].type); + gdb_printf (gdb_stdlog, + _(" descr %d: type=%u\n"), + k, desc[k].type); break; } data += bod->msgh_descriptor_count @@ -516,7 +516,7 @@ darwin_dump_message (mach_msg_header_t *hdr, int disp_body) size -= bod->msgh_descriptor_count * sizeof (mach_msg_port_descriptor_t); ndr = (NDR_record_t *)(desc + bod->msgh_descriptor_count); - fprintf_unfiltered + gdb_printf (gdb_stdlog, _("NDR: mig=%02x if=%02x encod=%02x " "int=%02x char=%02x float=%02x\n"), @@ -526,11 +526,11 @@ darwin_dump_message (mach_msg_header_t *hdr, int disp_body) size -= sizeof (NDR_record_t); } - fprintf_unfiltered (gdb_stdlog, _(" data:")); + gdb_printf (gdb_stdlog, _(" data:")); ldata = (const unsigned int *)data; for (i = 0; i < size / sizeof (unsigned int); i++) - fprintf_unfiltered (gdb_stdlog, " %08x", ldata[i]); - fprintf_unfiltered (gdb_stdlog, _("\n")); + gdb_printf (gdb_stdlog, " %08x", ldata[i]); + gdb_printf (gdb_stdlog, _("\n")); } } @@ -1793,7 +1793,7 @@ darwin_execvp (const char *file, char * const argv[], char * const env[]) res = posix_spawnattr_init (&attr); if (res != 0) { - fprintf_unfiltered + gdb_printf (gdb_stderr, "Cannot initialize attribute for posix_spawn\n"); return; } @@ -1810,7 +1810,7 @@ darwin_execvp (const char *file, char * const argv[], char * const env[]) res = posix_spawnattr_setflags (&attr, ps_flags); if (res != 0) { - fprintf_unfiltered (gdb_stderr, "Cannot set posix_spawn flags\n"); + gdb_printf (gdb_stderr, "Cannot set posix_spawn flags\n"); return; } @@ -1945,11 +1945,11 @@ you \"run\". To prevent these attempts, you can use:\n\ return false; } - printf_filtered (_("Note: this version of macOS has System Integrity Protection.\n\ + gdb_printf (_("Note: this version of macOS has System Integrity Protection.\n\ Because `startup-with-shell' is enabled, gdb has worked around this by\n\ caching a copy of your shell. The shell used by \"run\" is now:\n\ %s\n"), - new_name.c_str ()); + new_name.c_str ()); } /* We need to make sure that the new name has the correct lifetime. */ diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 165040d..259860e 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1836,12 +1836,12 @@ read_dbx_symtab (minimal_symbol_reader &reader, (dependencies_used * sizeof (legacy_psymtab *))); #ifdef DEBUG_INFO - fprintf_unfiltered (gdb_stderr, - "Had to reallocate " - "dependency list.\n"); - fprintf_unfiltered (gdb_stderr, - "New dependencies allocated: %d\n", - dependencies_allocated); + gdb_printf (gdb_stderr, + "Had to reallocate " + "dependency list.\n"); + gdb_printf (gdb_stderr, + "New dependencies allocated: %d\n", + dependencies_allocated); #endif } } diff --git a/gdb/dcache.c b/gdb/dcache.c index 13c3e50..751c24f 100644 --- a/gdb/dcache.c +++ b/gdb/dcache.c @@ -136,7 +136,7 @@ static void show_dcache_enabled_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Deprecated remotecache flag is %s.\n"), value); + gdb_printf (file, _("Deprecated remotecache flag is %s.\n"), value); } /* Add BLOCK to circular block list BLIST, behind the block at *BLIST. @@ -554,7 +554,7 @@ dcache_print_line (DCACHE *dcache, int index) if (dcache == NULL) { - printf_filtered (_("No data cache available.\n")); + gdb_printf (_("No data cache available.\n")); return; } @@ -569,24 +569,24 @@ dcache_print_line (DCACHE *dcache, int index) if (!n) { - printf_filtered (_("No such cache line exists.\n")); + gdb_printf (_("No such cache line exists.\n")); return; } db = (struct dcache_block *) n->value; - printf_filtered (_("Line %d: address %s [%d hits]\n"), - index, paddress (target_gdbarch (), db->addr), db->refs); + gdb_printf (_("Line %d: address %s [%d hits]\n"), + index, paddress (target_gdbarch (), db->addr), db->refs); for (j = 0; j < dcache->line_size; j++) { - printf_filtered ("%02x ", db->data[j]); + gdb_printf ("%02x ", db->data[j]); /* Print a newline every 16 bytes (48 characters). */ if ((j % 16 == 15) && (j != dcache->line_size - 1)) - printf_filtered ("\n"); + gdb_printf ("\n"); } - printf_filtered ("\n"); + gdb_printf ("\n"); } /* Parse EXP and show the info about DCACHE. */ @@ -604,7 +604,7 @@ dcache_info_1 (DCACHE *dcache, const char *exp) i = strtol (exp, &linestart, 10); if (linestart == exp || i < 0) { - printf_filtered (_("Usage: info dcache [LINENUMBER]\n")); + gdb_printf (_("Usage: info dcache [LINENUMBER]\n")); return; } @@ -612,19 +612,19 @@ dcache_info_1 (DCACHE *dcache, const char *exp) return; } - printf_filtered (_("Dcache %u lines of %u bytes each.\n"), - dcache_size, - dcache ? (unsigned) dcache->line_size - : dcache_line_size); + gdb_printf (_("Dcache %u lines of %u bytes each.\n"), + dcache_size, + dcache ? (unsigned) dcache->line_size + : dcache_line_size); if (dcache == NULL || dcache->ptid == null_ptid) { - printf_filtered (_("No data cache available.\n")); + gdb_printf (_("No data cache available.\n")); return; } - printf_filtered (_("Contains data for %s\n"), - target_pid_to_str (dcache->ptid).c_str ()); + gdb_printf (_("Contains data for %s\n"), + target_pid_to_str (dcache->ptid).c_str ()); refcount = 0; @@ -635,15 +635,15 @@ dcache_info_1 (DCACHE *dcache, const char *exp) { struct dcache_block *db = (struct dcache_block *) n->value; - printf_filtered (_("Line %d: address %s [%d hits]\n"), - i, paddress (target_gdbarch (), db->addr), db->refs); + gdb_printf (_("Line %d: address %s [%d hits]\n"), + i, paddress (target_gdbarch (), db->addr), db->refs); i++; refcount += db->refs; n = splay_tree_successor (dcache->tree, n->key); } - printf_filtered (_("Cache state: %d active lines, %d hits\n"), i, refcount); + gdb_printf (_("Cache state: %d active lines, %d hits\n"), i, refcount); } static void diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index d5d023f..b3a49bf 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -115,9 +115,9 @@ progressfn (debuginfod_client *c, long cur, long total) if (check_quit_flag ()) { - printf_filtered ("Cancelling download of %s %ps...\n", - data->desc, - styled_string (file_name_style.style (), data->fname)); + gdb_printf ("Cancelling download of %s %ps...\n", + data->desc, + styled_string (file_name_style.style (), data->fname)); return 1; } @@ -136,14 +136,14 @@ progressfn (debuginfod_client *c, long cur, long total) unit = "MB"; } - printf_filtered ("Downloading %.2f %s %s %ps...\n", - size, unit, data->desc, - styled_string (file_name_style.style (), - data->fname)); + gdb_printf ("Downloading %.2f %s %s %ps...\n", + size, unit, data->desc, + styled_string (file_name_style.style (), + data->fname)); } else - printf_filtered ("Downloading %s %ps...\n", data->desc, - styled_string (file_name_style.style (), data->fname)); + gdb_printf ("Downloading %s %ps...\n", data->desc, + styled_string (file_name_style.style (), data->fname)); data->has_printed = true; } @@ -187,16 +187,16 @@ debuginfod_is_enabled () urls); if (!resp) { - printf_filtered (_("Debuginfod has been disabled.\nTo make this " \ - "setting permanent, add \'set debuginfod " \ - "enabled off\' to .gdbinit.\n")); + gdb_printf (_("Debuginfod has been disabled.\nTo make this " \ + "setting permanent, add \'set debuginfod " \ + "enabled off\' to .gdbinit.\n")); debuginfod_enabled = debuginfod_off; return false; } - printf_filtered (_("Debuginfod has been enabled.\nTo make this " \ - "setting permanent, add \'set debuginfod enabled " \ - "on\' to .gdbinit.\n")); + gdb_printf (_("Debuginfod has been enabled.\nTo make this " \ + "setting permanent, add \'set debuginfod enabled " \ + "on\' to .gdbinit.\n")); debuginfod_enabled = debuginfod_on; } @@ -238,9 +238,9 @@ debuginfod_source_query (const unsigned char *build_id, debuginfod_set_user_data (c, nullptr); if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT) - printf_filtered (_("Download failed: %s. Continuing without source file %ps.\n"), - safe_strerror (-fd.get ()), - styled_string (file_name_style.style (), srcpath)); + gdb_printf (_("Download failed: %s. Continuing without source file %ps.\n"), + safe_strerror (-fd.get ()), + styled_string (file_name_style.style (), srcpath)); if (fd.get () >= 0) destname->reset (dname); @@ -280,9 +280,9 @@ debuginfod_debuginfo_query (const unsigned char *build_id, debuginfod_set_user_data (c, nullptr); if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT) - printf_filtered (_("Download failed: %s. Continuing without debug info for %ps.\n"), - safe_strerror (-fd.get ()), - styled_string (file_name_style.style (), filename)); + gdb_printf (_("Download failed: %s. Continuing without debug info for %ps.\n"), + safe_strerror (-fd.get ()), + styled_string (file_name_style.style (), filename)); if (fd.get () >= 0) destname->reset (dname); @@ -321,10 +321,10 @@ debuginfod_exec_query (const unsigned char *build_id, debuginfod_set_user_data (c, nullptr); if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT) - printf_filtered (_("Download failed: %s. " \ - "Continuing without executable for %ps.\n"), - safe_strerror (-fd.get ()), - styled_string (file_name_style.style (), filename)); + gdb_printf (_("Download failed: %s. " \ + "Continuing without executable for %ps.\n"), + safe_strerror (-fd.get ()), + styled_string (file_name_style.style (), filename)); if (fd.get () >= 0) destname->reset (dname); @@ -359,9 +359,9 @@ static void show_debuginfod_enabled (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, - _("Debuginfod functionality is currently set to " - "\"%s\".\n"), debuginfod_enabled); + gdb_printf (file, + _("Debuginfod functionality is currently set to " + "\"%s\".\n"), debuginfod_enabled); } /* Set callback for "set debuginfod urls". */ @@ -402,10 +402,10 @@ show_debuginfod_urls (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value) { if (value[0] == '\0') - fprintf_filtered (file, _("Debuginfod URLs have not been set.\n")); + gdb_printf (file, _("Debuginfod URLs have not been set.\n")); else - fprintf_filtered (file, _("Debuginfod URLs are currently set to:\n%s\n"), - value); + gdb_printf (file, _("Debuginfod URLs are currently set to:\n%s\n"), + value); } /* Show callback for "set debuginfod verbose". */ @@ -414,8 +414,8 @@ static void show_debuginfod_verbose_command (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, _("Debuginfod verbose output is set to %s.\n"), - value); + gdb_printf (file, _("Debuginfod verbose output is set to %s.\n"), + value); } /* Register debuginfod commands. */ diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c index a8943fb..928d26f 100644 --- a/gdb/disasm-selftests.c +++ b/gdb/disasm-selftests.c @@ -135,14 +135,14 @@ print_one_insn_test (struct gdbarch *gdbarch) { if (run_verbose ()) { - fprintf_unfiltered (stream (), "%s ", - gdbarch_bfd_arch_info (arch ())->arch_name); + gdb_printf (stream (), "%s ", + gdbarch_bfd_arch_info (arch ())->arch_name); } int len = gdb_disassembler::print_insn (memaddr); if (run_verbose ()) - fprintf_unfiltered (stream (), "\n"); + gdb_printf (stream (), "\n"); return len; } diff --git a/gdb/disasm.c b/gdb/disasm.c index f00f598..24d757a 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -1048,7 +1048,7 @@ set_disassembler_options (const char *prospective_options) valid_options_and_args = gdbarch_valid_disassembler_options (gdbarch); if (valid_options_and_args == NULL) { - fprintf_filtered (gdb_stderr, _("\ + gdb_printf (gdb_stderr, _("\ 'set disassembler-options ...' is not supported on this architecture.\n")); return; } @@ -1084,9 +1084,9 @@ set_disassembler_options (const char *prospective_options) break; if (valid_options->name[i] == NULL) { - fprintf_filtered (gdb_stderr, - _("Invalid disassembler option value: '%s'.\n"), - opt); + gdb_printf (gdb_stderr, + _("Invalid disassembler option value: '%s'.\n"), + opt); return; } } @@ -1115,8 +1115,8 @@ show_disassembler_options_sfunc (struct ui_file *file, int from_tty, if (options == NULL) options = ""; - fprintf_filtered (file, _("The current disassembler options are '%s'\n\n"), - options); + gdb_printf (file, _("The current disassembler options are '%s'\n\n"), + options); valid_options_and_args = gdbarch_valid_disassembler_options (gdbarch); @@ -1130,7 +1130,7 @@ show_disassembler_options_sfunc (struct ui_file *file, int from_tty, valid_options = &valid_options_and_args->options; - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The following disassembler options are supported for use with the\n\ 'set disassembler-options OPTION [,OPTION]...' command:\n")); @@ -1138,7 +1138,7 @@ The following disassembler options are supported for use with the\n\ { size_t i, max_len = 0; - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); /* Compute the length of the longest option name. */ for (i = 0; valid_options->name[i] != NULL; i++) @@ -1153,35 +1153,35 @@ The following disassembler options are supported for use with the\n\ for (i = 0, max_len++; valid_options->name[i] != NULL; i++) { - fprintf_filtered (file, " %s", valid_options->name[i]); + gdb_printf (file, " %s", valid_options->name[i]); if (valid_options->arg != NULL && valid_options->arg[i] != NULL) - fprintf_filtered (file, "%s", valid_options->arg[i]->name); + gdb_printf (file, "%s", valid_options->arg[i]->name); if (valid_options->description[i] != NULL) { size_t len = strlen (valid_options->name[i]); if (valid_options->arg != NULL && valid_options->arg[i] != NULL) len += strlen (valid_options->arg[i]->name); - fprintf_filtered (file, "%*c %s", (int) (max_len - len), ' ', - valid_options->description[i]); + gdb_printf (file, "%*c %s", (int) (max_len - len), ' ', + valid_options->description[i]); } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } } else { size_t i; - fprintf_filtered (file, " "); + gdb_printf (file, " "); for (i = 0; valid_options->name[i] != NULL; i++) { - fprintf_filtered (file, "%s", valid_options->name[i]); + gdb_printf (file, "%s", valid_options->name[i]); if (valid_options->arg != NULL && valid_options->arg[i] != NULL) - fprintf_filtered (file, "%s", valid_options->arg[i]->name); + gdb_printf (file, "%s", valid_options->arg[i]->name); if (valid_options->name[i + 1] != NULL) - fprintf_filtered (file, ", "); + gdb_printf (file, ", "); file->wrap_here (2); } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } valid_args = valid_options_and_args->args; @@ -1191,15 +1191,15 @@ The following disassembler options are supported for use with the\n\ for (i = 0; valid_args[i].name != NULL; i++) { - fprintf_filtered (file, _("\n\ + gdb_printf (file, _("\n\ For the options above, the following values are supported for \"%s\":\n "), - valid_args[i].name); + valid_args[i].name); for (j = 0; valid_args[i].values[j] != NULL; j++) { - fprintf_filtered (file, " %s", valid_args[i].values[j]); + gdb_printf (file, " %s", valid_args[i].values[j]); file->wrap_here (3); } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } } } diff --git a/gdb/displaced-stepping.c b/gdb/displaced-stepping.c index e2afbe4..eac2c5d 100644 --- a/gdb/displaced-stepping.c +++ b/gdb/displaced-stepping.c @@ -40,7 +40,7 @@ static void show_debug_displaced (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Displace stepping debugging is %s.\n"), value); + gdb_printf (file, _("Displace stepping debugging is %s.\n"), value); } displaced_step_prepare_status diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index db7aaac..40b455c 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -405,10 +405,10 @@ fprint_dummy_frames (struct ui_file *file) struct dummy_frame *s; for (s = dummy_frame_stack; s != NULL; s = s->next) - fprintf_filtered (file, "%s: id=%s, ptid=%s\n", - host_address_to_string (s), - s->id.id.to_string ().c_str (), - s->id.thread->ptid.to_string ().c_str ()); + gdb_printf (file, "%s: id=%s, ptid=%s\n", + host_address_to_string (s), + s->id.id.to_string ().c_str (), + s->id.thread->ptid.to_string ().c_str ()); } static void diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index 1c58cfe..5878d72 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -2192,9 +2192,9 @@ show_dwarf_unwinders_enabled_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The DWARF stack unwinders are currently %s.\n"), - value); + gdb_printf (file, + _("The DWARF stack unwinders are currently %s.\n"), + value); } void _initialize_dwarf2_frame (); diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c index fd76917..db9a6eb 100644 --- a/gdb/dwarf2/index-cache.c +++ b/gdb/dwarf2/index-cache.c @@ -257,8 +257,8 @@ show_index_cache_command (const char *arg, int from_tty) /* Call all "show index-cache" subcommands. */ cmd_show_list (show_index_cache_prefix_list, from_tty); - printf_filtered ("\n"); - printf_filtered + gdb_printf ("\n"); + gdb_printf (_("The index cache is currently %s.\n"), global_index_cache.enabled () ? _("enabled") : _("disabled")); } @@ -288,7 +288,7 @@ static void show_index_cache_enabled_command (ui_file *stream, int from_tty, cmd_list_element *cmd, const char *value) { - fprintf_filtered (stream, _("The index cache is %s.\n"), value); + gdb_printf (stream, _("The index cache is %s.\n"), value); } /* "set index-cache directory" handler. */ @@ -316,13 +316,13 @@ show_index_cache_stats_command (const char *arg, int from_tty) if (in_show_index_cache_command) { indent = " "; - printf_filtered ("\n"); + gdb_printf ("\n"); } - printf_filtered (_("%s Cache hits (this session): %u\n"), - indent, global_index_cache.n_hits ()); - printf_filtered (_("%sCache misses (this session): %u\n"), - indent, global_index_cache.n_misses ()); + gdb_printf (_("%s Cache hits (this session): %u\n"), + indent, global_index_cache.n_hits ()); + gdb_printf (_("%sCache misses (this session): %u\n"), + indent, global_index_cache.n_misses ()); } void _initialize_index_cache (); diff --git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c index 938e9fd..4807fca 100644 --- a/gdb/dwarf2/line-header.c +++ b/gdb/dwarf2/line-header.c @@ -35,8 +35,8 @@ line_header::add_include_dir (const char *include_dir) new_size = m_include_dirs.size (); else new_size = m_include_dirs.size () + 1; - fprintf_unfiltered (gdb_stdlog, "Adding dir %zu: %s\n", - new_size, include_dir); + gdb_printf (gdb_stdlog, "Adding dir %zu: %s\n", + new_size, include_dir); } m_include_dirs.push_back (include_dir); } @@ -54,8 +54,8 @@ line_header::add_file_name (const char *name, new_size = file_names_size (); else new_size = file_names_size () + 1; - fprintf_unfiltered (gdb_stdlog, "Adding file %zu: %s\n", - new_size, name); + gdb_printf (gdb_stdlog, "Adding file %zu: %s\n", + new_size, name); } m_file_names.emplace_back (name, d_index, mod_time, length); } diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 9cd2157..73de311 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -627,9 +627,9 @@ static void show_entry_values_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Entry values and tail call frames debugging is %s.\n"), - value); + gdb_printf (file, + _("Entry values and tail call frames debugging is %s.\n"), + value); } /* See gdbtypes.h. */ @@ -836,9 +836,9 @@ tailcall_dump (struct gdbarch *gdbarch, const struct call_site *call_site) CORE_ADDR addr = call_site->pc (); struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr - 1); - fprintf_unfiltered (gdb_stdlog, " %s(%s)", paddress (gdbarch, addr), - (msym.minsym == NULL ? "???" - : msym.minsym->print_name ())); + gdb_printf (gdb_stdlog, " %s(%s)", paddress (gdbarch, addr), + (msym.minsym == NULL ? "???" + : msym.minsym->print_name ())); } @@ -874,7 +874,7 @@ chain_candidate (struct gdbarch *gdbarch, if (entry_values_debug) { - fprintf_unfiltered (gdb_stdlog, "tailcall: initial:"); + gdb_printf (gdb_stdlog, "tailcall: initial:"); for (idx = 0; idx < length; idx++) tailcall_dump (gdbarch, result->call_site[idx]); gdb_putc ('\n', gdb_stdlog); @@ -885,7 +885,7 @@ chain_candidate (struct gdbarch *gdbarch, if (entry_values_debug) { - fprintf_unfiltered (gdb_stdlog, "tailcall: compare:"); + gdb_printf (gdb_stdlog, "tailcall: compare:"); for (idx = 0; idx < length; idx++) tailcall_dump (gdbarch, chain[idx]); gdb_putc ('\n', gdb_stdlog); @@ -914,7 +914,7 @@ chain_candidate (struct gdbarch *gdbarch, if (entry_values_debug) { - fprintf_unfiltered (gdb_stdlog, "tailcall: reduced:"); + gdb_printf (gdb_stdlog, "tailcall: reduced:"); for (idx = 0; idx < (*resultp)->callers; idx++) tailcall_dump (gdbarch, (*resultp)->call_site[idx]); gdb_puts (" |", gdb_stdlog); @@ -3144,8 +3144,8 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, if (data[0] >= DW_OP_reg0 && data[0] <= DW_OP_reg31) { - fprintf_filtered (stream, _("a variable in $%s"), - locexpr_regname (gdbarch, data[0] - DW_OP_reg0)); + gdb_printf (stream, _("a variable in $%s"), + locexpr_regname (gdbarch, data[0] - DW_OP_reg0)); data += 1; } else if (data[0] == DW_OP_regx) @@ -3153,8 +3153,8 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, uint64_t reg; data = safe_read_uleb128 (data + 1, end, ®); - fprintf_filtered (stream, _("a variable in $%s"), - locexpr_regname (gdbarch, reg)); + gdb_printf (stream, _("a variable in $%s"), + locexpr_regname (gdbarch, reg)); } else if (data[0] == DW_OP_fbreg) { @@ -3210,10 +3210,10 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, return save_data; } - fprintf_filtered (stream, - _("a variable at frame base reg $%s offset %s+%s"), - locexpr_regname (gdbarch, frame_reg), - plongest (base_offset), plongest (frame_offset)); + gdb_printf (stream, + _("a variable at frame base reg $%s offset %s+%s"), + locexpr_regname (gdbarch, frame_reg), + plongest (base_offset), plongest (frame_offset)); } else if (data[0] >= DW_OP_breg0 && data[0] <= DW_OP_breg31 && piece_end_p (data, end)) @@ -3222,10 +3222,10 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, data = safe_read_sleb128 (data + 1, end, &offset); - fprintf_filtered (stream, - _("a variable at offset %s from base reg $%s"), - plongest (offset), - locexpr_regname (gdbarch, data[0] - DW_OP_breg0)); + gdb_printf (stream, + _("a variable at offset %s from base reg $%s"), + plongest (offset), + locexpr_regname (gdbarch, data[0] - DW_OP_breg0)); } /* The location expression for a TLS variable looks like this (on a @@ -3254,10 +3254,10 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, offset = extract_unsigned_integer (data + 1, addr_size, gdbarch_byte_order (gdbarch)); - fprintf_filtered (stream, - _("a thread-local variable at offset 0x%s " - "in the thread-local storage for `%s'"), - phex_nz (offset, addr_size), objfile_name (objfile)); + gdb_printf (stream, + _("a thread-local variable at offset 0x%s " + "in the thread-local storage for `%s'"), + phex_nz (offset, addr_size), objfile_name (objfile)); data += 1 + addr_size + 1; } @@ -3278,10 +3278,10 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, data = safe_read_uleb128 (data + 1, end, &offset); offset = dwarf2_read_addr_index (per_cu, per_objfile, offset); - fprintf_filtered (stream, - _("a thread-local variable at offset 0x%s " - "in the thread-local storage for `%s'"), - phex_nz (offset, addr_size), objfile_name (objfile)); + gdb_printf (stream, + _("a thread-local variable at offset 0x%s " + "in the thread-local storage for `%s'"), + phex_nz (offset, addr_size), objfile_name (objfile)); ++data; } @@ -3290,7 +3290,7 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream, && data + 1 < end && data[1] == DW_OP_stack_value) { - fprintf_filtered (stream, _("the constant %d"), data[0] - DW_OP_lit0); + gdb_printf (stream, _("the constant %d"), data[0] - DW_OP_lit0); data += 2; } @@ -3327,8 +3327,8 @@ disassemble_dwarf_expression (struct ui_file *stream, if (!name) error (_("Unrecognized DWARF opcode 0x%02x at %ld"), op, (long) (data - 1 - start)); - fprintf_filtered (stream, " %*ld: %s", indent + 4, - (long) (data - 1 - start), name); + gdb_printf (stream, " %*ld: %s", indent + 4, + (long) (data - 1 - start), name); switch (op) { @@ -3336,65 +3336,65 @@ disassemble_dwarf_expression (struct ui_file *stream, ul = extract_unsigned_integer (data, addr_size, gdbarch_byte_order (arch)); data += addr_size; - fprintf_filtered (stream, " 0x%s", phex_nz (ul, addr_size)); + gdb_printf (stream, " 0x%s", phex_nz (ul, addr_size)); break; case DW_OP_const1u: ul = extract_unsigned_integer (data, 1, gdbarch_byte_order (arch)); data += 1; - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_const1s: l = extract_signed_integer (data, 1, gdbarch_byte_order (arch)); data += 1; - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_const2u: ul = extract_unsigned_integer (data, 2, gdbarch_byte_order (arch)); data += 2; - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_const2s: l = extract_signed_integer (data, 2, gdbarch_byte_order (arch)); data += 2; - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_const4u: ul = extract_unsigned_integer (data, 4, gdbarch_byte_order (arch)); data += 4; - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_const4s: l = extract_signed_integer (data, 4, gdbarch_byte_order (arch)); data += 4; - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_const8u: ul = extract_unsigned_integer (data, 8, gdbarch_byte_order (arch)); data += 8; - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_const8s: l = extract_signed_integer (data, 8, gdbarch_byte_order (arch)); data += 8; - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_constu: data = safe_read_uleb128 (data, end, &ul); - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_consts: data = safe_read_sleb128 (data, end, &l); - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_reg0: @@ -3429,20 +3429,20 @@ disassemble_dwarf_expression (struct ui_file *stream, case DW_OP_reg29: case DW_OP_reg30: case DW_OP_reg31: - fprintf_filtered (stream, " [$%s]", - locexpr_regname (arch, op - DW_OP_reg0)); + gdb_printf (stream, " [$%s]", + locexpr_regname (arch, op - DW_OP_reg0)); break; case DW_OP_regx: data = safe_read_uleb128 (data, end, &ul); - fprintf_filtered (stream, " %s [$%s]", pulongest (ul), - locexpr_regname (arch, (int) ul)); + gdb_printf (stream, " %s [$%s]", pulongest (ul), + locexpr_regname (arch, (int) ul)); break; case DW_OP_implicit_value: data = safe_read_uleb128 (data, end, &ul); data += ul; - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_breg0: @@ -3478,72 +3478,72 @@ disassemble_dwarf_expression (struct ui_file *stream, case DW_OP_breg30: case DW_OP_breg31: data = safe_read_sleb128 (data, end, &l); - fprintf_filtered (stream, " %s [$%s]", plongest (l), - locexpr_regname (arch, op - DW_OP_breg0)); + gdb_printf (stream, " %s [$%s]", plongest (l), + locexpr_regname (arch, op - DW_OP_breg0)); break; case DW_OP_bregx: data = safe_read_uleb128 (data, end, &ul); data = safe_read_sleb128 (data, end, &l); - fprintf_filtered (stream, " register %s [$%s] offset %s", - pulongest (ul), - locexpr_regname (arch, (int) ul), - plongest (l)); + gdb_printf (stream, " register %s [$%s] offset %s", + pulongest (ul), + locexpr_regname (arch, (int) ul), + plongest (l)); break; case DW_OP_fbreg: data = safe_read_sleb128 (data, end, &l); - fprintf_filtered (stream, " %s", plongest (l)); + gdb_printf (stream, " %s", plongest (l)); break; case DW_OP_xderef_size: case DW_OP_deref_size: case DW_OP_pick: - fprintf_filtered (stream, " %d", *data); + gdb_printf (stream, " %d", *data); ++data; break; case DW_OP_plus_uconst: data = safe_read_uleb128 (data, end, &ul); - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_skip: l = extract_signed_integer (data, 2, gdbarch_byte_order (arch)); data += 2; - fprintf_filtered (stream, " to %ld", - (long) (data + l - start)); + gdb_printf (stream, " to %ld", + (long) (data + l - start)); break; case DW_OP_bra: l = extract_signed_integer (data, 2, gdbarch_byte_order (arch)); data += 2; - fprintf_filtered (stream, " %ld", - (long) (data + l - start)); + gdb_printf (stream, " %ld", + (long) (data + l - start)); break; case DW_OP_call2: ul = extract_unsigned_integer (data, 2, gdbarch_byte_order (arch)); data += 2; - fprintf_filtered (stream, " offset %s", phex_nz (ul, 2)); + gdb_printf (stream, " offset %s", phex_nz (ul, 2)); break; case DW_OP_call4: ul = extract_unsigned_integer (data, 4, gdbarch_byte_order (arch)); data += 4; - fprintf_filtered (stream, " offset %s", phex_nz (ul, 4)); + gdb_printf (stream, " offset %s", phex_nz (ul, 4)); break; case DW_OP_call_ref: ul = extract_unsigned_integer (data, offset_size, gdbarch_byte_order (arch)); data += offset_size; - fprintf_filtered (stream, " offset %s", phex_nz (ul, offset_size)); + gdb_printf (stream, " offset %s", phex_nz (ul, offset_size)); break; case DW_OP_piece: data = safe_read_uleb128 (data, end, &ul); - fprintf_filtered (stream, " %s (bytes)", pulongest (ul)); + gdb_printf (stream, " %s (bytes)", pulongest (ul)); break; case DW_OP_bit_piece: @@ -3552,8 +3552,8 @@ disassemble_dwarf_expression (struct ui_file *stream, data = safe_read_uleb128 (data, end, &ul); data = safe_read_uleb128 (data, end, &offset); - fprintf_filtered (stream, " size %s offset %s (bits)", - pulongest (ul), pulongest (offset)); + gdb_printf (stream, " size %s offset %s (bits)", + pulongest (ul), pulongest (offset)); } break; @@ -3566,9 +3566,9 @@ disassemble_dwarf_expression (struct ui_file *stream, data = safe_read_sleb128 (data, end, &l); - fprintf_filtered (stream, " DIE %s offset %s", - phex_nz (ul, offset_size), - plongest (l)); + gdb_printf (stream, " DIE %s offset %s", + phex_nz (ul, offset_size), + plongest (l)); } break; @@ -3581,11 +3581,11 @@ disassemble_dwarf_expression (struct ui_file *stream, data = safe_read_uleb128 (data, end, &ul); cu_offset offset = (cu_offset) ul; type = dwarf2_get_die_type (offset, per_cu, per_objfile); - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); type_print (type, "", stream, -1); - fprintf_filtered (stream, " [0x%s]> %d", - phex_nz (to_underlying (offset), 0), - deref_addr_size); + gdb_printf (stream, " [0x%s]> %d", + phex_nz (to_underlying (offset), 0), + deref_addr_size); } break; @@ -3597,15 +3597,15 @@ disassemble_dwarf_expression (struct ui_file *stream, data = safe_read_uleb128 (data, end, &ul); cu_offset type_die = (cu_offset) ul; type = dwarf2_get_die_type (type_die, per_cu, per_objfile); - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); type_print (type, "", stream, -1); - fprintf_filtered (stream, " [0x%s]>", - phex_nz (to_underlying (type_die), 0)); + gdb_printf (stream, " [0x%s]>", + phex_nz (to_underlying (type_die), 0)); int n = *data++; - fprintf_filtered (stream, " %d byte block:", n); + gdb_printf (stream, " %d byte block:", n); for (int i = 0; i < n; ++i) - fprintf_filtered (stream, " %02x", data[i]); + gdb_printf (stream, " %02x", data[i]); data += n; } break; @@ -3621,11 +3621,11 @@ disassemble_dwarf_expression (struct ui_file *stream, cu_offset type_die = (cu_offset) ul; type = dwarf2_get_die_type (type_die, per_cu, per_objfile); - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); type_print (type, "", stream, -1); - fprintf_filtered (stream, " [0x%s]> [$%s]", - phex_nz (to_underlying (type_die), 0), - locexpr_regname (arch, reg)); + gdb_printf (stream, " [0x%s]> [$%s]", + phex_nz (to_underlying (type_die), 0), + locexpr_regname (arch, reg)); } break; @@ -3638,16 +3638,16 @@ disassemble_dwarf_expression (struct ui_file *stream, cu_offset type_die = (cu_offset) ul; if (to_underlying (type_die) == 0) - fprintf_filtered (stream, "<0>"); + gdb_printf (stream, "<0>"); else { struct type *type; type = dwarf2_get_die_type (type_die, per_cu, per_objfile); - fprintf_filtered (stream, "<"); + gdb_printf (stream, "<"); type_print (type, "", stream, -1); - fprintf_filtered (stream, " [0x%s]>", - phex_nz (to_underlying (type_die), 0)); + gdb_printf (stream, " [0x%s]>", + phex_nz (to_underlying (type_die), 0)); } } break; @@ -3665,31 +3665,31 @@ disassemble_dwarf_expression (struct ui_file *stream, case DW_OP_GNU_parameter_ref: ul = extract_unsigned_integer (data, 4, gdbarch_byte_order (arch)); data += 4; - fprintf_filtered (stream, " offset %s", phex_nz (ul, 4)); + gdb_printf (stream, " offset %s", phex_nz (ul, 4)); break; case DW_OP_addrx: case DW_OP_GNU_addr_index: data = safe_read_uleb128 (data, end, &ul); ul = dwarf2_read_addr_index (per_cu, per_objfile, ul); - fprintf_filtered (stream, " 0x%s", phex_nz (ul, addr_size)); + gdb_printf (stream, " 0x%s", phex_nz (ul, addr_size)); break; case DW_OP_GNU_const_index: data = safe_read_uleb128 (data, end, &ul); ul = dwarf2_read_addr_index (per_cu, per_objfile, ul); - fprintf_filtered (stream, " %s", pulongest (ul)); + gdb_printf (stream, " %s", pulongest (ul)); break; case DW_OP_GNU_variable_value: ul = extract_unsigned_integer (data, offset_size, gdbarch_byte_order (arch)); data += offset_size; - fprintf_filtered (stream, " offset %s", phex_nz (ul, offset_size)); + gdb_printf (stream, " offset %s", phex_nz (ul, offset_size)); break; } - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } return data; @@ -3701,10 +3701,10 @@ static void show_dwarf_always_disassemble (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether to always disassemble " - "DWARF expressions is %s.\n"), - value); + gdb_printf (file, + _("Whether to always disassemble " + "DWARF expressions is %s.\n"), + value); } /* Describe a single location, which may in turn consist of multiple @@ -3730,7 +3730,7 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr, if (first_piece) first_piece = 0; else - fprintf_filtered (stream, _(", and ")); + gdb_printf (stream, _(", and ")); if (!dwarf_always_disassemble) { @@ -3746,7 +3746,7 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr, } if (disassemble) { - fprintf_filtered (stream, _("a complex DWARF expression:\n")); + gdb_printf (stream, _("a complex DWARF expression:\n")); data = disassemble_dwarf_expression (stream, objfile->arch (), addr_size, offset_size, data, @@ -3760,7 +3760,7 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr, int empty = data == here; if (disassemble) - fprintf_filtered (stream, " "); + gdb_printf (stream, " "); if (data[0] == DW_OP_piece) { uint64_t bytes; @@ -3768,11 +3768,11 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr, data = safe_read_uleb128 (data + 1, end, &bytes); if (empty) - fprintf_filtered (stream, _("an empty %s-byte piece"), - pulongest (bytes)); + gdb_printf (stream, _("an empty %s-byte piece"), + pulongest (bytes)); else - fprintf_filtered (stream, _(" [%s-byte piece]"), - pulongest (bytes)); + gdb_printf (stream, _(" [%s-byte piece]"), + pulongest (bytes)); } else if (data[0] == DW_OP_bit_piece) { @@ -3782,13 +3782,13 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr, data = safe_read_uleb128 (data, end, &offset); if (empty) - fprintf_filtered (stream, - _("an empty %s-bit piece"), - pulongest (bits)); + gdb_printf (stream, + _("an empty %s-bit piece"), + pulongest (bits)); else - fprintf_filtered (stream, - _(" [%s-bit piece, offset %s bits]"), - pulongest (bits), pulongest (offset)); + gdb_printf (stream, + _(" [%s-bit piece, offset %s bits]"), + pulongest (bits), pulongest (offset)); } else { @@ -3964,7 +3964,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr, loc_ptr = dlbaton->data; buf_end = dlbaton->data + dlbaton->size; - fprintf_filtered (stream, _("multi-location:\n")); + gdb_printf (stream, _("multi-location:\n")); /* Iterate through locations until we run out. */ while (!done) @@ -3999,8 +3999,8 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr, case DEBUG_LOC_BASE_ADDRESS: base_address = high; - fprintf_filtered (stream, _(" Base address %s"), - paddress (gdbarch, base_address)); + gdb_printf (stream, _(" Base address %s"), + paddress (gdbarch, base_address)); continue; case DEBUG_LOC_START_END: @@ -4043,15 +4043,15 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr, /* (It would improve readability to print only the minimum necessary digits of the second number of the range.) */ - fprintf_filtered (stream, _(" Range %s-%s: "), - paddress (gdbarch, low), paddress (gdbarch, high)); + gdb_printf (stream, _(" Range %s-%s: "), + paddress (gdbarch, low), paddress (gdbarch, high)); /* Now describe this particular location. */ locexpr_describe_location_1 (symbol, low, stream, loc_ptr, length, addr_size, offset_size, dlbaton->per_cu, dlbaton->per_objfile); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); loc_ptr += length; } diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6fc9e37..5c02d56 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1090,9 +1090,9 @@ static void show_dwarf_max_cache_age (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The upper bound on the age of cached " - "DWARF compilation units is %s.\n"), - value); + gdb_printf (file, _("The upper bound on the age of cached " + "DWARF compilation units is %s.\n"), + value); } /* local function prototypes */ @@ -3311,8 +3311,8 @@ dwarf2_base_index_functions::print_stats (struct objfile *objfile, if (!per_objfile->symtab_set_p (per_cu)) ++count; } - printf_filtered (_(" Number of read CUs: %d\n"), total - count); - printf_filtered (_(" Number of unread CUs: %d\n"), count); + gdb_printf (_(" Number of read CUs: %d\n"), total - count); + gdb_printf (_(" Number of unread CUs: %d\n"), count); } /* This dumps minimal information about the index. @@ -3326,15 +3326,15 @@ dwarf2_gdb_index::dump (struct objfile *objfile) dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); gdb_assert (per_objfile->per_bfd->using_index); - printf_filtered (".gdb_index:"); + gdb_printf (".gdb_index:"); if (per_objfile->per_bfd->index_table != NULL) { - printf_filtered (" version %d\n", - per_objfile->per_bfd->index_table->version); + gdb_printf (" version %d\n", + per_objfile->per_bfd->index_table->version); } else - printf_filtered (" faked for \"readnow\"\n"); - printf_filtered ("\n"); + gdb_printf (" faked for \"readnow\"\n"); + gdb_printf ("\n"); } void @@ -5334,12 +5334,12 @@ dwarf2_debug_names_index::dump (struct objfile *objfile) dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); gdb_assert (per_objfile->per_bfd->using_index); - printf_filtered (".debug_names:"); + gdb_printf (".debug_names:"); if (per_objfile->per_bfd->debug_names_table) - printf_filtered (" exists\n"); + gdb_printf (" exists\n"); else - printf_filtered (" faked for \"readnow\"\n"); - printf_filtered ("\n"); + gdb_printf (" faked for \"readnow\"\n"); + gdb_printf ("\n"); } void @@ -6390,11 +6390,11 @@ read_cutu_die_from_dwo (dwarf2_cu *cu, if (dwarf_die_debug) { - fprintf_unfiltered (gdb_stdlog, - "Read die from %s@0x%x of %s:\n", - section->get_name (), - (unsigned) (begin_info_ptr - section->buffer), - bfd_get_filename (abfd)); + gdb_printf (gdb_stdlog, + "Read die from %s@0x%x of %s:\n", + section->get_name (), + (unsigned) (begin_info_ptr - section->buffer), + bfd_get_filename (abfd)); dump_die (comp_unit_die, dwarf_die_debug); } @@ -6537,9 +6537,9 @@ cutu_reader::cutu_reader (dwarf2_per_cu_data *this_cu, int rereading_dwo_cu = 0; if (dwarf_die_debug) - fprintf_unfiltered (gdb_stdlog, "Reading %s unit at offset %s\n", - this_cu->is_debug_types ? "type" : "comp", - sect_offset_str (this_cu->sect_off)); + gdb_printf (gdb_stdlog, "Reading %s unit at offset %s\n", + this_cu->is_debug_types ? "type" : "comp", + sect_offset_str (this_cu->sect_off)); /* If we're reading a TU directly from a DWO file, including a virtual DWO file (instead of going through the stub), short-circuit all of this. */ @@ -6752,9 +6752,9 @@ cutu_reader::cutu_reader (dwarf2_per_cu_data *this_cu, const gdb_byte *begin_info_ptr, *info_ptr; if (dwarf_die_debug) - fprintf_unfiltered (gdb_stdlog, "Reading %s unit at offset %s\n", - this_cu->is_debug_types ? "type" : "comp", - sect_offset_str (this_cu->sect_off)); + gdb_printf (gdb_stdlog, "Reading %s unit at offset %s\n", + this_cu->is_debug_types ? "type" : "comp", + sect_offset_str (this_cu->sect_off)); gdb_assert (per_objfile->get_cu (this_cu) == nullptr); @@ -18860,11 +18860,11 @@ read_die_and_siblings (const struct die_reader_specs *reader, if (dwarf_die_debug) { - fprintf_unfiltered (gdb_stdlog, - "Read die from %s@0x%x of %s:\n", - reader->die_section->get_name (), - (unsigned) (info_ptr - reader->die_section->buffer), - bfd_get_filename (reader->abfd)); + gdb_printf (gdb_stdlog, + "Read die from %s@0x%x of %s:\n", + reader->die_section->get_name (), + (unsigned) (info_ptr - reader->die_section->buffer), + bfd_get_filename (reader->abfd)); dump_die (die, dwarf_die_debug); } @@ -18966,11 +18966,11 @@ read_full_die (const struct die_reader_specs *reader, if (dwarf_die_debug) { - fprintf_unfiltered (gdb_stdlog, - "Read die from %s@0x%x of %s:\n", - reader->die_section->get_name (), - (unsigned) (info_ptr - reader->die_section->buffer), - bfd_get_filename (reader->abfd)); + gdb_printf (gdb_stdlog, + "Read die from %s@0x%x of %s:\n", + reader->die_section->get_name (), + (unsigned) (info_ptr - reader->die_section->buffer), + bfd_get_filename (reader->abfd)); dump_die (*diep, dwarf_die_debug); } @@ -21131,10 +21131,10 @@ dwarf_record_line_1 (struct gdbarch *gdbarch, struct subfile *subfile, if (dwarf_line_debug) { - fprintf_unfiltered (gdb_stdlog, - "Recording line %u, file %s, address %s\n", - line, lbasename (subfile->name), - paddress (gdbarch, address)); + gdb_printf (gdb_stdlog, + "Recording line %u, file %s, address %s\n", + line, lbasename (subfile->name), + paddress (gdbarch, address)); } if (cu != nullptr) @@ -21155,10 +21155,10 @@ dwarf_finish_line (struct gdbarch *gdbarch, struct subfile *subfile, if (dwarf_line_debug) { - fprintf_unfiltered (gdb_stdlog, - "Finishing current line, file %s, address %s\n", - lbasename (subfile->name), - paddress (gdbarch, address)); + gdb_printf (gdb_stdlog, + "Finishing current line, file %s, address %s\n", + lbasename (subfile->name), + paddress (gdbarch, address)); } dwarf_record_line_1 (gdbarch, subfile, 0, address, true, cu); @@ -21169,13 +21169,13 @@ lnp_state_machine::record_line (bool end_sequence) { if (dwarf_line_debug) { - fprintf_unfiltered (gdb_stdlog, - "Processing actual line %u: file %u," - " address %s, is_stmt %u, discrim %u%s\n", - m_line, m_file, - paddress (m_gdbarch, m_address), - m_is_stmt, m_discriminator, - (end_sequence ? "\t(end sequence)" : "")); + gdb_printf (gdb_stdlog, + "Processing actual line %u: file %u," + " address %s, is_stmt %u, discrim %u%s\n", + m_line, m_file, + paddress (m_gdbarch, m_address), + m_is_stmt, m_discriminator, + (end_sequence ? "\t(end sequence)" : "")); } file_entry *fe = current_file (); @@ -23065,57 +23065,57 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) { unsigned int i; - fprintf_unfiltered (f, "%*sDie: %s (abbrev %d, offset %s)\n", - indent, "", - dwarf_tag_name (die->tag), die->abbrev, - sect_offset_str (die->sect_off)); + gdb_printf (f, "%*sDie: %s (abbrev %d, offset %s)\n", + indent, "", + dwarf_tag_name (die->tag), die->abbrev, + sect_offset_str (die->sect_off)); if (die->parent != NULL) - fprintf_unfiltered (f, "%*s parent at offset: %s\n", - indent, "", - sect_offset_str (die->parent->sect_off)); + gdb_printf (f, "%*s parent at offset: %s\n", + indent, "", + sect_offset_str (die->parent->sect_off)); - fprintf_unfiltered (f, "%*s has children: %s\n", - indent, "", - dwarf_bool_name (die->child != NULL)); + gdb_printf (f, "%*s has children: %s\n", + indent, "", + dwarf_bool_name (die->child != NULL)); - fprintf_unfiltered (f, "%*s attributes:\n", indent, ""); + gdb_printf (f, "%*s attributes:\n", indent, ""); for (i = 0; i < die->num_attrs; ++i) { - fprintf_unfiltered (f, "%*s %s (%s) ", - indent, "", - dwarf_attr_name (die->attrs[i].name), - dwarf_form_name (die->attrs[i].form)); + gdb_printf (f, "%*s %s (%s) ", + indent, "", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); switch (die->attrs[i].form) { case DW_FORM_addr: case DW_FORM_addrx: case DW_FORM_GNU_addr_index: - fprintf_unfiltered (f, "address: "); + gdb_printf (f, "address: "); gdb_puts (hex_string (die->attrs[i].as_address ()), f); break; case DW_FORM_block2: case DW_FORM_block4: case DW_FORM_block: case DW_FORM_block1: - fprintf_unfiltered (f, "block: size %s", - pulongest (die->attrs[i].as_block ()->size)); + gdb_printf (f, "block: size %s", + pulongest (die->attrs[i].as_block ()->size)); break; case DW_FORM_exprloc: - fprintf_unfiltered (f, "expression: size %s", - pulongest (die->attrs[i].as_block ()->size)); + gdb_printf (f, "expression: size %s", + pulongest (die->attrs[i].as_block ()->size)); break; case DW_FORM_data16: - fprintf_unfiltered (f, "constant of 16 bytes"); + gdb_printf (f, "constant of 16 bytes"); break; case DW_FORM_ref_addr: - fprintf_unfiltered (f, "ref address: "); + gdb_printf (f, "ref address: "); gdb_puts (hex_string (die->attrs[i].as_unsigned ()), f); break; case DW_FORM_GNU_ref_alt: - fprintf_unfiltered (f, "alt ref address: "); + gdb_printf (f, "alt ref address: "); gdb_puts (hex_string (die->attrs[i].as_unsigned ()), f); break; case DW_FORM_ref1: @@ -23123,24 +23123,24 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) case DW_FORM_ref4: case DW_FORM_ref8: case DW_FORM_ref_udata: - fprintf_unfiltered (f, "constant ref: 0x%lx (adjusted)", - (long) (die->attrs[i].as_unsigned ())); + gdb_printf (f, "constant ref: 0x%lx (adjusted)", + (long) (die->attrs[i].as_unsigned ())); break; case DW_FORM_data1: case DW_FORM_data2: case DW_FORM_data4: case DW_FORM_data8: case DW_FORM_udata: - fprintf_unfiltered (f, "constant: %s", - pulongest (die->attrs[i].as_unsigned ())); + gdb_printf (f, "constant: %s", + pulongest (die->attrs[i].as_unsigned ())); break; case DW_FORM_sec_offset: - fprintf_unfiltered (f, "section offset: %s", - pulongest (die->attrs[i].as_unsigned ())); + gdb_printf (f, "section offset: %s", + pulongest (die->attrs[i].as_unsigned ())); break; case DW_FORM_ref_sig8: - fprintf_unfiltered (f, "signature: %s", - hex_string (die->attrs[i].as_signature ())); + gdb_printf (f, "signature: %s", + hex_string (die->attrs[i].as_signature ())); break; case DW_FORM_string: case DW_FORM_strp: @@ -23148,37 +23148,37 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) case DW_FORM_strx: case DW_FORM_GNU_str_index: case DW_FORM_GNU_strp_alt: - fprintf_unfiltered (f, "string: \"%s\" (%s canonicalized)", - die->attrs[i].as_string () - ? die->attrs[i].as_string () : "", - die->attrs[i].canonical_string_p () ? "is" : "not"); + gdb_printf (f, "string: \"%s\" (%s canonicalized)", + die->attrs[i].as_string () + ? die->attrs[i].as_string () : "", + die->attrs[i].canonical_string_p () ? "is" : "not"); break; case DW_FORM_flag: if (die->attrs[i].as_boolean ()) - fprintf_unfiltered (f, "flag: TRUE"); + gdb_printf (f, "flag: TRUE"); else - fprintf_unfiltered (f, "flag: FALSE"); + gdb_printf (f, "flag: FALSE"); break; case DW_FORM_flag_present: - fprintf_unfiltered (f, "flag: TRUE"); + gdb_printf (f, "flag: TRUE"); break; case DW_FORM_indirect: /* The reader will have reduced the indirect form to the "base form" so this form should not occur. */ - fprintf_unfiltered (f, - "unexpected attribute form: DW_FORM_indirect"); + gdb_printf (f, + "unexpected attribute form: DW_FORM_indirect"); break; case DW_FORM_sdata: case DW_FORM_implicit_const: - fprintf_unfiltered (f, "constant: %s", - plongest (die->attrs[i].as_signed ())); + gdb_printf (f, "constant: %s", + plongest (die->attrs[i].as_signed ())); break; default: - fprintf_unfiltered (f, "unsupported attribute form: %d.", - die->attrs[i].form); + gdb_printf (f, "unsupported attribute form: %d.", + die->attrs[i].form); break; } - fprintf_unfiltered (f, "\n"); + gdb_printf (f, "\n"); } } @@ -23202,16 +23202,16 @@ dump_die_1 (struct ui_file *f, int level, int max_level, struct die_info *die) if (die->child != NULL) { - fprintf_unfiltered (f, "%*s Children:", indent, ""); + gdb_printf (f, "%*s Children:", indent, ""); if (level + 1 < max_level) { - fprintf_unfiltered (f, "\n"); + gdb_printf (f, "\n"); dump_die_1 (f, level + 1, max_level, die->child); } else { - fprintf_unfiltered (f, - " [not printed, max nesting level reached]\n"); + gdb_printf (f, + " [not printed, max nesting level reached]\n"); } } @@ -24942,9 +24942,9 @@ static void show_check_physname (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether to check \"physname\" is %s.\n"), - value); + gdb_printf (file, + _("Whether to check \"physname\" is %s.\n"), + value); } void _initialize_dwarf2_read (); diff --git a/gdb/elfread.c b/gdb/elfread.c index 3f2d8b4..fb40032 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -1049,9 +1049,9 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, if (symtab_create_debug) { - fprintf_unfiltered (gdb_stdlog, - "Reading minimal symbols of objfile %s ...\n", - objfile_name (objfile)); + gdb_printf (gdb_stdlog, + "Reading minimal symbols of objfile %s ...\n", + objfile_name (objfile)); } /* If we already have minsyms, then we can skip some work here. @@ -1065,8 +1065,8 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, && ei->ctfsect == NULL) { if (symtab_create_debug) - fprintf_unfiltered (gdb_stdlog, - "... minimal symbols previously read\n"); + gdb_printf (gdb_stdlog, + "... minimal symbols previously read\n"); return; } @@ -1171,7 +1171,7 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, reader.install (); if (symtab_create_debug) - fprintf_unfiltered (gdb_stdlog, "Done reading minimal symbols.\n"); + gdb_printf (gdb_stdlog, "Done reading minimal symbols.\n"); } /* Scan and build partial symbols for a symbol file. diff --git a/gdb/event-top.c b/gdb/event-top.c index aa3b21be..b628f03 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -108,7 +108,7 @@ static void show_bt_on_fatal_signal (struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, _("Backtrace on a fatal signal is %s.\n"), value); + gdb_printf (file, _("Backtrace on a fatal signal is %s.\n"), value); } /* Signal handling variables. */ @@ -495,7 +495,7 @@ stdin_event_handler (int error, gdb_client_data client_data) if (main_ui == ui) { /* If stdin died, we may as well kill gdb. */ - fprintf_unfiltered (gdb_stderr, _("error detected on stdin\n")); + gdb_printf (gdb_stderr, _("error detected on stdin\n")); quit_command ((char *) 0, 0); } else @@ -1406,7 +1406,7 @@ static void show_debug_event_loop_command (struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, _("Event loop debugging is %s.\n"), value); + gdb_printf (file, _("Event loop debugging is %s.\n"), value); } void _initialize_event_top (); diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 73c4818..64a3627 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -88,7 +88,7 @@ print_exception (struct ui_file *file, const struct gdb_exception &e) file->write (start, end - start); } } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); /* Now append the annotation. */ switch (e.reason) @@ -103,9 +103,9 @@ static void show_exec_file_mismatch_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("exec-file-mismatch handling is currently \"%s\".\n"), - exec_file_mismatch_names[exec_file_mismatch_mode]); + gdb_printf (file, + _("exec-file-mismatch handling is currently \"%s\".\n"), + exec_file_mismatch_names[exec_file_mismatch_mode]); } /* Set command. Change the setting for range checking. */ @@ -136,8 +136,8 @@ static void show_write_files (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Writing into executable and core files is %s.\n"), - value); + gdb_printf (file, _("Writing into executable and core files is %s.\n"), + value); } @@ -379,7 +379,7 @@ exec_file_attach (const char *filename, int from_tty) if (!filename) { if (from_tty) - printf_filtered (_("No executable file now.\n")); + gdb_printf (_("No executable file now.\n")); set_gdbarch_from_file (NULL); } @@ -906,11 +906,11 @@ print_section_info (const target_section_table *t, bfd *abfd) /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64. */ int wid = gdbarch_addr_bit (gdbarch) <= 32 ? 8 : 16; - printf_filtered ("\t`%ps', ", - styled_string (file_name_style.style (), - bfd_get_filename (abfd))); + gdb_printf ("\t`%ps', ", + styled_string (file_name_style.style (), + bfd_get_filename (abfd))); gdb_stdout->wrap_here (8); - printf_filtered (_("file type %s.\n"), bfd_get_target (abfd)); + gdb_printf (_("file type %s.\n"), bfd_get_target (abfd)); if (abfd == current_program_space->exec_bfd ()) { /* gcc-3.4 does not like the initialization in @@ -944,16 +944,16 @@ print_section_info (const target_section_table *t, bfd *abfd) entry_point = gdbarch_addr_bits_remove (gdbarch, bfd_get_start_address (abfd) + displacement); - printf_filtered (_("\tEntry point: %s\n"), - paddress (gdbarch, entry_point)); + gdb_printf (_("\tEntry point: %s\n"), + paddress (gdbarch, entry_point)); } for (const target_section &p : *t) { struct bfd_section *psect = p.the_bfd_section; bfd *pbfd = psect->owner; - printf_filtered ("\t%s", hex_string_custom (p.addr, wid)); - printf_filtered (" - %s", hex_string_custom (p.endaddr, wid)); + gdb_printf ("\t%s", hex_string_custom (p.addr, wid)); + gdb_printf (" - %s", hex_string_custom (p.endaddr, wid)); /* FIXME: A format of "08l" is not wide enough for file offsets larger than 4GB. OTOH, making it "016l" isn't desirable either @@ -962,14 +962,14 @@ print_section_info (const target_section_table *t, bfd *abfd) format string accordingly. */ /* FIXME: i18n: Need to rewrite this sentence. */ if (info_verbose) - printf_filtered (" @ %s", - hex_string_custom (psect->filepos, 8)); - printf_filtered (" is %s", bfd_section_name (psect)); + gdb_printf (" @ %s", + hex_string_custom (psect->filepos, 8)); + gdb_printf (" is %s", bfd_section_name (psect)); if (pbfd != abfd) - printf_filtered (" in %ps", - styled_string (file_name_style.style (), - bfd_get_filename (pbfd))); - printf_filtered ("\n"); + gdb_printf (" in %ps", + styled_string (file_name_style.style (), + bfd_get_filename (pbfd))); + gdb_printf ("\n"); } } diff --git a/gdb/expop.h b/gdb/expop.h index a346570..c8c1aa1 100644 --- a/gdb/expop.h +++ b/gdb/expop.h @@ -346,7 +346,7 @@ void dump_for_expression (struct ui_file *stream, int depth, const std::vector<T> &vals) { - fprintf_filtered (stream, _("%*sVector:\n"), depth, ""); + gdb_printf (stream, _("%*sVector:\n"), depth, ""); for (auto &item : vals) dump_for_expression (stream, depth + 1, item); } diff --git a/gdb/expprint.c b/gdb/expprint.c index 4dab3a2..cef6ffb 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -71,63 +71,63 @@ namespace expr void dump_for_expression (struct ui_file *stream, int depth, enum exp_opcode op) { - fprintf_filtered (stream, _("%*sOperation: %s\n"), depth, "", op_name (op)); + gdb_printf (stream, _("%*sOperation: %s\n"), depth, "", op_name (op)); } void dump_for_expression (struct ui_file *stream, int depth, const std::string &str) { - fprintf_filtered (stream, _("%*sString: %s\n"), depth, "", str.c_str ()); + gdb_printf (stream, _("%*sString: %s\n"), depth, "", str.c_str ()); } void dump_for_expression (struct ui_file *stream, int depth, struct type *type) { - fprintf_filtered (stream, _("%*sType: "), depth, ""); + gdb_printf (stream, _("%*sType: "), depth, ""); type_print (type, nullptr, stream, 0); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void dump_for_expression (struct ui_file *stream, int depth, CORE_ADDR addr) { - fprintf_filtered (stream, _("%*sConstant: %s\n"), depth, "", - core_addr_to_string (addr)); + gdb_printf (stream, _("%*sConstant: %s\n"), depth, "", + core_addr_to_string (addr)); } void dump_for_expression (struct ui_file *stream, int depth, internalvar *ivar) { - fprintf_filtered (stream, _("%*sInternalvar: $%s\n"), depth, "", - internalvar_name (ivar)); + gdb_printf (stream, _("%*sInternalvar: $%s\n"), depth, "", + internalvar_name (ivar)); } void dump_for_expression (struct ui_file *stream, int depth, symbol *sym) { - fprintf_filtered (stream, _("%*sSymbol: %s\n"), depth, "", - sym->print_name ()); + gdb_printf (stream, _("%*sSymbol: %s\n"), depth, "", + sym->print_name ()); } void dump_for_expression (struct ui_file *stream, int depth, bound_minimal_symbol msym) { - fprintf_filtered (stream, _("%*sMinsym %s in objfile %s\n"), depth, "", - msym.minsym->print_name (), objfile_name (msym.objfile)); + gdb_printf (stream, _("%*sMinsym %s in objfile %s\n"), depth, "", + msym.minsym->print_name (), objfile_name (msym.objfile)); } void dump_for_expression (struct ui_file *stream, int depth, const block *bl) { - fprintf_filtered (stream, _("%*sBlock: %p\n"), depth, "", bl); + gdb_printf (stream, _("%*sBlock: %p\n"), depth, "", bl); } void dump_for_expression (struct ui_file *stream, int depth, const block_symbol &sym) { - fprintf_filtered (stream, _("%*sBlock symbol:\n"), depth, ""); + gdb_printf (stream, _("%*sBlock symbol:\n"), depth, ""); dump_for_expression (stream, depth + 1, sym.symbol); dump_for_expression (stream, depth + 1, sym.block); } @@ -136,19 +136,19 @@ void dump_for_expression (struct ui_file *stream, int depth, type_instance_flags flags) { - fprintf_filtered (stream, _("%*sType flags: "), depth, ""); + gdb_printf (stream, _("%*sType flags: "), depth, ""); if (flags & TYPE_INSTANCE_FLAG_CONST) gdb_puts ("const ", stream); if (flags & TYPE_INSTANCE_FLAG_VOLATILE) gdb_puts ("volatile", stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void dump_for_expression (struct ui_file *stream, int depth, enum c_string_type_values flags) { - fprintf_filtered (stream, _("%*sC string flags: "), depth, ""); + gdb_printf (stream, _("%*sC string flags: "), depth, ""); switch (flags & ~C_CHAR) { case C_WIDE_STRING: @@ -176,7 +176,7 @@ void dump_for_expression (struct ui_file *stream, int depth, enum range_flag flags) { - fprintf_filtered (stream, _("%*sRange:"), depth, ""); + gdb_printf (stream, _("%*sRange:"), depth, ""); if ((flags & RANGE_LOW_BOUND_DEFAULT) != 0) gdb_puts (_("low-default "), stream); if ((flags & RANGE_HIGH_BOUND_DEFAULT) != 0) @@ -185,7 +185,7 @@ dump_for_expression (struct ui_file *stream, int depth, gdb_puts (_("high-exclusive "), stream); if ((flags & RANGE_HAS_STRIDE) != 0) gdb_puts (_("has-stride"), stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void @@ -198,9 +198,9 @@ dump_for_expression (struct ui_file *stream, int depth, void float_const_operation::dump (struct ui_file *stream, int depth) const { - fprintf_filtered (stream, _("%*sFloat: "), depth, ""); + gdb_printf (stream, _("%*sFloat: "), depth, ""); print_floating (m_data.data (), m_type, stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } } /* namespace expr */ diff --git a/gdb/f-lang.c b/gdb/f-lang.c index eaeda88..72dd136 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -50,8 +50,8 @@ static void show_repack_array_slices (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Repacking of Fortran array slices is %s.\n"), - value); + gdb_printf (file, _("Repacking of Fortran array slices is %s.\n"), + value); } /* Debugging of Fortran's array slicing. */ @@ -63,8 +63,8 @@ show_fortran_array_slicing_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of Fortran array slicing is %s.\n"), - value); + gdb_printf (file, _("Debugging of Fortran array slicing is %s.\n"), + value); } /* Local functions */ @@ -1541,9 +1541,9 @@ f_language::print_array_index (struct type *index_type, LONGEST index, { struct value *index_value = value_from_longest (index_type, index); - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); value_print (index_value, stream, options); - fprintf_filtered (stream, ") = "); + gdb_printf (stream, ") = "); } /* See language.h. */ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 5065ffa..31786d4 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -111,7 +111,7 @@ f_language::f_type_print_varspec_prefix (struct type *type, case TYPE_CODE_FUNC: f_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0); if (passed_a_ptr) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); break; case TYPE_CODE_ARRAY: @@ -169,7 +169,7 @@ f_language::f_type_print_varspec_suffix (struct type *type, arrayprint_recurse_level++; if (arrayprint_recurse_level == 1) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); if (type_not_associated (type)) print_rank_only = true; @@ -193,18 +193,18 @@ f_language::f_type_print_varspec_suffix (struct type *type, print_rank_only); if (print_rank_only) - fprintf_filtered (stream, ":"); + gdb_printf (stream, ":"); else { LONGEST lower_bound = f77_get_lowerbound (type); if (lower_bound != 1) /* Not the default. */ - fprintf_filtered (stream, "%s:", plongest (lower_bound)); + gdb_printf (stream, "%s:", plongest (lower_bound)); /* Make sure that, if we have an assumed size array, we print out a warning and print the upperbound as '*'. */ if (type->bounds ()->high.kind () == PROP_UNDEFINED) - fprintf_filtered (stream, "*"); + gdb_printf (stream, "*"); else { LONGEST upper_bound = f77_get_upperbound (type); @@ -219,9 +219,9 @@ f_language::f_type_print_varspec_suffix (struct type *type, print_rank_only); if (arrayprint_recurse_level == 1) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); else - fprintf_filtered (stream, ","); + gdb_printf (stream, ","); arrayprint_recurse_level--; break; @@ -229,7 +229,7 @@ f_language::f_type_print_varspec_suffix (struct type *type, case TYPE_CODE_REF: f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0, arrayprint_recurse_level, false); - fprintf_filtered (stream, " )"); + gdb_printf (stream, " )"); break; case TYPE_CODE_FUNC: @@ -240,8 +240,8 @@ f_language::f_type_print_varspec_suffix (struct type *type, passed_a_ptr, 0, arrayprint_recurse_level, false); if (passed_a_ptr) - fprintf_filtered (stream, ") "); - fprintf_filtered (stream, "("); + gdb_printf (stream, ") "); + gdb_printf (stream, "("); if (nfields == 0 && type->is_prototyped ()) print_type (builtin_f_type (type->arch ())->builtin_void, "", stream, -1, 0, 0); @@ -255,7 +255,7 @@ f_language::f_type_print_varspec_suffix (struct type *type, } print_type (type->field (i).type (), "", stream, -1, 0, 0); } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } break; @@ -310,7 +310,7 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, else if (type->code () == TYPE_CODE_STRUCT || type->code () == TYPE_CODE_NAMELIST) prefix = "Type "; - fprintf_filtered (stream, "%*s%s%s", level, "", prefix, type->name ()); + gdb_printf (stream, "%*s%s%s", level, "", prefix, type->name ()); return; } @@ -334,33 +334,33 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, break; case TYPE_CODE_PTR: - fprintf_filtered (stream, "%*sPTR TO -> ( ", level, ""); + gdb_printf (stream, "%*sPTR TO -> ( ", level, ""); f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, 0); break; case TYPE_CODE_REF: - fprintf_filtered (stream, "%*sREF TO -> ( ", level, ""); + gdb_printf (stream, "%*sREF TO -> ( ", level, ""); f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, 0); break; case TYPE_CODE_VOID: { struct type *void_type = builtin_f_type (type->arch ())->builtin_void; - fprintf_filtered (stream, "%*s%s", level, "", void_type->name ()); + gdb_printf (stream, "%*s%s", level, "", void_type->name ()); } break; case TYPE_CODE_UNDEF: - fprintf_filtered (stream, "%*sstruct <unknown>", level, ""); + gdb_printf (stream, "%*sstruct <unknown>", level, ""); break; case TYPE_CODE_ERROR: - fprintf_filtered (stream, "%*s%s", level, "", TYPE_ERROR_NAME (type)); + gdb_printf (stream, "%*s%s", level, "", TYPE_ERROR_NAME (type)); break; case TYPE_CODE_RANGE: /* This should not occur. */ - fprintf_filtered (stream, "%*s<range type>", level, ""); + gdb_printf (stream, "%*s<range type>", level, ""); break; case TYPE_CODE_CHAR: @@ -370,7 +370,7 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, C-oriented, we must change these to "character" from "char". */ if (strcmp (type->name (), "char") == 0) - fprintf_filtered (stream, "%*scharacter", level, ""); + gdb_printf (stream, "%*scharacter", level, ""); else goto default_case; break; @@ -386,19 +386,19 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, { LONGEST upper_bound = f77_get_upperbound (type); - fprintf_filtered (stream, "character*%s", pulongest (upper_bound)); + gdb_printf (stream, "character*%s", pulongest (upper_bound)); } else - fprintf_filtered (stream, "%*scharacter*(*)", level, ""); + gdb_printf (stream, "%*scharacter*(*)", level, ""); break; case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: case TYPE_CODE_NAMELIST: if (type->code () == TYPE_CODE_UNION) - fprintf_filtered (stream, "%*sType, C_Union :: ", level, ""); + gdb_printf (stream, "%*sType, C_Union :: ", level, ""); else - fprintf_filtered (stream, "%*sType ", level, ""); + gdb_printf (stream, "%*sType ", level, ""); gdb_puts (type->name (), stream); /* According to the definition, we only print structure elements in case show > 0. */ @@ -416,13 +416,13 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, stream, show - 1, 0, 0, 0, false); gdb_puts ("\n", stream); } - fprintf_filtered (stream, "%*sEnd Type ", level, ""); + gdb_printf (stream, "%*sEnd Type ", level, ""); gdb_puts (type->name (), stream); } break; case TYPE_CODE_MODULE: - fprintf_filtered (stream, "%*smodule %s", level, "", type->name ()); + gdb_printf (stream, "%*smodule %s", level, "", type->name ()); break; default_case: @@ -432,12 +432,12 @@ f_language::f_type_print_base (struct type *type, struct ui_file *stream, the type name is, as recorded in the type itself. If there is no type name, then complain. */ if (type->name () != NULL) - fprintf_filtered (stream, "%*s%s", level, "", type->name ()); + gdb_printf (stream, "%*s%s", level, "", type->name ()); else error (_("Invalid type code (%d) in symbol table."), type->code ()); break; } if (TYPE_IS_ALLOCATABLE (type)) - fprintf_filtered (stream, ", allocatable"); + gdb_printf (stream, ", allocatable"); } diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index e10d471..aea01bb 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -212,10 +212,10 @@ public: if (nrepeats >= m_options->repeat_count_threshold) { annotate_elt_rep (nrepeats + 1); - fprintf_filtered (m_stream, "%p[<repeats %s times>%p]", - metadata_style.style ().ptr (), - plongest (nrepeats + 1), - nullptr); + gdb_printf (m_stream, "%p[<repeats %s times>%p]", + metadata_style.style ().ptr (), + plongest (nrepeats + 1), + nullptr); annotate_elt_rep_end (); if (!repeated) gdb_puts (" ", m_stream); @@ -281,10 +281,10 @@ public: if (nrepeats >= m_options->repeat_count_threshold) { annotate_elt_rep (nrepeats + 1); - fprintf_filtered (m_stream, "%p[<repeats %s times>%p]", - metadata_style.style ().ptr (), - plongest (nrepeats + 1), - nullptr); + gdb_printf (m_stream, "%p[<repeats %s times>%p]", + metadata_style.style ().ptr (), + plongest (nrepeats + 1), + nullptr); annotate_elt_rep_end (); } else @@ -515,7 +515,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream, case TYPE_CODE_NAMELIST: /* Starting from the Fortran 90 standard, Fortran supports derived types. */ - fprintf_filtered (stream, "( "); + gdb_printf (stream, "( "); for (index = 0; index < type->num_fields (); index++) { struct type *field_type @@ -557,7 +557,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream, ++printed_field; } } - fprintf_filtered (stream, " )"); + gdb_printf (stream, " )"); break; case TYPE_CODE_BOOL: @@ -625,17 +625,17 @@ info_common_command_for_block (const struct block *block, const char *comname, else *any_printed = 1; if (sym->print_name ()) - printf_filtered (_("Contents of F77 COMMON block '%s':\n"), - sym->print_name ()); + gdb_printf (_("Contents of F77 COMMON block '%s':\n"), + sym->print_name ()); else - printf_filtered (_("Contents of blank COMMON block:\n")); + gdb_printf (_("Contents of blank COMMON block:\n")); for (index = 0; index < common->n_entries; index++) { struct value *val = NULL; - printf_filtered ("%s = ", - common->contents[index]->print_name ()); + gdb_printf ("%s = ", + common->contents[index]->print_name ()); try { @@ -679,7 +679,7 @@ info_common_command (const char *comname, int from_tty) block = get_frame_block (fi, 0); if (block == NULL) { - printf_filtered (_("No symbol table info available.\n")); + gdb_printf (_("No symbol table info available.\n")); return; } @@ -696,9 +696,9 @@ info_common_command (const char *comname, int from_tty) if (!values_printed) { if (comname) - printf_filtered (_("No common block '%s'.\n"), comname); + gdb_printf (_("No common block '%s'.\n"), comname); else - printf_filtered (_("No common blocks.\n")); + gdb_printf (_("No common blocks.\n")); } } diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index ee128a9..8e5107c 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -108,12 +108,12 @@ fbsd_nat_target::find_memory_regions (find_memory_region_ftype func, size = kve->kve_end - kve->kve_start; if (info_verbose) { - printf_filtered ("Save segment, %ld bytes at %s (%c%c%c)\n", - (long) size, - paddress (target_gdbarch (), kve->kve_start), - kve->kve_protection & KVME_PROT_READ ? 'r' : '-', - kve->kve_protection & KVME_PROT_WRITE ? 'w' : '-', - kve->kve_protection & KVME_PROT_EXEC ? 'x' : '-'); + gdb_printf ("Save segment, %ld bytes at %s (%c%c%c)\n", + (long) size, + paddress (target_gdbarch (), kve->kve_start), + kve->kve_protection & KVME_PROT_READ ? 'r' : '-', + kve->kve_protection & KVME_PROT_WRITE ? 'w' : '-', + kve->kve_protection & KVME_PROT_EXEC ? 'x' : '-'); } /* Invoke the callback function to create the corefile segment. @@ -241,7 +241,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) else error (_("Invalid arguments.")); - printf_filtered (_("process %d\n"), pid); + gdb_printf (_("process %d\n"), pid); if (do_cwd || do_exe || do_files) fdtbl.reset (kinfo_getfile (pid, &nfd)); @@ -249,7 +249,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) { gdb::unique_xmalloc_ptr<char> cmdline = fbsd_fetch_cmdline (pid); if (cmdline != nullptr) - printf_filtered ("cmdline = '%s'\n", cmdline.get ()); + gdb_printf ("cmdline = '%s'\n", cmdline.get ()); else warning (_("unable to fetch command line")); } @@ -266,7 +266,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) } } if (cwd != NULL) - printf_filtered ("cwd = '%s'\n", cwd); + gdb_printf ("cwd = '%s'\n", cwd); else warning (_("unable to fetch current working directory")); } @@ -285,7 +285,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) if (exe == NULL) exe = pid_to_exec_file (pid); if (exe != NULL) - printf_filtered ("exe = '%s'\n", exe); + gdb_printf ("exe = '%s'\n", exe); else warning (_("unable to fetch executable path name")); } @@ -336,7 +336,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) const char *state; int pgtok; - printf_filtered ("Name: %s\n", kp.ki_comm); + gdb_printf ("Name: %s\n", kp.ki_comm); switch (kp.ki_stat) { case SIDL: @@ -364,69 +364,69 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what) state = "? (unknown)"; break; } - printf_filtered ("State: %s\n", state); - printf_filtered ("Parent process: %d\n", kp.ki_ppid); - printf_filtered ("Process group: %d\n", kp.ki_pgid); - printf_filtered ("Session id: %d\n", kp.ki_sid); - printf_filtered ("TTY: %s\n", pulongest (kp.ki_tdev)); - printf_filtered ("TTY owner process group: %d\n", kp.ki_tpgid); - printf_filtered ("User IDs (real, effective, saved): %d %d %d\n", - kp.ki_ruid, kp.ki_uid, kp.ki_svuid); - printf_filtered ("Group IDs (real, effective, saved): %d %d %d\n", - kp.ki_rgid, kp.ki_groups[0], kp.ki_svgid); - printf_filtered ("Groups: "); + gdb_printf ("State: %s\n", state); + gdb_printf ("Parent process: %d\n", kp.ki_ppid); + gdb_printf ("Process group: %d\n", kp.ki_pgid); + gdb_printf ("Session id: %d\n", kp.ki_sid); + gdb_printf ("TTY: %s\n", pulongest (kp.ki_tdev)); + gdb_printf ("TTY owner process group: %d\n", kp.ki_tpgid); + gdb_printf ("User IDs (real, effective, saved): %d %d %d\n", + kp.ki_ruid, kp.ki_uid, kp.ki_svuid); + gdb_printf ("Group IDs (real, effective, saved): %d %d %d\n", + kp.ki_rgid, kp.ki_groups[0], kp.ki_svgid); + gdb_printf ("Groups: "); for (int i = 0; i < kp.ki_ngroups; i++) - printf_filtered ("%d ", kp.ki_groups[i]); - printf_filtered ("\n"); - printf_filtered ("Minor faults (no memory page): %ld\n", - kp.ki_rusage.ru_minflt); - printf_filtered ("Minor faults, children: %ld\n", - kp.ki_rusage_ch.ru_minflt); - printf_filtered ("Major faults (memory page faults): %ld\n", - kp.ki_rusage.ru_majflt); - printf_filtered ("Major faults, children: %ld\n", - kp.ki_rusage_ch.ru_majflt); - printf_filtered ("utime: %s.%06ld\n", - plongest (kp.ki_rusage.ru_utime.tv_sec), - kp.ki_rusage.ru_utime.tv_usec); - printf_filtered ("stime: %s.%06ld\n", - plongest (kp.ki_rusage.ru_stime.tv_sec), - kp.ki_rusage.ru_stime.tv_usec); - printf_filtered ("utime, children: %s.%06ld\n", - plongest (kp.ki_rusage_ch.ru_utime.tv_sec), - kp.ki_rusage_ch.ru_utime.tv_usec); - printf_filtered ("stime, children: %s.%06ld\n", - plongest (kp.ki_rusage_ch.ru_stime.tv_sec), - kp.ki_rusage_ch.ru_stime.tv_usec); - printf_filtered ("'nice' value: %d\n", kp.ki_nice); - printf_filtered ("Start time: %s.%06ld\n", - plongest (kp.ki_start.tv_sec), - kp.ki_start.tv_usec); + gdb_printf ("%d ", kp.ki_groups[i]); + gdb_printf ("\n"); + gdb_printf ("Minor faults (no memory page): %ld\n", + kp.ki_rusage.ru_minflt); + gdb_printf ("Minor faults, children: %ld\n", + kp.ki_rusage_ch.ru_minflt); + gdb_printf ("Major faults (memory page faults): %ld\n", + kp.ki_rusage.ru_majflt); + gdb_printf ("Major faults, children: %ld\n", + kp.ki_rusage_ch.ru_majflt); + gdb_printf ("utime: %s.%06ld\n", + plongest (kp.ki_rusage.ru_utime.tv_sec), + kp.ki_rusage.ru_utime.tv_usec); + gdb_printf ("stime: %s.%06ld\n", + plongest (kp.ki_rusage.ru_stime.tv_sec), + kp.ki_rusage.ru_stime.tv_usec); + gdb_printf ("utime, children: %s.%06ld\n", + plongest (kp.ki_rusage_ch.ru_utime.tv_sec), + kp.ki_rusage_ch.ru_utime.tv_usec); + gdb_printf ("stime, children: %s.%06ld\n", + plongest (kp.ki_rusage_ch.ru_stime.tv_sec), + kp.ki_rusage_ch.ru_stime.tv_usec); + gdb_printf ("'nice' value: %d\n", kp.ki_nice); + gdb_printf ("Start time: %s.%06ld\n", + plongest (kp.ki_start.tv_sec), + kp.ki_start.tv_usec); pgtok = getpagesize () / 1024; - printf_filtered ("Virtual memory size: %s kB\n", - pulongest (kp.ki_size / 1024)); - printf_filtered ("Data size: %s kB\n", - pulongest (kp.ki_dsize * pgtok)); - printf_filtered ("Stack size: %s kB\n", - pulongest (kp.ki_ssize * pgtok)); - printf_filtered ("Text size: %s kB\n", - pulongest (kp.ki_tsize * pgtok)); - printf_filtered ("Resident set size: %s kB\n", - pulongest (kp.ki_rssize * pgtok)); - printf_filtered ("Maximum RSS: %s kB\n", - pulongest (kp.ki_rusage.ru_maxrss)); - printf_filtered ("Pending Signals: "); + gdb_printf ("Virtual memory size: %s kB\n", + pulongest (kp.ki_size / 1024)); + gdb_printf ("Data size: %s kB\n", + pulongest (kp.ki_dsize * pgtok)); + gdb_printf ("Stack size: %s kB\n", + pulongest (kp.ki_ssize * pgtok)); + gdb_printf ("Text size: %s kB\n", + pulongest (kp.ki_tsize * pgtok)); + gdb_printf ("Resident set size: %s kB\n", + pulongest (kp.ki_rssize * pgtok)); + gdb_printf ("Maximum RSS: %s kB\n", + pulongest (kp.ki_rusage.ru_maxrss)); + gdb_printf ("Pending Signals: "); for (int i = 0; i < _SIG_WORDS; i++) - printf_filtered ("%08x ", kp.ki_siglist.__bits[i]); - printf_filtered ("\n"); - printf_filtered ("Ignored Signals: "); + gdb_printf ("%08x ", kp.ki_siglist.__bits[i]); + gdb_printf ("\n"); + gdb_printf ("Ignored Signals: "); for (int i = 0; i < _SIG_WORDS; i++) - printf_filtered ("%08x ", kp.ki_sigignore.__bits[i]); - printf_filtered ("\n"); - printf_filtered ("Caught Signals: "); + gdb_printf ("%08x ", kp.ki_sigignore.__bits[i]); + gdb_printf ("\n"); + gdb_printf ("Caught Signals: "); for (int i = 0; i < _SIG_WORDS; i++) - printf_filtered ("%08x ", kp.ki_sigcatch.__bits[i]); - printf_filtered ("\n"); + gdb_printf ("%08x ", kp.ki_sigcatch.__bits[i]); + gdb_printf ("\n"); } } @@ -717,15 +717,15 @@ static void show_fbsd_lwp_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of FreeBSD lwp module is %s.\n"), value); + gdb_printf (file, _("Debugging of FreeBSD lwp module is %s.\n"), value); } static void show_fbsd_nat_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of FreeBSD native target is %s.\n"), - value); + gdb_printf (file, _("Debugging of FreeBSD native target is %s.\n"), + value); } #define fbsd_lwp_debug_printf(fmt, ...) \ @@ -1296,8 +1296,8 @@ fbsd_nat_target::wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus, fbsd_lwp_debug_printf ("deleting thread for LWP %u", pl.pl_lwpid); if (print_thread_events) - printf_filtered (_("[%s exited]\n"), - target_pid_to_str (wptid).c_str ()); + gdb_printf (_("[%s exited]\n"), + target_pid_to_str (wptid).c_str ()); low_delete_thread (thr); delete_thread (thr); } diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index 744fa6d..1b7e36e 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -921,8 +921,8 @@ fbsd_print_sockaddr_in (const void *sockaddr) if (inet_ntop (AF_INET, sin->sin_addr, buf, sizeof buf) == nullptr) error (_("Failed to format IPv4 address")); - printf_filtered ("%s:%u", buf, - (sin->sin_port[0] << 8) | sin->sin_port[1]); + gdb_printf ("%s:%u", buf, + (sin->sin_port[0] << 8) | sin->sin_port[1]); } /* Helper function to print out an IPv6 socket address. */ @@ -936,8 +936,8 @@ fbsd_print_sockaddr_in6 (const void *sockaddr) if (inet_ntop (AF_INET6, sin6->sin6_addr, buf, sizeof buf) == nullptr) error (_("Failed to format IPv6 address")); - printf_filtered ("%s.%u", buf, - (sin6->sin6_port[0] << 8) | sin6->sin6_port[1]); + gdb_printf ("%s.%u", buf, + (sin6->sin6_port[0] << 8) | sin6->sin6_port[1]); } /* See fbsd-tdep.h. */ @@ -945,9 +945,9 @@ fbsd_print_sockaddr_in6 (const void *sockaddr) void fbsd_info_proc_files_header () { - printf_filtered (_("Open files:\n\n")); - printf_filtered (" %6s %6s %10s %9s %s\n", - "FD", "Type", "Offset", "Flags ", "Name"); + gdb_printf (_("Open files:\n\n")); + gdb_printf (" %6s %6s %10s %9s %s\n", + "FD", "Type", "Offset", "Flags ", "Name"); } /* See fbsd-tdep.h. */ @@ -959,11 +959,11 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, int kf_sock_protocol, const void *kf_sa_local, const void *kf_sa_peer, const void *kf_path) { - printf_filtered (" %6s %6s %10s %8s ", - fbsd_file_fd (kf_fd), - fbsd_file_type (kf_type, kf_vnode_type), - kf_offset > -1 ? hex_string (kf_offset) : "-", - fbsd_file_flags (kf_flags)); + gdb_printf (" %6s %6s %10s %8s ", + fbsd_file_fd (kf_fd), + fbsd_file_type (kf_type, kf_vnode_type), + kf_offset > -1 ? hex_string (kf_offset) : "-", + fbsd_file_flags (kf_flags)); if (kf_type == KINFO_FILE_TYPE_SOCKET) { switch (kf_sock_domain) @@ -973,16 +973,16 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, switch (kf_sock_type) { case FBSD_SOCK_STREAM: - printf_filtered ("unix stream:"); + gdb_printf ("unix stream:"); break; case FBSD_SOCK_DGRAM: - printf_filtered ("unix dgram:"); + gdb_printf ("unix dgram:"); break; case FBSD_SOCK_SEQPACKET: - printf_filtered ("unix seqpacket:"); + gdb_printf ("unix seqpacket:"); break; default: - printf_filtered ("unix <%d>:", kf_sock_type); + gdb_printf ("unix <%d>:", kf_sock_type); break; } @@ -993,26 +993,26 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, if (saddr_un->sun_path[0] == 0) saddr_un = reinterpret_cast<const struct fbsd_sockaddr_un *> (kf_sa_peer); - printf_filtered ("%s", saddr_un->sun_path); + gdb_printf ("%s", saddr_un->sun_path); break; } case FBSD_AF_INET: - printf_filtered ("%s4 ", fbsd_ipproto (kf_sock_protocol)); + gdb_printf ("%s4 ", fbsd_ipproto (kf_sock_protocol)); fbsd_print_sockaddr_in (kf_sa_local); - printf_filtered (" -> "); + gdb_printf (" -> "); fbsd_print_sockaddr_in (kf_sa_peer); break; case FBSD_AF_INET6: - printf_filtered ("%s6 ", fbsd_ipproto (kf_sock_protocol)); + gdb_printf ("%s6 ", fbsd_ipproto (kf_sock_protocol)); fbsd_print_sockaddr_in6 (kf_sa_local); - printf_filtered (" -> "); + gdb_printf (" -> "); fbsd_print_sockaddr_in6 (kf_sa_peer); break; } } else - printf_filtered ("%s", reinterpret_cast<const char *> (kf_path)); - printf_filtered ("\n"); + gdb_printf ("%s", reinterpret_cast<const char *> (kf_path)); + gdb_printf ("\n"); } /* Implement "info proc files" for a corefile. */ @@ -1098,20 +1098,20 @@ fbsd_vm_map_entry_flags (int kve_flags, int kve_protection) void fbsd_info_proc_mappings_header (int addr_bit) { - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (addr_bit == 64) { - printf_filtered (" %18s %18s %10s %10s %9s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "Flags ", "File"); + gdb_printf (" %18s %18s %10s %10s %9s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "Flags ", "File"); } else { - printf_filtered ("\t%10s %10s %10s %10s %9s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "Flags ", "File"); + gdb_printf ("\t%10s %10s %10s %10s %9s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "Flags ", "File"); } } @@ -1125,23 +1125,23 @@ fbsd_info_proc_mappings_entry (int addr_bit, ULONGEST kve_start, { if (addr_bit == 64) { - printf_filtered (" %18s %18s %10s %10s %9s %s\n", - hex_string (kve_start), - hex_string (kve_end), - hex_string (kve_end - kve_start), - hex_string (kve_offset), - fbsd_vm_map_entry_flags (kve_flags, kve_protection), - reinterpret_cast<const char *> (kve_path)); + gdb_printf (" %18s %18s %10s %10s %9s %s\n", + hex_string (kve_start), + hex_string (kve_end), + hex_string (kve_end - kve_start), + hex_string (kve_offset), + fbsd_vm_map_entry_flags (kve_flags, kve_protection), + reinterpret_cast<const char *> (kve_path)); } else { - printf_filtered ("\t%10s %10s %10s %10s %9s %s\n", - hex_string (kve_start), - hex_string (kve_end), - hex_string (kve_end - kve_start), - hex_string (kve_offset), - fbsd_vm_map_entry_flags (kve_flags, kve_protection), - reinterpret_cast<const char *> (kve_path)); + gdb_printf ("\t%10s %10s %10s %10s %9s %s\n", + hex_string (kve_start), + hex_string (kve_end), + hex_string (kve_end - kve_start), + hex_string (kve_offset), + fbsd_vm_map_entry_flags (kve_flags, kve_protection), + reinterpret_cast<const char *> (kve_path)); } } @@ -1272,11 +1272,11 @@ fbsd_core_fetch_timeval (struct gdbarch *gdbarch, unsigned char *data, static void fbsd_print_sigset (const char *descr, unsigned char *sigset) { - printf_filtered ("%s: ", descr); + gdb_printf ("%s: ", descr); for (int i = 0; i < SIG_WORDS; i++) - printf_filtered ("%08x ", - (unsigned int) bfd_get_32 (core_bfd, sigset + i * 4)); - printf_filtered ("\n"); + gdb_printf ("%08x ", + (unsigned int) bfd_get_32 (core_bfd, sigset + i * 4)); + gdb_printf ("\n"); } /* Implement "info proc status" for a corefile. */ @@ -1336,15 +1336,15 @@ fbsd_core_info_proc_status (struct gdbarch *gdbarch) return; } - printf_filtered ("Name: %.19s\n", descdata + kp->ki_comm); - printf_filtered ("Process ID: %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_pid))); - printf_filtered ("Parent process: %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_ppid))); - printf_filtered ("Process group: %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_pgid))); - printf_filtered ("Session id: %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_sid))); + gdb_printf ("Name: %.19s\n", descdata + kp->ki_comm); + gdb_printf ("Process ID: %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_pid))); + gdb_printf ("Parent process: %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_ppid))); + gdb_printf ("Process group: %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_pgid))); + gdb_printf ("Session id: %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_sid))); /* FreeBSD 12.0 and later store a 64-bit dev_t at 'ki_tdev'. Older kernels store a 32-bit dev_t at 'ki_tdev_freebsd11'. In older @@ -1355,76 +1355,76 @@ fbsd_core_info_proc_status (struct gdbarch *gdbarch) value = bfd_get_64 (core_bfd, descdata + kp->ki_tdev); if (value == 0) value = bfd_get_32 (core_bfd, descdata + kp->ki_tdev_freebsd11); - printf_filtered ("TTY: %s\n", pulongest (value)); - printf_filtered ("TTY owner process group: %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_tpgid))); - printf_filtered ("User IDs (real, effective, saved): %s %s %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_ruid)), - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_uid)), - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_svuid))); - printf_filtered ("Group IDs (real, effective, saved): %s %s %s\n", - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_rgid)), - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_groups)), - pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_svgid))); - printf_filtered ("Groups: "); + gdb_printf ("TTY: %s\n", pulongest (value)); + gdb_printf ("TTY owner process group: %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_tpgid))); + gdb_printf ("User IDs (real, effective, saved): %s %s %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_ruid)), + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_uid)), + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_svuid))); + gdb_printf ("Group IDs (real, effective, saved): %s %s %s\n", + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_rgid)), + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_groups)), + pulongest (bfd_get_32 (core_bfd, descdata + kp->ki_svgid))); + gdb_printf ("Groups: "); uint16_t ngroups = bfd_get_16 (core_bfd, descdata + kp->ki_ngroups); for (int i = 0; i < ngroups; i++) - printf_filtered ("%s ", - pulongest (bfd_get_32 (core_bfd, - descdata + kp->ki_groups + i * 4))); - printf_filtered ("\n"); + gdb_printf ("%s ", + pulongest (bfd_get_32 (core_bfd, + descdata + kp->ki_groups + i * 4))); + gdb_printf ("\n"); value = bfd_get (long_bit, core_bfd, descdata + kp->ki_rusage + kp->ru_minflt); - printf_filtered ("Minor faults (no memory page): %s\n", pulongest (value)); + gdb_printf ("Minor faults (no memory page): %s\n", pulongest (value)); value = bfd_get (long_bit, core_bfd, descdata + kp->ki_rusage_ch + kp->ru_minflt); - printf_filtered ("Minor faults, children: %s\n", pulongest (value)); + gdb_printf ("Minor faults, children: %s\n", pulongest (value)); value = bfd_get (long_bit, core_bfd, descdata + kp->ki_rusage + kp->ru_majflt); - printf_filtered ("Major faults (memory page faults): %s\n", - pulongest (value)); + gdb_printf ("Major faults (memory page faults): %s\n", + pulongest (value)); value = bfd_get (long_bit, core_bfd, descdata + kp->ki_rusage_ch + kp->ru_majflt); - printf_filtered ("Major faults, children: %s\n", pulongest (value)); + gdb_printf ("Major faults, children: %s\n", pulongest (value)); fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_rusage + kp->ru_utime, sec, value); - printf_filtered ("utime: %s.%06d\n", plongest (sec), (int) value); + gdb_printf ("utime: %s.%06d\n", plongest (sec), (int) value); fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_rusage + kp->ru_stime, sec, value); - printf_filtered ("stime: %s.%06d\n", plongest (sec), (int) value); + gdb_printf ("stime: %s.%06d\n", plongest (sec), (int) value); fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_rusage_ch + kp->ru_utime, sec, value); - printf_filtered ("utime, children: %s.%06d\n", plongest (sec), (int) value); + gdb_printf ("utime, children: %s.%06d\n", plongest (sec), (int) value); fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_rusage_ch + kp->ru_stime, sec, value); - printf_filtered ("stime, children: %s.%06d\n", plongest (sec), (int) value); - printf_filtered ("'nice' value: %d\n", - (int) bfd_get_signed_8 (core_bfd, descdata + kp->ki_nice)); + gdb_printf ("stime, children: %s.%06d\n", plongest (sec), (int) value); + gdb_printf ("'nice' value: %d\n", + (int) bfd_get_signed_8 (core_bfd, descdata + kp->ki_nice)); fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_start, sec, value); - printf_filtered ("Start time: %s.%06d\n", plongest (sec), (int) value); - printf_filtered ("Virtual memory size: %s kB\n", - pulongest (bfd_get (addr_bit, core_bfd, - descdata + kp->ki_size) / 1024)); - printf_filtered ("Data size: %s pages\n", - pulongest (bfd_get (addr_bit, core_bfd, - descdata + kp->ki_dsize))); - printf_filtered ("Stack size: %s pages\n", - pulongest (bfd_get (addr_bit, core_bfd, - descdata + kp->ki_ssize))); - printf_filtered ("Text size: %s pages\n", - pulongest (bfd_get (addr_bit, core_bfd, - descdata + kp->ki_tsize))); - printf_filtered ("Resident set size: %s pages\n", - pulongest (bfd_get (addr_bit, core_bfd, - descdata + kp->ki_rssize))); - printf_filtered ("Maximum RSS: %s pages\n", - pulongest (bfd_get (long_bit, core_bfd, - descdata + kp->ki_rusage - + kp->ru_maxrss))); + gdb_printf ("Start time: %s.%06d\n", plongest (sec), (int) value); + gdb_printf ("Virtual memory size: %s kB\n", + pulongest (bfd_get (addr_bit, core_bfd, + descdata + kp->ki_size) / 1024)); + gdb_printf ("Data size: %s pages\n", + pulongest (bfd_get (addr_bit, core_bfd, + descdata + kp->ki_dsize))); + gdb_printf ("Stack size: %s pages\n", + pulongest (bfd_get (addr_bit, core_bfd, + descdata + kp->ki_ssize))); + gdb_printf ("Text size: %s pages\n", + pulongest (bfd_get (addr_bit, core_bfd, + descdata + kp->ki_tsize))); + gdb_printf ("Resident set size: %s pages\n", + pulongest (bfd_get (addr_bit, core_bfd, + descdata + kp->ki_rssize))); + gdb_printf ("Maximum RSS: %s pages\n", + pulongest (bfd_get (long_bit, core_bfd, + descdata + kp->ki_rusage + + kp->ru_maxrss))); fbsd_print_sigset ("Ignored Signals", descdata + kp->ki_sigignore); fbsd_print_sigset ("Caught Signals", descdata + kp->ki_sigcatch); } @@ -1483,7 +1483,7 @@ fbsd_core_info_proc (struct gdbarch *gdbarch, const char *args, pid = bfd_core_file_pid (core_bfd); if (pid != 0) - printf_filtered (_("process %d\n"), pid); + gdb_printf (_("process %d\n"), pid); if (do_cmdline) { @@ -1491,7 +1491,7 @@ fbsd_core_info_proc (struct gdbarch *gdbarch, const char *args, cmdline = bfd_core_file_failing_command (core_bfd); if (cmdline) - printf_filtered ("cmdline = '%s'\n", cmdline); + gdb_printf ("cmdline = '%s'\n", cmdline); else warning (_("Command line unavailable")); } @@ -1500,7 +1500,7 @@ fbsd_core_info_proc (struct gdbarch *gdbarch, const char *args, gdb::unique_xmalloc_ptr<char> cwd = fbsd_core_vnode_path (gdbarch, KINFO_FILE_FD_TYPE_CWD); if (cwd) - printf_filtered ("cwd = '%s'\n", cwd.get ()); + gdb_printf ("cwd = '%s'\n", cwd.get ()); else warning (_("unable to read current working directory")); } @@ -1509,7 +1509,7 @@ fbsd_core_info_proc (struct gdbarch *gdbarch, const char *args, gdb::unique_xmalloc_ptr<char> exe = fbsd_core_vnode_path (gdbarch, KINFO_FILE_FD_TYPE_TEXT); if (exe) - printf_filtered ("exe = '%s'\n", exe.get ()); + gdb_printf ("exe = '%s'\n", exe.get ()); else warning (_("unable to read executable path name")); } diff --git a/gdb/filesystem.c b/gdb/filesystem.c index 1f969d3..f9aaeed 100644 --- a/gdb/filesystem.c +++ b/gdb/filesystem.c @@ -64,16 +64,16 @@ show_target_file_system_kind_command (struct ui_file *file, const char *value) { if (target_file_system_kind == file_system_kind_auto) - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The assumed file system kind for target reported file names \ is \"%s\" (currently \"%s\").\n"), - value, - effective_target_file_system_kind ()); + value, + effective_target_file_system_kind ()); else - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The assumed file system kind for target reported file names \ is \"%s\".\n"), - value); + value); } void _initialize_filesystem (); diff --git a/gdb/findcmd.c b/gdb/findcmd.c index 4ae6097..ff13f22 100644 --- a/gdb/findcmd.c +++ b/gdb/findcmd.c @@ -121,7 +121,7 @@ parse_find_args (const char *args, ULONGEST *max_countp, len = value_as_long (v); if (len == 0) { - printf_filtered (_("Empty search range.\n")); + gdb_printf (_("Empty search range.\n")); return pattern_buf; } if (len < 0) @@ -247,7 +247,7 @@ find_command (const char *args, int from_tty) break; print_address (gdbarch, found_addr, gdb_stdout); - printf_filtered ("\n"); + gdb_printf ("\n"); ++found_count; last_found_addr = found_addr; @@ -274,10 +274,10 @@ find_command (const char *args, int from_tty) } if (found_count == 0) - printf_filtered ("Pattern not found.\n"); + gdb_printf ("Pattern not found.\n"); else - printf_filtered ("%d pattern%s found.\n", found_count, - found_count > 1 ? "s" : ""); + gdb_printf ("%d pattern%s found.\n", found_count, + found_count > 1 ? "s" : ""); } void _initialize_mem_search (); diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 8989523..89003fa 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -98,7 +98,7 @@ postfork_child_hook () static int debug_setpgrp = 657473; /* Make sure we switch to main_ui here in order to be able to - use the fprintf_unfiltered/warning/error functions. */ + use the gdb_printf/warning/error functions. */ current_ui = main_ui; /* Create a new session for the inferior process, if necessary. @@ -146,9 +146,9 @@ static void show_startup_with_shell (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Use of shell to start subprocesses is %s.\n"), - value); + gdb_printf (file, + _("Use of shell to start subprocesses is %s.\n"), + value); } void _initialize_fork_child (); diff --git a/gdb/frame.c b/gdb/frame.c index ce95cf8..2b296ed 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -339,7 +339,7 @@ static void show_frame_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Frame debugging is %s.\n"), value); + gdb_printf (file, _("Frame debugging is %s.\n"), value); } /* Implementation of "show backtrace past-main". */ @@ -348,10 +348,10 @@ static void show_backtrace_past_main (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether backtraces should " - "continue past \"main\" is %s.\n"), - value); + gdb_printf (file, + _("Whether backtraces should " + "continue past \"main\" is %s.\n"), + value); } /* Implementation of "show backtrace past-entry". */ @@ -360,9 +360,9 @@ static void show_backtrace_past_entry (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Whether backtraces should continue past the " - "entry point of a program is %s.\n"), - value); + gdb_printf (file, _("Whether backtraces should continue past the " + "entry point of a program is %s.\n"), + value); } /* Implementation of "show backtrace limit". */ @@ -371,10 +371,10 @@ static void show_backtrace_limit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("An upper bound on the number " - "of backtrace levels is %s.\n"), - value); + gdb_printf (file, + _("An upper bound on the number " + "of backtrace levels is %s.\n"), + value); } /* See frame.h. */ @@ -1238,36 +1238,36 @@ frame_unwind_register_value (frame_info *next_frame, int regnum) { string_file debug_file; - fprintf_unfiltered (&debug_file, " ->"); + gdb_printf (&debug_file, " ->"); if (value_optimized_out (value)) { - fprintf_unfiltered (&debug_file, " "); + gdb_printf (&debug_file, " "); val_print_not_saved (&debug_file); } else { if (VALUE_LVAL (value) == lval_register) - fprintf_unfiltered (&debug_file, " register=%d", - VALUE_REGNUM (value)); + gdb_printf (&debug_file, " register=%d", + VALUE_REGNUM (value)); else if (VALUE_LVAL (value) == lval_memory) - fprintf_unfiltered (&debug_file, " address=%s", - paddress (gdbarch, - value_address (value))); + gdb_printf (&debug_file, " address=%s", + paddress (gdbarch, + value_address (value))); else - fprintf_unfiltered (&debug_file, " computed"); + gdb_printf (&debug_file, " computed"); if (value_lazy (value)) - fprintf_unfiltered (&debug_file, " lazy"); + gdb_printf (&debug_file, " lazy"); else { int i; gdb::array_view<const gdb_byte> buf = value_contents (value); - fprintf_unfiltered (&debug_file, " bytes="); - fprintf_unfiltered (&debug_file, "["); + gdb_printf (&debug_file, " bytes="); + gdb_printf (&debug_file, "["); for (i = 0; i < register_size (gdbarch, regnum); i++) - fprintf_unfiltered (&debug_file, "%02x", buf[i]); - fprintf_unfiltered (&debug_file, "]"); + gdb_printf (&debug_file, "%02x", buf[i]); + gdb_printf (&debug_file, "]"); } } diff --git a/gdb/gcore.c b/gdb/gcore.c index 5e3aa68..fdb22b7 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -140,8 +140,8 @@ gcore_command (const char *args, int from_tty) } if (info_verbose) - printf_filtered ("Opening corefile '%s' for output.\n", - corefilename.get ()); + gdb_printf ("Opening corefile '%s' for output.\n", + corefilename.get ()); if (target_supports_dumpcore ()) target_dumpcore (corefilename.get ()); @@ -160,7 +160,7 @@ gcore_command (const char *args, int from_tty) unlink_file.keep (); } - printf_filtered ("Saved corefile %s\n", corefilename.get ()); + gdb_printf ("Saved corefile %s\n", corefilename.get ()); } static enum bfd_architecture @@ -384,8 +384,8 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, { if (info_verbose) { - printf_filtered ("Ignore segment, %s bytes at %s\n", - plongest (size), paddress (target_gdbarch (), vaddr)); + gdb_printf ("Ignore segment, %s bytes at %s\n", + plongest (size), paddress (target_gdbarch (), vaddr)); } return 0; @@ -444,8 +444,8 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, if (info_verbose) { - printf_filtered ("Save segment, %s bytes at %s\n", - plongest (size), paddress (target_gdbarch (), vaddr)); + gdb_printf ("Save segment, %s bytes at %s\n", + plongest (size), paddress (target_gdbarch (), vaddr)); } bfd_set_section_size (osec, size); diff --git a/gdb/gdb-demangle.c b/gdb/gdb-demangle.c index 975ad43..3db979c 100644 --- a/gdb/gdb-demangle.c +++ b/gdb/gdb-demangle.c @@ -50,10 +50,10 @@ static void show_demangle (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Demangling of encoded C++/ObjC names " - "when displaying symbols is %s.\n"), - value); + gdb_printf (file, + _("Demangling of encoded C++/ObjC names " + "when displaying symbols is %s.\n"), + value); } /* See documentation in gdb-demangle.h. */ @@ -63,10 +63,10 @@ static void show_asm_demangle (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Demangling of C++/ObjC names in " - "disassembly listings is %s.\n"), - value); + gdb_printf (file, + _("Demangling of C++/ObjC names in " + "disassembly listings is %s.\n"), + value); } /* String name for the current demangling style. Set by the @@ -83,8 +83,8 @@ static void show_demangling_style_names(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The current C++ demangling style is \"%s\".\n"), - value); + gdb_printf (file, _("The current C++ demangling style is \"%s\".\n"), + value); } /* Set current demangling style. Called by the "set demangle-style" @@ -204,7 +204,7 @@ demangle_command (const char *args, int from_tty) gdb::unique_xmalloc_ptr<char> demangled = language_demangle (lang, name, DMGL_ANSI | DMGL_PARAMS); if (demangled != NULL) - printf_filtered ("%s\n", demangled.get ()); + gdb_printf ("%s\n", demangled.get ()); else error (_("Can't demangle \"%s\""), name); } diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c index b2e896f..2282848 100644 --- a/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c @@ -132,7 +132,7 @@ static void show_bfd_sharing (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("BFD sharing is %s.\n"), value); + gdb_printf (file, _("BFD sharing is %s.\n"), value); } /* When true debugging of the bfd caches is enabled. */ @@ -148,7 +148,7 @@ static void show_bfd_cache_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("BFD cache debugging is %s.\n"), value); + gdb_printf (file, _("BFD cache debugging is %s.\n"), value); } /* The type of an object being looked up in gdb_bfd_cache. We use diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 9fdcf15..ff404f4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -622,802 +622,802 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) #if defined (GDB_NM_FILE) gdb_nm_file = GDB_NM_FILE; #endif - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: GDB_NM_FILE = %s\n", gdb_nm_file); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: bfd_arch_info = %s\n", gdbarch_bfd_arch_info (gdbarch)->printable_name); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: byte_order = %s\n", plongest (gdbarch->byte_order)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: byte_order_for_code = %s\n", plongest (gdbarch->byte_order_for_code)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: osabi = %s\n", plongest (gdbarch->osabi)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: target_desc = %s\n", host_address_to_string (gdbarch->target_desc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: short_bit = %s\n", plongest (gdbarch->short_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: int_bit = %s\n", plongest (gdbarch->int_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: long_bit = %s\n", plongest (gdbarch->long_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: long_long_bit = %s\n", plongest (gdbarch->long_long_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: bfloat16_bit = %s\n", plongest (gdbarch->bfloat16_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: bfloat16_format = %s\n", pformat (gdbarch->bfloat16_format)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: half_bit = %s\n", plongest (gdbarch->half_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: half_format = %s\n", pformat (gdbarch->half_format)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: float_bit = %s\n", plongest (gdbarch->float_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: float_format = %s\n", pformat (gdbarch->float_format)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: double_bit = %s\n", plongest (gdbarch->double_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: double_format = %s\n", pformat (gdbarch->double_format)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: long_double_bit = %s\n", plongest (gdbarch->long_double_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: long_double_format = %s\n", pformat (gdbarch->long_double_format)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: wchar_bit = %s\n", plongest (gdbarch->wchar_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: wchar_signed = %s\n", plongest (gdbarch->wchar_signed)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: floatformat_for_type = <%s>\n", host_address_to_string (gdbarch->floatformat_for_type)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ptr_bit = %s\n", plongest (gdbarch->ptr_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: addr_bit = %s\n", plongest (gdbarch->addr_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dwarf2_addr_size = %s\n", plongest (gdbarch->dwarf2_addr_size)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: char_signed = %s\n", plongest (gdbarch->char_signed)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_read_pc_p() = %d\n", gdbarch_read_pc_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: read_pc = <%s>\n", host_address_to_string (gdbarch->read_pc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_write_pc_p() = %d\n", gdbarch_write_pc_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: write_pc = <%s>\n", host_address_to_string (gdbarch->write_pc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: virtual_frame_pointer = <%s>\n", host_address_to_string (gdbarch->virtual_frame_pointer)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", gdbarch_pseudo_register_read_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: pseudo_register_read = <%s>\n", host_address_to_string (gdbarch->pseudo_register_read)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", gdbarch_pseudo_register_read_value_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: pseudo_register_read_value = <%s>\n", host_address_to_string (gdbarch->pseudo_register_read_value)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", gdbarch_pseudo_register_write_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: pseudo_register_write = <%s>\n", host_address_to_string (gdbarch->pseudo_register_write)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: num_regs = %s\n", plongest (gdbarch->num_regs)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: num_pseudo_regs = %s\n", plongest (gdbarch->num_pseudo_regs)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n", gdbarch_ax_pseudo_register_collect_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ax_pseudo_register_collect = <%s>\n", host_address_to_string (gdbarch->ax_pseudo_register_collect)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n", gdbarch_ax_pseudo_register_push_stack_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n", host_address_to_string (gdbarch->ax_pseudo_register_push_stack)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_report_signal_info_p() = %d\n", gdbarch_report_signal_info_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: report_signal_info = <%s>\n", host_address_to_string (gdbarch->report_signal_info)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: sp_regnum = %s\n", plongest (gdbarch->sp_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: pc_regnum = %s\n", plongest (gdbarch->pc_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ps_regnum = %s\n", plongest (gdbarch->ps_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: fp0_regnum = %s\n", plongest (gdbarch->fp0_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stab_reg_to_regnum = <%s>\n", host_address_to_string (gdbarch->stab_reg_to_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", host_address_to_string (gdbarch->ecoff_reg_to_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", host_address_to_string (gdbarch->sdb_reg_to_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n", host_address_to_string (gdbarch->dwarf2_reg_to_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: register_name = <%s>\n", host_address_to_string (gdbarch->register_name)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: register_type = <%s>\n", host_address_to_string (gdbarch->register_type)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dummy_id = <%s>\n", host_address_to_string (gdbarch->dummy_id)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: deprecated_fp_regnum = %s\n", plongest (gdbarch->deprecated_fp_regnum)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", gdbarch_push_dummy_call_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: push_dummy_call = <%s>\n", host_address_to_string (gdbarch->push_dummy_call)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: call_dummy_location = %s\n", plongest (gdbarch->call_dummy_location)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", gdbarch_push_dummy_code_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: push_dummy_code = <%s>\n", host_address_to_string (gdbarch->push_dummy_code)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: code_of_frame_writable = <%s>\n", host_address_to_string (gdbarch->code_of_frame_writable)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: print_registers_info = <%s>\n", host_address_to_string (gdbarch->print_registers_info)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: print_float_info = <%s>\n", host_address_to_string (gdbarch->print_float_info)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", gdbarch_print_vector_info_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: print_vector_info = <%s>\n", host_address_to_string (gdbarch->print_vector_info)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: register_sim_regno = <%s>\n", host_address_to_string (gdbarch->register_sim_regno)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: cannot_fetch_register = <%s>\n", host_address_to_string (gdbarch->cannot_fetch_register)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: cannot_store_register = <%s>\n", host_address_to_string (gdbarch->cannot_store_register)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n", gdbarch_get_longjmp_target_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_longjmp_target = <%s>\n", host_address_to_string (gdbarch->get_longjmp_target)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: believe_pcc_promotion = %s\n", plongest (gdbarch->believe_pcc_promotion)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: convert_register_p = <%s>\n", host_address_to_string (gdbarch->convert_register_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: register_to_value = <%s>\n", host_address_to_string (gdbarch->register_to_value)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: value_to_register = <%s>\n", host_address_to_string (gdbarch->value_to_register)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: value_from_register = <%s>\n", host_address_to_string (gdbarch->value_from_register)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: pointer_to_address = <%s>\n", host_address_to_string (gdbarch->pointer_to_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: address_to_pointer = <%s>\n", host_address_to_string (gdbarch->address_to_pointer)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n", gdbarch_integer_to_address_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: integer_to_address = <%s>\n", host_address_to_string (gdbarch->integer_to_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_return_value_p() = %d\n", gdbarch_return_value_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: return_value = <%s>\n", host_address_to_string (gdbarch->return_value)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n", host_address_to_string (gdbarch->return_in_first_hidden_param_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_prologue = <%s>\n", host_address_to_string (gdbarch->skip_prologue)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n", gdbarch_skip_main_prologue_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_main_prologue = <%s>\n", host_address_to_string (gdbarch->skip_main_prologue)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n", gdbarch_skip_entrypoint_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_entrypoint = <%s>\n", host_address_to_string (gdbarch->skip_entrypoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: inner_than = <%s>\n", host_address_to_string (gdbarch->inner_than)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: breakpoint_from_pc = <%s>\n", host_address_to_string (gdbarch->breakpoint_from_pc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n", host_address_to_string (gdbarch->breakpoint_kind_from_pc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n", host_address_to_string (gdbarch->sw_breakpoint_from_kind)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n", host_address_to_string (gdbarch->breakpoint_kind_from_current_state)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", gdbarch_adjust_breakpoint_address_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: adjust_breakpoint_address = <%s>\n", host_address_to_string (gdbarch->adjust_breakpoint_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: memory_insert_breakpoint = <%s>\n", host_address_to_string (gdbarch->memory_insert_breakpoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: memory_remove_breakpoint = <%s>\n", host_address_to_string (gdbarch->memory_remove_breakpoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: decr_pc_after_break = %s\n", core_addr_to_string_nz (gdbarch->decr_pc_after_break)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: deprecated_function_start_offset = %s\n", core_addr_to_string_nz (gdbarch->deprecated_function_start_offset)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: remote_register_number = <%s>\n", host_address_to_string (gdbarch->remote_register_number)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n", gdbarch_fetch_tls_load_module_address_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: fetch_tls_load_module_address = <%s>\n", host_address_to_string (gdbarch->fetch_tls_load_module_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_get_thread_local_address_p() = %d\n", gdbarch_get_thread_local_address_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_thread_local_address = <%s>\n", host_address_to_string (gdbarch->get_thread_local_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: frame_args_skip = %s\n", core_addr_to_string_nz (gdbarch->frame_args_skip)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: unwind_pc = <%s>\n", host_address_to_string (gdbarch->unwind_pc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: unwind_sp = <%s>\n", host_address_to_string (gdbarch->unwind_sp)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n", gdbarch_frame_num_args_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: frame_num_args = <%s>\n", host_address_to_string (gdbarch->frame_num_args)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_frame_align_p() = %d\n", gdbarch_frame_align_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: frame_align = <%s>\n", host_address_to_string (gdbarch->frame_align)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stabs_argument_has_addr = <%s>\n", host_address_to_string (gdbarch->stabs_argument_has_addr)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: frame_red_zone_size = %s\n", plongest (gdbarch->frame_red_zone_size)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n", host_address_to_string (gdbarch->convert_from_func_ptr_addr)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: addr_bits_remove = <%s>\n", host_address_to_string (gdbarch->addr_bits_remove)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: significant_addr_bit = %s\n", plongest (gdbarch->significant_addr_bit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: memtag_to_string = <%s>\n", host_address_to_string (gdbarch->memtag_to_string)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: tagged_address_p = <%s>\n", host_address_to_string (gdbarch->tagged_address_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: memtag_matches_p = <%s>\n", host_address_to_string (gdbarch->memtag_matches_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: set_memtags = <%s>\n", host_address_to_string (gdbarch->set_memtags)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_memtag = <%s>\n", host_address_to_string (gdbarch->get_memtag)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: memtag_granule_size = %s\n", core_addr_to_string_nz (gdbarch->memtag_granule_size)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", gdbarch_software_single_step_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: software_single_step = <%s>\n", host_address_to_string (gdbarch->software_single_step)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n", gdbarch_single_step_through_delay_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: single_step_through_delay = <%s>\n", host_address_to_string (gdbarch->single_step_through_delay)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: print_insn = <%s>\n", host_address_to_string (gdbarch->print_insn)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_trampoline_code = <%s>\n", host_address_to_string (gdbarch->skip_trampoline_code)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_solib_resolver = <%s>\n", host_address_to_string (gdbarch->skip_solib_resolver)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: in_solib_return_trampoline = <%s>\n", host_address_to_string (gdbarch->in_solib_return_trampoline)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: in_indirect_branch_thunk = <%s>\n", host_address_to_string (gdbarch->in_indirect_branch_thunk)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stack_frame_destroyed_p = <%s>\n", host_address_to_string (gdbarch->stack_frame_destroyed_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n", gdbarch_elf_make_msymbol_special_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: elf_make_msymbol_special = <%s>\n", host_address_to_string (gdbarch->elf_make_msymbol_special)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: coff_make_msymbol_special = <%s>\n", host_address_to_string (gdbarch->coff_make_msymbol_special)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: make_symbol_special = <%s>\n", host_address_to_string (gdbarch->make_symbol_special)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: adjust_dwarf2_addr = <%s>\n", host_address_to_string (gdbarch->adjust_dwarf2_addr)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: adjust_dwarf2_line = <%s>\n", host_address_to_string (gdbarch->adjust_dwarf2_line)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: cannot_step_breakpoint = %s\n", plongest (gdbarch->cannot_step_breakpoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: have_nonsteppable_watchpoint = %s\n", plongest (gdbarch->have_nonsteppable_watchpoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", gdbarch_address_class_type_flags_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: address_class_type_flags = <%s>\n", host_address_to_string (gdbarch->address_class_type_flags)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", gdbarch_address_class_type_flags_to_name_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: address_class_type_flags_to_name = <%s>\n", host_address_to_string (gdbarch->address_class_type_flags_to_name)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: execute_dwarf_cfa_vendor_op = <%s>\n", host_address_to_string (gdbarch->execute_dwarf_cfa_vendor_op)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", gdbarch_address_class_name_to_type_flags_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: address_class_name_to_type_flags = <%s>\n", host_address_to_string (gdbarch->address_class_name_to_type_flags)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: register_reggroup_p = <%s>\n", host_address_to_string (gdbarch->register_reggroup_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", gdbarch_fetch_pointer_argument_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: fetch_pointer_argument = <%s>\n", host_address_to_string (gdbarch->fetch_pointer_argument)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n", gdbarch_iterate_over_regset_sections_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: iterate_over_regset_sections = <%s>\n", host_address_to_string (gdbarch->iterate_over_regset_sections)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n", gdbarch_make_corefile_notes_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: make_corefile_notes = <%s>\n", host_address_to_string (gdbarch->make_corefile_notes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n", gdbarch_find_memory_regions_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: find_memory_regions = <%s>\n", host_address_to_string (gdbarch->find_memory_regions)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", gdbarch_core_xfer_shared_libraries_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_xfer_shared_libraries = <%s>\n", host_address_to_string (gdbarch->core_xfer_shared_libraries)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n", gdbarch_core_xfer_shared_libraries_aix_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n", host_address_to_string (gdbarch->core_xfer_shared_libraries_aix)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n", gdbarch_core_pid_to_str_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_pid_to_str = <%s>\n", host_address_to_string (gdbarch->core_pid_to_str)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n", gdbarch_core_thread_name_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_thread_name = <%s>\n", host_address_to_string (gdbarch->core_thread_name)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_xfer_siginfo_p() = %d\n", gdbarch_core_xfer_siginfo_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_xfer_siginfo = <%s>\n", host_address_to_string (gdbarch->core_xfer_siginfo)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n", gdbarch_gcore_bfd_target_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gcore_bfd_target = %s\n", pstring (gdbarch->gcore_bfd_target)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: vtable_function_descriptors = %s\n", plongest (gdbarch->vtable_function_descriptors)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: vbit_in_delta = %s\n", plongest (gdbarch->vbit_in_delta)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: skip_permanent_breakpoint = <%s>\n", host_address_to_string (gdbarch->skip_permanent_breakpoint)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n", gdbarch_max_insn_length_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: max_insn_length = %s\n", plongest (gdbarch->max_insn_length)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", gdbarch_displaced_step_copy_insn_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_copy_insn = <%s>\n", host_address_to_string (gdbarch->displaced_step_copy_insn)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", host_address_to_string (gdbarch->displaced_step_hw_singlestep)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n", gdbarch_displaced_step_fixup_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_fixup = <%s>\n", host_address_to_string (gdbarch->displaced_step_fixup)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_displaced_step_prepare_p() = %d\n", gdbarch_displaced_step_prepare_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_prepare = <%s>\n", host_address_to_string (gdbarch->displaced_step_prepare)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_finish = <%s>\n", host_address_to_string (gdbarch->displaced_step_finish)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_displaced_step_copy_insn_closure_by_addr_p() = %d\n", gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_copy_insn_closure_by_addr = <%s>\n", host_address_to_string (gdbarch->displaced_step_copy_insn_closure_by_addr)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: displaced_step_restore_all_in_ptid = <%s>\n", host_address_to_string (gdbarch->displaced_step_restore_all_in_ptid)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", gdbarch_relocate_instruction_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: relocate_instruction = <%s>\n", host_address_to_string (gdbarch->relocate_instruction)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_overlay_update_p() = %d\n", gdbarch_overlay_update_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: overlay_update = <%s>\n", host_address_to_string (gdbarch->overlay_update)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", gdbarch_core_read_description_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_read_description = <%s>\n", host_address_to_string (gdbarch->core_read_description)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: sofun_address_maybe_missing = %s\n", plongest (gdbarch->sofun_address_maybe_missing)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_process_record_p() = %d\n", gdbarch_process_record_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: process_record = <%s>\n", host_address_to_string (gdbarch->process_record)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n", gdbarch_process_record_signal_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: process_record_signal = <%s>\n", host_address_to_string (gdbarch->process_record_signal)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n", gdbarch_gdb_signal_from_target_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdb_signal_from_target = <%s>\n", host_address_to_string (gdbarch->gdb_signal_from_target)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n", gdbarch_gdb_signal_to_target_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdb_signal_to_target = <%s>\n", host_address_to_string (gdbarch->gdb_signal_to_target)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n", gdbarch_get_siginfo_type_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_siginfo_type = <%s>\n", host_address_to_string (gdbarch->get_siginfo_type)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n", gdbarch_record_special_symbol_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: record_special_symbol = <%s>\n", host_address_to_string (gdbarch->record_special_symbol)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n", gdbarch_get_syscall_number_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_syscall_number = <%s>\n", host_address_to_string (gdbarch->get_syscall_number)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: xml_syscall_file = %s\n", pstring (gdbarch->xml_syscall_file)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: syscalls_info = %s\n", host_address_to_string (gdbarch->syscalls_info)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_integer_prefixes = %s\n", pstring_list (gdbarch->stap_integer_prefixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_integer_suffixes = %s\n", pstring_list (gdbarch->stap_integer_suffixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_register_prefixes = %s\n", pstring_list (gdbarch->stap_register_prefixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_register_suffixes = %s\n", pstring_list (gdbarch->stap_register_suffixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_register_indirection_prefixes = %s\n", pstring_list (gdbarch->stap_register_indirection_prefixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_register_indirection_suffixes = %s\n", pstring_list (gdbarch->stap_register_indirection_suffixes)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_gdb_register_prefix = %s\n", pstring (gdbarch->stap_gdb_register_prefix)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_gdb_register_suffix = %s\n", pstring (gdbarch->stap_gdb_register_suffix)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n", gdbarch_stap_is_single_operand_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_is_single_operand = <%s>\n", host_address_to_string (gdbarch->stap_is_single_operand)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n", gdbarch_stap_parse_special_token_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_parse_special_token = <%s>\n", host_address_to_string (gdbarch->stap_parse_special_token)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n", gdbarch_stap_adjust_register_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: stap_adjust_register = <%s>\n", host_address_to_string (gdbarch->stap_adjust_register)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n", gdbarch_dtrace_parse_probe_argument_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n", host_address_to_string (gdbarch->dtrace_parse_probe_argument)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n", gdbarch_dtrace_probe_is_enabled_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n", host_address_to_string (gdbarch->dtrace_probe_is_enabled)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n", gdbarch_dtrace_enable_probe_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dtrace_enable_probe = <%s>\n", host_address_to_string (gdbarch->dtrace_enable_probe)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n", gdbarch_dtrace_disable_probe_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: dtrace_disable_probe = <%s>\n", host_address_to_string (gdbarch->dtrace_disable_probe)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: has_global_solist = %s\n", plongest (gdbarch->has_global_solist)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: has_global_breakpoints = %s\n", plongest (gdbarch->has_global_breakpoints)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: has_shared_address_space = <%s>\n", host_address_to_string (gdbarch->has_shared_address_space)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n", host_address_to_string (gdbarch->fast_tracepoint_valid_at)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: guess_tracepoint_registers = <%s>\n", host_address_to_string (gdbarch->guess_tracepoint_registers)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: auto_charset = <%s>\n", host_address_to_string (gdbarch->auto_charset)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: auto_wide_charset = <%s>\n", host_address_to_string (gdbarch->auto_wide_charset)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: solib_symbols_extension = %s\n", pstring (gdbarch->solib_symbols_extension)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: has_dos_based_file_system = %s\n", plongest (gdbarch->has_dos_based_file_system)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gen_return_address = <%s>\n", host_address_to_string (gdbarch->gen_return_address)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_info_proc_p() = %d\n", gdbarch_info_proc_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: info_proc = <%s>\n", host_address_to_string (gdbarch->info_proc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n", gdbarch_core_info_proc_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: core_info_proc = <%s>\n", host_address_to_string (gdbarch->core_info_proc)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n", host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: ravenscar_ops = %s\n", host_address_to_string (gdbarch->ravenscar_ops)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: insn_is_call = <%s>\n", host_address_to_string (gdbarch->insn_is_call)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: insn_is_ret = <%s>\n", host_address_to_string (gdbarch->insn_is_ret)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: insn_is_jump = <%s>\n", host_address_to_string (gdbarch->insn_is_jump)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: program_breakpoint_here_p = <%s>\n", host_address_to_string (gdbarch->program_breakpoint_here_p)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n", gdbarch_auxv_parse_p (gdbarch)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: auxv_parse = <%s>\n", host_address_to_string (gdbarch->auxv_parse)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: print_auxv_entry = <%s>\n", host_address_to_string (gdbarch->print_auxv_entry)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: vsyscall_range = <%s>\n", host_address_to_string (gdbarch->vsyscall_range)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: infcall_mmap = <%s>\n", host_address_to_string (gdbarch->infcall_mmap)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: infcall_munmap = <%s>\n", host_address_to_string (gdbarch->infcall_munmap)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gcc_target_options = <%s>\n", host_address_to_string (gdbarch->gcc_target_options)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: gnu_triplet_regexp = <%s>\n", host_address_to_string (gdbarch->gnu_triplet_regexp)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: addressable_memory_unit_size = <%s>\n", host_address_to_string (gdbarch->addressable_memory_unit_size)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: disassembler_options_implicit = %s\n", pstring (gdbarch->disassembler_options_implicit)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: disassembler_options = %s\n", pstring_ptr (gdbarch->disassembler_options)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: valid_disassembler_options = %s\n", host_address_to_string (gdbarch->valid_disassembler_options)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: type_align = <%s>\n", host_address_to_string (gdbarch->type_align)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: get_pc_address_flags = <%s>\n", host_address_to_string (gdbarch->get_pc_address_flags)); - fprintf_filtered (file, + gdb_printf (file, "gdbarch_dump: read_core_file_mappings = <%s>\n", host_address_to_string (gdbarch->read_core_file_mappings)); if (gdbarch->dump_tdep != NULL) @@ -1430,7 +1430,7 @@ gdbarch_bfd_arch_info (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); return gdbarch->bfd_arch_info; } @@ -1439,7 +1439,7 @@ gdbarch_byte_order (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); + gdb_printf (gdb_stdlog, "gdbarch_byte_order called\n"); return gdbarch->byte_order; } @@ -1448,7 +1448,7 @@ gdbarch_byte_order_for_code (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); + gdb_printf (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); return gdbarch->byte_order_for_code; } @@ -1457,7 +1457,7 @@ gdbarch_osabi (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); + gdb_printf (gdb_stdlog, "gdbarch_osabi called\n"); return gdbarch->osabi; } @@ -1466,7 +1466,7 @@ gdbarch_target_desc (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_target_desc called\n"); return gdbarch->target_desc; } @@ -1476,7 +1476,7 @@ gdbarch_short_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of short_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_short_bit called\n"); return gdbarch->short_bit; } @@ -1493,7 +1493,7 @@ gdbarch_int_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of int_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_int_bit called\n"); return gdbarch->int_bit; } @@ -1510,7 +1510,7 @@ gdbarch_long_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of long_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_long_bit called\n"); return gdbarch->long_bit; } @@ -1527,7 +1527,7 @@ gdbarch_long_long_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of long_long_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_long_long_bit called\n"); return gdbarch->long_long_bit; } @@ -1544,7 +1544,7 @@ gdbarch_bfloat16_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of bfloat16_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_bfloat16_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_bfloat16_bit called\n"); return gdbarch->bfloat16_bit; } @@ -1560,7 +1560,7 @@ gdbarch_bfloat16_format (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_bfloat16_format called\n"); + gdb_printf (gdb_stdlog, "gdbarch_bfloat16_format called\n"); return gdbarch->bfloat16_format; } @@ -1577,7 +1577,7 @@ gdbarch_half_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of half_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_half_bit called\n"); return gdbarch->half_bit; } @@ -1593,7 +1593,7 @@ gdbarch_half_format (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n"); + gdb_printf (gdb_stdlog, "gdbarch_half_format called\n"); return gdbarch->half_format; } @@ -1610,7 +1610,7 @@ gdbarch_float_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of float_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_float_bit called\n"); return gdbarch->float_bit; } @@ -1626,7 +1626,7 @@ gdbarch_float_format (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); + gdb_printf (gdb_stdlog, "gdbarch_float_format called\n"); return gdbarch->float_format; } @@ -1643,7 +1643,7 @@ gdbarch_double_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of double_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_double_bit called\n"); return gdbarch->double_bit; } @@ -1659,7 +1659,7 @@ gdbarch_double_format (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); + gdb_printf (gdb_stdlog, "gdbarch_double_format called\n"); return gdbarch->double_format; } @@ -1676,7 +1676,7 @@ gdbarch_long_double_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of long_double_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_long_double_bit called\n"); return gdbarch->long_double_bit; } @@ -1692,7 +1692,7 @@ gdbarch_long_double_format (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); + gdb_printf (gdb_stdlog, "gdbarch_long_double_format called\n"); return gdbarch->long_double_format; } @@ -1709,7 +1709,7 @@ gdbarch_wchar_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of wchar_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_wchar_bit called\n"); return gdbarch->wchar_bit; } @@ -1727,7 +1727,7 @@ gdbarch_wchar_signed (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->wchar_signed != -1); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_signed called\n"); + gdb_printf (gdb_stdlog, "gdbarch_wchar_signed called\n"); return gdbarch->wchar_signed; } @@ -1744,7 +1744,7 @@ gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int len gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->floatformat_for_type != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n"); + gdb_printf (gdb_stdlog, "gdbarch_floatformat_for_type called\n"); return gdbarch->floatformat_for_type (gdbarch, name, length); } @@ -1761,7 +1761,7 @@ gdbarch_ptr_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of ptr_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ptr_bit called\n"); return gdbarch->ptr_bit; } @@ -1779,7 +1779,7 @@ gdbarch_addr_bit (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->addr_bit != 0); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_addr_bit called\n"); return gdbarch->addr_bit; } @@ -1797,7 +1797,7 @@ gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->dwarf2_addr_size != 0); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); return gdbarch->dwarf2_addr_size; } @@ -1815,7 +1815,7 @@ gdbarch_char_signed (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->char_signed != -1); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); + gdb_printf (gdb_stdlog, "gdbarch_char_signed called\n"); return gdbarch->char_signed; } @@ -1839,7 +1839,7 @@ gdbarch_read_pc (struct gdbarch *gdbarch, readable_regcache *regcache) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->read_pc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_read_pc called\n"); return gdbarch->read_pc (regcache); } @@ -1863,7 +1863,7 @@ gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->write_pc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_write_pc called\n"); gdbarch->write_pc (regcache, val); } @@ -1880,7 +1880,7 @@ gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->virtual_frame_pointer != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); + gdb_printf (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset); } @@ -1904,7 +1904,7 @@ gdbarch_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcac gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->pseudo_register_read != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); + gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); } @@ -1928,7 +1928,7 @@ gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, readable_regcache * gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->pseudo_register_read_value != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); + gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); } @@ -1952,7 +1952,7 @@ gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcach gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->pseudo_register_write != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); + gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); } @@ -1970,7 +1970,7 @@ gdbarch_num_regs (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->num_regs != -1); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); + gdb_printf (gdb_stdlog, "gdbarch_num_regs called\n"); return gdbarch->num_regs; } @@ -1987,7 +1987,7 @@ gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of num_pseudo_regs, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); + gdb_printf (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); return gdbarch->num_pseudo_regs; } @@ -2011,7 +2011,7 @@ gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr * gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->ax_pseudo_register_collect != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg); } @@ -2035,7 +2035,7 @@ gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_exp gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg); } @@ -2059,7 +2059,7 @@ gdbarch_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->report_signal_info != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_report_signal_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_report_signal_info called\n"); gdbarch->report_signal_info (gdbarch, uiout, siggnal); } @@ -2076,7 +2076,7 @@ gdbarch_sp_regnum (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of sp_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_sp_regnum called\n"); return gdbarch->sp_regnum; } @@ -2093,7 +2093,7 @@ gdbarch_pc_regnum (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of pc_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_pc_regnum called\n"); return gdbarch->pc_regnum; } @@ -2110,7 +2110,7 @@ gdbarch_ps_regnum (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of ps_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ps_regnum called\n"); return gdbarch->ps_regnum; } @@ -2127,7 +2127,7 @@ gdbarch_fp0_regnum (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of fp0_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_fp0_regnum called\n"); return gdbarch->fp0_regnum; } @@ -2144,7 +2144,7 @@ gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stab_reg_to_regnum != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); } @@ -2161,7 +2161,7 @@ gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); } @@ -2178,7 +2178,7 @@ gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); } @@ -2195,7 +2195,7 @@ gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); } @@ -2212,7 +2212,7 @@ gdbarch_register_name (struct gdbarch *gdbarch, int regnr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_name != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); + gdb_printf (gdb_stdlog, "gdbarch_register_name called\n"); return gdbarch->register_name (gdbarch, regnr); } @@ -2229,7 +2229,7 @@ gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_type != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); + gdb_printf (gdb_stdlog, "gdbarch_register_type called\n"); return gdbarch->register_type (gdbarch, reg_nr); } @@ -2246,7 +2246,7 @@ gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dummy_id != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dummy_id called\n"); return gdbarch->dummy_id (gdbarch, this_frame); } @@ -2263,7 +2263,7 @@ gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); + gdb_printf (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); return gdbarch->deprecated_fp_regnum; } @@ -2287,7 +2287,7 @@ gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->push_dummy_call != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); + gdb_printf (gdb_stdlog, "gdbarch_push_dummy_call called\n"); return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, return_method, struct_addr); } @@ -2304,7 +2304,7 @@ gdbarch_call_dummy_location (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of call_dummy_location, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); + gdb_printf (gdb_stdlog, "gdbarch_call_dummy_location called\n"); return gdbarch->call_dummy_location; } @@ -2328,7 +2328,7 @@ gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funadd gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->push_dummy_code != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); + gdb_printf (gdb_stdlog, "gdbarch_push_dummy_code called\n"); return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); } @@ -2345,7 +2345,7 @@ gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *fram gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->code_of_frame_writable != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n"); + gdb_printf (gdb_stdlog, "gdbarch_code_of_frame_writable called\n"); return gdbarch->code_of_frame_writable (gdbarch, frame); } @@ -2362,7 +2362,7 @@ gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, str gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_registers_info != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_print_registers_info called\n"); gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); } @@ -2379,7 +2379,7 @@ gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_float_info != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_print_float_info called\n"); gdbarch->print_float_info (gdbarch, file, frame, args); } @@ -2403,7 +2403,7 @@ gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_vector_info != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_print_vector_info called\n"); gdbarch->print_vector_info (gdbarch, file, frame, args); } @@ -2420,7 +2420,7 @@ gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_sim_regno != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); + gdb_printf (gdb_stdlog, "gdbarch_register_sim_regno called\n"); return gdbarch->register_sim_regno (gdbarch, reg_nr); } @@ -2437,7 +2437,7 @@ gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->cannot_fetch_register != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); + gdb_printf (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); return gdbarch->cannot_fetch_register (gdbarch, regnum); } @@ -2454,7 +2454,7 @@ gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->cannot_store_register != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); + gdb_printf (gdb_stdlog, "gdbarch_cannot_store_register called\n"); return gdbarch->cannot_store_register (gdbarch, regnum); } @@ -2478,7 +2478,7 @@ gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, C gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_longjmp_target != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); return gdbarch->get_longjmp_target (frame, pc); } @@ -2495,7 +2495,7 @@ gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of believe_pcc_promotion, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); + gdb_printf (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); return gdbarch->believe_pcc_promotion; } @@ -2512,7 +2512,7 @@ gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *ty gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->convert_register_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_convert_register_p called\n"); return gdbarch->convert_register_p (gdbarch, regnum, type); } @@ -2529,7 +2529,7 @@ gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, in gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_to_value != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); + gdb_printf (gdb_stdlog, "gdbarch_register_to_value called\n"); return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep); } @@ -2546,7 +2546,7 @@ gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, in gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->value_to_register != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); + gdb_printf (gdb_stdlog, "gdbarch_value_to_register called\n"); gdbarch->value_to_register (frame, regnum, type, buf); } @@ -2563,7 +2563,7 @@ gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int reg gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->value_from_register != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n"); + gdb_printf (gdb_stdlog, "gdbarch_value_from_register called\n"); return gdbarch->value_from_register (gdbarch, type, regnum, frame_id); } @@ -2580,7 +2580,7 @@ gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gd gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->pointer_to_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_pointer_to_address called\n"); return gdbarch->pointer_to_address (gdbarch, type, buf); } @@ -2597,7 +2597,7 @@ gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->address_to_pointer != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); + gdb_printf (gdb_stdlog, "gdbarch_address_to_pointer called\n"); gdbarch->address_to_pointer (gdbarch, type, buf, addr); } @@ -2621,7 +2621,7 @@ gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gd gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->integer_to_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_integer_to_address called\n"); return gdbarch->integer_to_address (gdbarch, type, buf); } @@ -2645,7 +2645,7 @@ gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct ty gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->return_value != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); + gdb_printf (gdb_stdlog, "gdbarch_return_value called\n"); return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf); } @@ -2662,7 +2662,7 @@ gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *ty gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); return gdbarch->return_in_first_hidden_param_p (gdbarch, type); } @@ -2679,7 +2679,7 @@ gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_prologue != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_prologue called\n"); return gdbarch->skip_prologue (gdbarch, ip); } @@ -2703,7 +2703,7 @@ gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_main_prologue != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); return gdbarch->skip_main_prologue (gdbarch, ip); } @@ -2727,7 +2727,7 @@ gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_entrypoint != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_entrypoint called\n"); return gdbarch->skip_entrypoint (gdbarch, ip); } @@ -2744,7 +2744,7 @@ gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->inner_than != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); + gdb_printf (gdb_stdlog, "gdbarch_inner_than called\n"); return gdbarch->inner_than (lhs, rhs); } @@ -2761,7 +2761,7 @@ gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenp gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->breakpoint_from_pc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); } @@ -2778,7 +2778,7 @@ gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n"); return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr); } @@ -2795,7 +2795,7 @@ gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n"); + gdb_printf (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n"); return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size); } @@ -2812,7 +2812,7 @@ gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regc gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n"); + gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n"); return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr); } @@ -2836,7 +2836,7 @@ gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->adjust_breakpoint_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); } @@ -2853,7 +2853,7 @@ gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->memory_insert_breakpoint != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt); } @@ -2870,7 +2870,7 @@ gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->memory_remove_breakpoint != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt); } @@ -2887,7 +2887,7 @@ gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of decr_pc_after_break, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); + gdb_printf (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); return gdbarch->decr_pc_after_break; } @@ -2904,7 +2904,7 @@ gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); + gdb_printf (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); return gdbarch->deprecated_function_start_offset; } @@ -2921,7 +2921,7 @@ gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->remote_register_number != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n"); + gdb_printf (gdb_stdlog, "gdbarch_remote_register_number called\n"); return gdbarch->remote_register_number (gdbarch, regno); } @@ -2945,7 +2945,7 @@ gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile * gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->fetch_tls_load_module_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); return gdbarch->fetch_tls_load_module_address (objfile); } @@ -2969,7 +2969,7 @@ gdbarch_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid, CORE_ADD gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_thread_local_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_thread_local_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_thread_local_address called\n"); return gdbarch->get_thread_local_address (gdbarch, ptid, lm_addr, offset); } @@ -2986,7 +2986,7 @@ gdbarch_frame_args_skip (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of frame_args_skip, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); + gdb_printf (gdb_stdlog, "gdbarch_frame_args_skip called\n"); return gdbarch->frame_args_skip; } @@ -3003,7 +3003,7 @@ gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->unwind_pc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_unwind_pc called\n"); return gdbarch->unwind_pc (gdbarch, next_frame); } @@ -3020,7 +3020,7 @@ gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->unwind_sp != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); + gdb_printf (gdb_stdlog, "gdbarch_unwind_sp called\n"); return gdbarch->unwind_sp (gdbarch, next_frame); } @@ -3044,7 +3044,7 @@ gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->frame_num_args != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); + gdb_printf (gdb_stdlog, "gdbarch_frame_num_args called\n"); return gdbarch->frame_num_args (frame); } @@ -3068,7 +3068,7 @@ gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->frame_align != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); + gdb_printf (gdb_stdlog, "gdbarch_frame_align called\n"); return gdbarch->frame_align (gdbarch, address); } @@ -3085,7 +3085,7 @@ gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stabs_argument_has_addr != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); return gdbarch->stabs_argument_has_addr (gdbarch, type); } @@ -3102,7 +3102,7 @@ gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of frame_red_zone_size, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); + gdb_printf (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); return gdbarch->frame_red_zone_size; } @@ -3119,7 +3119,7 @@ gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, str gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); + gdb_printf (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); } @@ -3136,7 +3136,7 @@ gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->addr_bits_remove != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); + gdb_printf (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); return gdbarch->addr_bits_remove (gdbarch, addr); } @@ -3153,7 +3153,7 @@ gdbarch_significant_addr_bit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of significant_addr_bit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_significant_addr_bit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_significant_addr_bit called\n"); return gdbarch->significant_addr_bit; } @@ -3170,7 +3170,7 @@ gdbarch_memtag_to_string (struct gdbarch *gdbarch, struct value *tag) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->memtag_to_string != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_memtag_to_string called\n"); + gdb_printf (gdb_stdlog, "gdbarch_memtag_to_string called\n"); return gdbarch->memtag_to_string (gdbarch, tag); } @@ -3187,7 +3187,7 @@ gdbarch_tagged_address_p (struct gdbarch *gdbarch, struct value *address) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->tagged_address_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_tagged_address_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_tagged_address_p called\n"); return gdbarch->tagged_address_p (gdbarch, address); } @@ -3204,7 +3204,7 @@ gdbarch_memtag_matches_p (struct gdbarch *gdbarch, struct value *address) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->memtag_matches_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_memtag_matches_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_memtag_matches_p called\n"); return gdbarch->memtag_matches_p (gdbarch, address); } @@ -3221,7 +3221,7 @@ gdbarch_set_memtags (struct gdbarch *gdbarch, struct value *address, size_t leng gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->set_memtags != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_set_memtags called\n"); + gdb_printf (gdb_stdlog, "gdbarch_set_memtags called\n"); return gdbarch->set_memtags (gdbarch, address, length, tags, tag_type); } @@ -3238,7 +3238,7 @@ gdbarch_get_memtag (struct gdbarch *gdbarch, struct value *address, memtag_type gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_memtag != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_memtag called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_memtag called\n"); return gdbarch->get_memtag (gdbarch, address, tag_type); } @@ -3255,7 +3255,7 @@ gdbarch_memtag_granule_size (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of memtag_granule_size, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_memtag_granule_size called\n"); + gdb_printf (gdb_stdlog, "gdbarch_memtag_granule_size called\n"); return gdbarch->memtag_granule_size; } @@ -3279,7 +3279,7 @@ gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->software_single_step != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); + gdb_printf (gdb_stdlog, "gdbarch_software_single_step called\n"); return gdbarch->software_single_step (regcache); } @@ -3303,7 +3303,7 @@ gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *f gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->single_step_through_delay != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); + gdb_printf (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); return gdbarch->single_step_through_delay (gdbarch, frame); } @@ -3320,7 +3320,7 @@ gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_inf gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_insn != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); + gdb_printf (gdb_stdlog, "gdbarch_print_insn called\n"); return gdbarch->print_insn (vma, info); } @@ -3337,7 +3337,7 @@ gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_trampoline_code != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); return gdbarch->skip_trampoline_code (frame, pc); } @@ -3354,7 +3354,7 @@ gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_solib_resolver != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); return gdbarch->skip_solib_resolver (gdbarch, pc); } @@ -3371,7 +3371,7 @@ gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->in_solib_return_trampoline != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); + gdb_printf (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); return gdbarch->in_solib_return_trampoline (gdbarch, pc, name); } @@ -3388,7 +3388,7 @@ gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch, CORE_ADDR pc) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->in_indirect_branch_thunk != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_in_indirect_branch_thunk called\n"); + gdb_printf (gdb_stdlog, "gdbarch_in_indirect_branch_thunk called\n"); return gdbarch->in_indirect_branch_thunk (gdbarch, pc); } @@ -3405,7 +3405,7 @@ gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stack_frame_destroyed_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n"); return gdbarch->stack_frame_destroyed_p (gdbarch, addr); } @@ -3429,7 +3429,7 @@ gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->elf_make_msymbol_special != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); + gdb_printf (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); gdbarch->elf_make_msymbol_special (sym, msym); } @@ -3446,7 +3446,7 @@ gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct mini gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->coff_make_msymbol_special != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); + gdb_printf (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); gdbarch->coff_make_msymbol_special (val, msym); } @@ -3463,7 +3463,7 @@ gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->make_symbol_special != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n"); + gdb_printf (gdb_stdlog, "gdbarch_make_symbol_special called\n"); gdbarch->make_symbol_special (sym, objfile); } @@ -3480,7 +3480,7 @@ gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->adjust_dwarf2_addr != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n"); + gdb_printf (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n"); return gdbarch->adjust_dwarf2_addr (pc); } @@ -3497,7 +3497,7 @@ gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->adjust_dwarf2_line != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n"); + gdb_printf (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n"); return gdbarch->adjust_dwarf2_line (addr, rel); } @@ -3514,7 +3514,7 @@ gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); return gdbarch->cannot_step_breakpoint; } @@ -3531,7 +3531,7 @@ gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); return gdbarch->have_nonsteppable_watchpoint; } @@ -3555,7 +3555,7 @@ gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dw gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->address_class_type_flags != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); + gdb_printf (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); } @@ -3579,7 +3579,7 @@ gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, type_instance gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); + gdb_printf (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); } @@ -3596,7 +3596,7 @@ gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struc gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->execute_dwarf_cfa_vendor_op != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_execute_dwarf_cfa_vendor_op called\n"); + gdb_printf (gdb_stdlog, "gdbarch_execute_dwarf_cfa_vendor_op called\n"); return gdbarch->execute_dwarf_cfa_vendor_op (gdbarch, op, fs); } @@ -3620,7 +3620,7 @@ gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *n gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); + gdb_printf (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); } @@ -3637,7 +3637,7 @@ gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggrou gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_reggroup_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); } @@ -3661,7 +3661,7 @@ gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *fram gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->fetch_pointer_argument != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); + gdb_printf (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); return gdbarch->fetch_pointer_argument (frame, argi, type); } @@ -3685,7 +3685,7 @@ gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regs gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->iterate_over_regset_sections != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n"); + gdb_printf (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n"); gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache); } @@ -3709,7 +3709,7 @@ gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->make_corefile_notes != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); return gdbarch->make_corefile_notes (gdbarch, obfd, note_size); } @@ -3733,7 +3733,7 @@ gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype f gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->find_memory_regions != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n"); + gdb_printf (gdb_stdlog, "gdbarch_find_memory_regions called\n"); return gdbarch->find_memory_regions (gdbarch, func, data); } @@ -3757,7 +3757,7 @@ gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_xfer_shared_libraries != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len); } @@ -3781,7 +3781,7 @@ gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readb gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len); } @@ -3805,7 +3805,7 @@ gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_pid_to_str != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); return gdbarch->core_pid_to_str (gdbarch, ptid); } @@ -3829,7 +3829,7 @@ gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_thread_name != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_thread_name called\n"); return gdbarch->core_thread_name (gdbarch, thr); } @@ -3853,7 +3853,7 @@ gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_xfer_siginfo != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_siginfo called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_xfer_siginfo called\n"); return gdbarch->core_xfer_siginfo (gdbarch, readbuf, offset, len); } @@ -3878,7 +3878,7 @@ gdbarch_gcore_bfd_target (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->gcore_bfd_target != 0); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); return gdbarch->gcore_bfd_target; } @@ -3895,7 +3895,7 @@ gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); + gdb_printf (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); return gdbarch->vtable_function_descriptors; } @@ -3912,7 +3912,7 @@ gdbarch_vbit_in_delta (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of vbit_in_delta, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); + gdb_printf (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); return gdbarch->vbit_in_delta; } @@ -3929,7 +3929,7 @@ gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *reg gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_permanent_breakpoint != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); + gdb_printf (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); gdbarch->skip_permanent_breakpoint (regcache); } @@ -3954,7 +3954,7 @@ gdbarch_max_insn_length (struct gdbarch *gdbarch) /* Check variable changed from pre-default. */ gdb_assert (gdbarch->max_insn_length != 0); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n"); + gdb_printf (gdb_stdlog, "gdbarch_max_insn_length called\n"); return gdbarch->max_insn_length; } @@ -3978,7 +3978,7 @@ gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_copy_insn != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs); } @@ -3995,7 +3995,7 @@ gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); return gdbarch->displaced_step_hw_singlestep (gdbarch); } @@ -4020,7 +4020,7 @@ gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_cop gdb_assert (gdbarch->displaced_step_fixup != NULL); /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs); } @@ -4044,7 +4044,7 @@ gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, thread_info *thread, CO gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_prepare != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_prepare called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_prepare called\n"); return gdbarch->displaced_step_prepare (gdbarch, thread, displaced_pc); } @@ -4061,7 +4061,7 @@ gdbarch_displaced_step_finish (struct gdbarch *gdbarch, thread_info *thread, gdb gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_finish != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_finish called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_finish called\n"); return gdbarch->displaced_step_finish (gdbarch, thread, sig); } @@ -4085,7 +4085,7 @@ gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch, infer gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_copy_insn_closure_by_addr != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn_closure_by_addr called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_copy_insn_closure_by_addr called\n"); return gdbarch->displaced_step_copy_insn_closure_by_addr (inf, addr); } @@ -4102,7 +4102,7 @@ gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch, inferior *p gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->displaced_step_restore_all_in_ptid != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_restore_all_in_ptid called\n"); + gdb_printf (gdb_stdlog, "gdbarch_displaced_step_restore_all_in_ptid called\n"); gdbarch->displaced_step_restore_all_in_ptid (parent_inf, child_ptid); } @@ -4127,7 +4127,7 @@ gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR gdb_assert (gdbarch->relocate_instruction != NULL); /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n"); + gdb_printf (gdb_stdlog, "gdbarch_relocate_instruction called\n"); gdbarch->relocate_instruction (gdbarch, to, from); } @@ -4151,7 +4151,7 @@ gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->overlay_update != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n"); + gdb_printf (gdb_stdlog, "gdbarch_overlay_update called\n"); gdbarch->overlay_update (osect); } @@ -4175,7 +4175,7 @@ gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *targe gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_read_description != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_read_description called\n"); return gdbarch->core_read_description (gdbarch, target, abfd); } @@ -4192,7 +4192,7 @@ gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); + gdb_printf (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); return gdbarch->sofun_address_maybe_missing; } @@ -4216,7 +4216,7 @@ gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->process_record != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n"); + gdb_printf (gdb_stdlog, "gdbarch_process_record called\n"); return gdbarch->process_record (gdbarch, regcache, addr); } @@ -4240,7 +4240,7 @@ gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcach gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->process_record_signal != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n"); + gdb_printf (gdb_stdlog, "gdbarch_process_record_signal called\n"); return gdbarch->process_record_signal (gdbarch, regcache, signal); } @@ -4264,7 +4264,7 @@ gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->gdb_signal_from_target != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); return gdbarch->gdb_signal_from_target (gdbarch, signo); } @@ -4288,7 +4288,7 @@ gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->gdb_signal_to_target != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n"); return gdbarch->gdb_signal_to_target (gdbarch, signal); } @@ -4312,7 +4312,7 @@ gdbarch_get_siginfo_type (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_siginfo_type != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); return gdbarch->get_siginfo_type (gdbarch); } @@ -4336,7 +4336,7 @@ gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->record_special_symbol != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n"); + gdb_printf (gdb_stdlog, "gdbarch_record_special_symbol called\n"); gdbarch->record_special_symbol (gdbarch, objfile, sym); } @@ -4360,7 +4360,7 @@ gdbarch_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_syscall_number != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_syscall_number called\n"); return gdbarch->get_syscall_number (gdbarch, thread); } @@ -4377,7 +4377,7 @@ gdbarch_xml_syscall_file (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of xml_syscall_file, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n"); + gdb_printf (gdb_stdlog, "gdbarch_xml_syscall_file called\n"); return gdbarch->xml_syscall_file; } @@ -4394,7 +4394,7 @@ gdbarch_syscalls_info (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of syscalls_info, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n"); + gdb_printf (gdb_stdlog, "gdbarch_syscalls_info called\n"); return gdbarch->syscalls_info; } @@ -4411,7 +4411,7 @@ gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_integer_prefixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n"); return gdbarch->stap_integer_prefixes; } @@ -4428,7 +4428,7 @@ gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_integer_suffixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n"); return gdbarch->stap_integer_suffixes; } @@ -4445,7 +4445,7 @@ gdbarch_stap_register_prefixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_register_prefixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_register_prefixes called\n"); return gdbarch->stap_register_prefixes; } @@ -4462,7 +4462,7 @@ gdbarch_stap_register_suffixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_register_suffixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_register_suffixes called\n"); return gdbarch->stap_register_suffixes; } @@ -4479,7 +4479,7 @@ gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n"); return gdbarch->stap_register_indirection_prefixes; } @@ -4496,7 +4496,7 @@ gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n"); return gdbarch->stap_register_indirection_suffixes; } @@ -4513,7 +4513,7 @@ gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); return gdbarch->stap_gdb_register_prefix; } @@ -4530,7 +4530,7 @@ gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); return gdbarch->stap_gdb_register_suffix; } @@ -4554,7 +4554,7 @@ gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stap_is_single_operand != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); return gdbarch->stap_is_single_operand (gdbarch, s); } @@ -4578,7 +4578,7 @@ gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_inf gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stap_parse_special_token != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); return gdbarch->stap_parse_special_token (gdbarch, p); } @@ -4602,7 +4602,7 @@ gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->stap_adjust_register != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_adjust_register called\n"); + gdb_printf (gdb_stdlog, "gdbarch_stap_adjust_register called\n"); return gdbarch->stap_adjust_register (gdbarch, p, regname, regnum); } @@ -4626,7 +4626,7 @@ gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, int narg) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n"); return gdbarch->dtrace_parse_probe_argument (gdbarch, narg); } @@ -4650,7 +4650,7 @@ gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n"); return gdbarch->dtrace_probe_is_enabled (gdbarch, addr); } @@ -4674,7 +4674,7 @@ gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dtrace_enable_probe != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n"); gdbarch->dtrace_enable_probe (gdbarch, addr); } @@ -4698,7 +4698,7 @@ gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dtrace_disable_probe != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n"); + gdb_printf (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n"); gdbarch->dtrace_disable_probe (gdbarch, addr); } @@ -4715,7 +4715,7 @@ gdbarch_has_global_solist (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of has_global_solist, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n"); + gdb_printf (gdb_stdlog, "gdbarch_has_global_solist called\n"); return gdbarch->has_global_solist; } @@ -4732,7 +4732,7 @@ gdbarch_has_global_breakpoints (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of has_global_breakpoints, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); + gdb_printf (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); return gdbarch->has_global_breakpoints; } @@ -4749,7 +4749,7 @@ gdbarch_has_shared_address_space (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->has_shared_address_space != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); + gdb_printf (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); return gdbarch->has_shared_address_space (gdbarch); } @@ -4766,7 +4766,7 @@ gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, std:: gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); + gdb_printf (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg); } @@ -4783,7 +4783,7 @@ gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *re gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->guess_tracepoint_registers != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n"); + gdb_printf (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n"); gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr); } @@ -4800,7 +4800,7 @@ gdbarch_auto_charset (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->auto_charset != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n"); + gdb_printf (gdb_stdlog, "gdbarch_auto_charset called\n"); return gdbarch->auto_charset (); } @@ -4817,7 +4817,7 @@ gdbarch_auto_wide_charset (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->auto_wide_charset != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); + gdb_printf (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); return gdbarch->auto_wide_charset (); } @@ -4834,7 +4834,7 @@ gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of solib_symbols_extension, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); + gdb_printf (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); return gdbarch->solib_symbols_extension; } @@ -4851,7 +4851,7 @@ gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); + gdb_printf (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); return gdbarch->has_dos_based_file_system; } @@ -4868,7 +4868,7 @@ gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, stru gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->gen_return_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gen_return_address called\n"); gdbarch->gen_return_address (gdbarch, ax, value, scope); } @@ -4892,7 +4892,7 @@ gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_wha gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->info_proc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_info_proc called\n"); gdbarch->info_proc (gdbarch, args, what); } @@ -4916,7 +4916,7 @@ gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_pro gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_info_proc != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n"); + gdb_printf (gdb_stdlog, "gdbarch_core_info_proc called\n"); gdbarch->core_info_proc (gdbarch, args, what); } @@ -4933,7 +4933,7 @@ gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_ gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); + gdb_printf (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile); } @@ -4950,7 +4950,7 @@ gdbarch_ravenscar_ops (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of ravenscar_ops, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); + gdb_printf (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); return gdbarch->ravenscar_ops; } @@ -4967,7 +4967,7 @@ gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->insn_is_call != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n"); + gdb_printf (gdb_stdlog, "gdbarch_insn_is_call called\n"); return gdbarch->insn_is_call (gdbarch, addr); } @@ -4984,7 +4984,7 @@ gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->insn_is_ret != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n"); + gdb_printf (gdb_stdlog, "gdbarch_insn_is_ret called\n"); return gdbarch->insn_is_ret (gdbarch, addr); } @@ -5001,7 +5001,7 @@ gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->insn_is_jump != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n"); + gdb_printf (gdb_stdlog, "gdbarch_insn_is_jump called\n"); return gdbarch->insn_is_jump (gdbarch, addr); } @@ -5018,7 +5018,7 @@ gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch, CORE_ADDR address) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->program_breakpoint_here_p != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_program_breakpoint_here_p called\n"); + gdb_printf (gdb_stdlog, "gdbarch_program_breakpoint_here_p called\n"); return gdbarch->program_breakpoint_here_p (gdbarch, address); } @@ -5042,7 +5042,7 @@ gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endpt gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->auxv_parse != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n"); + gdb_printf (gdb_stdlog, "gdbarch_auxv_parse called\n"); return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp); } @@ -5059,7 +5059,7 @@ gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_AD gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_auxv_entry != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n"); + gdb_printf (gdb_stdlog, "gdbarch_print_auxv_entry called\n"); gdbarch->print_auxv_entry (gdbarch, file, type, val); } @@ -5076,7 +5076,7 @@ gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->vsyscall_range != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n"); + gdb_printf (gdb_stdlog, "gdbarch_vsyscall_range called\n"); return gdbarch->vsyscall_range (gdbarch, range); } @@ -5093,7 +5093,7 @@ gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->infcall_mmap != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n"); + gdb_printf (gdb_stdlog, "gdbarch_infcall_mmap called\n"); return gdbarch->infcall_mmap (size, prot); } @@ -5110,7 +5110,7 @@ gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->infcall_munmap != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n"); + gdb_printf (gdb_stdlog, "gdbarch_infcall_munmap called\n"); gdbarch->infcall_munmap (addr, size); } @@ -5127,7 +5127,7 @@ gdbarch_gcc_target_options (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->gcc_target_options != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gcc_target_options called\n"); return gdbarch->gcc_target_options (gdbarch); } @@ -5144,7 +5144,7 @@ gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->gnu_triplet_regexp != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n"); + gdb_printf (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n"); return gdbarch->gnu_triplet_regexp (gdbarch); } @@ -5161,7 +5161,7 @@ gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->addressable_memory_unit_size != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n"); + gdb_printf (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n"); return gdbarch->addressable_memory_unit_size (gdbarch); } @@ -5178,7 +5178,7 @@ gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of disassembler_options_implicit, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options_implicit called\n"); + gdb_printf (gdb_stdlog, "gdbarch_disassembler_options_implicit called\n"); return gdbarch->disassembler_options_implicit; } @@ -5195,7 +5195,7 @@ gdbarch_disassembler_options (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of disassembler_options, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options called\n"); + gdb_printf (gdb_stdlog, "gdbarch_disassembler_options called\n"); return gdbarch->disassembler_options; } @@ -5212,7 +5212,7 @@ gdbarch_valid_disassembler_options (struct gdbarch *gdbarch) gdb_assert (gdbarch != NULL); /* Skip verify of valid_disassembler_options, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_valid_disassembler_options called\n"); + gdb_printf (gdb_stdlog, "gdbarch_valid_disassembler_options called\n"); return gdbarch->valid_disassembler_options; } @@ -5229,7 +5229,7 @@ gdbarch_type_align (struct gdbarch *gdbarch, struct type *type) gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->type_align != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_type_align called\n"); + gdb_printf (gdb_stdlog, "gdbarch_type_align called\n"); return gdbarch->type_align (gdbarch, type); } @@ -5246,7 +5246,7 @@ gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_A gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_pc_address_flags != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_get_pc_address_flags called\n"); + gdb_printf (gdb_stdlog, "gdbarch_get_pc_address_flags called\n"); return gdbarch->get_pc_address_flags (frame, pc); } @@ -5263,7 +5263,7 @@ gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, read gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->read_core_file_mappings != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_read_core_file_mappings called\n"); + gdb_printf (gdb_stdlog, "gdbarch_read_core_file_mappings called\n"); gdbarch->read_core_file_mappings (gdbarch, cbfd, pre_loop_cb, loop_cb); } diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py index cc96ccd..8956a9c 100755 --- a/gdb/gdbarch.py +++ b/gdb/gdbarch.py @@ -391,19 +391,19 @@ with open("gdbarch.c", "w") as f: print("#if defined (GDB_NM_FILE)", file=f) print(" gdb_nm_file = GDB_NM_FILE;", file=f) print("#endif", file=f) - print(" fprintf_filtered (file,", file=f) + print(" gdb_printf (file,", file=f) print(""" "gdbarch_dump: GDB_NM_FILE = %s\\n",""", file=f) print(" gdb_nm_file);", file=f) for c in components: if c.predicate: - print(" fprintf_filtered (file,", file=f) + print(" gdb_printf (file,", file=f) print( f""" "gdbarch_dump: gdbarch_{c.name}_p() = %d\\n",""", file=f, ) print(f" gdbarch_{c.name}_p (gdbarch));", file=f) if isinstance(c, Function): - print(" fprintf_filtered (file,", file=f) + print(" gdb_printf (file,", file=f) print( f""" "gdbarch_dump: {c.name} = <%s>\\n",""", file=f ) @@ -418,7 +418,7 @@ with open("gdbarch.c", "w") as f: printer = f"core_addr_to_string_nz (gdbarch->{c.name})" else: printer = f"plongest (gdbarch->{c.name})" - print(" fprintf_filtered (file,", file=f) + print(" gdb_printf (file,", file=f) print( f""" "gdbarch_dump: {c.name} = %s\\n",""", file=f ) @@ -454,7 +454,7 @@ with open("gdbarch.c", "w") as f: ) print(" if (gdbarch_debug >= 2)", file=f) print( - f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""", + f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""", file=f, ) print(" ", file=f, end="") @@ -488,7 +488,7 @@ with open("gdbarch.c", "w") as f: print(f" gdb_assert (gdbarch->{c.name} != {c.predefault});", file=f) print(" if (gdbarch_debug >= 2)", file=f) print( - f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""", + f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""", file=f, ) print(f" return gdbarch->{c.name};", file=f) @@ -509,7 +509,7 @@ with open("gdbarch.c", "w") as f: print(" gdb_assert (gdbarch != NULL);", file=f) print(" if (gdbarch_debug >= 2)", file=f) print( - f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""", + f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""", file=f, ) print(f" return gdbarch->{c.name};", file=f) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index d029aea..f55c6d1 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -145,9 +145,9 @@ show_opaque_type_resolution (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Resolution of opaque struct/class/union types " - "(if set before loading symbols) is %s.\n"), - value); + gdb_printf (file, _("Resolution of opaque struct/class/union types " + "(if set before loading symbols) is %s.\n"), + value); } /* A function to show whether C++ overload debugging is enabled. */ @@ -156,8 +156,8 @@ static void show_overload_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of C++ overloading is %s.\n"), - value); + gdb_printf (file, _("Debugging of C++ overloading is %s.\n"), + value); } /* A function to show the status of strict type checking. */ @@ -166,7 +166,7 @@ static void show_strict_type_checking (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Strict type checking is %s.\n"), value); + gdb_printf (file, _("Strict type checking is %s.\n"), value); } @@ -4836,10 +4836,10 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value) if (overload_debug) { /* Debugging only. */ - fprintf_filtered (gdb_stderr, - "------ Arg is %s [%d], parm is %s [%d]\n", - arg->name (), arg->code (), - parm->name (), parm->code ()); + gdb_printf (gdb_stderr, + "------ Arg is %s [%d], parm is %s [%d]\n", + arg->name (), arg->code (), + parm->name (), parm->code ()); } /* x -> y means arg of type x being supplied for parameter of type y. */ @@ -4891,9 +4891,9 @@ print_bit_vector (B_TYPE *bits, int nbits) gdb_puts (" "); } if (B_TST (bits, bitno)) - printf_filtered (("1")); + gdb_printf (("1")); else - printf_filtered (("0")); + gdb_printf (("0")); } } @@ -4910,7 +4910,7 @@ print_args (struct field *args, int nargs, int spaces) for (i = 0; i < nargs; i++) { - printf_filtered + gdb_printf ("%*s[%d] name '%s'\n", spaces, "", i, args[i].name () != NULL ? args[i].name () : "<NULL>"); recursive_dump_type (args[i].type (), spaces + 2); @@ -4937,12 +4937,12 @@ dump_fn_fieldlists (struct type *type, int spaces) int overload_idx; struct fn_field *f; - printf_filtered ("%*sfn_fieldlists %s\n", spaces, "", - host_address_to_string (TYPE_FN_FIELDLISTS (type))); + gdb_printf ("%*sfn_fieldlists %s\n", spaces, "", + host_address_to_string (TYPE_FN_FIELDLISTS (type))); for (method_idx = 0; method_idx < TYPE_NFN_FIELDS (type); method_idx++) { f = TYPE_FN_FIELDLIST1 (type, method_idx); - printf_filtered + gdb_printf ("%*s[%d] name '%s' (%s) length %d\n", spaces + 2, "", method_idx, TYPE_FN_FIELDLIST_NAME (type, method_idx), @@ -4952,46 +4952,46 @@ dump_fn_fieldlists (struct type *type, int spaces) overload_idx < TYPE_FN_FIELDLIST_LENGTH (type, method_idx); overload_idx++) { - printf_filtered + gdb_printf ("%*s[%d] physname '%s' (%s)\n", spaces + 4, "", overload_idx, TYPE_FN_FIELD_PHYSNAME (f, overload_idx), host_address_to_string (TYPE_FN_FIELD_PHYSNAME (f, overload_idx))); - printf_filtered + gdb_printf ("%*stype %s\n", spaces + 8, "", host_address_to_string (TYPE_FN_FIELD_TYPE (f, overload_idx))); recursive_dump_type (TYPE_FN_FIELD_TYPE (f, overload_idx), spaces + 8 + 2); - printf_filtered + gdb_printf ("%*sargs %s\n", spaces + 8, "", host_address_to_string (TYPE_FN_FIELD_ARGS (f, overload_idx))); print_args (TYPE_FN_FIELD_ARGS (f, overload_idx), TYPE_FN_FIELD_TYPE (f, overload_idx)->num_fields (), spaces + 8 + 2); - printf_filtered + gdb_printf ("%*sfcontext %s\n", spaces + 8, "", host_address_to_string (TYPE_FN_FIELD_FCONTEXT (f, overload_idx))); - printf_filtered ("%*sis_const %d\n", spaces + 8, "", - TYPE_FN_FIELD_CONST (f, overload_idx)); - printf_filtered ("%*sis_volatile %d\n", spaces + 8, "", - TYPE_FN_FIELD_VOLATILE (f, overload_idx)); - printf_filtered ("%*sis_private %d\n", spaces + 8, "", - TYPE_FN_FIELD_PRIVATE (f, overload_idx)); - printf_filtered ("%*sis_protected %d\n", spaces + 8, "", - TYPE_FN_FIELD_PROTECTED (f, overload_idx)); - printf_filtered ("%*sis_stub %d\n", spaces + 8, "", - TYPE_FN_FIELD_STUB (f, overload_idx)); - printf_filtered ("%*sdefaulted %d\n", spaces + 8, "", - TYPE_FN_FIELD_DEFAULTED (f, overload_idx)); - printf_filtered ("%*sis_deleted %d\n", spaces + 8, "", - TYPE_FN_FIELD_DELETED (f, overload_idx)); - printf_filtered ("%*svoffset %u\n", spaces + 8, "", - TYPE_FN_FIELD_VOFFSET (f, overload_idx)); + gdb_printf ("%*sis_const %d\n", spaces + 8, "", + TYPE_FN_FIELD_CONST (f, overload_idx)); + gdb_printf ("%*sis_volatile %d\n", spaces + 8, "", + TYPE_FN_FIELD_VOLATILE (f, overload_idx)); + gdb_printf ("%*sis_private %d\n", spaces + 8, "", + TYPE_FN_FIELD_PRIVATE (f, overload_idx)); + gdb_printf ("%*sis_protected %d\n", spaces + 8, "", + TYPE_FN_FIELD_PROTECTED (f, overload_idx)); + gdb_printf ("%*sis_stub %d\n", spaces + 8, "", + TYPE_FN_FIELD_STUB (f, overload_idx)); + gdb_printf ("%*sdefaulted %d\n", spaces + 8, "", + TYPE_FN_FIELD_DEFAULTED (f, overload_idx)); + gdb_printf ("%*sis_deleted %d\n", spaces + 8, "", + TYPE_FN_FIELD_DELETED (f, overload_idx)); + gdb_printf ("%*svoffset %u\n", spaces + 8, "", + TYPE_FN_FIELD_VOFFSET (f, overload_idx)); } } } @@ -4999,20 +4999,20 @@ dump_fn_fieldlists (struct type *type, int spaces) static void print_cplus_stuff (struct type *type, int spaces) { - printf_filtered ("%*svptr_fieldno %d\n", spaces, "", - TYPE_VPTR_FIELDNO (type)); - printf_filtered ("%*svptr_basetype %s\n", spaces, "", - host_address_to_string (TYPE_VPTR_BASETYPE (type))); + gdb_printf ("%*svptr_fieldno %d\n", spaces, "", + TYPE_VPTR_FIELDNO (type)); + gdb_printf ("%*svptr_basetype %s\n", spaces, "", + host_address_to_string (TYPE_VPTR_BASETYPE (type))); if (TYPE_VPTR_BASETYPE (type) != NULL) recursive_dump_type (TYPE_VPTR_BASETYPE (type), spaces + 2); - printf_filtered ("%*sn_baseclasses %d\n", spaces, "", - TYPE_N_BASECLASSES (type)); - printf_filtered ("%*snfn_fields %d\n", spaces, "", - TYPE_NFN_FIELDS (type)); + gdb_printf ("%*sn_baseclasses %d\n", spaces, "", + TYPE_N_BASECLASSES (type)); + gdb_printf ("%*snfn_fields %d\n", spaces, "", + TYPE_NFN_FIELDS (type)); if (TYPE_N_BASECLASSES (type) > 0) { - printf_filtered + gdb_printf ("%*svirtual_field_bits (%d bits at *%s)", spaces, "", TYPE_N_BASECLASSES (type), host_address_to_string (TYPE_FIELD_VIRTUAL_BITS (type))); @@ -5025,7 +5025,7 @@ print_cplus_stuff (struct type *type, int spaces) { if (TYPE_FIELD_PRIVATE_BITS (type) != NULL) { - printf_filtered + gdb_printf ("%*sprivate_field_bits (%d bits at *%s)", spaces, "", type->num_fields (), host_address_to_string (TYPE_FIELD_PRIVATE_BITS (type))); @@ -5035,7 +5035,7 @@ print_cplus_stuff (struct type *type, int spaces) } if (TYPE_FIELD_PROTECTED_BITS (type) != NULL) { - printf_filtered + gdb_printf ("%*sprotected_field_bits (%d bits at *%s", spaces, "", type->num_fields (), host_address_to_string (TYPE_FIELD_PROTECTED_BITS (type))); @@ -5049,8 +5049,8 @@ print_cplus_stuff (struct type *type, int spaces) dump_fn_fieldlists (type, spaces); } - printf_filtered ("%*scalling_convention %d\n", spaces, "", - TYPE_CPLUS_CALLING_CONVENTION (type)); + gdb_printf ("%*scalling_convention %d\n", spaces, "", + TYPE_CPLUS_CALLING_CONVENTION (type)); } /* Print the contents of the TYPE's type_specific union, assuming that @@ -5062,10 +5062,10 @@ print_gnat_stuff (struct type *type, int spaces) struct type *descriptive_type = TYPE_DESCRIPTIVE_TYPE (type); if (descriptive_type == NULL) - printf_filtered ("%*sno descriptive type\n", spaces + 2, ""); + gdb_printf ("%*sno descriptive type\n", spaces + 2, ""); else { - printf_filtered ("%*sdescriptive type\n", spaces + 2, ""); + gdb_printf ("%*sdescriptive type\n", spaces + 2, ""); recursive_dump_type (descriptive_type, spaces + 4); } } @@ -5076,8 +5076,8 @@ print_gnat_stuff (struct type *type, int spaces) static void print_fixed_point_type_info (struct type *type, int spaces) { - printf_filtered ("%*sscaling factor: %s\n", spaces + 2, "", - type->fixed_point_scaling_factor ().str ().c_str ()); + gdb_printf ("%*sscaling factor: %s\n", spaces + 2, "", + type->fixed_point_scaling_factor ().str ().c_str ()); } static struct obstack dont_print_type_obstack; @@ -5090,14 +5090,14 @@ dump_dynamic_prop (dynamic_prop const& prop) switch (prop.kind ()) { case PROP_CONST: - printf_filtered ("%s", plongest (prop.const_val ())); + gdb_printf ("%s", plongest (prop.const_val ())); break; case PROP_UNDEFINED: - printf_filtered ("(undefined)"); + gdb_printf ("(undefined)"); break; case PROP_LOCEXPR: case PROP_LOCLIST: - printf_filtered ("(dynamic)"); + gdb_printf ("(dynamic)"); break; default: gdb_assert_not_reached ("unhandled prop kind"); @@ -5126,9 +5126,9 @@ recursive_dump_type (struct type *type, int spaces) { if (type == first_dont_print[i]) { - printf_filtered ("%*stype node %s", spaces, "", - host_address_to_string (type)); - printf_filtered (_(" <same as already seen type>\n")); + gdb_printf ("%*stype node %s", spaces, "", + host_address_to_string (type)); + gdb_printf (_(" <same as already seen type>\n")); return; } } @@ -5136,116 +5136,116 @@ recursive_dump_type (struct type *type, int spaces) obstack_ptr_grow (&dont_print_type_obstack, type); } - printf_filtered ("%*stype node %s\n", spaces, "", - host_address_to_string (type)); - printf_filtered ("%*sname '%s' (%s)\n", spaces, "", - type->name () ? type->name () : "<NULL>", - host_address_to_string (type->name ())); - printf_filtered ("%*scode 0x%x ", spaces, "", type->code ()); + gdb_printf ("%*stype node %s\n", spaces, "", + host_address_to_string (type)); + gdb_printf ("%*sname '%s' (%s)\n", spaces, "", + type->name () ? type->name () : "<NULL>", + host_address_to_string (type->name ())); + gdb_printf ("%*scode 0x%x ", spaces, "", type->code ()); switch (type->code ()) { case TYPE_CODE_UNDEF: - printf_filtered ("(TYPE_CODE_UNDEF)"); + gdb_printf ("(TYPE_CODE_UNDEF)"); break; case TYPE_CODE_PTR: - printf_filtered ("(TYPE_CODE_PTR)"); + gdb_printf ("(TYPE_CODE_PTR)"); break; case TYPE_CODE_ARRAY: - printf_filtered ("(TYPE_CODE_ARRAY)"); + gdb_printf ("(TYPE_CODE_ARRAY)"); break; case TYPE_CODE_STRUCT: - printf_filtered ("(TYPE_CODE_STRUCT)"); + gdb_printf ("(TYPE_CODE_STRUCT)"); break; case TYPE_CODE_UNION: - printf_filtered ("(TYPE_CODE_UNION)"); + gdb_printf ("(TYPE_CODE_UNION)"); break; case TYPE_CODE_ENUM: - printf_filtered ("(TYPE_CODE_ENUM)"); + gdb_printf ("(TYPE_CODE_ENUM)"); break; case TYPE_CODE_FLAGS: - printf_filtered ("(TYPE_CODE_FLAGS)"); + gdb_printf ("(TYPE_CODE_FLAGS)"); break; case TYPE_CODE_FUNC: - printf_filtered ("(TYPE_CODE_FUNC)"); + gdb_printf ("(TYPE_CODE_FUNC)"); break; case TYPE_CODE_INT: - printf_filtered ("(TYPE_CODE_INT)"); + gdb_printf ("(TYPE_CODE_INT)"); break; case TYPE_CODE_FLT: - printf_filtered ("(TYPE_CODE_FLT)"); + gdb_printf ("(TYPE_CODE_FLT)"); break; case TYPE_CODE_VOID: - printf_filtered ("(TYPE_CODE_VOID)"); + gdb_printf ("(TYPE_CODE_VOID)"); break; case TYPE_CODE_SET: - printf_filtered ("(TYPE_CODE_SET)"); + gdb_printf ("(TYPE_CODE_SET)"); break; case TYPE_CODE_RANGE: - printf_filtered ("(TYPE_CODE_RANGE)"); + gdb_printf ("(TYPE_CODE_RANGE)"); break; case TYPE_CODE_STRING: - printf_filtered ("(TYPE_CODE_STRING)"); + gdb_printf ("(TYPE_CODE_STRING)"); break; case TYPE_CODE_ERROR: - printf_filtered ("(TYPE_CODE_ERROR)"); + gdb_printf ("(TYPE_CODE_ERROR)"); break; case TYPE_CODE_MEMBERPTR: - printf_filtered ("(TYPE_CODE_MEMBERPTR)"); + gdb_printf ("(TYPE_CODE_MEMBERPTR)"); break; case TYPE_CODE_METHODPTR: - printf_filtered ("(TYPE_CODE_METHODPTR)"); + gdb_printf ("(TYPE_CODE_METHODPTR)"); break; case TYPE_CODE_METHOD: - printf_filtered ("(TYPE_CODE_METHOD)"); + gdb_printf ("(TYPE_CODE_METHOD)"); break; case TYPE_CODE_REF: - printf_filtered ("(TYPE_CODE_REF)"); + gdb_printf ("(TYPE_CODE_REF)"); break; case TYPE_CODE_CHAR: - printf_filtered ("(TYPE_CODE_CHAR)"); + gdb_printf ("(TYPE_CODE_CHAR)"); break; case TYPE_CODE_BOOL: - printf_filtered ("(TYPE_CODE_BOOL)"); + gdb_printf ("(TYPE_CODE_BOOL)"); break; case TYPE_CODE_COMPLEX: - printf_filtered ("(TYPE_CODE_COMPLEX)"); + gdb_printf ("(TYPE_CODE_COMPLEX)"); break; case TYPE_CODE_TYPEDEF: - printf_filtered ("(TYPE_CODE_TYPEDEF)"); + gdb_printf ("(TYPE_CODE_TYPEDEF)"); break; case TYPE_CODE_NAMESPACE: - printf_filtered ("(TYPE_CODE_NAMESPACE)"); + gdb_printf ("(TYPE_CODE_NAMESPACE)"); break; case TYPE_CODE_FIXED_POINT: - printf_filtered ("(TYPE_CODE_FIXED_POINT)"); + gdb_printf ("(TYPE_CODE_FIXED_POINT)"); break; default: - printf_filtered ("(UNKNOWN TYPE CODE)"); + gdb_printf ("(UNKNOWN TYPE CODE)"); break; } gdb_puts ("\n"); - printf_filtered ("%*slength %s\n", spaces, "", - pulongest (TYPE_LENGTH (type))); + gdb_printf ("%*slength %s\n", spaces, "", + pulongest (TYPE_LENGTH (type))); if (type->is_objfile_owned ()) - printf_filtered ("%*sobjfile %s\n", spaces, "", - host_address_to_string (type->objfile_owner ())); + gdb_printf ("%*sobjfile %s\n", spaces, "", + host_address_to_string (type->objfile_owner ())); else - printf_filtered ("%*sgdbarch %s\n", spaces, "", - host_address_to_string (type->arch_owner ())); - printf_filtered ("%*starget_type %s\n", spaces, "", - host_address_to_string (TYPE_TARGET_TYPE (type))); + gdb_printf ("%*sgdbarch %s\n", spaces, "", + host_address_to_string (type->arch_owner ())); + gdb_printf ("%*starget_type %s\n", spaces, "", + host_address_to_string (TYPE_TARGET_TYPE (type))); if (TYPE_TARGET_TYPE (type) != NULL) { recursive_dump_type (TYPE_TARGET_TYPE (type), spaces + 2); } - printf_filtered ("%*spointer_type %s\n", spaces, "", - host_address_to_string (TYPE_POINTER_TYPE (type))); - printf_filtered ("%*sreference_type %s\n", spaces, "", - host_address_to_string (TYPE_REFERENCE_TYPE (type))); - printf_filtered ("%*stype_chain %s\n", spaces, "", - host_address_to_string (TYPE_CHAIN (type))); - printf_filtered ("%*sinstance_flags 0x%x", spaces, "", - (unsigned) type->instance_flags ()); + gdb_printf ("%*spointer_type %s\n", spaces, "", + host_address_to_string (TYPE_POINTER_TYPE (type))); + gdb_printf ("%*sreference_type %s\n", spaces, "", + host_address_to_string (TYPE_REFERENCE_TYPE (type))); + gdb_printf ("%*stype_chain %s\n", spaces, "", + host_address_to_string (TYPE_CHAIN (type))); + gdb_printf ("%*sinstance_flags 0x%x", spaces, "", + (unsigned) type->instance_flags ()); if (TYPE_CONST (type)) { gdb_puts (" TYPE_CONST"); @@ -5280,7 +5280,7 @@ recursive_dump_type (struct type *type, int spaces) } gdb_puts ("\n"); - printf_filtered ("%*sflags", spaces, ""); + gdb_printf ("%*sflags", spaces, ""); if (type->is_unsigned ()) { gdb_puts (" TYPE_UNSIGNED"); @@ -5329,41 +5329,41 @@ recursive_dump_type (struct type *type, int spaces) gdb_puts (" TYPE_NOTTEXT"); } gdb_puts ("\n"); - printf_filtered ("%*snfields %d ", spaces, "", type->num_fields ()); + gdb_printf ("%*snfields %d ", spaces, "", type->num_fields ()); if (TYPE_ASSOCIATED_PROP (type) != nullptr || TYPE_ALLOCATED_PROP (type) != nullptr) { - printf_filtered ("%*s", spaces, ""); + gdb_printf ("%*s", spaces, ""); if (TYPE_ASSOCIATED_PROP (type) != nullptr) { - printf_filtered ("associated "); + gdb_printf ("associated "); dump_dynamic_prop (*TYPE_ASSOCIATED_PROP (type)); } if (TYPE_ALLOCATED_PROP (type) != nullptr) { if (TYPE_ASSOCIATED_PROP (type) != nullptr) - printf_filtered (" "); - printf_filtered ("allocated "); + gdb_printf (" "); + gdb_printf ("allocated "); dump_dynamic_prop (*TYPE_ALLOCATED_PROP (type)); } - printf_filtered ("\n"); + gdb_printf ("\n"); } - printf_filtered ("%s\n", host_address_to_string (type->fields ())); + gdb_printf ("%s\n", host_address_to_string (type->fields ())); for (idx = 0; idx < type->num_fields (); idx++) { if (type->code () == TYPE_CODE_ENUM) - printf_filtered ("%*s[%d] enumval %s type ", spaces + 2, "", - idx, plongest (type->field (idx).loc_enumval ())); + gdb_printf ("%*s[%d] enumval %s type ", spaces + 2, "", + idx, plongest (type->field (idx).loc_enumval ())); else - printf_filtered ("%*s[%d] bitpos %s bitsize %d type ", spaces + 2, "", - idx, plongest (type->field (idx).loc_bitpos ()), - TYPE_FIELD_BITSIZE (type, idx)); - printf_filtered ("%s name '%s' (%s)\n", - host_address_to_string (type->field (idx).type ()), - type->field (idx).name () != NULL - ? type->field (idx).name () - : "<NULL>", - host_address_to_string (type->field (idx).name ())); + gdb_printf ("%*s[%d] bitpos %s bitsize %d type ", spaces + 2, "", + idx, plongest (type->field (idx).loc_bitpos ()), + TYPE_FIELD_BITSIZE (type, idx)); + gdb_printf ("%s name '%s' (%s)\n", + host_address_to_string (type->field (idx).type ()), + type->field (idx).name () != NULL + ? type->field (idx).name () + : "<NULL>", + host_address_to_string (type->field (idx).name ())); if (type->field (idx).type () != NULL) { recursive_dump_type (type->field (idx).type (), spaces + 4); @@ -5371,29 +5371,29 @@ recursive_dump_type (struct type *type, int spaces) } if (type->code () == TYPE_CODE_RANGE) { - printf_filtered ("%*slow ", spaces, ""); + gdb_printf ("%*slow ", spaces, ""); dump_dynamic_prop (type->bounds ()->low); - printf_filtered (" high "); + gdb_printf (" high "); dump_dynamic_prop (type->bounds ()->high); - printf_filtered ("\n"); + gdb_printf ("\n"); } switch (TYPE_SPECIFIC_FIELD (type)) { case TYPE_SPECIFIC_CPLUS_STUFF: - printf_filtered ("%*scplus_stuff %s\n", spaces, "", - host_address_to_string (TYPE_CPLUS_SPECIFIC (type))); + gdb_printf ("%*scplus_stuff %s\n", spaces, "", + host_address_to_string (TYPE_CPLUS_SPECIFIC (type))); print_cplus_stuff (type, spaces); break; case TYPE_SPECIFIC_GNAT_STUFF: - printf_filtered ("%*sgnat_stuff %s\n", spaces, "", - host_address_to_string (TYPE_GNAT_SPECIFIC (type))); + gdb_printf ("%*sgnat_stuff %s\n", spaces, "", + host_address_to_string (TYPE_GNAT_SPECIFIC (type))); print_gnat_stuff (type, spaces); break; case TYPE_SPECIFIC_FLOATFORMAT: - printf_filtered ("%*sfloatformat ", spaces, ""); + gdb_printf ("%*sfloatformat ", spaces, ""); if (TYPE_FLOATFORMAT (type) == NULL || TYPE_FLOATFORMAT (type)->name == NULL) gdb_puts ("(null)"); @@ -5403,18 +5403,18 @@ recursive_dump_type (struct type *type, int spaces) break; case TYPE_SPECIFIC_FUNC: - printf_filtered ("%*scalling_convention %d\n", spaces, "", - TYPE_CALLING_CONVENTION (type)); + gdb_printf ("%*scalling_convention %d\n", spaces, "", + TYPE_CALLING_CONVENTION (type)); /* tail_call_list is not printed. */ break; case TYPE_SPECIFIC_SELF_TYPE: - printf_filtered ("%*sself_type %s\n", spaces, "", - host_address_to_string (TYPE_SELF_TYPE (type))); + gdb_printf ("%*sself_type %s\n", spaces, "", + host_address_to_string (TYPE_SELF_TYPE (type))); break; case TYPE_SPECIFIC_FIXED_POINT: - printf_filtered ("%*sfixed_point_info ", spaces, ""); + gdb_printf ("%*sfixed_point_info ", spaces, ""); print_fixed_point_type_info (type, spaces); gdb_puts ("\n"); break; @@ -5424,8 +5424,8 @@ recursive_dump_type (struct type *type, int spaces) { unsigned bit_size = type->bit_size (); unsigned bit_off = type->bit_offset (); - printf_filtered ("%*s bit size = %u, bit offset = %u\n", spaces, "", - bit_size, bit_off); + gdb_printf ("%*s bit size = %u, bit offset = %u\n", spaces, "", + bit_size, bit_off); } break; } diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 02938af..7231482 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2775,10 +2775,10 @@ show_task_pause_cmd (const char *args, int from_tty) struct inf *inf = cur_inf (); check_empty (args, "show task pause"); - printf_filtered ("The inferior task %s suspended while gdb has control.\n", - inf->task - ? (inf->pause_sc == 0 ? "isn't" : "is") - : (inf->pause_sc == 0 ? "won't be" : "will be")); + gdb_printf ("The inferior task %s suspended while gdb has control.\n", + inf->task + ? (inf->pause_sc == 0 ? "isn't" : "is") + : (inf->pause_sc == 0 ? "won't be" : "will be")); } static void @@ -2792,9 +2792,9 @@ static void show_task_detach_sc_cmd (const char *args, int from_tty) { check_empty (args, "show task detach-suspend-count"); - printf_filtered ("The inferior task will be left with a " - "suspend count of %d when detaching.\n", - cur_inf ()->detach_sc); + gdb_printf ("The inferior task will be left with a " + "suspend count of %d when detaching.\n", + cur_inf ()->detach_sc); } @@ -2814,9 +2814,9 @@ show_thread_default_pause_cmd (const char *args, int from_tty) int sc = inf->default_thread_pause_sc; check_empty (args, "show thread default pause"); - printf_filtered ("New threads %s suspended while gdb has control%s.\n", - sc ? "are" : "aren't", - !sc && inf->pause_sc ? " (but the task is)" : ""); + gdb_printf ("New threads %s suspended while gdb has control%s.\n", + sc ? "are" : "aren't", + !sc && inf->pause_sc ? " (but the task is)" : ""); } static void @@ -2834,8 +2834,8 @@ show_thread_default_run_cmd (const char *args, int from_tty) struct inf *inf = cur_inf (); check_empty (args, "show thread default run"); - printf_filtered ("New threads %s allowed to run.\n", - inf->default_thread_run_sc == 0 ? "are" : "aren't"); + gdb_printf ("New threads %s allowed to run.\n", + inf->default_thread_run_sc == 0 ? "are" : "aren't"); } static void @@ -2849,8 +2849,8 @@ static void show_thread_default_detach_sc_cmd (const char *args, int from_tty) { check_empty (args, "show thread default detach-suspend-count"); - printf_filtered ("New threads will get a detach-suspend-count of %d.\n", - cur_inf ()->default_thread_detach_sc); + gdb_printf ("New threads will get a detach-suspend-count of %d.\n", + cur_inf ()->default_thread_detach_sc); } @@ -2913,8 +2913,8 @@ show_stopped_cmd (const char *args, int from_tty) struct inf *inf = active_inf (); check_empty (args, "show stopped"); - printf_filtered ("The inferior process %s stopped.\n", - inf->stopped ? "is" : "isn't"); + gdb_printf ("The inferior process %s stopped.\n", + inf->stopped ? "is" : "isn't"); } static void @@ -2942,10 +2942,10 @@ show_sig_thread_cmd (const char *args, int from_tty) check_empty (args, "show signal-thread"); if (inf->signal_thread) - printf_filtered ("The signal thread is %s.\n", - proc_string (inf->signal_thread)); + gdb_printf ("The signal thread is %s.\n", + proc_string (inf->signal_thread)); else - printf_filtered ("There is no signal thread.\n"); + gdb_printf ("There is no signal thread.\n"); } @@ -2973,10 +2973,10 @@ show_signals_cmd (const char *args, int from_tty) struct inf *inf = cur_inf (); check_empty (args, "show signals"); - printf_filtered ("The inferior process's signals %s intercepted.\n", - inf->task - ? (inf->traced ? "are" : "aren't") - : (inf->want_signals ? "will be" : "won't be")); + gdb_printf ("The inferior process's signals %s intercepted.\n", + inf->task + ? (inf->traced ? "are" : "aren't") + : (inf->want_signals ? "will be" : "won't be")); } static void @@ -3002,18 +3002,18 @@ show_exceptions_cmd (const char *args, int from_tty) struct inf *inf = cur_inf (); check_empty (args, "show exceptions"); - printf_filtered ("Exceptions in the inferior %s trapped.\n", - inf->task - ? (inf->want_exceptions ? "are" : "aren't") - : (inf->want_exceptions ? "will be" : "won't be")); + gdb_printf ("Exceptions in the inferior %s trapped.\n", + inf->task + ? (inf->want_exceptions ? "are" : "aren't") + : (inf->want_exceptions ? "will be" : "won't be")); } static void set_task_cmd (const char *args, int from_tty) { - printf_filtered ("\"set task\" must be followed by the name" - " of a task property.\n"); + gdb_printf ("\"set task\" must be followed by the name" + " of a task property.\n"); } static void @@ -3277,10 +3277,10 @@ show_thread_pause_cmd (const char *args, int from_tty) int sc = thread->pause_sc; check_empty (args, "show task pause"); - printf_filtered ("Thread %s %s suspended while gdb has control%s.\n", - proc_string (thread), - sc ? "is" : "isn't", - !sc && thread->inf->pause_sc ? " (but the task is)" : ""); + gdb_printf ("Thread %s %s suspended while gdb has control%s.\n", + proc_string (thread), + sc ? "is" : "isn't", + !sc && thread->inf->pause_sc ? " (but the task is)" : ""); } static void @@ -3297,9 +3297,9 @@ show_thread_run_cmd (const char *args, int from_tty) struct proc *thread = cur_thread (); check_empty (args, "show thread run"); - printf_filtered ("Thread %s %s allowed to run.", - proc_string (thread), - thread->run_sc == 0 ? "is" : "isn't"); + gdb_printf ("Thread %s %s allowed to run.", + proc_string (thread), + thread->run_sc == 0 ? "is" : "isn't"); } static void @@ -3315,10 +3315,10 @@ show_thread_detach_sc_cmd (const char *args, int from_tty) struct proc *thread = cur_thread (); check_empty (args, "show thread detach-suspend-count"); - printf_filtered ("Thread %s will be left with a suspend count" - " of %d when detaching.\n", - proc_string (thread), - thread->detach_sc); + gdb_printf ("Thread %s will be left with a suspend count" + " of %d when detaching.\n", + proc_string (thread), + thread->detach_sc); } static void @@ -3360,7 +3360,7 @@ thread_takeover_sc_cmd (const char *args, int from_tty) error (("%s."), safe_strerror (err)); thread->sc = info->suspend_count; if (from_tty) - printf_filtered ("Suspend count was %d.\n", thread->sc); + gdb_printf ("Suspend count was %d.\n", thread->sc); if (info != &_info) vm_deallocate (mach_task_self (), (vm_address_t) info, info_len * sizeof (int)); diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h index 628ef5a..c4ea134 100644 --- a/gdb/gnu-nat.h +++ b/gdb/gnu-nat.h @@ -109,8 +109,8 @@ extern bool gnu_debug_flag; #define debug(msg, args...) \ do { if (gnu_debug_flag) \ - fprintf_unfiltered (gdb_stdlog, "%s:%d: " msg "\r\n", \ - __FILE__ , __LINE__ , ##args); } while (0) + gdb_printf (gdb_stdlog, "%s:%d: " msg "\r\n", \ + __FILE__ , __LINE__ , ##args); } while (0) /* A prototype generic GNU/Hurd target. The client can override it with local methods. */ diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index da4f27e..b8640d6 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -623,7 +623,7 @@ gnuv3_print_method_ptr (const gdb_byte *contents, /* Check for NULL. */ if (ptr_value == 0 && vbit == 0) { - fprintf_filtered (stream, "NULL"); + gdb_printf (stream, "NULL"); return; } @@ -647,7 +647,7 @@ gnuv3_print_method_ptr (const gdb_byte *contents, gdb::unique_xmalloc_ptr<char> demangled_name = gdb_demangle (physname, DMGL_ANSI | DMGL_PARAMS); - fprintf_filtered (stream, "&virtual "); + gdb_printf (stream, "&virtual "); if (demangled_name == NULL) gdb_puts (physname, stream); else @@ -666,7 +666,7 @@ gnuv3_print_method_ptr (const gdb_byte *contents, /* We didn't find it; print the raw data. */ if (vbit) { - fprintf_filtered (stream, "&virtual table offset "); + gdb_printf (stream, "&virtual table offset "); print_longest (stream, 'd', 1, ptr_value); } else @@ -679,7 +679,7 @@ gnuv3_print_method_ptr (const gdb_byte *contents, if (adjustment) { - fprintf_filtered (stream, ", this adjustment "); + gdb_printf (stream, ", this adjustment "); print_longest (stream, 'd', 1, adjustment); } } @@ -907,11 +907,11 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, vt_addr = value_address (value_field (vtable, vtable_field_virtual_functions)); - printf_filtered (_("vtable for '%s' @ %s (subobject @ %s):\n"), - TYPE_SAFE_NAME (type), - paddress (gdbarch, vt_addr), - paddress (gdbarch, (value_address (value) - + value_embedded_offset (value)))); + gdb_printf (_("vtable for '%s' @ %s (subobject @ %s):\n"), + TYPE_SAFE_NAME (type), + paddress (gdbarch, vt_addr), + paddress (gdbarch, (value_address (value) + + value_embedded_offset (value)))); for (i = 0; i <= max_voffset; ++i) { @@ -920,7 +920,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, int got_error = 0; struct value *vfn; - printf_filtered ("[%d]: ", i); + gdb_printf ("[%d]: ", i); vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions), @@ -942,7 +942,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, if (!got_error) print_function_pointer_address (opts, gdbarch, addr, gdb_stdout); - printf_filtered ("\n"); + gdb_printf ("\n"); } } @@ -983,7 +983,7 @@ gnuv3_print_vtable (struct value *value) if (!vtable) { - printf_filtered (_("This object does not have a virtual function table\n")); + gdb_printf (_("This object does not have a virtual function table\n")); return; } @@ -1002,7 +1002,7 @@ gnuv3_print_vtable (struct value *value) if (iter->max_voffset >= 0) { if (count > 0) - printf_filtered ("\n"); + gdb_printf ("\n"); print_one_vtable (gdbarch, iter->value, iter->max_voffset, &opts); ++count; } diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c index ade99c9..45bd529 100644 --- a/gdb/go-valprint.c +++ b/gdb/go-valprint.c @@ -72,9 +72,9 @@ print_go_string (struct type *type, if (length < 0) { - printf_filtered (_("<invalid length: %ps>"), - styled_string (metadata_style.style (), - plongest (addr))); + gdb_printf (_("<invalid length: %ps>"), + styled_string (metadata_style.style (), + plongest (addr))); return; } diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index eb6cf7c..475425d 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -663,7 +663,7 @@ static cmdline_t child_cmd; /* Parsed child's command line kept here. */ void go32_nat_target::files_info () { - printf_filtered ("You are running a DJGPP V2 program.\n"); + gdb_printf ("You are running a DJGPP V2 program.\n"); } void @@ -899,9 +899,9 @@ go32_nat_target::terminal_init () void go32_nat_target::terminal_info (const char *args, int from_tty) { - printf_filtered ("Inferior's terminal is in %s mode.\n", - !inf_mode_valid - ? "default" : inf_terminal_mode ? "raw" : "cooked"); + gdb_printf ("Inferior's terminal is in %s mode.\n", + !inf_mode_valid + ? "default" : inf_terminal_mode ? "raw" : "cooked"); #if __DJGPP_MINOR__ > 2 if (child_cmd.redirection) @@ -911,15 +911,15 @@ go32_nat_target::terminal_info (const char *args, int from_tty) for (i = 0; i < DBG_HANDLES; i++) { if (child_cmd.redirection[i]->file_name) - printf_filtered ("\tFile handle %d is redirected to `%s'.\n", - i, child_cmd.redirection[i]->file_name); + gdb_printf ("\tFile handle %d is redirected to `%s'.\n", + i, child_cmd.redirection[i]->file_name); else if (_get_dev_info (child_cmd.redirection[i]->inf_handle) == -1) - printf_filtered + gdb_printf ("\tFile handle %d appears to be closed by inferior.\n", i); /* Mask off the raw/cooked bit when comparing device info words. */ else if ((_get_dev_info (child_cmd.redirection[i]->inf_handle) & 0xdf) != (_get_dev_info (i) & 0xdf)) - printf_filtered + gdb_printf ("\tFile handle %d appears to be redirected by inferior.\n", i); } } @@ -1063,12 +1063,12 @@ print_mem (unsigned long datum, const char *header, int in_pages_p) gdb_puts (header); if (datum > 1024) { - printf_filtered ("%lu KB", datum >> 10); + gdb_printf ("%lu KB", datum >> 10); if (datum > 1024 * 1024) - printf_filtered (" (%lu MB)", datum >> 20); + gdb_printf (" (%lu MB)", datum >> 20); } else - printf_filtered ("%lu Bytes", datum); + gdb_printf ("%lu Bytes", datum); gdb_puts ("\n"); } } @@ -1134,9 +1134,9 @@ go32_sysinfo (const char *arg, int from_tty) #endif } - printf_filtered ("CPU Type.......................%s", u.machine); + gdb_printf ("CPU Type.......................%s", u.machine); if (cpuid_vendor[0]) - printf_filtered (" (%s)", cpuid_vendor); + gdb_printf (" (%s)", cpuid_vendor); gdb_puts ("\n"); /* CPUID with EAX = 1 returns processor signature and features. */ @@ -1257,7 +1257,7 @@ go32_sysinfo (const char *arg, int from_tty) xsnprintf (cpu_string, sizeof (cpu_string), "%s%s Model %d Stepping %d", intel_p ? "Pentium" : (amd_p ? "AMD" : (hygon_p ? "Hygon" : "ix86")), cpu_brand, cpu_model, cpuid_eax & 0xf); - printf_filtered ("%*s%s\n", 31, "", cpu_string); + gdb_printf ("%*s%s\n", 31, "", cpu_string); if (((cpuid_edx & (6 | (0x0d << 23))) != 0) || ((cpuid_edx & 1) == 0) || ((amd_p || hygon_p) && (cpuid_edx & (3 << 30)) != 0)) @@ -1290,10 +1290,10 @@ go32_sysinfo (const char *arg, int from_tty) } } gdb_puts ("\n"); - printf_filtered ("DOS Version....................%s %s.%s", - _os_flavor, u.release, u.version); + gdb_printf ("DOS Version....................%s %s.%s", + _os_flavor, u.release, u.version); if (true_dos_version != advertized_dos_version) - printf_filtered (" (disguised as v%d.%d)", _osmajor, _osminor); + gdb_printf (" (disguised as v%d.%d)", _osmajor, _osminor); gdb_puts ("\n"); if (!windows_major) go32_get_windows_version (); @@ -1301,8 +1301,8 @@ go32_sysinfo (const char *arg, int from_tty) { const char *windows_flavor; - printf_filtered ("Windows Version................%d.%02d (Windows ", - windows_major, windows_minor); + gdb_printf ("Windows Version................%d.%02d (Windows ", + windows_major, windows_minor); switch (windows_major) { case 3: @@ -1332,11 +1332,11 @@ go32_sysinfo (const char *arg, int from_tty) windows_flavor = "??"; break; } - printf_filtered ("%s)\n", windows_flavor); + gdb_printf ("%s)\n", windows_flavor); } else if (true_dos_version == 0x532 && advertized_dos_version == 0x500) - printf_filtered ("Windows Version................" - "Windows NT family (W2K/XP/W2K3/Vista/W2K8)\n"); + gdb_printf ("Windows Version................" + "Windows NT family (W2K/XP/W2K3/Vista/W2K8)\n"); gdb_puts ("\n"); /* On some versions of Windows, __dpmi_get_capabilities returns zero, but the buffer is not filled with info, so we fill the @@ -1352,37 +1352,37 @@ go32_sysinfo (const char *arg, int from_tty) I don't trust the vendors to follow that... */ if (!memchr (&dpmi_vendor_info[2], 0, 126)) dpmi_vendor_info[128] = '\0'; - printf_filtered ("DPMI Host......................" - "%s v%d.%d (capabilities: %#x)\n", - &dpmi_vendor_info[2], - (unsigned)dpmi_vendor_info[0], - (unsigned)dpmi_vendor_info[1], - ((unsigned)dpmi_flags & 0x7f)); + gdb_printf ("DPMI Host......................" + "%s v%d.%d (capabilities: %#x)\n", + &dpmi_vendor_info[2], + (unsigned)dpmi_vendor_info[0], + (unsigned)dpmi_vendor_info[1], + ((unsigned)dpmi_flags & 0x7f)); } else - printf_filtered ("DPMI Host......................(Info not available)\n"); + gdb_printf ("DPMI Host......................(Info not available)\n"); __dpmi_get_version (&dpmi_version_data); - printf_filtered ("DPMI Version...................%d.%02d\n", - dpmi_version_data.major, dpmi_version_data.minor); - printf_filtered ("DPMI Info......................" - "%s-bit DPMI, with%s Virtual Memory support\n", - (dpmi_version_data.flags & 1) ? "32" : "16", - (dpmi_version_data.flags & 4) ? "" : "out"); - printf_filtered ("%*sInterrupts reflected to %s mode\n", 31, "", - (dpmi_version_data.flags & 2) ? "V86" : "Real"); - printf_filtered ("%*sProcessor type: i%d86\n", 31, "", - dpmi_version_data.cpu); - printf_filtered ("%*sPIC base interrupt: Master: %#x Slave: %#x\n", 31, "", - dpmi_version_data.master_pic, dpmi_version_data.slave_pic); + gdb_printf ("DPMI Version...................%d.%02d\n", + dpmi_version_data.major, dpmi_version_data.minor); + gdb_printf ("DPMI Info......................" + "%s-bit DPMI, with%s Virtual Memory support\n", + (dpmi_version_data.flags & 1) ? "32" : "16", + (dpmi_version_data.flags & 4) ? "" : "out"); + gdb_printf ("%*sInterrupts reflected to %s mode\n", 31, "", + (dpmi_version_data.flags & 2) ? "V86" : "Real"); + gdb_printf ("%*sProcessor type: i%d86\n", 31, "", + dpmi_version_data.cpu); + gdb_printf ("%*sPIC base interrupt: Master: %#x Slave: %#x\n", 31, "", + dpmi_version_data.master_pic, dpmi_version_data.slave_pic); /* a_tss is only initialized when the debuggee is first run. */ if (prog_has_started) { __asm__ __volatile__ ("pushfl ; popl %0" : "=g" (eflags)); - printf_filtered ("Protection....................." - "Ring %d (in %s), with%s I/O protection\n", - a_tss.tss_cs & 3, (a_tss.tss_cs & 4) ? "LDT" : "GDT", - (a_tss.tss_cs & 3) > ((eflags >> 12) & 3) ? "" : "out"); + gdb_printf ("Protection....................." + "Ring %d (in %s), with%s I/O protection\n", + a_tss.tss_cs & 3, (a_tss.tss_cs & 4) ? "LDT" : "GDT", + (a_tss.tss_cs & 3) > ((eflags >> 12) & 3) ? "" : "out"); } gdb_puts ("\n"); __dpmi_get_free_memory_information (&mem_info); @@ -1420,14 +1420,14 @@ go32_sysinfo (const char *arg, int from_tty) hilo_idx = 0; if (fit_idx > 2) fit_idx = 0; - printf_filtered ("DOS Memory Allocation..........%s memory, %s fit\n", - dos_hilo[hilo_idx], dos_fit[fit_idx]); + gdb_printf ("DOS Memory Allocation..........%s memory, %s fit\n", + dos_hilo[hilo_idx], dos_fit[fit_idx]); regs.x.ax = 0x5802; __dpmi_int (0x21, ®s); if ((regs.x.flags & 1) != 0) regs.h.al = 0; - printf_filtered ("%*sUMBs %sin DOS memory chain\n", 31, "", - regs.h.al == 0 ? "not " : ""); + gdb_printf ("%*sUMBs %sin DOS memory chain\n", 31, "", + regs.h.al == 0 ? "not " : ""); } } @@ -1561,65 +1561,65 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force) if (descr.present && (allowed_descriptors[type] & (1 << descr.stype)) != 0) { - printf_filtered ("0x%03x: ", - type == 1 - ? idx : (idx * 8) | (type ? (cpl | 4) : 0)); + gdb_printf ("0x%03x: ", + type == 1 + ? idx : (idx * 8) | (type ? (cpl | 4) : 0)); if (descr.page_granular) limit = (limit << 12) | 0xfff; /* big segment: low 12 bit set */ if (descr.stype == 1 || descr.stype == 2 || descr.stype == 3 || descr.stype == 9 || descr.stype == 11 || (descr.stype >= 16 && descr.stype < 32)) - printf_filtered ("base=0x%02x%02x%04x limit=0x%08lx", - descr.base2, descr.base1, descr.base0, limit); + gdb_printf ("base=0x%02x%02x%04x limit=0x%08lx", + descr.base2, descr.base1, descr.base0, limit); switch (descr.stype) { case 1: case 3: - printf_filtered (" 16-bit TSS (task %sactive)", - descr.stype == 3 ? "" : "in"); + gdb_printf (" 16-bit TSS (task %sactive)", + descr.stype == 3 ? "" : "in"); break; case 2: gdb_puts (" LDT"); break; case 4: memcpy (&gate, &descr, sizeof gate); - printf_filtered ("selector=0x%04x offs=0x%04x%04x", - gate.selector, gate.offset1, gate.offset0); - printf_filtered (" 16-bit Call Gate (params=%d)", - gate.param_count); + gdb_printf ("selector=0x%04x offs=0x%04x%04x", + gate.selector, gate.offset1, gate.offset0); + gdb_printf (" 16-bit Call Gate (params=%d)", + gate.param_count); break; case 5: - printf_filtered ("TSS selector=0x%04x", descr.base0); - printf_filtered ("%*sTask Gate", 16, ""); + gdb_printf ("TSS selector=0x%04x", descr.base0); + gdb_printf ("%*sTask Gate", 16, ""); break; case 6: case 7: memcpy (&gate, &descr, sizeof gate); - printf_filtered ("selector=0x%04x offs=0x%04x%04x", - gate.selector, gate.offset1, gate.offset0); - printf_filtered (" 16-bit %s Gate", - descr.stype == 6 ? "Interrupt" : "Trap"); + gdb_printf ("selector=0x%04x offs=0x%04x%04x", + gate.selector, gate.offset1, gate.offset0); + gdb_printf (" 16-bit %s Gate", + descr.stype == 6 ? "Interrupt" : "Trap"); break; case 9: case 11: - printf_filtered (" 32-bit TSS (task %sactive)", - descr.stype == 3 ? "" : "in"); + gdb_printf (" 32-bit TSS (task %sactive)", + descr.stype == 3 ? "" : "in"); break; case 12: memcpy (&gate, &descr, sizeof gate); - printf_filtered ("selector=0x%04x offs=0x%04x%04x", - gate.selector, gate.offset1, gate.offset0); - printf_filtered (" 32-bit Call Gate (params=%d)", - gate.param_count); + gdb_printf ("selector=0x%04x offs=0x%04x%04x", + gate.selector, gate.offset1, gate.offset0); + gdb_printf (" 32-bit Call Gate (params=%d)", + gate.param_count); break; case 14: case 15: memcpy (&gate, &descr, sizeof gate); - printf_filtered ("selector=0x%04x offs=0x%04x%04x", - gate.selector, gate.offset1, gate.offset0); - printf_filtered (" 32-bit %s Gate", - descr.stype == 14 ? "Interrupt" : "Trap"); + gdb_printf ("selector=0x%04x offs=0x%04x%04x", + gate.selector, gate.offset1, gate.offset0); + gdb_printf (" 32-bit %s Gate", + descr.stype == 14 ? "Interrupt" : "Trap"); break; case 16: /* data segments */ case 17: @@ -1629,12 +1629,12 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force) case 21: case 22: case 23: - printf_filtered (" %s-bit Data (%s Exp-%s%s)", - descr.bit32 ? "32" : "16", - descr.stype & 2 - ? "Read/Write," : "Read-Only, ", - descr.stype & 4 ? "down" : "up", - descr.stype & 1 ? "" : ", N.Acc"); + gdb_printf (" %s-bit Data (%s Exp-%s%s)", + descr.bit32 ? "32" : "16", + descr.stype & 2 + ? "Read/Write," : "Read-Only, ", + descr.stype & 4 ? "down" : "up", + descr.stype & 1 ? "" : ", N.Acc"); break; case 24: /* code segments */ case 25: @@ -1644,32 +1644,32 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force) case 29: case 30: case 31: - printf_filtered (" %s-bit Code (%s, %sConf%s)", - descr.bit32 ? "32" : "16", - descr.stype & 2 ? "Exec/Read" : "Exec-Only", - descr.stype & 4 ? "" : "N.", - descr.stype & 1 ? "" : ", N.Acc"); + gdb_printf (" %s-bit Code (%s, %sConf%s)", + descr.bit32 ? "32" : "16", + descr.stype & 2 ? "Exec/Read" : "Exec-Only", + descr.stype & 4 ? "" : "N.", + descr.stype & 1 ? "" : ", N.Acc"); break; default: - printf_filtered ("Unknown type 0x%02x", descr.stype); + gdb_printf ("Unknown type 0x%02x", descr.stype); break; } gdb_puts ("\n"); } else if (force) { - printf_filtered ("0x%03x: ", - type == 1 - ? idx : (idx * 8) | (type ? (cpl | 4) : 0)); + gdb_printf ("0x%03x: ", + type == 1 + ? idx : (idx * 8) | (type ? (cpl | 4) : 0)); if (!descr.present) gdb_puts ("Segment not present\n"); else - printf_filtered ("Segment type 0x%02x is invalid in this table\n", - descr.stype); + gdb_printf ("Segment type 0x%02x is invalid in this table\n", + descr.stype); } } else if (force) - printf_filtered ("0x%03x: Cannot read this descriptor\n", idx); + gdb_printf ("0x%03x: Cannot read this descriptor\n", idx); } static void @@ -1703,10 +1703,10 @@ go32_sldt (const char *arg, int from_tty) gdb_puts ("There is no LDT.\n"); /* LDT's entry in the GDT must have the type LDT, which is 2. */ else if (get_descriptor (gdtr.base, ldt_idx, &ldt_descr) != 2) - printf_filtered ("LDT is present (at %#x), but unreadable by GDB.\n", - ldt_descr.base0 - | (ldt_descr.base1 << 16) - | (ldt_descr.base2 << 24)); + gdb_printf ("LDT is present (at %#x), but unreadable by GDB.\n", + ldt_descr.base0 + | (ldt_descr.base1 << 16) + | (ldt_descr.base2 << 24)); else { unsigned base = @@ -1939,23 +1939,23 @@ display_ptable_entry (unsigned long entry, int is_dir, int force, unsigned off) { if ((entry & 1) != 0) { - printf_filtered ("Base=0x%05lx000", entry >> 12); + gdb_printf ("Base=0x%05lx000", entry >> 12); if ((entry & 0x100) && !is_dir) gdb_puts (" Global"); if ((entry & 0x40) && !is_dir) gdb_puts (" Dirty"); - printf_filtered (" %sAcc.", (entry & 0x20) ? "" : "Not-"); - printf_filtered (" %sCached", (entry & 0x10) ? "" : "Not-"); - printf_filtered (" Write-%s", (entry & 8) ? "Thru" : "Back"); - printf_filtered (" %s", (entry & 4) ? "Usr" : "Sup"); - printf_filtered (" Read-%s", (entry & 2) ? "Write" : "Only"); + gdb_printf (" %sAcc.", (entry & 0x20) ? "" : "Not-"); + gdb_printf (" %sCached", (entry & 0x10) ? "" : "Not-"); + gdb_printf (" Write-%s", (entry & 8) ? "Thru" : "Back"); + gdb_printf (" %s", (entry & 4) ? "Usr" : "Sup"); + gdb_printf (" Read-%s", (entry & 2) ? "Write" : "Only"); if (off) - printf_filtered (" +0x%x", off); + gdb_printf (" +0x%x", off); gdb_puts ("\n"); } else if (force) - printf_filtered ("Page%s not present or not supported; value=0x%lx.\n", - is_dir ? " Table" : "", entry >> 1); + gdb_printf ("Page%s not present or not supported; value=0x%lx.\n", + is_dir ? " Table" : "", entry >> 1); } static void @@ -1998,14 +1998,14 @@ display_page_table (long n, int force) { int i; - printf_filtered ("Page Table pointed to by " - "Page Directory entry 0x%lx:\n", n); + gdb_printf ("Page Table pointed to by " + "Page Directory entry 0x%lx:\n", n); for (i = 0; i < 1024; i++) display_ptable_entry (get_pte (pde, i), 0, 0, 0); gdb_puts ("\n"); } else if (force) - printf_filtered ("Page Table not present; value=0x%lx.\n", pde >> 1); + gdb_printf ("Page Table not present; value=0x%lx.\n", pde >> 1); } static void @@ -2059,8 +2059,8 @@ go32_pte_for_address (const char *arg, int from_tty) int pte_idx = (addr >> 12) & 0x3ff; unsigned offs = addr & 0xfff; - printf_filtered ("Page Table entry for address %s:\n", - hex_string(addr)); + gdb_printf ("Page Table entry for address %s:\n", + hex_string(addr)); display_ptable_entry (get_pte (get_pde (pde_idx), pte_idx), 0, 1, offs); } } diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index c040be5..c7be48f 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -273,7 +273,7 @@ gdbscm_source_script (const struct extension_language_defn *extlang, gdb::unique_xmalloc_ptr<char> msg = gdbscm_safe_source_script (filename); if (msg != NULL) - fprintf_filtered (gdb_stderr, "%s\n", msg.get ()); + gdb_printf (gdb_stderr, "%s\n", msg.get ()); } /* (execute string [#:from-tty boolean] [#:to-string boolean]) @@ -528,11 +528,11 @@ print_throw_error (SCM key, SCM args) static SCM handle_boot_error (void *boot_scm_file, SCM key, SCM args) { - fprintf_unfiltered (gdb_stderr, ("Exception caught while booting Guile.\n")); + gdb_printf (gdb_stderr, ("Exception caught while booting Guile.\n")); print_throw_error (key, args); - fprintf_unfiltered (gdb_stderr, "\n"); + gdb_printf (gdb_stderr, "\n"); warning (_("Could not complete Guile gdb module initialization from:\n" "%s.\n" "Limited Guile support is available.\n" diff --git a/gdb/guile/scm-auto-load.c b/gdb/guile/scm-auto-load.c index 8ced220..6aa0a5d 100644 --- a/gdb/guile/scm-auto-load.c +++ b/gdb/guile/scm-auto-load.c @@ -38,7 +38,7 @@ static void show_auto_load_guile_scripts (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Auto-loading of Guile scripts is %s.\n"), value); + gdb_printf (file, _("Auto-loading of Guile scripts is %s.\n"), value); } /* See guile-internal.h. */ diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c index bdd61ae..760d5aa 100644 --- a/gdb/guile/scm-objfile.c +++ b/gdb/guile/scm-objfile.c @@ -314,7 +314,7 @@ gdbscm_source_objfile_script (const struct extension_language_defn *extlang, gdb::unique_xmalloc_ptr<char> msg = gdbscm_safe_source_script (filename); if (msg != NULL) - fprintf_filtered (gdb_stderr, "%s", msg.get ()); + gdb_printf (gdb_stderr, "%s", msg.get ()); ofscm_current_objfile = NULL; } @@ -335,7 +335,7 @@ gdbscm_execute_objfile_script (const struct extension_language_defn *extlang, gdb::unique_xmalloc_ptr<char> msg = gdbscm_safe_eval_string (script, 0 /* display_result */); if (msg != NULL) - fprintf_filtered (gdb_stderr, "%s", msg.get ()); + gdb_printf (gdb_stderr, "%s", msg.get ()); ofscm_current_objfile = NULL; } diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c index 42727bb..54c8c27 100644 --- a/gdb/guile/scm-param.c +++ b/gdb/guile/scm-param.c @@ -320,7 +320,7 @@ pascm_set_func (const char *args, int from_tty, struct cmd_list_element *c) /* GDB is usually silent when a parameter is set. */ if (*msg.get () != '\0') - printf_filtered ("%s\n", msg.get ()); + gdb_printf ("%s\n", msg.get ()); } /* A callback function that is registered against the respective @@ -362,7 +362,7 @@ pascm_show_func (struct ui_file *file, int from_tty, error (_("Error converting show text to host string.")); } - fprintf_filtered (file, "%s\n", msg.get ()); + gdb_printf (file, "%s\n", msg.get ()); } /* A helper function that dispatches to the appropriate add_setshow diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c index 707ef4b..a99ab13 100644 --- a/gdb/guile/scm-pretty-print.c +++ b/gdb/guile/scm-pretty-print.c @@ -617,7 +617,7 @@ ppscm_print_exception_unless_memory_error (SCM exception, /* This "shouldn't happen", but play it safe. */ if (msg == NULL || msg.get ()[0] == '\0') - fprintf_filtered (stream, _("<error reading variable>")); + gdb_printf (stream, _("<error reading variable>")); else { /* Remove the trailing newline. We could instead call a special @@ -628,7 +628,7 @@ ppscm_print_exception_unless_memory_error (SCM exception, if (msg_text[len - 1] == '\n') msg_text[len - 1] = '\0'; - fprintf_filtered (stream, _("<error reading variable: %s>"), msg_text); + gdb_printf (stream, _("<error reading variable: %s>"), msg_text); } } else @@ -871,7 +871,7 @@ ppscm_print_children (SCM printer, enum display_hint hint, /* We print the index, not whatever the child method returned as the name. */ if (options->print_array_indexes) - fprintf_filtered (stream, "[%d] = ", i); + gdb_printf (stream, "[%d] = ", i); } else if (! is_map) { diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 1365ee3..c4d9824 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1007,17 +1007,17 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file, rval = get_frame_register_signed (frame, regno); - fprintf_filtered (file, "%-14s ", name); + gdb_printf (file, "%-14s ", name); if ((regno == E_PSEUDO_CCR_REGNUM (gdbarch)) || \ (regno == E_PSEUDO_EXR_REGNUM (gdbarch) && is_h8300smode (gdbarch))) { - fprintf_filtered (file, "0x%02x ", (unsigned char) rval); + gdb_printf (file, "0x%02x ", (unsigned char) rval); print_longest (file, 'u', 1, rval); } else { - fprintf_filtered (file, "0x%s ", phex ((ULONGEST) rval, - BINWORD (gdbarch))); + gdb_printf (file, "0x%s ", phex ((ULONGEST) rval, + BINWORD (gdbarch))); print_longest (file, 'd', 1, rval); } if (regno == E_PSEUDO_CCR_REGNUM (gdbarch)) @@ -1025,51 +1025,51 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file, /* CCR register */ int C, Z, N, V; unsigned char l = rval & 0xff; - fprintf_filtered (file, "\t"); - fprintf_filtered (file, "I-%d ", (l & 0x80) != 0); - fprintf_filtered (file, "UI-%d ", (l & 0x40) != 0); - fprintf_filtered (file, "H-%d ", (l & 0x20) != 0); - fprintf_filtered (file, "U-%d ", (l & 0x10) != 0); + gdb_printf (file, "\t"); + gdb_printf (file, "I-%d ", (l & 0x80) != 0); + gdb_printf (file, "UI-%d ", (l & 0x40) != 0); + gdb_printf (file, "H-%d ", (l & 0x20) != 0); + gdb_printf (file, "U-%d ", (l & 0x10) != 0); N = (l & 0x8) != 0; Z = (l & 0x4) != 0; V = (l & 0x2) != 0; C = (l & 0x1) != 0; - fprintf_filtered (file, "N-%d ", N); - fprintf_filtered (file, "Z-%d ", Z); - fprintf_filtered (file, "V-%d ", V); - fprintf_filtered (file, "C-%d ", C); + gdb_printf (file, "N-%d ", N); + gdb_printf (file, "Z-%d ", Z); + gdb_printf (file, "V-%d ", V); + gdb_printf (file, "C-%d ", C); if ((C | Z) == 0) - fprintf_filtered (file, "u> "); + gdb_printf (file, "u> "); if ((C | Z) == 1) - fprintf_filtered (file, "u<= "); + gdb_printf (file, "u<= "); if (C == 0) - fprintf_filtered (file, "u>= "); + gdb_printf (file, "u>= "); if (C == 1) - fprintf_filtered (file, "u< "); + gdb_printf (file, "u< "); if (Z == 0) - fprintf_filtered (file, "!= "); + gdb_printf (file, "!= "); if (Z == 1) - fprintf_filtered (file, "== "); + gdb_printf (file, "== "); if ((N ^ V) == 0) - fprintf_filtered (file, ">= "); + gdb_printf (file, ">= "); if ((N ^ V) == 1) - fprintf_filtered (file, "< "); + gdb_printf (file, "< "); if ((Z | (N ^ V)) == 0) - fprintf_filtered (file, "> "); + gdb_printf (file, "> "); if ((Z | (N ^ V)) == 1) - fprintf_filtered (file, "<= "); + gdb_printf (file, "<= "); } else if (regno == E_PSEUDO_EXR_REGNUM (gdbarch) && is_h8300smode (gdbarch)) { /* EXR register */ unsigned char l = rval & 0xff; - fprintf_filtered (file, "\t"); - fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0); - fprintf_filtered (file, "I2-%d ", (l & 4) != 0); - fprintf_filtered (file, "I1-%d ", (l & 2) != 0); - fprintf_filtered (file, "I0-%d", (l & 1) != 0); + gdb_printf (file, "\t"); + gdb_printf (file, "T-%d - - - ", (l & 0x80) != 0); + gdb_printf (file, "I2-%d ", (l & 4) != 0); + gdb_printf (file, "I1-%d ", (l & 2) != 0); + gdb_printf (file, "I0-%d", (l & 1) != 0); } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } static void diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 80cea7e..090d7d0 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -475,14 +475,14 @@ find_unwind_entry (CORE_ADDR pc) int first, middle, last; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "{ find_unwind_entry %s -> ", - hex_string (pc)); + gdb_printf (gdb_stdlog, "{ find_unwind_entry %s -> ", + hex_string (pc)); /* A function at address 0? Not in HP-UX! */ if (pc == (CORE_ADDR) 0) { if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "NULL }\n"); + gdb_printf (gdb_stdlog, "NULL }\n"); return NULL; } @@ -510,8 +510,8 @@ find_unwind_entry (CORE_ADDR pc) && pc <= ui->cache->region_end) { if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "%s (cached) }\n", - hex_string ((uintptr_t) ui->cache)); + gdb_printf (gdb_stdlog, "%s (cached) }\n", + hex_string ((uintptr_t) ui->cache)); return ui->cache; } @@ -528,8 +528,8 @@ find_unwind_entry (CORE_ADDR pc) { ui->cache = &ui->table[middle]; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "%s }\n", - hex_string ((uintptr_t) ui->cache)); + gdb_printf (gdb_stdlog, "%s }\n", + hex_string ((uintptr_t) ui->cache)); return &ui->table[middle]; } @@ -541,7 +541,7 @@ find_unwind_entry (CORE_ADDR pc) } if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "NULL (not found) }\n"); + gdb_printf (gdb_stdlog, "NULL (not found) }\n"); return NULL; } @@ -1868,14 +1868,14 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) int i; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "{ hppa_frame_cache (frame=%d) -> ", - frame_relative_level(this_frame)); + gdb_printf (gdb_stdlog, "{ hppa_frame_cache (frame=%d) -> ", + frame_relative_level(this_frame)); if ((*this_cache) != NULL) { if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "base=%s (cached) }", - paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base)); + gdb_printf (gdb_stdlog, "base=%s (cached) }", + paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base)); return (struct hppa_frame_cache *) (*this_cache); } cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache); @@ -1887,7 +1887,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) if (!u) { if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "base=NULL (no unwind entry) }"); + gdb_printf (gdb_stdlog, "base=NULL (no unwind entry) }"); return (struct hppa_frame_cache *) (*this_cache); } @@ -2108,11 +2108,11 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) CORE_ADDR fp; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (this_sp=%s, pc=%s, " - "prologue_end=%s) ", - paddress (gdbarch, this_sp), - paddress (gdbarch, get_frame_pc (this_frame)), - paddress (gdbarch, prologue_end)); + gdb_printf (gdb_stdlog, " (this_sp=%s, pc=%s, " + "prologue_end=%s) ", + paddress (gdbarch, this_sp), + paddress (gdbarch, get_frame_pc (this_frame)), + paddress (gdbarch, prologue_end)); /* Check to see if a frame pointer is available, and use it for frame unwinding if it is. @@ -2143,8 +2143,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base = fp; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (base=%s) [frame pointer]", - paddress (gdbarch, cache->base)); + gdb_printf (gdb_stdlog, " (base=%s) [frame pointer]", + paddress (gdbarch, cache->base)); } else if (u->Save_SP && cache->saved_regs[HPPA_SP_REGNUM].is_addr ()) @@ -2155,8 +2155,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base = read_memory_integer (this_sp, word_size, byte_order); if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (base=%s) [saved]", - paddress (gdbarch, cache->base)); + gdb_printf (gdb_stdlog, " (base=%s) [saved]", + paddress (gdbarch, cache->base)); } else { @@ -2164,8 +2164,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) the SP back. */ cache->base = this_sp - frame_size; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (base=%s) [unwind adjust]", - paddress (gdbarch, cache->base)); + gdb_printf (gdb_stdlog, " (base=%s) [unwind adjust]", + paddress (gdbarch, cache->base)); } cache->saved_regs[HPPA_SP_REGNUM].set_value (cache->base); @@ -2179,14 +2179,14 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) { cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM] = cache->saved_regs[31]; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (pc=r31) [stack] } "); + gdb_printf (gdb_stdlog, " (pc=r31) [stack] } "); } else { ULONGEST r31 = get_frame_register_unsigned (this_frame, 31); cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM].set_value (r31); if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (pc=r31) [frame] } "); + gdb_printf (gdb_stdlog, " (pc=r31) [frame] } "); } } else @@ -2196,7 +2196,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM] = cache->saved_regs[HPPA_RP_REGNUM]; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (pc=rp) [stack] } "); + gdb_printf (gdb_stdlog, " (pc=rp) [stack] } "); } else { @@ -2204,7 +2204,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) HPPA_RP_REGNUM); cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM].set_value (rp); if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " (pc=rp) [frame] } "); + gdb_printf (gdb_stdlog, " (pc=rp) [frame] } "); } } @@ -2248,8 +2248,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) } if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, "base=%s }", - paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base)); + gdb_printf (gdb_stdlog, "base=%s }", + paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base)); return (struct hppa_frame_cache *) (*this_cache); } @@ -2316,9 +2316,9 @@ hppa_fallback_frame_cache (struct frame_info *this_frame, void **this_cache) CORE_ADDR start_pc; if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, - "{ hppa_fallback_frame_cache (frame=%d) -> ", - frame_relative_level (this_frame)); + gdb_printf (gdb_stdlog, + "{ hppa_fallback_frame_cache (frame=%d) -> ", + frame_relative_level (this_frame)); cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache); (*this_cache) = cache; @@ -2354,8 +2354,8 @@ hppa_fallback_frame_cache (struct frame_info *this_frame, void **this_cache) } if (hppa_debug) - fprintf_unfiltered (gdb_stdlog, " frame_size=%d, found_rp=%d }\n", - frame_size, found_rp); + gdb_printf (gdb_stdlog, " frame_size=%d, found_rp=%d }\n", + frame_size, found_rp); cache->base = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM); cache->base -= frame_size; @@ -2559,19 +2559,19 @@ unwind_command (const char *exp, int from_tty) if (!u) { - printf_filtered ("Can't find unwind table entry for %s\n", exp); + gdb_printf ("Can't find unwind table entry for %s\n", exp); return; } - printf_filtered ("unwind_table_entry (%s):\n", host_address_to_string (u)); + gdb_printf ("unwind_table_entry (%s):\n", host_address_to_string (u)); - printf_filtered ("\tregion_start = %s\n", hex_string (u->region_start)); + gdb_printf ("\tregion_start = %s\n", hex_string (u->region_start)); - printf_filtered ("\tregion_end = %s\n", hex_string (u->region_end)); + gdb_printf ("\tregion_end = %s\n", hex_string (u->region_end)); -#define pif(FLD) if (u->FLD) printf_filtered (" "#FLD); +#define pif(FLD) if (u->FLD) gdb_printf (" "#FLD); - printf_filtered ("\n\tflags ="); + gdb_printf ("\n\tflags ="); pif (Cannot_unwind); pif (Millicode); pif (Millicode_save_sr0); @@ -2598,7 +2598,7 @@ unwind_command (const char *exp, int from_tty) gdb_putc ('\n'); -#define pin(FLD) printf_filtered ("\t"#FLD" = 0x%x\n", u->FLD); +#define pin(FLD) gdb_printf ("\t"#FLD" = 0x%x\n", u->FLD); pin (Region_description); pin (Entry_FR); @@ -2607,26 +2607,26 @@ unwind_command (const char *exp, int from_tty) if (u->stub_unwind.stub_type) { - printf_filtered ("\tstub type = "); + gdb_printf ("\tstub type = "); switch (u->stub_unwind.stub_type) { case LONG_BRANCH: - printf_filtered ("long branch\n"); + gdb_printf ("long branch\n"); break; case PARAMETER_RELOCATION: - printf_filtered ("parameter relocation\n"); + gdb_printf ("parameter relocation\n"); break; case EXPORT: - printf_filtered ("export\n"); + gdb_printf ("export\n"); break; case IMPORT: - printf_filtered ("import\n"); + gdb_printf ("import\n"); break; case IMPORT_SHLIB: - printf_filtered ("import shlib\n"); + gdb_printf ("import shlib\n"); break; default: - printf_filtered ("unknown (%d)\n", u->stub_unwind.stub_type); + gdb_printf ("unknown (%d)\n", u->stub_unwind.stub_type); } } } @@ -3149,9 +3149,9 @@ hppa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) { hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch); - fprintf_filtered (file, "bytes_per_address = %d\n", - tdep->bytes_per_address); - fprintf_filtered (file, "elf = %s\n", tdep->is_elf ? "yes" : "no"); + gdb_printf (file, "bytes_per_address = %d\n", + tdep->bytes_per_address); + gdb_printf (file, "elf = %s\n", tdep->is_elf ? "yes" : "no"); } void _initialize_hppa_tdep (); diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 4819179..1f1aaa7 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -466,10 +466,10 @@ i386_linux_intx80_sysenter_syscall_record (struct regcache *regcache) if (syscall_gdb < 0) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %s\n"), - plongest (syscall_native)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %s\n"), + plongest (syscall_native)); return -1; } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index b98f475..394bb08 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -5091,9 +5091,9 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, ir.gdbarch = gdbarch; if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, "Process record: i386_process_record " - "addr = %s\n", - paddress (gdbarch, ir.addr)); + gdb_printf (gdb_stdlog, "Process record: i386_process_record " + "addr = %s\n", + paddress (gdbarch, ir.addr)); /* prefixes */ while (1) @@ -6864,9 +6864,9 @@ Do you want to stop the program?"), /* XXX */ case 0xcc: /* int3 */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support instruction " - "int3.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support instruction " + "int3.\n")); ir.addr -= 1; goto no_support; break; @@ -6882,10 +6882,10 @@ Do you want to stop the program?"), if (interrupt != 0x80 || tdep->i386_intx80_record == NULL) { - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction int 0x%02x.\n"), - interrupt); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction int 0x%02x.\n"), + interrupt); ir.addr -= 2; goto no_support; } @@ -6897,9 +6897,9 @@ Do you want to stop the program?"), /* XXX */ case 0xce: /* into */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction into.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction into.\n")); ir.addr -= 1; goto no_support; break; @@ -6909,9 +6909,9 @@ Do you want to stop the program?"), break; case 0x62: /* bound */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction bound.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction bound.\n")); ir.addr -= 1; goto no_support; break; @@ -6946,17 +6946,17 @@ Do you want to stop the program?"), break; case 0x0f30: /* wrmsr */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction wrmsr.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction wrmsr.\n")); ir.addr -= 2; goto no_support; break; case 0x0f32: /* rdmsr */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction rdmsr.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction rdmsr.\n")); ir.addr -= 2; goto no_support; break; @@ -6976,9 +6976,9 @@ Do you want to stop the program?"), } if (tdep->i386_sysenter_record == NULL) { - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction sysenter.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction sysenter.\n")); ir.addr -= 2; goto no_support; } @@ -6989,9 +6989,9 @@ Do you want to stop the program?"), break; case 0x0f35: /* sysexit */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction sysexit.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction sysexit.\n")); ir.addr -= 2; goto no_support; break; @@ -7001,9 +7001,9 @@ Do you want to stop the program?"), int ret; if (tdep->i386_syscall_record == NULL) { - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction syscall.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction syscall.\n")); ir.addr -= 2; goto no_support; } @@ -7014,9 +7014,9 @@ Do you want to stop the program?"), break; case 0x0f07: /* sysret */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction sysret.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction sysret.\n")); ir.addr -= 2; goto no_support; break; @@ -7029,9 +7029,9 @@ Do you want to stop the program?"), break; case 0xf4: /* hlt */ - fprintf_unfiltered (gdb_stderr, - _("Process record does not support " - "instruction hlt.\n")); + gdb_printf (gdb_stderr, + _("Process record does not support " + "instruction hlt.\n")); ir.addr -= 1; goto no_support; break; @@ -8149,11 +8149,11 @@ reswitch_prefix_add: return 0; no_support: - fprintf_unfiltered (gdb_stderr, - _("Process record does not support instruction 0x%02x " - "at address %s.\n"), - (unsigned int) (opcode), - paddress (gdbarch, ir.orig_addr)); + gdb_printf (gdb_stderr, + _("Process record does not support instruction 0x%02x " + "at address %s.\n"), + (unsigned int) (opcode), + paddress (gdbarch, ir.orig_addr)); return -1; } @@ -8992,14 +8992,14 @@ i386_mpx_info_bounds (const char *args, int from_tty) if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386 || !i386_mpx_enabled ()) { - printf_filtered (_("Intel Memory Protection Extensions not " - "supported on this target.\n")); + gdb_printf (_("Intel Memory Protection Extensions not " + "supported on this target.\n")); return; } if (args == NULL) { - printf_filtered (_("Address of pointer variable expected.\n")); + gdb_printf (_("Address of pointer variable expected.\n")); return; } diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 57f23c0..f056ea5 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -42,7 +42,7 @@ print_i387_value (struct gdbarch *gdbarch, point, 19 for the digits and 6 for the exponent adds up to 27. */ const struct type *type = i387_ext_type (gdbarch); std::string str = target_float_to_string (raw, type, " %-+27.19g"); - fprintf_filtered (file, "%s", str.c_str ()); + gdb_printf (file, "%s", str.c_str ()); } /* Print the classification for the register contents RAW. */ @@ -67,7 +67,7 @@ print_i387_ext (struct gdbarch *gdbarch, { if (fraction[0] == 0x00000000 && fraction[1] == 0x00000000) /* Infinity. */ - fprintf_filtered (file, " %cInf", (sign ? '-' : '+')); + gdb_printf (file, " %cInf", (sign ? '-' : '+')); else if (sign && fraction[0] == 0x00000000 && fraction[1] == 0x40000000) /* Real Indefinite (QNaN). */ gdb_puts (" Real Indefinite (QNaN)", file); @@ -105,35 +105,35 @@ static void print_i387_status_word (int status_p, unsigned int status, struct ui_file *file) { - fprintf_filtered (file, "Status Word: "); + gdb_printf (file, "Status Word: "); if (!status_p) { - fprintf_filtered (file, "%s\n", _("<unavailable>")); + gdb_printf (file, "%s\n", _("<unavailable>")); return; } - fprintf_filtered (file, "%s", hex_string_custom (status, 4)); + gdb_printf (file, "%s", hex_string_custom (status, 4)); gdb_puts (" ", file); - fprintf_filtered (file, " %s", (status & 0x0001) ? "IE" : " "); - fprintf_filtered (file, " %s", (status & 0x0002) ? "DE" : " "); - fprintf_filtered (file, " %s", (status & 0x0004) ? "ZE" : " "); - fprintf_filtered (file, " %s", (status & 0x0008) ? "OE" : " "); - fprintf_filtered (file, " %s", (status & 0x0010) ? "UE" : " "); - fprintf_filtered (file, " %s", (status & 0x0020) ? "PE" : " "); + gdb_printf (file, " %s", (status & 0x0001) ? "IE" : " "); + gdb_printf (file, " %s", (status & 0x0002) ? "DE" : " "); + gdb_printf (file, " %s", (status & 0x0004) ? "ZE" : " "); + gdb_printf (file, " %s", (status & 0x0008) ? "OE" : " "); + gdb_printf (file, " %s", (status & 0x0010) ? "UE" : " "); + gdb_printf (file, " %s", (status & 0x0020) ? "PE" : " "); gdb_puts (" ", file); - fprintf_filtered (file, " %s", (status & 0x0080) ? "ES" : " "); + gdb_printf (file, " %s", (status & 0x0080) ? "ES" : " "); gdb_puts (" ", file); - fprintf_filtered (file, " %s", (status & 0x0040) ? "SF" : " "); + gdb_printf (file, " %s", (status & 0x0040) ? "SF" : " "); gdb_puts (" ", file); - fprintf_filtered (file, " %s", (status & 0x0100) ? "C0" : " "); - fprintf_filtered (file, " %s", (status & 0x0200) ? "C1" : " "); - fprintf_filtered (file, " %s", (status & 0x0400) ? "C2" : " "); - fprintf_filtered (file, " %s", (status & 0x4000) ? "C3" : " "); + gdb_printf (file, " %s", (status & 0x0100) ? "C0" : " "); + gdb_printf (file, " %s", (status & 0x0200) ? "C1" : " "); + gdb_printf (file, " %s", (status & 0x0400) ? "C2" : " "); + gdb_printf (file, " %s", (status & 0x4000) ? "C3" : " "); gdb_puts ("\n", file); - fprintf_filtered (file, - " TOP: %d\n", ((status >> 11) & 7)); + gdb_printf (file, + " TOP: %d\n", ((status >> 11) & 7)); } /* Print the control word CONTROL. If CONTROL_P is false, then @@ -143,21 +143,21 @@ static void print_i387_control_word (int control_p, unsigned int control, struct ui_file *file) { - fprintf_filtered (file, "Control Word: "); + gdb_printf (file, "Control Word: "); if (!control_p) { - fprintf_filtered (file, "%s\n", _("<unavailable>")); + gdb_printf (file, "%s\n", _("<unavailable>")); return; } - fprintf_filtered (file, "%s", hex_string_custom (control, 4)); + gdb_printf (file, "%s", hex_string_custom (control, 4)); gdb_puts (" ", file); - fprintf_filtered (file, " %s", (control & 0x0001) ? "IM" : " "); - fprintf_filtered (file, " %s", (control & 0x0002) ? "DM" : " "); - fprintf_filtered (file, " %s", (control & 0x0004) ? "ZM" : " "); - fprintf_filtered (file, " %s", (control & 0x0008) ? "OM" : " "); - fprintf_filtered (file, " %s", (control & 0x0010) ? "UM" : " "); - fprintf_filtered (file, " %s", (control & 0x0020) ? "PM" : " "); + gdb_printf (file, " %s", (control & 0x0001) ? "IM" : " "); + gdb_printf (file, " %s", (control & 0x0002) ? "DM" : " "); + gdb_printf (file, " %s", (control & 0x0004) ? "ZM" : " "); + gdb_printf (file, " %s", (control & 0x0008) ? "OM" : " "); + gdb_printf (file, " %s", (control & 0x0010) ? "UM" : " "); + gdb_printf (file, " %s", (control & 0x0020) ? "PM" : " "); gdb_puts ("\n", file); @@ -254,7 +254,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, int i; int tag = -1; - fprintf_filtered (file, "%sR%d: ", fpreg == top ? "=>" : " ", fpreg); + gdb_printf (file, "%sR%d: ", fpreg == top ? "=>" : " ", fpreg); if (ftag_p) { @@ -288,13 +288,13 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, gdb_puts ("0x", file); for (i = 9; i >= 0; i--) - fprintf_filtered (file, "%02x", raw[i]); + gdb_printf (file, "%02x", raw[i]); if (tag != -1 && tag != 3) print_i387_ext (gdbarch, raw, file); } else - fprintf_filtered (file, "%s", _("<unavailable>")); + gdb_printf (file, "%s", _("<unavailable>")); gdb_puts ("\n", file); } @@ -303,20 +303,20 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, gdb_puts ("\n", file); print_i387_status_word (fstat_p, fstat, file); print_i387_control_word (fctrl_p, fctrl, file); - fprintf_filtered (file, "Tag Word: %s\n", - ftag_p ? hex_string_custom (ftag, 4) : _("<unavailable>")); - fprintf_filtered (file, "Instruction Pointer: %s:", - fiseg_p ? hex_string_custom (fiseg, 2) : _("<unavailable>")); - fprintf_filtered (file, "%s\n", - fioff_p ? hex_string_custom (fioff, 8) : _("<unavailable>")); - fprintf_filtered (file, "Operand Pointer: %s:", - foseg_p ? hex_string_custom (foseg, 2) : _("<unavailable>")); - fprintf_filtered (file, "%s\n", - fooff_p ? hex_string_custom (fooff, 8) : _("<unavailable>")); - fprintf_filtered (file, "Opcode: %s\n", - fop_p - ? (hex_string_custom (fop ? (fop | 0xd800) : 0, 4)) - : _("<unavailable>")); + gdb_printf (file, "Tag Word: %s\n", + ftag_p ? hex_string_custom (ftag, 4) : _("<unavailable>")); + gdb_printf (file, "Instruction Pointer: %s:", + fiseg_p ? hex_string_custom (fiseg, 2) : _("<unavailable>")); + gdb_printf (file, "%s\n", + fioff_p ? hex_string_custom (fioff, 8) : _("<unavailable>")); + gdb_printf (file, "Operand Pointer: %s:", + foseg_p ? hex_string_custom (foseg, 2) : _("<unavailable>")); + gdb_printf (file, "%s\n", + fooff_p ? hex_string_custom (fooff, 8) : _("<unavailable>")); + gdb_printf (file, "Opcode: %s\n", + fop_p + ? (hex_string_custom (fop ? (fop | 0xd800) : 0, 4)) + : _("<unavailable>")); } diff --git a/gdb/ia64-libunwind-tdep.c b/gdb/ia64-libunwind-tdep.c index 6d15710..a2a236a 100644 --- a/gdb/ia64-libunwind-tdep.c +++ b/gdb/ia64-libunwind-tdep.c @@ -512,11 +512,11 @@ libunwind_load (void) } if (handle == NULL) { - fprintf_unfiltered (gdb_stderr, _("[GDB failed to load %s: %s]\n"), - LIBUNWIND_SO, so_error); + gdb_printf (gdb_stderr, _("[GDB failed to load %s: %s]\n"), + LIBUNWIND_SO, so_error); #ifdef LIBUNWIND_SO_7 - fprintf_unfiltered (gdb_stderr, _("[GDB failed to load %s: %s]\n"), - LIBUNWIND_SO_7, dlerror ()); + gdb_printf (gdb_stderr, _("[GDB failed to load %s: %s]\n"), + LIBUNWIND_SO_7, dlerror ()); #endif /* LIBUNWIND_SO_7 */ } xfree (so_error); diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 0d01902..c2d1a47 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -1895,13 +1895,13 @@ ia64_frame_this_id (struct frame_info *this_frame, void **this_cache, if (cache->base != 0) (*this_id) = frame_id_build_special (cache->base, cache->pc, cache->bsp); if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "regular frame id: code %s, stack %s, " - "special %s, this_frame %s\n", - paddress (gdbarch, this_id->code_addr), - paddress (gdbarch, this_id->stack_addr), - paddress (gdbarch, cache->bsp), - host_address_to_string (this_frame)); + gdb_printf (gdb_stdlog, + "regular frame id: code %s, stack %s, " + "special %s, this_frame %s\n", + paddress (gdbarch, this_id->code_addr), + paddress (gdbarch, this_id->stack_addr), + paddress (gdbarch, cache->bsp), + host_address_to_string (this_frame)); } static struct value * @@ -2269,13 +2269,13 @@ ia64_sigtramp_frame_this_id (struct frame_info *this_frame, get_frame_pc (this_frame), cache->bsp); if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "sigtramp frame id: code %s, stack %s, " - "special %s, this_frame %s\n", - paddress (gdbarch, this_id->code_addr), - paddress (gdbarch, this_id->stack_addr), - paddress (gdbarch, cache->bsp), - host_address_to_string (this_frame)); + gdb_printf (gdb_stdlog, + "sigtramp frame id: code %s, stack %s, " + "special %s, this_frame %s\n", + paddress (gdbarch, this_id->code_addr), + paddress (gdbarch, this_id->stack_addr), + paddress (gdbarch, cache->bsp), + host_address_to_string (this_frame)); } static struct value * @@ -2524,11 +2524,11 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val, } if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - " access_reg: from cache: %4s=%s\n", - (((unsigned) regnum <= IA64_NAT127_REGNUM) - ? ia64_register_names[regnum] : "r??"), - paddress (gdbarch, *val)); + gdb_printf (gdb_stdlog, + " access_reg: from cache: %4s=%s\n", + (((unsigned) regnum <= IA64_NAT127_REGNUM) + ? ia64_register_names[regnum] : "r??"), + paddress (gdbarch, *val)); return 0; } @@ -2595,11 +2595,11 @@ ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, } if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - " access_rse_reg: from cache: %4s=%s\n", - (((unsigned) regnum <= IA64_NAT127_REGNUM) - ? ia64_register_names[regnum] : "r??"), - paddress (gdbarch, *val)); + gdb_printf (gdb_stdlog, + " access_rse_reg: from cache: %4s=%s\n", + (((unsigned) regnum <= IA64_NAT127_REGNUM) + ? ia64_register_names[regnum] : "r??"), + paddress (gdbarch, *val)); return 0; } @@ -2693,12 +2693,12 @@ get_kernel_table (unw_word_t ip, unw_dyn_info_t *di) di->u.ti.table_data = (unw_word_t *) ktab; if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, "get_kernel_table: found table `%s': " - "segbase=%s, length=%s, gp=%s\n", - (char *) di->u.ti.name_ptr, - hex_string (di->u.ti.segbase), - pulongest (di->u.ti.table_len), - hex_string (di->gp)); + gdb_printf (gdb_stdlog, "get_kernel_table: found table `%s': " + "segbase=%s, length=%s, gp=%s\n", + (char *) di->u.ti.name_ptr, + hex_string (di->u.ti.segbase), + pulongest (di->u.ti.table_len), + hex_string (di->gp)); return 0; } @@ -2799,15 +2799,15 @@ ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, return -UNW_ENOINFO; if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, "ia64_find_proc_info_x: %s -> " - "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," - "length=%s,data=%s)\n", - hex_string (ip), (char *)di.u.ti.name_ptr, - hex_string (di.u.ti.segbase), - hex_string (di.start_ip), hex_string (di.end_ip), - hex_string (di.gp), - pulongest (di.u.ti.table_len), - hex_string ((CORE_ADDR)di.u.ti.table_data)); + gdb_printf (gdb_stdlog, "ia64_find_proc_info_x: %s -> " + "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," + "length=%s,data=%s)\n", + hex_string (ip), (char *)di.u.ti.name_ptr, + hex_string (di.u.ti.segbase), + hex_string (di.start_ip), hex_string (di.end_ip), + hex_string (di.gp), + pulongest (di.u.ti.table_len), + hex_string ((CORE_ADDR)di.u.ti.table_data)); } else { @@ -2816,15 +2816,15 @@ ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, return ret; if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, "ia64_find_proc_info_x: %s -> " - "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," - "length=%s,data=%s)\n", - hex_string (ip), (char *)di.u.rti.name_ptr, - hex_string (di.u.rti.segbase), - hex_string (di.start_ip), hex_string (di.end_ip), - hex_string (di.gp), - pulongest (di.u.rti.table_len), - hex_string (di.u.rti.table_data)); + gdb_printf (gdb_stdlog, "ia64_find_proc_info_x: %s -> " + "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," + "length=%s,data=%s)\n", + hex_string (ip), (char *)di.u.rti.name_ptr, + hex_string (di.u.rti.segbase), + hex_string (di.start_ip), hex_string (di.end_ip), + hex_string (di.gp), + pulongest (di.u.rti.table_len), + hex_string (di.u.rti.table_data)); } ret = libunwind_search_unwind_table (&as, ip, &di, pi, need_unwind_info, @@ -2874,11 +2874,11 @@ ia64_get_dyn_info_list (unw_addr_space_t as, if (addr) { if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "dynamic unwind table in objfile %s " - "at %s (gp=%s)\n", - bfd_get_filename (objfile->obfd), - hex_string (addr), hex_string (di.gp)); + gdb_printf (gdb_stdlog, + "dynamic unwind table in objfile %s " + "at %s (gp=%s)\n", + bfd_get_filename (objfile->obfd), + hex_string (addr), hex_string (di.gp)); *dilap = addr; return 0; } @@ -2915,13 +2915,13 @@ ia64_libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache, (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp); if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "libunwind frame id: code %s, stack %s, " - "special %s, this_frame %s\n", - paddress (gdbarch, id.code_addr), - paddress (gdbarch, id.stack_addr), - paddress (gdbarch, bsp), - host_address_to_string (this_frame)); + gdb_printf (gdb_stdlog, + "libunwind frame id: code %s, stack %s, " + "special %s, this_frame %s\n", + paddress (gdbarch, id.code_addr), + paddress (gdbarch, id.stack_addr), + paddress (gdbarch, bsp), + host_address_to_string (this_frame)); } static struct value * @@ -3047,13 +3047,13 @@ ia64_libunwind_sigtramp_frame_this_id (struct frame_info *this_frame, (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp); if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "libunwind sigtramp frame id: code %s, " - "stack %s, special %s, this_frame %s\n", - paddress (gdbarch, id.code_addr), - paddress (gdbarch, id.stack_addr), - paddress (gdbarch, bsp), - host_address_to_string (this_frame)); + gdb_printf (gdb_stdlog, + "libunwind sigtramp frame id: code %s, " + "stack %s, special %s, this_frame %s\n", + paddress (gdbarch, id.code_addr), + paddress (gdbarch, id.stack_addr), + paddress (gdbarch, bsp), + host_address_to_string (this_frame)); } static struct value * @@ -3876,10 +3876,10 @@ ia64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) bsp = extract_unsigned_integer (buf, 8, byte_order); if (gdbarch_debug >= 1) - fprintf_unfiltered (gdb_stdlog, - "dummy frame id: code %s, stack %s, special %s\n", - paddress (gdbarch, get_frame_pc (this_frame)), - paddress (gdbarch, sp), paddress (gdbarch, bsp)); + gdb_printf (gdb_stdlog, + "dummy frame id: code %s, stack %s, special %s\n", + paddress (gdbarch, get_frame_pc (this_frame)), + paddress (gdbarch, sp), paddress (gdbarch, bsp)); return frame_id_build_special (sp, get_frame_pc (this_frame), bsp); } diff --git a/gdb/inf-child.c b/gdb/inf-child.c index fe91d1f..cc00867 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -161,7 +161,7 @@ inf_child_open_target (const char *arg, int from_tty) current_inferior ()->push_target (target); inf_child_explicitly_opened = 1; if (from_tty) - printf_filtered ("Done. Use the \"run\" command to start a process.\n"); + gdb_printf ("Done. Use the \"run\" command to start a process.\n"); } /* Implement the to_disconnect target_ops method. */ diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c index 2002c4b..41ca17a 100644 --- a/gdb/inf-loop.c +++ b/gdb/inf-loop.c @@ -85,7 +85,7 @@ inferior_event_handler (enum inferior_event_type event_type) break; default: - fprintf_unfiltered (gdb_stderr, _("Event type not recognized.\n")); + gdb_printf (gdb_stderr, _("Event type not recognized.\n")); break; } } diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index ea1fe45..b976797 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -333,9 +333,9 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, return minus_one_ptid; } - fprintf_unfiltered (gdb_stderr, - _("Child process unexpectedly missing: %s.\n"), - safe_strerror (save_errno)); + gdb_printf (gdb_stderr, + _("Child process unexpectedly missing: %s.\n"), + safe_strerror (save_errno)); ourstatus->set_ignore (); return minus_one_ptid; @@ -520,9 +520,9 @@ inf_ptrace_target::files_info () { struct inferior *inf = current_inferior (); - printf_filtered (_("\tUsing the running image of %s %s.\n"), - inf->attach_flag ? "attached" : "child", - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("\tUsing the running image of %s %s.\n"), + inf->attach_flag ? "attached" : "child", + target_pid_to_str (inferior_ptid).c_str ()); } std::string diff --git a/gdb/infcall.c b/gdb/infcall.c index f8c812c..5365f97 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -62,9 +62,9 @@ show_may_call_functions_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Permission to call functions in the program is %s.\n"), - value); + gdb_printf (file, + _("Permission to call functions in the program is %s.\n"), + value); } /* How you should pass arguments to a function depends on whether it @@ -92,10 +92,10 @@ static void show_coerce_float_to_double_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Coercion of floats to doubles " - "when calling functions is %s.\n"), - value); + gdb_printf (file, + _("Coercion of floats to doubles " + "when calling functions is %s.\n"), + value); } /* This boolean tells what gdb should do if a signal is received while @@ -110,10 +110,10 @@ static void show_unwind_on_signal_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Unwinding of stack if a signal is " - "received while in a call dummy is %s.\n"), - value); + gdb_printf (file, + _("Unwinding of stack if a signal is " + "received while in a call dummy is %s.\n"), + value); } /* This boolean tells what gdb should do if a std::terminate call is @@ -136,10 +136,10 @@ show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty, const char *value) { - fprintf_filtered (file, - _("Unwind stack if a C++ exception is " - "unhandled while in a call dummy is %s.\n"), - value); + gdb_printf (file, + _("Unwind stack if a C++ exception is " + "unhandled while in a call dummy is %s.\n"), + value); } /* Perform the standard coercions that are specified diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 1581d64..fbae4e1 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -117,9 +117,9 @@ show_inferior_tty_command (struct ui_file *file, int from_tty, directly. */ const std::string &inferior_tty = current_inferior ()->tty (); - fprintf_filtered (file, - _("Terminal for future runs of program being debugged " - "is \"%s\".\n"), inferior_tty.c_str ()); + gdb_printf (file, + _("Terminal for future runs of program being debugged " + "is \"%s\".\n"), inferior_tty.c_str ()); } void @@ -177,16 +177,16 @@ show_cwd_command (struct ui_file *file, int from_tty, const std::string &cwd = current_inferior ()->cwd (); if (cwd.empty ()) - fprintf_filtered (file, - _("\ + gdb_printf (file, + _("\ You have not set the inferior's current working directory.\n\ The inferior will inherit GDB's cwd if native debugging, or the remote\n\ server's cwd if remote debugging.\n")); else - fprintf_filtered (file, - _("Current working directory that will be used " - "when starting the inferior is \"%s\".\n"), - cwd.c_str ()); + gdb_printf (file, + _("Current working directory that will be used " + "when starting the inferior is \"%s\".\n"), + cwd.c_str ()); } @@ -701,13 +701,13 @@ continue_command (const char *args, int from_tty) /* set_ignore_count prints a message ending with a period. So print two spaces before "Continuing.". */ if (from_tty) - printf_filtered (" "); + gdb_printf (" "); stopped = 1; } if (!stopped && from_tty) { - printf_filtered + gdb_printf ("Not stopped at any breakpoint; argument ignored.\n"); } } @@ -724,7 +724,7 @@ continue_command (const char *args, int from_tty) prepare_execution_command (current_inferior ()->top_target (), async_exec); if (from_tty) - printf_filtered (_("Continuing.\n")); + gdb_printf (_("Continuing.\n")); continue_1 (all_threads_p); } @@ -1003,9 +1003,9 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm) error (_("Cannot find bounds of current function")); target_terminal::ours_for_output (); - printf_filtered (_("Single stepping until exit from function %s," - "\nwhich has no line number information.\n"), - name); + gdb_printf (_("Single stepping until exit from function %s," + "\nwhich has no line number information.\n"), + name); } } else @@ -1103,9 +1103,9 @@ jump_command (const char *arg, int from_tty) if (from_tty) { - printf_filtered (_("Continuing at ")); + gdb_printf (_("Continuing at ")); gdb_puts (paddress (gdbarch, addr)); - printf_filtered (".\n"); + gdb_printf (".\n"); } clear_proceed_status (0); @@ -1179,11 +1179,11 @@ signal_command (const char *signum_exp, int from_tty) && signal_pass_state (tp->stop_signal ())) { if (!must_confirm) - printf_filtered (_("Note:\n")); - printf_filtered (_(" Thread %s previously stopped with signal %s, %s.\n"), - print_thread_id (tp), - gdb_signal_to_name (tp->stop_signal ()), - gdb_signal_to_string (tp->stop_signal ())); + gdb_printf (_("Note:\n")); + gdb_printf (_(" Thread %s previously stopped with signal %s, %s.\n"), + print_thread_id (tp), + gdb_signal_to_name (tp->stop_signal ()), + gdb_signal_to_string (tp->stop_signal ())); must_confirm = 1; } } @@ -1199,10 +1199,10 @@ signal_command (const char *signum_exp, int from_tty) if (from_tty) { if (oursig == GDB_SIGNAL_0) - printf_filtered (_("Continuing with no signal.\n")); + gdb_printf (_("Continuing with no signal.\n")); else - printf_filtered (_("Continuing with signal %s.\n"), - gdb_signal_to_name (oursig)); + gdb_printf (_("Continuing with signal %s.\n"), + gdb_signal_to_name (oursig)); } clear_proceed_status (0); @@ -1831,7 +1831,7 @@ finish_command (const char *arg, int from_tty) source. */ if (from_tty) { - printf_filtered (_("Run till exit from ")); + gdb_printf (_("Run till exit from ")); print_stack_frame (get_selected_frame (NULL), 1, LOCATION, 0); } @@ -1848,7 +1848,7 @@ finish_command (const char *arg, int from_tty) if (from_tty) { if (execution_direction == EXEC_REVERSE) - printf_filtered (_("Run back to call of ")); + gdb_printf (_("Run back to call of ")); else { if (sm->function != NULL && TYPE_NO_RETURN (sm->function->type ()) @@ -1856,7 +1856,7 @@ finish_command (const char *arg, int from_tty) "Try to finish anyway? "), sm->function->print_name ())) error (_("Not confirmed.")); - printf_filtered (_("Run till exit from ")); + gdb_printf (_("Run till exit from ")); } print_stack_frame (get_selected_frame (NULL), 1, LOCATION, 0); @@ -1886,7 +1886,7 @@ info_program_command (const char *args, int from_tty) if (!target_has_execution ()) { - printf_filtered (_("The program being debugged is not being run.\n")); + gdb_printf (_("The program being debugged is not being run.\n")); return; } @@ -1912,10 +1912,10 @@ info_program_command (const char *args, int from_tty) stat = bpstat_num (&bs, &num); target_files_info (); - printf_filtered (_("Program stopped at %s.\n"), - paddress (target_gdbarch (), tp->stop_pc ())); + gdb_printf (_("Program stopped at %s.\n"), + paddress (target_gdbarch (), tp->stop_pc ())); if (tp->control.stop_step) - printf_filtered (_("It stopped after being stepped.\n")); + gdb_printf (_("It stopped after being stepped.\n")); else if (stat != 0) { /* There may be several breakpoints in the same place, so this @@ -1924,25 +1924,25 @@ info_program_command (const char *args, int from_tty) { if (stat < 0) { - printf_filtered (_("It stopped at a breakpoint " - "that has since been deleted.\n")); + gdb_printf (_("It stopped at a breakpoint " + "that has since been deleted.\n")); } else - printf_filtered (_("It stopped at breakpoint %d.\n"), num); + gdb_printf (_("It stopped at breakpoint %d.\n"), num); stat = bpstat_num (&bs, &num); } } else if (tp->stop_signal () != GDB_SIGNAL_0) { - printf_filtered (_("It stopped with signal %s, %s.\n"), - gdb_signal_to_name (tp->stop_signal ()), - gdb_signal_to_string (tp->stop_signal ())); + gdb_printf (_("It stopped with signal %s, %s.\n"), + gdb_signal_to_name (tp->stop_signal ()), + gdb_signal_to_string (tp->stop_signal ())); } if (from_tty) { - printf_filtered (_("Type \"info stack\" or \"info " - "registers\" for more information.\n")); + gdb_printf (_("Type \"info stack\" or \"info " + "registers\" for more information.\n")); } } @@ -2032,9 +2032,9 @@ set_environment_command (const char *arg, int from_tty) std::string var (arg, p - arg); if (nullset) { - printf_filtered (_("Setting environment variable " - "\"%s\" to null value.\n"), - var.c_str ()); + gdb_printf (_("Setting environment variable " + "\"%s\" to null value.\n"), + var.c_str ()); current_inferior ()->environment.set (var.c_str (), ""); } else @@ -2165,7 +2165,7 @@ default_print_one_register_info (struct ui_file *file, } gdb_puts (format_stream.c_str (), file); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } /* Print out the machine register regnum. If regnum is -1, print all @@ -2363,7 +2363,7 @@ print_vector_info (struct ui_file *file, } } if (!printed_something) - fprintf_filtered (file, "No vector information\n"); + gdb_printf (file, "No vector information\n"); } } @@ -2400,8 +2400,8 @@ kill_command (const char *arg, int from_tty) bfd_cache_close_all (); if (print_inferior_events) - printf_filtered (_("[Inferior %d (%s) killed]\n"), - infnum, pid_str.c_str ()); + gdb_printf (_("[Inferior %d (%s) killed]\n"), + infnum, pid_str.c_str ()); } /* Used in `attach&' command. Proceed threads of inferior INF iff @@ -2902,8 +2902,8 @@ default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, } } if (!printed_something) - fprintf_filtered (file, "No floating-point info " - "available for this processor.\n"); + gdb_printf (file, "No floating-point info " + "available for this processor.\n"); } static void @@ -3013,9 +3013,9 @@ show_print_finish (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Printing of return value after `finish' is %s.\n"), - value); + value); } diff --git a/gdb/inferior.c b/gdb/inferior.c index 8aa93a0..606b418 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -164,11 +164,11 @@ add_inferior (int pid) if (print_inferior_events) { if (pid != 0) - printf_filtered (_("[New inferior %d (%s)]\n"), - inf->num, - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf (_("[New inferior %d (%s)]\n"), + inf->num, + target_pid_to_str (ptid_t (pid)).c_str ()); else - printf_filtered (_("[New inferior %d]\n"), inf->num); + gdb_printf (_("[New inferior %d]\n"), inf->num); } return inf; @@ -264,9 +264,9 @@ detach_inferior (inferior *inf) exit_inferior_1 (inf, 0); if (print_inferior_events) - printf_filtered (_("[Inferior %d (%s) detached]\n"), - inf->num, - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf (_("[Inferior %d (%s) detached]\n"), + inf->num, + target_pid_to_str (ptid_t (pid)).c_str ()); } void @@ -650,9 +650,9 @@ inferior_command (const char *args, int from_tty) if (filename == nullptr) filename = _("<noexec>"); - printf_filtered (_("[Current inferior is %d [%s] (%s)]\n"), - inf->num, inferior_pid_to_str (inf->pid).c_str (), - filename); + gdb_printf (_("[Current inferior is %d [%s] (%s)]\n"), + inf->num, inferior_pid_to_str (inf->pid).c_str (), + filename); } else { @@ -776,19 +776,19 @@ switch_to_inferior_and_push_target (inferior *new_inf, { new_inf->push_target (proc_target); if (proc_target->connection_string () != NULL) - printf_filtered (_("Added inferior %d on connection %d (%s %s)\n"), - new_inf->num, - proc_target->connection_number, - proc_target->shortname (), - proc_target->connection_string ()); + gdb_printf (_("Added inferior %d on connection %d (%s %s)\n"), + new_inf->num, + proc_target->connection_number, + proc_target->shortname (), + proc_target->connection_string ()); else - printf_filtered (_("Added inferior %d on connection %d (%s)\n"), - new_inf->num, - proc_target->connection_number, - proc_target->shortname ()); + gdb_printf (_("Added inferior %d on connection %d (%s)\n"), + new_inf->num, + proc_target->connection_number, + proc_target->shortname ()); } else - printf_filtered (_("Added inferior %d\n"), new_inf->num); + gdb_printf (_("Added inferior %d\n"), new_inf->num); } /* add-inferior [-copies N] [-exec FILENAME] [-no-connection] */ @@ -960,7 +960,7 @@ static void show_print_inferior_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of inferior events is %s.\n"), value); + gdb_printf (file, _("Printing of inferior events is %s.\n"), value); } /* Return a new value for the selected inferior's id. */ diff --git a/gdb/inflow.c b/gdb/inflow.c index cd7a417..9c7e290 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -172,8 +172,8 @@ gdb_has_a_terminal (void) #define OOPSY(what) \ if (result == -1) \ - fprintf_unfiltered(gdb_stderr, "[%s failed in terminal_inferior: %s]\n", \ - what, safe_strerror (errno)) + gdb_printf(gdb_stderr, "[%s failed in terminal_inferior: %s]\n", \ + what, safe_strerror (errno)) /* Initialize the terminal settings we record for the inferior, before we actually run the inferior. */ @@ -382,7 +382,7 @@ child_terminal_inferior (struct target_ops *self) process running on another terminal and we couldn't tell whether it was sharing GDB's terminal (and so assumed yes). */ - fprintf_unfiltered + gdb_printf (gdb_stderr, "[tcsetpgrp failed in child_terminal_inferior: %s]\n", safe_strerror (errno)); @@ -492,9 +492,9 @@ child_terminal_ours_1 (target_terminal_state desired_state) used to check for an error here, so perhaps there are other such situations as well. */ if (result == -1) - fprintf_unfiltered (gdb_stderr, - "[tcsetpgrp failed in child_terminal_ours: %s]\n", - safe_strerror (errno)); + gdb_printf (gdb_stderr, + "[tcsetpgrp failed in child_terminal_ours: %s]\n", + safe_strerror (errno)); #endif #endif /* termios */ } @@ -681,7 +681,7 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty) if (!gdb_has_a_terminal ()) { - printf_filtered (_("This GDB does not control a terminal.\n")); + gdb_printf (_("This GDB does not control a terminal.\n")); return; } @@ -691,8 +691,8 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty) inf = current_inferior (); tinfo = get_inflow_inferior_data (inf); - printf_filtered (_("Inferior's terminal status " - "(currently saved by GDB):\n")); + gdb_printf (_("Inferior's terminal status " + "(currently saved by GDB):\n")); /* First the fcntl flags. */ { @@ -700,7 +700,7 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty) flags = tinfo->tflags; - printf_filtered ("File descriptor flags = "); + gdb_printf ("File descriptor flags = "); #ifndef O_ACCMODE #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) @@ -709,20 +709,20 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty) switch (flags & (O_ACCMODE)) { case O_RDONLY: - printf_filtered ("O_RDONLY"); + gdb_printf ("O_RDONLY"); break; case O_WRONLY: - printf_filtered ("O_WRONLY"); + gdb_printf ("O_WRONLY"); break; case O_RDWR: - printf_filtered ("O_RDWR"); + gdb_printf ("O_RDWR"); break; } flags &= ~(O_ACCMODE); #ifdef O_NONBLOCK if (flags & O_NONBLOCK) - printf_filtered (" | O_NONBLOCK"); + gdb_printf (" | O_NONBLOCK"); flags &= ~O_NONBLOCK; #endif @@ -731,27 +731,27 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty) print it as O_NONBLOCK, which is good cause that is what POSIX has, and the flag will already be cleared by the time we get here. */ if (flags & O_NDELAY) - printf_filtered (" | O_NDELAY"); + gdb_printf (" | O_NDELAY"); flags &= ~O_NDELAY; #endif if (flags & O_APPEND) - printf_filtered (" | O_APPEND"); + gdb_printf (" | O_APPEND"); flags &= ~O_APPEND; #if defined (O_BINARY) if (flags & O_BINARY) - printf_filtered (" | O_BINARY"); + gdb_printf (" | O_BINARY"); flags &= ~O_BINARY; #endif if (flags) - printf_filtered (" | 0x%x", flags); - printf_filtered ("\n"); + gdb_printf (" | 0x%x", flags); + gdb_printf ("\n"); } #ifdef HAVE_TERMIOS_H - printf_filtered ("Process group = %d\n", (int) tinfo->process_group); + gdb_printf ("Process group = %d\n", (int) tinfo->process_group); #endif serial_print_tty_state (stdin_serial, tinfo->ttystate, gdb_stdout); diff --git a/gdb/infrun.c b/gdb/infrun.c index 73a4635..dbd8277 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -138,7 +138,7 @@ static void show_step_stop_if_no_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Mode of the step operation is %s.\n"), value); + gdb_printf (file, _("Mode of the step operation is %s.\n"), value); } /* proceed and normal_stop use this to notify the user when the @@ -159,7 +159,7 @@ static void show_debug_infrun (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Inferior debugging is %s.\n"), value); + gdb_printf (file, _("Inferior debugging is %s.\n"), value); } /* Support for disabling address space randomization. */ @@ -171,10 +171,10 @@ show_disable_randomization (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (target_supports_disable_randomization ()) - fprintf_filtered (file, - _("Disabling randomization of debuggee's " - "virtual address space is %s.\n"), - value); + gdb_printf (file, + _("Disabling randomization of debuggee's " + "virtual address space is %s.\n"), + value); else gdb_puts (_("Disabling randomization of debuggee's " "virtual address space is unsupported on\n" @@ -213,9 +213,9 @@ static void show_non_stop (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Controlling the inferior in non-stop mode is %s.\n"), - value); + gdb_printf (file, + _("Controlling the inferior in non-stop mode is %s.\n"), + value); } /* "Observer mode" is somewhat like a more extreme version of @@ -257,15 +257,15 @@ set_observer_mode (const char *args, int from_tty, } if (from_tty) - printf_filtered (_("Observer mode is now %s.\n"), - (observer_mode ? "on" : "off")); + gdb_printf (_("Observer mode is now %s.\n"), + (observer_mode ? "on" : "off")); } static void show_observer_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Observer mode is %s.\n"), value); + gdb_printf (file, _("Observer mode is %s.\n"), value); } /* This updates the value of observer mode based on changes in @@ -285,8 +285,8 @@ update_observer_mode (void) /* Let the user know if things change. */ if (newval != observer_mode) - printf_filtered (_("Observer mode is now %s.\n"), - (newval ? "on" : "off")); + gdb_printf (_("Observer mode is now %s.\n"), + (newval ? "on" : "off")); observer_mode = observer_mode_1 = newval; } @@ -358,8 +358,8 @@ static void show_stop_on_solib_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Stopping for shared library events is %s.\n"), - value); + gdb_printf (file, _("Stopping for shared library events is %s.\n"), + value); } /* True after stop if current stack frame should be printed. */ @@ -389,10 +389,10 @@ static void show_follow_fork_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger response to a program " - "call of fork or vfork is \"%s\".\n"), - value); + gdb_printf (file, + _("Debugger response to a program " + "call of fork or vfork is \"%s\".\n"), + value); } @@ -422,7 +422,7 @@ follow_fork_inferior (bool follow_child, bool detach_fork) the parent stays blocked. If we're telling the parent to run in the foreground, the user will not be able to ctrl-c to get back the terminal, effectively hanging the debug session. */ - fprintf_filtered (gdb_stderr, _("\ + gdb_printf (gdb_stderr, _("\ Can not resume the parent process over vfork in the foreground while\n\ holding the child stopped. Try \"set detach-on-fork\" or \ \"set schedule-multiple\".\n")); @@ -456,9 +456,9 @@ holding the child stopped. Try \"set detach-on-fork\" or \ ptid_t process_ptid = ptid_t (child_ptid.pid ()); target_terminal::ours_for_output (); - printf_filtered (_("[Detaching after %s from child %s]\n"), - has_vforked ? "vfork" : "fork", - target_pid_to_str (process_ptid).c_str ()); + gdb_printf (_("[Detaching after %s from child %s]\n"), + has_vforked ? "vfork" : "fork", + target_pid_to_str (process_ptid).c_str ()); } } else @@ -522,10 +522,10 @@ holding the child stopped. Try \"set detach-on-fork\" or \ std::string child_pid = target_pid_to_str (child_ptid); target_terminal::ours_for_output (); - printf_filtered (_("[Attaching after %s %s to child %s]\n"), - parent_pid.c_str (), - has_vforked ? "vfork" : "fork", - child_pid.c_str ()); + gdb_printf (_("[Attaching after %s %s to child %s]\n"), + parent_pid.c_str (), + has_vforked ? "vfork" : "fork", + child_pid.c_str ()); } /* Add the new inferior first, so that the target_detach below @@ -650,9 +650,9 @@ holding the child stopped. Try \"set detach-on-fork\" or \ ptid_t process_ptid = ptid_t (parent_ptid.pid ()); target_terminal::ours_for_output (); - printf_filtered (_("[Detaching after fork from " - "parent %s]\n"), - target_pid_to_str (process_ptid).c_str ()); + gdb_printf (_("[Detaching after fork from " + "parent %s]\n"), + target_pid_to_str (process_ptid).c_str ()); } target_detach (parent_inf, 0); @@ -962,13 +962,13 @@ handle_vfork_child_exec_or_exit (int exec) if (exec) { - printf_filtered (_("[Detaching vfork parent %s " - "after child exec]\n"), pidstr.c_str ()); + gdb_printf (_("[Detaching vfork parent %s " + "after child exec]\n"), pidstr.c_str ()); } else { - printf_filtered (_("[Detaching vfork parent %s " - "after child exit]\n"), pidstr.c_str ()); + gdb_printf (_("[Detaching vfork parent %s " + "after child exit]\n"), pidstr.c_str ()); } } @@ -1049,7 +1049,7 @@ static void show_follow_exec_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Follow exec mode is \"%s\".\n"), value); + gdb_printf (file, _("Follow exec mode is \"%s\".\n"), value); } /* EXEC_FILE_TARGET is assumed to be non-NULL. */ @@ -1130,9 +1130,9 @@ follow_exec (ptid_t ptid, const char *exec_file_target) /* What is this a.out's name? */ process_ptid = ptid_t (pid); - printf_filtered (_("%s is executing new program: %s\n"), - target_pid_to_str (process_ptid).c_str (), - exec_file_target); + gdb_printf (_("%s is executing new program: %s\n"), + target_pid_to_str (process_ptid).c_str (), + exec_file_target); /* We've followed the inferior through an exec. Therefore, the inferior has essentially been killed & reborn. */ @@ -1519,14 +1519,14 @@ show_can_use_displaced_stepping (struct ui_file *file, int from_tty, const char *value) { if (can_use_displaced_stepping == AUTO_BOOLEAN_AUTO) - fprintf_filtered (file, - _("Debugger's willingness to use displaced stepping " - "to step over breakpoints is %s (currently %s).\n"), - value, target_is_non_stop_p () ? "on" : "off"); + gdb_printf (file, + _("Debugger's willingness to use displaced stepping " + "to step over breakpoints is %s (currently %s).\n"), + value, target_is_non_stop_p () ? "on" : "off"); else - fprintf_filtered (file, - _("Debugger's willingness to use displaced stepping " - "to step over breakpoints is %s.\n"), value); + gdb_printf (file, + _("Debugger's willingness to use displaced stepping " + "to step over breakpoints is %s.\n"), value); } /* Return true if the gdbarch implements the required methods to use @@ -2033,10 +2033,10 @@ static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Mode for locking scheduler " - "during execution is \"%s\".\n"), - value); + gdb_printf (file, + _("Mode for locking scheduler " + "during execution is \"%s\".\n"), + value); } static void @@ -4159,7 +4159,7 @@ fetch_inferior_event () && exec_done_display_p && (inferior_ptid == null_ptid || inferior_thread ()->state != THREAD_RUNNING)) - printf_filtered (_("completed.\n")); + gdb_printf (_("completed.\n")); } /* See infrun.h. */ @@ -8354,9 +8354,9 @@ maybe_remove_breakpoints (void) if (remove_breakpoints ()) { target_terminal::ours_for_output (); - printf_filtered (_("Cannot remove breakpoints because " - "program is no longer writable.\nFurther " - "execution is probably impossible.\n")); + gdb_printf (_("Cannot remove breakpoints because " + "program is no longer writable.\nFurther " + "execution is probably impossible.\n")); } } } @@ -8500,8 +8500,8 @@ normal_stop (void) SWITCH_THRU_ALL_UIS () { target_terminal::ours_for_output (); - printf_filtered (_("[Switching to %s]\n"), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("[Switching to %s]\n"), + target_pid_to_str (inferior_ptid).c_str ()); annotate_thread_changed (); } previous_inferior_ptid = inferior_ptid; @@ -8513,7 +8513,7 @@ normal_stop (void) if (current_ui->prompt_state == PROMPT_BLOCKED) { target_terminal::ours_for_output (); - printf_filtered (_("No unwaited-for children left.\n")); + gdb_printf (_("No unwaited-for children left.\n")); } } @@ -8697,8 +8697,8 @@ signal_catch_update (const unsigned int *info) static void sig_print_header (void) { - printf_filtered (_("Signal Stop\tPrint\tPass " - "to program\tDescription\n")); + gdb_printf (_("Signal Stop\tPrint\tPass " + "to program\tDescription\n")); } static void @@ -8710,12 +8710,12 @@ sig_print_info (enum gdb_signal oursig) if (name_padding <= 0) name_padding = 0; - printf_filtered ("%s", name); - printf_filtered ("%*.*s ", name_padding, name_padding, " "); - printf_filtered ("%s\t", signal_stop[oursig] ? "Yes" : "No"); - printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No"); - printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No"); - printf_filtered ("%s\n", gdb_signal_to_string (oursig)); + gdb_printf ("%s", name); + gdb_printf ("%*.*s ", name_padding, name_padding, " "); + gdb_printf ("%s\t", signal_stop[oursig] ? "Yes" : "No"); + gdb_printf ("%s\t", signal_print[oursig] ? "Yes" : "No"); + gdb_printf ("%s\t\t", signal_program[oursig] ? "Yes" : "No"); + gdb_printf ("%s\n", gdb_signal_to_string (oursig)); } /* Specify how various signals in the inferior should be handled. */ @@ -8851,7 +8851,7 @@ Are you sure you want to change it? "), sigs[signum] = 1; } else - printf_filtered (_("Not confirmed, unchanged.\n")); + gdb_printf (_("Not confirmed, unchanged.\n")); } break; case GDB_SIGNAL_0: @@ -8946,7 +8946,7 @@ info_signals_command (const char *signum_exp, int from_tty) return; } - printf_filtered ("\n"); + gdb_printf ("\n"); /* These ugly casts brought to you by the native VAX compiler. */ for (oursig = GDB_SIGNAL_FIRST; (int) oursig < (int) GDB_SIGNAL_LAST; @@ -8959,8 +8959,8 @@ info_signals_command (const char *signum_exp, int from_tty) sig_print_info (oursig); } - printf_filtered (_("\nUse the \"handle\" command " - "to change these tables.\n")); + gdb_printf (_("\nUse the \"handle\" command " + "to change these tables.\n")); } /* The $_siginfo convenience variable is a bit special. We don't know @@ -9333,10 +9333,10 @@ show_exec_direction_func (struct ui_file *out, int from_tty, { switch (execution_direction) { case EXEC_FORWARD: - fprintf_filtered (out, _("Forward.\n")); + gdb_printf (out, _("Forward.\n")); break; case EXEC_REVERSE: - fprintf_filtered (out, _("Reverse.\n")); + gdb_printf (out, _("Reverse.\n")); break; default: internal_error (__FILE__, __LINE__, @@ -9349,8 +9349,8 @@ static void show_schedule_multiple (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Resuming the execution of threads " - "of all processes is %s.\n"), value); + gdb_printf (file, _("Resuming the execution of threads " + "of all processes is %s.\n"), value); } /* Implementation of `siginfo' variable. */ @@ -71,7 +71,7 @@ static void show_jit_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("JIT debugging is %s.\n"), value); + gdb_printf (file, _("JIT debugging is %s.\n"), value); } /* Implementation of the "maintenance info jit" command. */ @@ -279,8 +279,8 @@ jit_read_descriptor (gdbarch *gdbarch, err = target_read_memory (addr, desc_buf, desc_size); if (err) { - fprintf_unfiltered (gdb_stderr, _("Unable to read JIT descriptor from " - "remote memory\n")); + gdb_printf (gdb_stderr, _("Unable to read JIT descriptor from " + "remote memory\n")); return false; } @@ -770,7 +770,7 @@ jit_bfd_try_read_symtab (struct jit_code_entry *code_entry, We would segfault later without this line. */ if (!bfd_check_format (nbfd.get (), bfd_object)) { - fprintf_unfiltered (gdb_stderr, _("\ + gdb_printf (gdb_stderr, _("\ JITed symbol file is not an object file, ignoring it.\n")); return; } @@ -1182,10 +1182,10 @@ jit_inferior_init (inferior *inf) /* Check that the version number agrees with that we support. */ if (descriptor.version != 1) { - fprintf_unfiltered (gdb_stderr, - _("Unsupported JIT protocol version %ld " - "in descriptor (expected 1)\n"), - (long) descriptor.version); + gdb_printf (gdb_stderr, + _("Unsupported JIT protocol version %ld " + "in descriptor (expected 1)\n"), + (long) descriptor.version); continue; } @@ -1274,10 +1274,10 @@ jit_event_handler (gdbarch *gdbarch, objfile *jiter) { objfile *jited = jit_find_objf_with_entry_addr (entry_addr); if (jited == nullptr) - fprintf_unfiltered (gdb_stderr, - _("Unable to find JITed code " - "entry at address: %s\n"), - paddress (gdbarch, entry_addr)); + gdb_printf (gdb_stderr, + _("Unable to find JITed code " + "entry at address: %s\n"), + paddress (gdbarch, entry_addr)); else jited->unlink (); diff --git a/gdb/language.c b/gdb/language.c index 28a98ab..af58a37 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -114,14 +114,14 @@ show_language_command (struct ui_file *file, int from_tty, enum language flang; /* The language of the frame. */ if (language_mode == language_mode_auto) - fprintf_filtered (file, - _("The current source language is " - "\"auto; currently %s\".\n"), - current_language->name ()); + gdb_printf (file, + _("The current source language is " + "\"auto; currently %s\".\n"), + current_language->name ()); else - fprintf_filtered (file, - _("The current source language is \"%s\".\n"), - current_language->name ()); + gdb_printf (file, + _("The current source language is \"%s\".\n"), + current_language->name ()); if (has_stack_frames ()) { @@ -132,7 +132,7 @@ show_language_command (struct ui_file *file, int from_tty, if (flang != language_unknown && language_mode == language_mode_manual && current_language->la_language != flang) - fprintf_filtered (file, "%s\n", _(lang_frame_mismatch_warn)); + gdb_printf (file, "%s\n", _(lang_frame_mismatch_warn)); } } @@ -220,13 +220,13 @@ show_range_command (struct ui_file *file, int from_tty, "Unrecognized range check setting."); } - fprintf_filtered (file, - _("Range checking is \"auto; currently %s\".\n"), - tmp); + gdb_printf (file, + _("Range checking is \"auto; currently %s\".\n"), + tmp); } else - fprintf_filtered (file, _("Range checking is \"%s\".\n"), - value); + gdb_printf (file, _("Range checking is \"%s\".\n"), + value); if (range_check == range_check_warn || ((range_check == range_check_on) @@ -296,15 +296,15 @@ show_case_command (struct ui_file *file, int from_tty, "Unrecognized case-sensitive setting."); } - fprintf_filtered (file, - _("Case sensitivity in " - "name search is \"auto; currently %s\".\n"), - tmp); + gdb_printf (file, + _("Case sensitivity in " + "name search is \"auto; currently %s\".\n"), + tmp); } else - fprintf_filtered (file, - _("Case sensitivity in name search is \"%s\".\n"), - value); + gdb_printf (file, + _("Case sensitivity in name search is \"%s\".\n"), + value); if (case_sensitivity != current_language->case_sensitivity ()) warning (_("the current case sensitivity setting does not match " @@ -383,7 +383,7 @@ language_info () return; expected_language = current_language; - printf_filtered (_("Current language: %s\n"), language); + gdb_printf (_("Current language: %s\n"), language); show_language_command (gdb_stdout, 1, NULL, NULL); } @@ -415,7 +415,7 @@ range_error (const char *string,...) /* FIXME: cagney/2002-01-30: Should this function print anything when range error is off? */ gdb_vprintf (gdb_stderr, string, args); - fprintf_filtered (gdb_stderr, "\n"); + gdb_printf (gdb_stderr, "\n"); break; default: internal_error (__FILE__, __LINE__, _("bad switch")); @@ -589,9 +589,9 @@ language_defn::print_array_index (struct type *index_type, LONGEST index, { struct value *index_value = value_from_longest (index_type, index); - fprintf_filtered (stream, "["); + gdb_printf (stream, "["); value_print (index_value, stream, options); - fprintf_filtered (stream, "] = "); + gdb_printf (stream, "] = "); } /* See language.h. */ @@ -1104,16 +1104,16 @@ language_lookup_primitive_type_as_symbol (const struct language_defn *la, struct language_arch_info *lai = &ld->arch_info[la->la_language]; if (symbol_lookup_debug) - fprintf_unfiltered (gdb_stdlog, - "language_lookup_primitive_type_as_symbol" - " (%s, %s, %s)", - la->name (), host_address_to_string (gdbarch), name); + gdb_printf (gdb_stdlog, + "language_lookup_primitive_type_as_symbol" + " (%s, %s, %s)", + la->name (), host_address_to_string (gdbarch), name); struct symbol *sym = lai->lookup_primitive_type_as_symbol (name, la->la_language); if (symbol_lookup_debug) - fprintf_unfiltered (gdb_stdlog, " = %s\n", host_address_to_string (sym)); + gdb_printf (gdb_stdlog, " = %s\n", host_address_to_string (sym)); /* Note: The result of symbol lookup is normally a symbol *and* the block it was found in. Builtin types don't live in blocks. We *could* give diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 8cea33d..ca876a5 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -348,8 +348,8 @@ linux_fork_mourn_inferior (void) last = find_last_fork (); fork_load_infrun_state (last); - printf_filtered (_("[Switching to %s]\n"), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("[Switching to %s]\n"), + target_pid_to_str (inferior_ptid).c_str ()); /* If there's only one fork, switch back to non-fork mode. */ if (one_fork_p ()) @@ -381,8 +381,8 @@ linux_fork_detach (int from_tty) fork_load_infrun_state (&fork_list.front ()); if (from_tty) - printf_filtered (_("[Switching to %s]\n"), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("[Switching to %s]\n"), + target_pid_to_str (inferior_ptid).c_str ()); /* If there's only one fork, switch back to non-fork mode. */ if (one_fork_p ()) @@ -509,7 +509,7 @@ Please switch to another checkpoint before deleting the current one")); pptid = fi->parent_ptid; if (from_tty) - printf_filtered (_("Killed %s\n"), target_pid_to_str (ptid).c_str ()); + gdb_printf (_("Killed %s\n"), target_pid_to_str (ptid).c_str ()); delete_fork (ptid); @@ -547,7 +547,7 @@ Please switch to another checkpoint before detaching the current one")); error (_("Unable to detach %s"), target_pid_to_str (ptid).c_str ()); if (from_tty) - printf_filtered (_("Detached %s\n"), target_pid_to_str (ptid).c_str ()); + gdb_printf (_("Detached %s\n"), target_pid_to_str (ptid).c_str ()); delete_fork (ptid); } @@ -571,30 +571,30 @@ info_checkpoints_command (const char *arg, int from_tty) printed = &fi; if (fi.ptid == inferior_ptid) - printf_filtered ("* "); + gdb_printf ("* "); else - printf_filtered (" "); + gdb_printf (" "); ULONGEST pc = fi.pc; - printf_filtered ("%d %s", fi.num, target_pid_to_str (fi.ptid).c_str ()); + gdb_printf ("%d %s", fi.num, target_pid_to_str (fi.ptid).c_str ()); if (fi.num == 0) - printf_filtered (_(" (main process)")); - printf_filtered (_(" at ")); + gdb_printf (_(" (main process)")); + gdb_printf (_(" at ")); gdb_puts (paddress (gdbarch, pc)); symtab_and_line sal = find_pc_line (pc, 0); if (sal.symtab) - printf_filtered (_(", file %s"), - symtab_to_filename_for_display (sal.symtab)); + gdb_printf (_(", file %s"), + symtab_to_filename_for_display (sal.symtab)); if (sal.line) - printf_filtered (_(", line %d"), sal.line); + gdb_printf (_(", line %d"), sal.line); if (!sal.symtab && !sal.line) { struct bound_minimal_symbol msym; msym = lookup_minimal_symbol_by_pc (pc); if (msym.minsym) - printf_filtered (", <%s>", msym.minsym->linkage_name ()); + gdb_printf (", <%s>", msym.minsym->linkage_name ()); } gdb_putc ('\n'); @@ -602,9 +602,9 @@ info_checkpoints_command (const char *arg, int from_tty) if (printed == NULL) { if (requested > 0) - printf_filtered (_("No checkpoint number %d.\n"), requested); + gdb_printf (_("No checkpoint number %d.\n"), requested); else - printf_filtered (_("No checkpoints.\n")); + gdb_printf (_("No checkpoints.\n")); } } @@ -685,15 +685,15 @@ checkpoint_command (const char *args, int from_tty) { int parent_pid; - printf_filtered (_("checkpoint %d: fork returned pid %ld.\n"), - fp != NULL ? fp->num : -1, (long) retpid); + gdb_printf (_("checkpoint %d: fork returned pid %ld.\n"), + fp != NULL ? fp->num : -1, (long) retpid); if (info_verbose) { parent_pid = last_target_ptid.lwp (); if (parent_pid == 0) parent_pid = last_target_ptid.pid (); - printf_filtered (_(" gdb says parent = %ld.\n"), - (long) parent_pid); + gdb_printf (_(" gdb says parent = %ld.\n"), + (long) parent_pid); } } @@ -728,8 +728,8 @@ linux_fork_context (struct fork_info *newfp, int from_tty) fork_load_infrun_state (newfp); insert_breakpoints (); - printf_filtered (_("Switching to %s\n"), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("Switching to %s\n"), + target_pid_to_str (inferior_ptid).c_str ()); print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1); } diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index e782f6f..a9b093c 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -202,8 +202,8 @@ static void show_debug_linux_nat (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of GNU/Linux native targets is %s.\n"), - value); + gdb_printf (file, _("Debugging of GNU/Linux native targets is %s.\n"), + value); } /* Print a linux-nat debug statement. */ @@ -894,8 +894,8 @@ exit_lwp (struct lwp_info *lp) if (th) { if (print_thread_events) - printf_filtered (_("[%s exited]\n"), - target_pid_to_str (lp->ptid).c_str ()); + gdb_printf (_("[%s exited]\n"), + target_pid_to_str (lp->ptid).c_str ()); delete_thread (th); } diff --git a/gdb/linux-record.c b/gdb/linux-record.c index 0a84bad..ea858df 100644 --- a/gdb/linux-record.c +++ b/gdb/linux-record.c @@ -120,11 +120,11 @@ record_linux_sockaddr (struct regcache *regcache, if (target_read_memory ((CORE_ADDR) len, a, tdep->size_int)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - phex_nz (len, tdep->size_pointer), - tdep->size_int); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + phex_nz (len, tdep->size_pointer), + tdep->size_int); return -1; } addrlen = (int) extract_unsigned_integer (a, tdep->size_int, byte_order); @@ -157,12 +157,12 @@ record_linux_msghdr (struct regcache *regcache, if (target_read_memory ((CORE_ADDR) addr, a, tdep->size_msghdr)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s " - "len = %d.\n", - phex_nz (addr, tdep->size_pointer), - tdep->size_msghdr); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s " + "len = %d.\n", + phex_nz (addr, tdep->size_pointer), + tdep->size_msghdr); return -1; } @@ -194,13 +194,13 @@ record_linux_msghdr (struct regcache *regcache, if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error " - "reading memory at " - "addr = 0x%s " - "len = %d.\n", - phex_nz (addr,tdep->size_pointer), - tdep->size_iovec); + gdb_printf (gdb_stdlog, + "Process record: error " + "reading memory at " + "addr = 0x%s " + "len = %d.\n", + phex_nz (addr,tdep->size_pointer), + tdep->size_iovec); return -1; } tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov, @@ -492,17 +492,17 @@ record_linux_system_call (enum gdb_syscall syscall, } else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support ioctl request TIOCSERGSTRUCT\n")); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support ioctl request TIOCSERGSTRUCT\n")); return 1; } else { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support ioctl request 0x%s.\n"), - OUTPUT_REG (tmpulongest, tdep->arg2)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support ioctl request 0x%s.\n"), + OUTPUT_REG (tmpulongest, tdep->arg2)); return 1; } break; @@ -616,11 +616,11 @@ record_linux_system_call (enum gdb_syscall syscall, if (target_read_memory (tmpulongest, a, sz_sel_arg)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading memory " - "at addr = 0x%s len = %lu.\n", - OUTPUT_REG (tmpulongest, tdep->arg1), - sz_sel_arg); + gdb_printf (gdb_stdlog, + "Process record: error reading memory " + "at addr = 0x%s len = %lu.\n", + OUTPUT_REG (tmpulongest, tdep->arg1), + sz_sel_arg); return -1; } /* Skip n. */ @@ -764,12 +764,12 @@ Do you want to stop the program?"), tdep->size_int)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s " - "len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg5), - tdep->size_int); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s " + "len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg5), + tdep->size_int); return -1; } regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp); @@ -808,11 +808,11 @@ Do you want to stop the program?"), tdep->size_ulong * 2)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong * 2); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong * 2); return -1; } tmpulongest = extract_unsigned_integer (a, @@ -839,11 +839,11 @@ Do you want to stop the program?"), tdep->size_ulong)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong); return -1; } tmpaddr @@ -870,11 +870,11 @@ Do you want to stop the program?"), tdep->size_ulong * 2)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong * 2); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong * 2); return -1; } tmpulongest = extract_unsigned_integer (a, tdep->size_ulong, @@ -897,11 +897,11 @@ Do you want to stop the program?"), tdep->size_ulong)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong); return -1; } tmpulongest = extract_unsigned_integer (a, tdep->size_ulong, @@ -934,11 +934,11 @@ Do you want to stop the program?"), tdep->size_ulong * 2)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong * 2); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong * 2); return -1; } tmpulongest = extract_unsigned_integer (a + tdep->size_ulong, @@ -950,13 +950,13 @@ Do you want to stop the program?"), tdep->size_int)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s " - "len = %d.\n", - phex_nz (tmpulongest, - tdep->size_ulong), - tdep->size_int); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s " + "len = %d.\n", + phex_nz (tmpulongest, + tdep->size_ulong), + tdep->size_int); return -1; } tmpaddr @@ -995,11 +995,11 @@ Do you want to stop the program?"), tdep->size_ulong)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - tdep->size_ulong); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + tdep->size_ulong); return -1; } tmpulongest = extract_unsigned_integer (a, tdep->size_ulong, @@ -1010,10 +1010,10 @@ Do you want to stop the program?"), } break; default: - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target " - "doesn't support socketcall call 0x%s\n"), - OUTPUT_REG (tmpulongest, tdep->arg1)); + gdb_printf (gdb_stderr, + _("Process record and replay target " + "doesn't support socketcall call 0x%s\n"), + OUTPUT_REG (tmpulongest, tdep->arg1)); return -1; break; } @@ -1151,10 +1151,10 @@ Do you want to stop the program?"), break; default: /* XXX RECORD_SEMCTL still not supported. */ - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support ipc number %s\n"), - pulongest (tmpulongest)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support ipc number %s\n"), + pulongest (tmpulongest)); break; } break; @@ -1292,11 +1292,11 @@ Do you want to stop the program?"), tdep->size_iovec)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading " - "memory at addr = 0x%s len = %d.\n", - OUTPUT_REG (vec, tdep->arg2), - tdep->size_iovec); + gdb_printf (gdb_stdlog, + "Process record: error reading " + "memory at addr = 0x%s len = %d.\n", + OUTPUT_REG (vec, tdep->arg2), + tdep->size_iovec); return -1; } tmpaddr @@ -1712,11 +1712,11 @@ Do you want to stop the program?"), nr * tdep->size_pointer)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: error reading memory " - "at addr = 0x%s len = %u.\n", - OUTPUT_REG (tmpulongest, tdep->arg2), - (int) (nr * tdep->size_pointer)); + gdb_printf (gdb_stdlog, + "Process record: error reading memory " + "at addr = 0x%s len = %u.\n", + OUTPUT_REG (tmpulongest, tdep->arg2), + (int) (nr * tdep->size_pointer)); return -1; } for (i = 0; i < nr; i++) @@ -2036,9 +2036,9 @@ Do you want to stop the program?"), break; default: - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %d\n"), syscall); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %d\n"), syscall); return -1; break; } diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index e9cf897..4e728a0 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -838,7 +838,7 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, if (args && args[0]) error (_("Too many parameters: %s"), args); - printf_filtered (_("process %ld\n"), pid); + gdb_printf (_("process %ld\n"), pid); if (cmdline_f) { xsnprintf (filename, sizeof filename, "/proc/%ld/cmdline", pid); @@ -856,7 +856,7 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, buffer[pos] = ' '; } buffer[len - 1] = '\0'; - printf_filtered ("cmdline = '%s'\n", buffer); + gdb_printf ("cmdline = '%s'\n", buffer); } else warning (_("unable to open /proc file '%s'"), filename); @@ -867,7 +867,7 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, gdb::optional<std::string> contents = target_fileio_readlink (NULL, filename, &target_errno); if (contents.has_value ()) - printf_filtered ("cwd = '%s'\n", contents->c_str ()); + gdb_printf ("cwd = '%s'\n", contents->c_str ()); else warning (_("unable to read link '%s'"), filename); } @@ -877,7 +877,7 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, gdb::optional<std::string> contents = target_fileio_readlink (NULL, filename, &target_errno); if (contents.has_value ()) - printf_filtered ("exe = '%s'\n", contents->c_str ()); + gdb_printf ("exe = '%s'\n", contents->c_str ()); else warning (_("unable to read link '%s'"), filename); } @@ -890,18 +890,18 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, { char *line; - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (gdbarch_addr_bit (gdbarch) == 32) { - printf_filtered ("\t%10s %10s %10s %10s %s %s\n", - "Start Addr", " End Addr", " Size", - " Offset", "Perms ", "objfile"); + gdb_printf ("\t%10s %10s %10s %10s %s %s\n", + "Start Addr", " End Addr", " Size", + " Offset", "Perms ", "objfile"); } else { - printf_filtered (" %18s %18s %10s %10s %s %s\n", - "Start Addr", " End Addr", " Size", - " Offset", "Perms ", "objfile"); + gdb_printf (" %18s %18s %10s %10s %s %s\n", + "Start Addr", " End Addr", " Size", + " Offset", "Perms ", "objfile"); } char *saveptr; @@ -913,25 +913,25 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, if (gdbarch_addr_bit (gdbarch) == 32) { - printf_filtered ("\t%10s %10s %10s %10s %-5.*s %s\n", - paddress (gdbarch, m.addr), - paddress (gdbarch, m.endaddr), - hex_string (m.endaddr - m.addr), - hex_string (m.offset), - (int) m.permissions.size (), - m.permissions.data (), - m.filename); + gdb_printf ("\t%10s %10s %10s %10s %-5.*s %s\n", + paddress (gdbarch, m.addr), + paddress (gdbarch, m.endaddr), + hex_string (m.endaddr - m.addr), + hex_string (m.offset), + (int) m.permissions.size (), + m.permissions.data (), + m.filename); } else { - printf_filtered (" %18s %18s %10s %10s %-5.*s %s\n", - paddress (gdbarch, m.addr), - paddress (gdbarch, m.endaddr), - hex_string (m.endaddr - m.addr), - hex_string (m.offset), - (int) m.permissions.size (), - m.permissions.data (), - m.filename); + gdb_printf (" %18s %18s %10s %10s %-5.*s %s\n", + paddress (gdbarch, m.addr), + paddress (gdbarch, m.endaddr), + hex_string (m.endaddr - m.addr), + hex_string (m.offset), + (int) m.permissions.size (), + m.permissions.data (), + m.filename); } } } @@ -957,8 +957,8 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, { const char *p = statstr.get (); - printf_filtered (_("Process: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Process: %s\n"), + pulongest (strtoulst (p, &p, 10))); p = skip_spaces (p); if (*p == '(') @@ -968,117 +968,117 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args, const char *ep = strrchr (p, ')'); if (ep != NULL) { - printf_filtered ("Exec file: %.*s\n", - (int) (ep - p - 1), p + 1); + gdb_printf ("Exec file: %.*s\n", + (int) (ep - p - 1), p + 1); p = ep + 1; } } p = skip_spaces (p); if (*p) - printf_filtered (_("State: %c\n"), *p++); + gdb_printf (_("State: %c\n"), *p++); if (*p) - printf_filtered (_("Parent process: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Parent process: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Process group: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Process group: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Session id: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Session id: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("TTY: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("TTY: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("TTY owner process group: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("TTY owner process group: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Flags: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Flags: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Minor faults (no memory page): %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Minor faults (no memory page): %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Minor faults, children: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Minor faults, children: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Major faults (memory page faults): %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Major faults (memory page faults): %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Major faults, children: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Major faults, children: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("utime: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("utime: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("stime: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("stime: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("utime, children: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("utime, children: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("stime, children: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("stime, children: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("jiffies remaining in current " - "time slice: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("jiffies remaining in current " + "time slice: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("'nice' value: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("'nice' value: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("jiffies until next timeout: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("jiffies until next timeout: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("jiffies until next SIGALRM: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("jiffies until next SIGALRM: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("start time (jiffies since " - "system boot): %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("start time (jiffies since " + "system boot): %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Virtual memory size: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Virtual memory size: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Resident set size: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("Resident set size: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("rlim: %s\n"), - pulongest (strtoulst (p, &p, 10))); + gdb_printf (_("rlim: %s\n"), + pulongest (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Start of text: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Start of text: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("End of text: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("End of text: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Start of stack: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Start of stack: %s\n"), + hex_string (strtoulst (p, &p, 10))); #if 0 /* Don't know how architecture-dependent the rest is... Anyway the signal bitmap info is available from "status". */ if (*p) - printf_filtered (_("Kernel stack pointer: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Kernel stack pointer: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Kernel instr pointer: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Kernel instr pointer: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Pending signals bitmap: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Pending signals bitmap: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Blocked signals bitmap: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Blocked signals bitmap: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Ignored signals bitmap: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Ignored signals bitmap: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("Catched signals bitmap: %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("Catched signals bitmap: %s\n"), + hex_string (strtoulst (p, &p, 10))); if (*p) - printf_filtered (_("wchan (system call): %s\n"), - hex_string (strtoulst (p, &p, 10))); + gdb_printf (_("wchan (system call): %s\n"), + hex_string (strtoulst (p, &p, 10))); #endif } else @@ -1233,39 +1233,39 @@ linux_core_info_proc_mappings (struct gdbarch *gdbarch, const char *args) linux_read_core_file_mappings (gdbarch, core_bfd, [=] (ULONGEST count) { - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (gdbarch_addr_bit (gdbarch) == 32) { - printf_filtered ("\t%10s %10s %10s %10s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "objfile"); + gdb_printf ("\t%10s %10s %10s %10s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "objfile"); } else { - printf_filtered (" %18s %18s %10s %10s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "objfile"); + gdb_printf (" %18s %18s %10s %10s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "objfile"); } }, [=] (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename, const bfd_build_id *build_id) { if (gdbarch_addr_bit (gdbarch) == 32) - printf_filtered ("\t%10s %10s %10s %10s %s\n", - paddress (gdbarch, start), - paddress (gdbarch, end), - hex_string (end - start), - hex_string (file_ofs), - filename); + gdb_printf ("\t%10s %10s %10s %10s %s\n", + paddress (gdbarch, start), + paddress (gdbarch, end), + hex_string (end - start), + hex_string (file_ofs), + filename); else - printf_filtered (" %18s %18s %10s %10s %s\n", - paddress (gdbarch, start), - paddress (gdbarch, end), - hex_string (end - start), - hex_string (file_ofs), - filename); + gdb_printf (" %18s %18s %10s %10s %s\n", + paddress (gdbarch, start), + paddress (gdbarch, end), + hex_string (end - start), + hex_string (file_ofs), + filename); }); } @@ -1284,7 +1284,7 @@ linux_core_info_proc (struct gdbarch *gdbarch, const char *args, exe = bfd_core_file_failing_command (core_bfd); if (exe != NULL) - printf_filtered ("exe = '%s'\n", exe); + gdb_printf ("exe = '%s'\n", exe); else warning (_("unable to find command name in core file")); } @@ -2659,8 +2659,8 @@ static void show_use_coredump_filter (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Use of /proc/PID/coredump_filter file to generate" - " corefiles is %s.\n"), value); + gdb_printf (file, _("Use of /proc/PID/coredump_filter file to generate" + " corefiles is %s.\n"), value); } /* Display whether the gcore command is dumping mappings marked with @@ -2670,8 +2670,8 @@ static void show_dump_excluded_mappings (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Dumping of mappings marked with the VM_DONTDUMP" - " flag is %s.\n"), value); + gdb_printf (file, _("Dumping of mappings marked with the VM_DONTDUMP" + " flag is %s.\n"), value); } /* To be called from the various GDB_OSABI_LINUX handlers for the diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 8703783..2837233 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -126,9 +126,9 @@ static void show_auto_load_thread_db (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Auto-loading of inferior specific libthread_db " - "is %s.\n"), - value); + gdb_printf (file, _("Auto-loading of inferior specific libthread_db " + "is %s.\n"), + value); } static void @@ -147,7 +147,7 @@ static void show_libthread_db_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("libthread-db debugging is %s.\n"), value); + gdb_printf (file, _("libthread-db debugging is %s.\n"), value); } /* If we're running on GNU/Linux, we must explicitly attach to any new @@ -861,8 +861,8 @@ try_thread_db_load_1 (struct thread_db_info *info) if (err != TD_OK) { if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, _("td_ta_new failed: %s\n"), - thread_db_err_str (err)); + gdb_printf (gdb_stdlog, _("td_ta_new failed: %s\n"), + thread_db_err_str (err)); else switch (err) { @@ -936,7 +936,7 @@ try_thread_db_load_1 (struct thread_db_info *info) return false; } - printf_filtered (_("[Thread debugging using libthread_db enabled]\n")); + gdb_printf (_("[Thread debugging using libthread_db enabled]\n")); if (!libthread_db_search_path.empty () || libthread_db_debug) { @@ -946,8 +946,8 @@ try_thread_db_load_1 (struct thread_db_info *info) if (library == NULL) library = LIBTHREAD_DB_SO; - printf_filtered (_("Using host libthread_db library \"%ps\".\n"), - styled_string (file_name_style.style (), library)); + gdb_printf (_("Using host libthread_db library \"%ps\".\n"), + styled_string (file_name_style.style (), library)); } /* The thread library was detected. Activate the thread_db target @@ -966,9 +966,9 @@ try_thread_db_load (const char *library, bool check_auto_load_safe) struct thread_db_info *info; if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, - _("Trying host libthread_db library: %s.\n"), - library); + gdb_printf (gdb_stdlog, + _("Trying host libthread_db library: %s.\n"), + library); if (check_auto_load_safe) { @@ -977,8 +977,8 @@ try_thread_db_load (const char *library, bool check_auto_load_safe) /* Do not print warnings by file_is_auto_load_safe if the library does not exist at this place. */ if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, _("open failed: %s.\n"), - safe_strerror (errno)); + gdb_printf (gdb_stdlog, _("open failed: %s.\n"), + safe_strerror (errno)); return false; } @@ -994,7 +994,7 @@ try_thread_db_load (const char *library, bool check_auto_load_safe) if (handle == NULL) { if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, _("dlopen failed: %s.\n"), dlerror ()); + gdb_printf (gdb_stdlog, _("dlopen failed: %s.\n"), dlerror ()); return false; } @@ -1008,8 +1008,8 @@ try_thread_db_load (const char *library, bool check_auto_load_safe) const char *const libpath = dladdr_to_soname (td_init); if (libpath != NULL) - fprintf_unfiltered (gdb_stdlog, _("Host %s resolved to: %s.\n"), - library, libpath); + gdb_printf (gdb_stdlog, _("Host %s resolved to: %s.\n"), + library, libpath); } } @@ -1177,8 +1177,8 @@ thread_db_load_search (void) } if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, - _("thread_db_load_search returning %d\n"), rc); + gdb_printf (gdb_stdlog, + _("thread_db_load_search returning %d\n"), rc); return rc; } @@ -1478,10 +1478,10 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) terminated and joined threads with kernel thread ID -1. See glibc PR17707. */ if (libthread_db_debug) - fprintf_unfiltered (gdb_stdlog, - "thread_db: skipping exited and " - "joined thread (0x%lx)\n", - (unsigned long) ti.ti_tid); + gdb_printf (gdb_stdlog, + "thread_db: skipping exited and " + "joined thread (0x%lx)\n", + (unsigned long) ti.ti_tid); return 0; } @@ -1556,9 +1556,9 @@ find_new_threads_once (struct thread_db_info *info, int iteration, if (libthread_db_debug) { - fprintf_unfiltered (gdb_stdlog, - _("Found %d new threads in iteration %d.\n"), - data.new_threads, iteration); + gdb_printf (gdb_stdlog, + _("Found %d new threads in iteration %d.\n"), + data.new_threads, iteration); } if (errp != NULL) diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index bc82bc5..17b21af 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -201,7 +201,7 @@ m2_language::printstr (struct ui_file *stream, struct type *elttype, in_quotes = 0; } printchar (string[i], elttype, stream); - fprintf_filtered (stream, " <repeats %u times>", reps); + gdb_printf (stream, " <repeats %u times>", reps); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; @@ -238,7 +238,7 @@ m2_language::emitchar (int ch, struct type *chtype, { if (ch == '\\' || ch == quoter) gdb_puts ("\\", stream); - fprintf_filtered (stream, "%c", ch); + gdb_printf (stream, "%c", ch); } else { @@ -266,7 +266,7 @@ m2_language::emitchar (int ch, struct type *chtype, gdb_puts ("\\a", stream); break; default: - fprintf_filtered (stream, "\\%.3o", (unsigned int) ch); + gdb_printf (stream, "\\%.3o", (unsigned int) ch); break; } } diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index ac0f9f6..ae0a879 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -162,15 +162,15 @@ m2_language::print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream) const { type = check_typedef (type); - fprintf_filtered (stream, "TYPE "); + gdb_printf (stream, "TYPE "); if (!new_symbol->type ()->name () || strcmp ((new_symbol->type ())->name (), new_symbol->linkage_name ()) != 0) - fprintf_filtered (stream, "%s = ", new_symbol->print_name ()); + gdb_printf (stream, "%s = ", new_symbol->print_name ()); else - fprintf_filtered (stream, "<builtin> = "); + gdb_printf (stream, "<builtin> = "); type_print (type, "", stream, 0); - fprintf_filtered (stream, ";"); + gdb_printf (stream, ";"); } /* m2_type_name - if a, type, has a name then print it. */ @@ -199,11 +199,11 @@ m2_range (struct type *type, struct ui_file *stream, int show, { struct type *target = TYPE_TARGET_TYPE (type); - fprintf_filtered (stream, "["); + gdb_printf (stream, "["); print_type_scalar (target, type->bounds ()->low.const_val (), stream); - fprintf_filtered (stream, ".."); + gdb_printf (stream, ".."); print_type_scalar (target, type->bounds ()->high.const_val (), stream); - fprintf_filtered (stream, "]"); + gdb_printf (stream, "]"); } } @@ -224,14 +224,14 @@ m2_typedef (struct type *type, struct ui_file *stream, int show, static void m2_array (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags) { - fprintf_filtered (stream, "ARRAY ["); + gdb_printf (stream, "ARRAY ["); if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0 && type->bounds ()->high.kind () != PROP_UNDEFINED) { if (type->index_type () != 0) { m2_print_bounds (type->index_type (), stream, show, -1, 0); - fprintf_filtered (stream, ".."); + gdb_printf (stream, ".."); m2_print_bounds (type->index_type (), stream, show, -1, 1); } else @@ -239,7 +239,7 @@ static void m2_array (struct type *type, struct ui_file *stream, / TYPE_LENGTH (TYPE_TARGET_TYPE (type)))), stream); } - fprintf_filtered (stream, "] OF "); + gdb_printf (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); } @@ -248,9 +248,9 @@ m2_pointer (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags) { if (TYPE_CONST (type)) - fprintf_filtered (stream, "[...] : "); + gdb_printf (stream, "[...] : "); else - fprintf_filtered (stream, "POINTER TO "); + gdb_printf (stream, "POINTER TO "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); } @@ -259,7 +259,7 @@ static void m2_ref (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags) { - fprintf_filtered (stream, "VAR"); + gdb_printf (stream, "VAR"); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); } @@ -267,26 +267,26 @@ static void m2_unknown (const char *s, struct type *type, struct ui_file *stream, int show, int level) { - fprintf_filtered (stream, "%s %s", s, _("is unknown")); + gdb_printf (stream, "%s %s", s, _("is unknown")); } static void m2_union (struct type *type, struct ui_file *stream) { - fprintf_filtered (stream, "union"); + gdb_printf (stream, "union"); } static void m2_procedure (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags) { - fprintf_filtered (stream, "PROCEDURE "); + gdb_printf (stream, "PROCEDURE "); m2_type_name (type, stream); if (TYPE_TARGET_TYPE (type) == NULL || TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { int i, len = type->num_fields (); - fprintf_filtered (stream, " ("); + gdb_printf (stream, " ("); for (i = 0; i < len; i++) { if (i > 0) @@ -296,7 +296,7 @@ m2_procedure (struct type *type, struct ui_file *stream, } m2_print_type (type->field (i).type (), "", stream, -1, 0, flags); } - fprintf_filtered (stream, ") : "); + gdb_printf (stream, ") : "); if (TYPE_TARGET_TYPE (type) != NULL) m2_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, 0, flags); else @@ -323,14 +323,14 @@ m2_print_bounds (struct type *type, static void m2_short_set (struct type *type, struct ui_file *stream, int show, int level) { - fprintf_filtered(stream, "SET ["); + gdb_printf(stream, "SET ["); m2_print_bounds (type->index_type (), stream, show - 1, level, 0); - fprintf_filtered(stream, ".."); + gdb_printf(stream, ".."); m2_print_bounds (type->index_type (), stream, show - 1, level, 1); - fprintf_filtered(stream, "]"); + gdb_printf(stream, "]"); } int @@ -450,26 +450,26 @@ m2_long_set (struct type *type, struct ui_file *stream, int show, int level, if (get_long_set_bounds (type, &low, &high)) { - fprintf_filtered(stream, "SET OF "); + gdb_printf(stream, "SET OF "); i = TYPE_N_BASECLASSES (type); if (m2_is_long_set_of_type (type, &of_type)) m2_print_type (of_type, "", stream, show - 1, level, flags); else { - fprintf_filtered(stream, "["); + gdb_printf(stream, "["); m2_print_bounds (type->field (i).type ()->index_type (), stream, show - 1, level, 0); - fprintf_filtered(stream, ".."); + gdb_printf(stream, ".."); m2_print_bounds (type->field (len - 1).type ()->index_type (), stream, show - 1, level, 1); - fprintf_filtered(stream, "]"); + gdb_printf(stream, "]"); } } else /* i18n: Do not translate the "SET OF" part! */ - fprintf_filtered(stream, _("SET OF <unknown>")); + gdb_printf(stream, _("SET OF <unknown>")); return 1; } @@ -536,16 +536,16 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show, { gdb_puts (type->name (), stream); if (show > 0) - fprintf_filtered (stream, " = "); + gdb_printf (stream, " = "); } } stream->wrap_here (4); if (show < 0) { if (type->code () == TYPE_CODE_STRUCT) - fprintf_filtered (stream, "RECORD ... END "); + gdb_printf (stream, "RECORD ... END "); else if (type->code () == TYPE_CODE_UNION) - fprintf_filtered (stream, "CASE ... END "); + gdb_printf (stream, "CASE ... END "); } else if (show > 0) { @@ -553,10 +553,10 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show, int len = type->num_fields (); if (type->code () == TYPE_CODE_STRUCT) - fprintf_filtered (stream, "RECORD\n"); + gdb_printf (stream, "RECORD\n"); else if (type->code () == TYPE_CODE_UNION) /* i18n: Do not translate "CASE" and "OF". */ - fprintf_filtered (stream, _("CASE <variant> OF\n")); + gdb_printf (stream, _("CASE <variant> OF\n")); for (i = TYPE_N_BASECLASSES (type); i < len; i++) { @@ -576,13 +576,13 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show, unnamed fields. This would lead to misleading results if the compiler does not put out fields for such things (I don't know what it does). */ - fprintf_filtered (stream, " : %d", - TYPE_FIELD_BITSIZE (type, i)); + gdb_printf (stream, " : %d", + TYPE_FIELD_BITSIZE (type, i)); } - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } - fprintf_filtered (stream, "%*sEND ", level, ""); + gdb_printf (stream, "%*sEND ", level, ""); } } @@ -596,29 +596,29 @@ m2_enum (struct type *type, struct ui_file *stream, int show, int level) { /* If we just printed a tag name, no need to print anything else. */ if (type->name () == NULL) - fprintf_filtered (stream, "(...)"); + gdb_printf (stream, "(...)"); } else if (show > 0 || type->name () == NULL) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); len = type->num_fields (); lastval = 0; for (i = 0; i < len; i++) { QUIT; if (i > 0) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); fputs_styled (type->field (i).name (), variable_name_style.style (), stream); if (lastval != type->field (i).loc_enumval ()) { - fprintf_filtered (stream, " = %s", - plongest (type->field (i).loc_enumval ())); + gdb_printf (stream, " = %s", + plongest (type->field (i).loc_enumval ())); lastval = type->field (i).loc_enumval (); } lastval++; } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } } diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index 3fe9ad8..9e3f16a 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -81,7 +81,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, type = check_typedef (type); - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); len = type->num_fields (); if (get_long_set_bounds (type, &low_bound, &high_bound)) { @@ -112,7 +112,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, if (! element_seen) { if (! empty_set) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); print_type_scalar (target, i, stream); empty_set = 0; element_seen = 1; @@ -125,7 +125,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, if (element_seen) { if (previous_low+1 < previous_high) - fprintf_filtered (stream, ".."); + gdb_printf (stream, ".."); if (previous_low+1 < previous_high) print_type_scalar (target, previous_high, stream); element_seen = 0; @@ -146,12 +146,12 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, { if (previous_low+1 < previous_high) { - fprintf_filtered (stream, ".."); + gdb_printf (stream, ".."); print_type_scalar (target, previous_high, stream); } element_seen = 0; } - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } } @@ -175,9 +175,9 @@ m2_print_unbounded_array (struct value *value, addr); len = unpack_field_as_long (type, valaddr, 1); - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); m2_print_array_contents (val, stream, recurse, options, len); - fprintf_filtered (stream, ", HIGH = %d}", (int) len); + gdb_printf (stream, ", HIGH = %d}", (int) len); } static int @@ -232,9 +232,9 @@ print_variable_at_address (struct type *type, CORE_ADDR addr = unpack_pointer (type, valaddr); struct type *elttype = check_typedef (TYPE_TARGET_TYPE (type)); - fprintf_filtered (stream, "["); + gdb_printf (stream, "["); gdb_puts (paddress (gdbarch, addr), stream); - fprintf_filtered (stream, "] : "); + gdb_printf (stream, "] : "); if (elttype->code () != TYPE_CODE_UNDEF) { @@ -274,9 +274,9 @@ m2_print_array_contents (struct value *val, options); else { - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); value_print_array_elements (val, stream, recurse, options, 0); - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } } } @@ -342,10 +342,10 @@ m2_language::value_print_inner (struct value *val, struct ui_file *stream, } else { - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); value_print_array_elements (val, stream, recurse, options, 0); - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } break; } @@ -368,7 +368,7 @@ m2_language::value_print_inner (struct value *val, struct ui_file *stream, case TYPE_CODE_UNION: if (recurse && !options->unionprint) { - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); break; } /* Fall through. */ diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index cbce2f4..070eeb8 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1013,7 +1013,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, if (regno == HARD_A_REGNUM || regno == HARD_B_REGNUM || regno == HARD_CCR_REGNUM || regno == HARD_PAGE_REGNUM) { - fprintf_filtered (file, "0x%02x ", (unsigned char) rval); + gdb_printf (file, "0x%02x ", (unsigned char) rval); if (regno != HARD_CCR_REGNUM) print_longest (file, 'd', 1, rval); } @@ -1027,12 +1027,12 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, ULONGEST page; page = get_frame_register_unsigned (frame, HARD_PAGE_REGNUM); - fprintf_filtered (file, "0x%02x:%04x ", (unsigned) page, - (unsigned) rval); + gdb_printf (file, "0x%02x:%04x ", (unsigned) page, + (unsigned) rval); } else { - fprintf_filtered (file, "0x%04x ", (unsigned) rval); + gdb_printf (file, "0x%04x ", (unsigned) rval); if (regno != HARD_PC_REGNUM && regno != HARD_SP_REGNUM && regno != SOFT_FP_REGNUM && regno != M68HC12_HARD_PC_REGNUM) print_longest (file, 'd', 1, rval); @@ -1045,15 +1045,15 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, int C, Z, N, V; unsigned char l = rval & 0xff; - fprintf_filtered (file, "%c%c%c%c%c%c%c%c ", - l & M6811_S_BIT ? 'S' : '-', - l & M6811_X_BIT ? 'X' : '-', - l & M6811_H_BIT ? 'H' : '-', - l & M6811_I_BIT ? 'I' : '-', - l & M6811_N_BIT ? 'N' : '-', - l & M6811_Z_BIT ? 'Z' : '-', - l & M6811_V_BIT ? 'V' : '-', - l & M6811_C_BIT ? 'C' : '-'); + gdb_printf (file, "%c%c%c%c%c%c%c%c ", + l & M6811_S_BIT ? 'S' : '-', + l & M6811_X_BIT ? 'X' : '-', + l & M6811_H_BIT ? 'H' : '-', + l & M6811_I_BIT ? 'I' : '-', + l & M6811_N_BIT ? 'N' : '-', + l & M6811_Z_BIT ? 'Z' : '-', + l & M6811_V_BIT ? 'V' : '-', + l & M6811_C_BIT ? 'C' : '-'); N = (l & M6811_N_BIT) != 0; Z = (l & M6811_Z_BIT) != 0; V = (l & M6811_V_BIT) != 0; @@ -1061,26 +1061,26 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, /* Print flags following the h8300. */ if ((C | Z) == 0) - fprintf_filtered (file, "u> "); + gdb_printf (file, "u> "); else if ((C | Z) == 1) - fprintf_filtered (file, "u<= "); + gdb_printf (file, "u<= "); else if (C == 0) - fprintf_filtered (file, "u< "); + gdb_printf (file, "u< "); if (Z == 0) - fprintf_filtered (file, "!= "); + gdb_printf (file, "!= "); else - fprintf_filtered (file, "== "); + gdb_printf (file, "== "); if ((N ^ V) == 0) - fprintf_filtered (file, ">= "); + gdb_printf (file, ">= "); else - fprintf_filtered (file, "< "); + gdb_printf (file, "< "); if ((Z | (N ^ V)) == 0) - fprintf_filtered (file, "> "); + gdb_printf (file, "> "); else - fprintf_filtered (file, "<= "); + gdb_printf (file, "<= "); } } @@ -1096,43 +1096,43 @@ m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, if (!name || !*name) return; - fprintf_filtered (file, "%-10s ", name); + gdb_printf (file, "%-10s ", name); m68hc11_print_register (gdbarch, file, frame, regno); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } else { int i, nr; - fprintf_filtered (file, "PC="); + gdb_printf (file, "PC="); m68hc11_print_register (gdbarch, file, frame, HARD_PC_REGNUM); - fprintf_filtered (file, " SP="); + gdb_printf (file, " SP="); m68hc11_print_register (gdbarch, file, frame, HARD_SP_REGNUM); - fprintf_filtered (file, " FP="); + gdb_printf (file, " FP="); m68hc11_print_register (gdbarch, file, frame, SOFT_FP_REGNUM); - fprintf_filtered (file, "\nCCR="); + gdb_printf (file, "\nCCR="); m68hc11_print_register (gdbarch, file, frame, HARD_CCR_REGNUM); - fprintf_filtered (file, "\nD="); + gdb_printf (file, "\nD="); m68hc11_print_register (gdbarch, file, frame, HARD_D_REGNUM); - fprintf_filtered (file, " X="); + gdb_printf (file, " X="); m68hc11_print_register (gdbarch, file, frame, HARD_X_REGNUM); - fprintf_filtered (file, " Y="); + gdb_printf (file, " Y="); m68hc11_print_register (gdbarch, file, frame, HARD_Y_REGNUM); m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch); if (tdep->use_page_register) { - fprintf_filtered (file, "\nPage="); + gdb_printf (file, "\nPage="); m68hc11_print_register (gdbarch, file, frame, HARD_PAGE_REGNUM); } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); nr = 0; for (i = SOFT_D1_REGNUM; i < M68HC11_ALL_REGS; i++) @@ -1141,16 +1141,16 @@ m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, if (soft_regs[i].name == 0) continue; - fprintf_filtered (file, "D%d=", i - SOFT_D1_REGNUM + 1); + gdb_printf (file, "D%d=", i - SOFT_D1_REGNUM + 1); m68hc11_print_register (gdbarch, file, frame, i); nr++; if ((nr % 8) == 7) - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); else - fprintf_filtered (file, " "); + gdb_printf (file, " "); } if (nr && (nr % 8) != 7) - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } } diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index e1caeef..5626c71 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -109,17 +109,17 @@ show_pp_source_pos (struct ui_file *stream, int line) { std::string fullname = macro_source_fullname (file); - fprintf_filtered (stream, "%ps:%d\n", - styled_string (file_name_style.style (), - fullname.c_str ()), - line); + gdb_printf (stream, "%ps:%d\n", + styled_string (file_name_style.style (), + fullname.c_str ()), + line); while (file->included_by) { fullname = macro_source_fullname (file->included_by); gdb_puts (_(" included at "), stream); fputs_styled (fullname.c_str (), file_name_style.style (), stream); - fprintf_filtered (stream, ":%d\n", file->included_at_line); + gdb_printf (stream, ":%d\n", file->included_at_line); file = file->included_by; } } @@ -137,13 +137,13 @@ print_macro_definition (const char *name, struct macro_source_file *file, int line) { - printf_filtered ("Defined at "); + gdb_printf ("Defined at "); show_pp_source_pos (gdb_stdout, file, line); if (line != 0) - printf_filtered ("#define %s", name); + gdb_printf ("#define %s", name); else - printf_filtered ("-D%s", name); + gdb_printf ("-D%s", name); if (d->kind == macro_function_like) { @@ -160,9 +160,9 @@ print_macro_definition (const char *name, } if (line != 0) - printf_filtered (" %s\n", d->replacement); + gdb_printf (" %s\n", d->replacement); else - printf_filtered ("=%s\n", d->replacement); + gdb_printf ("=%s\n", d->replacement); } /* The implementation of the `info macro' command. */ @@ -229,9 +229,9 @@ info_macro_command (const char *args, int from_tty) } else { - printf_filtered ("The symbol `%s' has no definition as a C/C++" - " preprocessor macro\n" - "at ", name); + gdb_printf ("The symbol `%s' has no definition as a C/C++" + " preprocessor macro\n" + "at ", name); show_pp_source_pos (gdb_stdout, ms->file, ms->line); } } @@ -423,18 +423,18 @@ static void print_one_macro (const char *name, const struct macro_definition *macro, struct macro_source_file *source, int line) { - printf_filtered ("macro define %s", name); + gdb_printf ("macro define %s", name); if (macro->kind == macro_function_like) { int i; - printf_filtered ("("); + gdb_printf ("("); for (i = 0; i < macro->argc; ++i) - printf_filtered ("%s%s", (i > 0) ? ", " : "", + gdb_printf ("%s%s", (i > 0) ? ", " : "", macro->argv[i]); - printf_filtered (")"); + gdb_printf (")"); } - printf_filtered (" %s\n", macro->replacement); + gdb_printf (" %s\n", macro->replacement); } @@ -122,7 +122,7 @@ set_gdb_data_directory (const char *new_datadir) { int save_errno = errno; - fprintf_unfiltered (gdb_stderr, "Warning: "); + gdb_printf (gdb_stderr, "Warning: "); print_sys_errmsg (new_datadir, save_errno); } else if (!S_ISDIR (st.st_mode)) @@ -1101,11 +1101,11 @@ captured_main_1 (struct captured_main_args *context) /* Any argument left on the command line is unexpected and will be ignored. Inform the user. */ if (optind < argc) - fprintf_unfiltered (gdb_stderr, - _("Excess command line " - "arguments ignored. (%s%s)\n"), - argv[optind], - (optind == argc - 1) ? "" : " ..."); + gdb_printf (gdb_stderr, + _("Excess command line " + "arguments ignored. (%s%s)\n"), + argv[optind], + (optind == argc - 1) ? "" : " ..."); } /* Lookup gdbinit files. Note that the gdbinit file name may be @@ -1125,7 +1125,7 @@ captured_main_1 (struct captured_main_args *context) { print_gdb_version (gdb_stdout, false); gdb_stdout->wrap_here (0); - printf_filtered ("\n"); + gdb_printf ("\n"); exit (0); } @@ -1139,7 +1139,7 @@ captured_main_1 (struct captured_main_args *context) { print_gdb_configuration (gdb_stdout); gdb_stdout->wrap_here (0); - printf_filtered ("\n"); + gdb_printf ("\n"); exit (0); } @@ -1153,9 +1153,9 @@ captured_main_1 (struct captured_main_args *context) about to read a symbol file (possibly slowly). */ print_gdb_version (gdb_stdout, true); if (symarg) - printf_filtered (".."); + gdb_printf (".."); gdb_stdout->wrap_here (0); - printf_filtered ("\n"); + gdb_printf ("\n"); gdb_flush (gdb_stdout); /* Force to screen during slow operations. */ } @@ -1174,9 +1174,9 @@ captured_main_1 (struct captured_main_args *context) about to read a symbol file (possibly slowly). */ print_gdb_version (gdb_stdout, true); if (symarg) - printf_filtered (".."); + gdb_printf (".."); gdb_stdout->wrap_here (0); - printf_filtered ("\n"); + gdb_printf ("\n"); gdb_flush (gdb_stdout); /* Force to screen during slow operations. */ } @@ -1467,11 +1467,11 @@ At startup, GDB reads the following early init files and executes their\n\ commands:\n\ "), stream); if (!home_gdbearlyinit.empty ()) - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ * user-specific early init file: %s\n\ "), home_gdbearlyinit.c_str ()); if (home_gdbearlyinit.empty ()) - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ None found.\n")); gdb_puts (_("\n\ At startup, GDB reads the following init files and executes their commands:\n\ @@ -1485,32 +1485,32 @@ At startup, GDB reads the following init files and executes their commands:\n\ if (idx < system_gdbinit.size () - 1) output += ", "; } - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ * system-wide init files: %s\n\ "), output.c_str ()); } if (!home_gdbinit.empty ()) - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ * user-specific init file: %s\n\ "), home_gdbinit.c_str ()); if (!local_gdbinit.empty ()) - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ * local init file (see also 'set auto-load local-gdbinit'): ./%s\n\ "), local_gdbinit.c_str ()); if (system_gdbinit.empty () && home_gdbinit.empty () && local_gdbinit.empty ()) - fprintf_unfiltered (stream, _("\ + gdb_printf (stream, _("\ None found.\n")); gdb_puts (_("\n\ For more information, type \"help\" from within GDB, or consult the\n\ GDB manual (available as on-line info or a printed manual).\n\ "), stream); if (REPORT_BUGS_TO[0] && stream == gdb_stdout) - fprintf_unfiltered (stream, _("\n\ + gdb_printf (stream, _("\n\ Report bugs to %s.\n\ "), REPORT_BUGS_TO); if (stream == gdb_stdout) - fprintf_unfiltered (stream, _("\n\ + gdb_printf (stream, _("\n\ You can ask GDB-related questions on the GDB users mailing list\n\ (gdb@sourceware.org) or on GDB's IRC channel (#gdb on Freenode).\n")); } diff --git a/gdb/maint-test-options.c b/gdb/maint-test-options.c index d9d7e0a..1480897 100644 --- a/gdb/maint-test-options.c +++ b/gdb/maint-test-options.c @@ -143,22 +143,22 @@ struct test_options_opts arguments. */ void dump (ui_file *file, const char *args) const { - fprintf_filtered (file, - _("-flag %d -xx1 %d -xx2 %d -bool %d " - "-enum %s -uint %s -zuint-unl %s -string '%s' -- %s\n"), - flag_opt, - xx1_opt, - xx2_opt, - boolean_opt, - enum_opt, - (uint_opt == UINT_MAX - ? "unlimited" - : pulongest (uint_opt)), - (zuint_unl_opt == -1 - ? "unlimited" - : plongest (zuint_unl_opt)), - string_opt.c_str (), - args); + gdb_printf (file, + _("-flag %d -xx1 %d -xx2 %d -bool %d " + "-enum %s -uint %s -zuint-unl %s -string '%s' -- %s\n"), + flag_opt, + xx1_opt, + xx2_opt, + boolean_opt, + enum_opt, + (uint_opt == UINT_MAX + ? "unlimited" + : pulongest (uint_opt)), + (zuint_unl_opt == -1 + ? "unlimited" + : plongest (zuint_unl_opt)), + string_opt.c_str (), + args); } }; diff --git a/gdb/maint-test-settings.c b/gdb/maint-test-settings.c index 5607b92..fbcce9d 100644 --- a/gdb/maint-test-settings.c +++ b/gdb/maint-test-settings.c @@ -75,7 +75,7 @@ maintenance_show_test_settings_value_cmd (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, (("%s\n")), value); + gdb_printf (file, (("%s\n")), value); } diff --git a/gdb/maint.c b/gdb/maint.c index de3e07e..8cebd6a 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -109,14 +109,14 @@ maintenance_demangler_warning (const char *args, int from_tty) static void maintenance_demangle (const char *args, int from_tty) { - printf_filtered (_("This command has been moved to \"demangle\".\n")); + gdb_printf (_("This command has been moved to \"demangle\".\n")); } static void maintenance_time_display (const char *args, int from_tty) { if (args == NULL || *args == '\0') - printf_filtered (_("\"maintenance time\" takes a numeric argument.\n")); + gdb_printf (_("\"maintenance time\" takes a numeric argument.\n")); else set_per_command_time (strtol (args, NULL, 10)); } @@ -125,7 +125,7 @@ static void maintenance_space_display (const char *args, int from_tty) { if (args == NULL || *args == '\0') - printf_filtered ("\"maintenance space\" takes a numeric argument.\n"); + gdb_printf ("\"maintenance space\" takes a numeric argument.\n"); else set_per_command_space (strtol (args, NULL, 10)); } @@ -220,7 +220,7 @@ print_bfd_flags (flagword flags) for (const auto &f : bfd_flag_info) { if (flags & f.value) - printf_filtered (" %s", f.name); + gdb_printf (" %s", f.name); } } @@ -229,13 +229,13 @@ maint_print_section_info (const char *name, flagword flags, CORE_ADDR addr, CORE_ADDR endaddr, unsigned long filepos, int addr_size) { - printf_filtered (" %s", hex_string_custom (addr, addr_size)); - printf_filtered ("->%s", hex_string_custom (endaddr, addr_size)); - printf_filtered (" at %s", - hex_string_custom ((unsigned long) filepos, 8)); - printf_filtered (": %s", name); + gdb_printf (" %s", hex_string_custom (addr, addr_size)); + gdb_printf ("->%s", hex_string_custom (endaddr, addr_size)); + gdb_printf (" at %s", + hex_string_custom ((unsigned long) filepos, 8)); + gdb_printf (": %s", name); print_bfd_flags (flags); - printf_filtered ("\n"); + gdb_printf ("\n"); } /* Return the number of digits required to display COUNT in decimal. @@ -261,7 +261,7 @@ print_section_index (bfd *abfd, std::string result = string_printf (" [%d] ", gdb_bfd_section_index (abfd, asect)); /* The '+ 4' for the leading and trailing characters. */ - printf_filtered ("%-*s", (index_digits + 4), result.c_str ()); + gdb_printf ("%-*s", (index_digits + 4), result.c_str ()); } /* Print information about ASECT from ABFD. The section will be printed using @@ -365,9 +365,9 @@ maint_print_all_sections (const char *header, bfd *abfd, objfile *objfile, { gdb_puts (header); gdb_stdout->wrap_here (8); - printf_filtered ("`%s', ", bfd_get_filename (abfd)); + gdb_printf ("`%s', ", bfd_get_filename (abfd)); gdb_stdout->wrap_here (8); - printf_filtered (_("file type %s.\n"), bfd_get_target (abfd)); + gdb_printf (_("file type %s.\n"), bfd_get_target (abfd)); int section_count = gdb_bfd_count_sections (abfd); int digits = index_digits (section_count); @@ -497,8 +497,8 @@ maintenance_info_target_sections (const char *arg, int from_tty) gdbarch = gdbarch_from_bfd (abfd); addr_size = gdbarch_addr_bit (gdbarch) / 8; - printf_filtered (_("From '%s', file type %s:\n"), - bfd_get_filename (abfd), bfd_get_target (abfd)); + gdb_printf (_("From '%s', file type %s:\n"), + bfd_get_filename (abfd), bfd_get_target (abfd)); } print_bfd_section_info (abfd, sec.the_bfd_section, @@ -506,11 +506,11 @@ maintenance_info_target_sections (const char *arg, int from_tty) digits); /* The magic '8 + digits' here ensures that the 'Start' is aligned with the output of print_bfd_section_info. */ - printf_filtered ("%*sStart: %s, End: %s, Owner token: %p\n", - (8 + digits), "", - hex_string_custom (sec.addr, addr_size), - hex_string_custom (sec.endaddr, addr_size), - sec.owner); + gdb_printf ("%*sStart: %s, End: %s, Owner token: %p\n", + (8 + digits), "", + hex_string_custom (sec.addr, addr_size), + hex_string_custom (sec.endaddr, addr_size), + sec.owner); } } @@ -603,21 +603,21 @@ maintenance_translate_address (const char *arg, int from_tty) obj_name = objfile_name (sect->objfile); if (current_program_space->multi_objfile_p ()) - printf_filtered (_("%s + %s in section %s of %s\n"), - symbol_name, symbol_offset, - section_name, obj_name); + gdb_printf (_("%s + %s in section %s of %s\n"), + symbol_name, symbol_offset, + section_name, obj_name); else - printf_filtered (_("%s + %s in section %s\n"), - symbol_name, symbol_offset, section_name); + gdb_printf (_("%s + %s in section %s\n"), + symbol_name, symbol_offset, section_name); } else - printf_filtered (_("%s + %s\n"), symbol_name, symbol_offset); + gdb_printf (_("%s + %s\n"), symbol_name, symbol_offset); } else if (sect) - printf_filtered (_("no symbol at %s:%s\n"), - sect->the_bfd_section->name, hex_string (address)); + gdb_printf (_("no symbol at %s:%s\n"), + sect->the_bfd_section->name, hex_string (address)); else - printf_filtered (_("no symbol at %s\n"), hex_string (address)); + gdb_printf (_("no symbol at %s\n"), hex_string (address)); return; } @@ -632,7 +632,7 @@ maintenance_deprecate (const char *args, int from_tty) { if (args == NULL || *args == '\0') { - printf_filtered (_("\"maintenance deprecate\" takes an argument,\n\ + gdb_printf (_("\"maintenance deprecate\" takes an argument,\n\ the command you want to deprecate, and optionally the replacement command\n\ enclosed in quotes.\n")); } @@ -646,7 +646,7 @@ maintenance_undeprecate (const char *args, int from_tty) { if (args == NULL || *args == '\0') { - printf_filtered (_("\"maintenance undeprecate\" takes an argument, \n\ + gdb_printf (_("\"maintenance undeprecate\" takes an argument, \n\ the command you want to undeprecate.\n")); } @@ -677,7 +677,7 @@ maintenance_do_deprecate (const char *text, int deprecate) if (!lookup_cmd_composition (text, &alias, &prefix_cmd, &cmd)) { - printf_filtered (_("Can't find command '%s' to deprecate.\n"), text); + gdb_printf (_("Can't find command '%s' to deprecate.\n"), text); return; } @@ -777,7 +777,7 @@ static void show_maintenance_profile_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Internal profiling is %s.\n"), value); + gdb_printf (file, _("Internal profiling is %s.\n"), value); } #ifdef HAVE__ETEXT @@ -874,9 +874,9 @@ maintenance_show_worker_threads (struct ui_file *file, int from_tty, #if CXX_STD_THREAD if (n_worker_threads == -1) { - fprintf_filtered (file, _("The number of worker threads GDB " - "can use is unlimited (currently %zu).\n"), - gdb::thread_pool::g_thread_pool->thread_count ()); + gdb_printf (file, _("The number of worker threads GDB " + "can use is unlimited (currently %zu).\n"), + gdb::thread_pool::g_thread_pool->thread_count ()); return; } #endif @@ -885,9 +885,9 @@ maintenance_show_worker_threads (struct ui_file *file, int from_tty, #if CXX_STD_THREAD report_threads = n_worker_threads; #endif - fprintf_filtered (file, _("The number of worker threads GDB " - "can use is %d.\n"), - report_threads); + gdb_printf (file, _("The number of worker threads GDB " + "can use is %d.\n"), + report_threads); } @@ -990,12 +990,12 @@ scoped_command_stats::~scoped_command_stats () /* Subtract time spend in prompt_for_continue from walltime. */ wall_time -= get_prompt_for_continue_wait_time (); - fprintf_unfiltered (gdb_stdlog, - !m_msg_type - ? _("Startup time: %.6f (cpu), %.6f (wall)\n") - : _("Command execution time: %.6f (cpu), %.6f (wall)\n"), - duration<double> (cmd_time).count (), - duration<double> (wall_time).count ()); + gdb_printf (gdb_stdlog, + !m_msg_type + ? _("Startup time: %.6f (cpu), %.6f (wall)\n") + : _("Command execution time: %.6f (cpu), %.6f (wall)\n"), + duration<double> (cmd_time).count (), + duration<double> (wall_time).count ()); } if (m_space_enabled && per_command_space) @@ -1006,13 +1006,13 @@ scoped_command_stats::~scoped_command_stats () long space_now = lim - lim_at_start; long space_diff = space_now - m_start_space; - fprintf_unfiltered (gdb_stdlog, - !m_msg_type - ? _("Space used: %ld (%s%ld during startup)\n") - : _("Space used: %ld (%s%ld for this command)\n"), - space_now, - (space_diff >= 0 ? "+" : ""), - space_diff); + gdb_printf (gdb_stdlog, + !m_msg_type + ? _("Space used: %ld (%s%ld during startup)\n") + : _("Space used: %ld (%s%ld for this command)\n"), + space_now, + (space_diff >= 0 ? "+" : ""), + space_diff); #endif } @@ -1021,17 +1021,17 @@ scoped_command_stats::~scoped_command_stats () int nr_symtabs, nr_compunit_symtabs, nr_blocks; count_symtabs_and_blocks (&nr_symtabs, &nr_compunit_symtabs, &nr_blocks); - fprintf_unfiltered (gdb_stdlog, - _("#symtabs: %d (+%d)," - " #compunits: %d (+%d)," - " #blocks: %d (+%d)\n"), - nr_symtabs, - nr_symtabs - m_start_nr_symtabs, - nr_compunit_symtabs, - (nr_compunit_symtabs - - m_start_nr_compunit_symtabs), - nr_blocks, - nr_blocks - m_start_nr_blocks); + gdb_printf (gdb_stdlog, + _("#symtabs: %d (+%d)," + " #compunits: %d (+%d)," + " #blocks: %d (+%d)\n"), + nr_symtabs, + nr_symtabs - m_start_nr_symtabs, + nr_compunit_symtabs, + (nr_compunit_symtabs + - m_start_nr_compunit_symtabs), + nr_blocks, + nr_blocks - m_start_nr_blocks); } } @@ -1098,7 +1098,7 @@ scoped_command_stats::print_time (const char *msg) char out[100]; strftime (out, sizeof (out), "%F %H:%M:%S", &tm); - fprintf_unfiltered (gdb_stdlog, "%s.%03d - %s\n", out, (int) millis, msg); + gdb_printf (gdb_stdlog, "%s.%03d - %s\n", out, (int) millis, msg); } /* Handle unknown "mt set per-command" arguments. @@ -1164,7 +1164,7 @@ maintenance_selftest (const char *args, int from_tty) const gdb_argv argv (args); selftests::run_tests (argv.as_array_view (), opts.verbose); #else - printf_filtered (_("\ + gdb_printf (_("\ Selftests have been disabled for this build.\n")); #endif } @@ -1196,12 +1196,12 @@ static void maintenance_info_selftests (const char *arg, int from_tty) { #if GDB_SELF_TEST - printf_filtered ("Registered selftests:\n"); + gdb_printf ("Registered selftests:\n"); selftests::for_each_selftest ([] (const std::string &name) { - printf_filtered (" - %s\n", name.c_str ()); + gdb_printf (" - %s\n", name.c_str ()); }); #else - printf_filtered (_("\ + gdb_printf (_("\ Selftests have been disabled for this build.\n")); #endif } diff --git a/gdb/make-target-delegates.py b/gdb/make-target-delegates.py index a68315d..9fe7cb1 100755 --- a/gdb/make-target-delegates.py +++ b/gdb/make-target-delegates.py @@ -246,7 +246,7 @@ def write_debugmethod(f, content, name, return_type, argtypes): if return_type != "void": print(" " + return_type + " result;", file=f) print( - ' fprintf_unfiltered (gdb_stdlog, "-> %s->' + ' gdb_printf (gdb_stdlog, "-> %s->' + name + ' (...)\\n", this->beneath ()->shortname ());', file=f, @@ -262,7 +262,7 @@ def write_debugmethod(f, content, name, return_type, argtypes): # Now print the arguments. print( - ' fprintf_unfiltered (gdb_stdlog, "<- %s->' + ' gdb_printf (gdb_stdlog, "<- %s->' + name + ' (", this->beneath ()->shortname ());', file=f, diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index e377fdb..0db0508 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -371,11 +371,11 @@ mdebug_build_psymtabs (minimal_symbol_reader &reader, if (compare_glevel (max_glevel, GLEVEL_2) < 0) { if (max_gdbinfo == 0) - printf_filtered (_("\n%s not compiled with -g, " - "debugging support is limited.\n"), - objfile->name); - printf_filtered (_("You should compile with -g2 or " - "-g3 for best debugging support.\n")); + gdb_printf (_("\n%s not compiled with -g, " + "debugging support is limited.\n"), + objfile->name); + gdb_printf (_("You should compile with -g2 or " + "-g3 for best debugging support.\n")); } #endif } @@ -2102,9 +2102,9 @@ parse_external (EXTR *es, int bigend, const section_offsets §ion_offsets, n_undef_symbols++; /* FIXME: Turn this into a complaint? */ if (info_verbose) - printf_filtered (_("Warning: %s `%s' is undefined (in %s)\n"), - what, debug_info->ssext + es->asym.iss, - fdr_name (cur_fdr)); + gdb_printf (_("Warning: %s `%s' is undefined (in %s)\n"), + what, debug_info->ssext + es->asym.iss, + fdr_name (cur_fdr)); return; } @@ -4200,13 +4200,13 @@ mdebug_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) from a shared library, so tell the user only if verbose is on. */ if (info_verbose && n_undef_symbols) { - printf_filtered (_("File %s contains %d unresolved references:"), - symtab_to_filename_for_display - (cust->primary_filetab ()), - n_undef_symbols); - printf_filtered ("\n\t%4d variables\n\t%4d " - "procedures\n\t%4d labels\n", - n_undef_vars, n_undef_procs, n_undef_labels); + gdb_printf (_("File %s contains %d unresolved references:"), + symtab_to_filename_for_display + (cust->primary_filetab ()), + n_undef_symbols); + gdb_printf ("\n\t%4d variables\n\t%4d " + "procedures\n\t%4d labels\n", + n_undef_vars, n_undef_procs, n_undef_labels); n_undef_symbols = n_undef_labels = n_undef_vars = n_undef_procs = 0; } diff --git a/gdb/memattr.c b/gdb/memattr.c index f838884..fbcbe1d 100644 --- a/gdb/memattr.c +++ b/gdb/memattr.c @@ -60,11 +60,11 @@ show_inaccessible_by_default (struct ui_file *file, int from_tty, const char *value) { if (inaccessible_by_default) - fprintf_filtered (file, _("Unknown memory addresses will " - "be treated as inaccessible.\n")); + gdb_printf (file, _("Unknown memory addresses will " + "be treated as inaccessible.\n")); else - fprintf_filtered (file, _("Unknown memory addresses " - "will be treated as RAM.\n")); + gdb_printf (file, _("Unknown memory addresses " + "will be treated as RAM.\n")); } /* This function should be called before any command which would @@ -121,7 +121,7 @@ create_user_mem_region (CORE_ADDR lo, CORE_ADDR hi, /* lo == hi is a useless empty region. */ if (lo >= hi && hi != 0) { - printf_filtered (_("invalid memory region: low >= high\n")); + gdb_printf (_("invalid memory region: low >= high\n")); return; } @@ -148,7 +148,7 @@ create_user_mem_region (CORE_ADDR lo, CORE_ADDR hi, || (hi > n.lo && (hi <= n.hi || n.hi == 0)) || (lo <= n.lo && ((hi >= n.hi && n.hi != 0) || hi == 0))) { - printf_filtered (_("overlapping memory region\n")); + gdb_printf (_("overlapping memory region\n")); return; } } @@ -339,42 +339,42 @@ static void info_mem_command (const char *args, int from_tty) { if (mem_use_target ()) - printf_filtered (_("Using memory regions provided by the target.\n")); + gdb_printf (_("Using memory regions provided by the target.\n")); else - printf_filtered (_("Using user-defined memory regions.\n")); + gdb_printf (_("Using user-defined memory regions.\n")); require_target_regions (); if (mem_region_list->empty ()) { - printf_filtered (_("There are no memory regions defined.\n")); + gdb_printf (_("There are no memory regions defined.\n")); return; } - printf_filtered ("Num "); - printf_filtered ("Enb "); - printf_filtered ("Low Addr "); + gdb_printf ("Num "); + gdb_printf ("Enb "); + gdb_printf ("Low Addr "); if (gdbarch_addr_bit (target_gdbarch ()) > 32) - printf_filtered (" "); - printf_filtered ("High Addr "); + gdb_printf (" "); + gdb_printf ("High Addr "); if (gdbarch_addr_bit (target_gdbarch ()) > 32) - printf_filtered (" "); - printf_filtered ("Attrs "); - printf_filtered ("\n"); + gdb_printf (" "); + gdb_printf ("Attrs "); + gdb_printf ("\n"); for (const mem_region &m : *mem_region_list) { const char *tmp; - printf_filtered ("%-3d %-3c\t", - m.number, - m.enabled_p ? 'y' : 'n'); + gdb_printf ("%-3d %-3c\t", + m.number, + m.enabled_p ? 'y' : 'n'); if (gdbarch_addr_bit (target_gdbarch ()) <= 32) tmp = hex_string_custom (m.lo, 8); else tmp = hex_string_custom (m.lo, 16); - printf_filtered ("%s ", tmp); + gdb_printf ("%s ", tmp); if (gdbarch_addr_bit (target_gdbarch ()) <= 32) { @@ -391,7 +391,7 @@ info_mem_command (const char *args, int from_tty) tmp = hex_string_custom (m.hi, 16); } - printf_filtered ("%s ", tmp); + gdb_printf ("%s ", tmp); /* Print a token for each attribute. @@ -408,32 +408,32 @@ info_mem_command (const char *args, int from_tty) switch (m.attrib.mode) { case MEM_RW: - printf_filtered ("rw "); + gdb_printf ("rw "); break; case MEM_RO: - printf_filtered ("ro "); + gdb_printf ("ro "); break; case MEM_WO: - printf_filtered ("wo "); + gdb_printf ("wo "); break; case MEM_FLASH: - printf_filtered ("flash blocksize 0x%x ", m.attrib.blocksize); + gdb_printf ("flash blocksize 0x%x ", m.attrib.blocksize); break; } switch (m.attrib.width) { case MEM_WIDTH_8: - printf_filtered ("8 "); + gdb_printf ("8 "); break; case MEM_WIDTH_16: - printf_filtered ("16 "); + gdb_printf ("16 "); break; case MEM_WIDTH_32: - printf_filtered ("32 "); + gdb_printf ("32 "); break; case MEM_WIDTH_64: - printf_filtered ("64 "); + gdb_printf ("64 "); break; case MEM_WIDTH_UNSPECIFIED: break; @@ -441,24 +441,24 @@ info_mem_command (const char *args, int from_tty) #if 0 if (attrib->hwbreak) - printf_filtered ("hwbreak"); + gdb_printf ("hwbreak"); else - printf_filtered ("swbreak"); + gdb_printf ("swbreak"); #endif if (m.attrib.cache) - printf_filtered ("cache "); + gdb_printf ("cache "); else - printf_filtered ("nocache "); + gdb_printf ("nocache "); #if 0 if (attrib->verify) - printf_filtered ("verify "); + gdb_printf ("verify "); else - printf_filtered ("noverify "); + gdb_printf ("noverify "); #endif - printf_filtered ("\n"); + gdb_printf ("\n"); } } @@ -474,7 +474,7 @@ mem_enable (int num) m.enabled_p = 1; return; } - printf_filtered (_("No memory region number %d.\n"), num); + gdb_printf (_("No memory region number %d.\n"), num); } static void @@ -512,7 +512,7 @@ mem_disable (int num) m.enabled_p = 0; return; } - printf_filtered (_("No memory region number %d.\n"), num); + gdb_printf (_("No memory region number %d.\n"), num); } static void @@ -545,7 +545,7 @@ mem_delete (int num) { if (!mem_region_list) { - printf_filtered (_("No memory region number %d.\n"), num); + gdb_printf (_("No memory region number %d.\n"), num); return; } @@ -558,7 +558,7 @@ mem_delete (int num) if (it != mem_region_list->end ()) mem_region_list->erase (it); else - printf_filtered (_("No memory region number %d.\n"), num); + gdb_printf (_("No memory region number %d.\n"), num); } static void diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index c660fd5..3db09cf 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -125,9 +125,9 @@ mi_cmd_var_create (const char *command, char **argv, int argc) } if (varobjdebug) - fprintf_unfiltered (gdb_stdlog, - "Name=\"%s\", Frame=\"%s\" (%s), Expression=\"%s\"\n", - name, frame, hex_string (frameaddr), expr); + gdb_printf (gdb_stdlog, + "Name=\"%s\", Frame=\"%s\" (%s), Expression=\"%s\"\n", + name, frame, hex_string (frameaddr), expr); var = varobj_create (name, expr, frameaddr, var_type); diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 4da4518..8d6e033 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -159,9 +159,9 @@ mi_interp::init (bool top_level) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-group-added,id=\"i%d\"", - inf->num); + gdb_printf (mi->event_channel, + "thread-group-added,id=\"i%d\"", + inf->num); gdb_flush (mi->event_channel); } @@ -348,9 +348,9 @@ mi_new_thread (struct thread_info *t) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-created,id=\"%d\",group-id=\"i%d\"", - t->global_num, t->inf->num); + gdb_printf (mi->event_channel, + "thread-created,id=\"%d\",group-id=\"i%d\"", + t->global_num, t->inf->num); gdb_flush (mi->event_channel); } } @@ -370,9 +370,9 @@ mi_thread_exit (struct thread_info *t, int silent) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-exited,id=\"%d\",group-id=\"i%d\"", - t->global_num, t->inf->num); + gdb_printf (mi->event_channel, + "thread-exited,id=\"%d\",group-id=\"i%d\"", + t->global_num, t->inf->num); gdb_flush (mi->event_channel); } } @@ -397,24 +397,24 @@ mi_record_changed (struct inferior *inferior, int started, const char *method, { if (format != NULL) { - fprintf_unfiltered (mi->event_channel, - "record-started,thread-group=\"i%d\"," - "method=\"%s\",format=\"%s\"", - inferior->num, method, format); + gdb_printf (mi->event_channel, + "record-started,thread-group=\"i%d\"," + "method=\"%s\",format=\"%s\"", + inferior->num, method, format); } else { - fprintf_unfiltered (mi->event_channel, - "record-started,thread-group=\"i%d\"," - "method=\"%s\"", - inferior->num, method); + gdb_printf (mi->event_channel, + "record-started,thread-group=\"i%d\"," + "method=\"%s\"", + inferior->num, method); } } else { - fprintf_unfiltered (mi->event_channel, - "record-stopped,thread-group=\"i%d\"", - inferior->num); + gdb_printf (mi->event_channel, + "record-stopped,thread-group=\"i%d\"", + inferior->num); } gdb_flush (mi->event_channel); @@ -442,9 +442,9 @@ mi_inferior_added (struct inferior *inf) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-group-added,id=\"i%d\"", - inf->num); + gdb_printf (mi->event_channel, + "thread-group-added,id=\"i%d\"", + inf->num); gdb_flush (mi->event_channel); } } @@ -462,9 +462,9 @@ mi_inferior_appeared (struct inferior *inf) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-group-started,id=\"i%d\",pid=\"%d\"", - inf->num, inf->pid); + gdb_printf (mi->event_channel, + "thread-group-started,id=\"i%d\",pid=\"%d\"", + inf->num, inf->pid); gdb_flush (mi->event_channel); } } @@ -483,12 +483,12 @@ mi_inferior_exit (struct inferior *inf) target_terminal::ours_for_output (); if (inf->has_exit_code) - fprintf_unfiltered (mi->event_channel, - "thread-group-exited,id=\"i%d\",exit-code=\"%s\"", - inf->num, int_string (inf->exit_code, 8, 0, 0, 1)); + gdb_printf (mi->event_channel, + "thread-group-exited,id=\"i%d\",exit-code=\"%s\"", + inf->num, int_string (inf->exit_code, 8, 0, 0, 1)); else - fprintf_unfiltered (mi->event_channel, - "thread-group-exited,id=\"i%d\"", inf->num); + gdb_printf (mi->event_channel, + "thread-group-exited,id=\"i%d\"", inf->num); gdb_flush (mi->event_channel); } @@ -507,9 +507,9 @@ mi_inferior_removed (struct inferior *inf) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "thread-group-removed,id=\"i%d\"", - inf->num); + gdb_printf (mi->event_channel, + "thread-group-removed,id=\"i%d\"", + inf->num); gdb_flush (mi->event_channel); } } @@ -740,11 +740,11 @@ mi_traceframe_changed (int tfnum, int tpnum) target_terminal::ours_for_output (); if (tfnum >= 0) - fprintf_unfiltered (mi->event_channel, "traceframe-changed," - "num=\"%d\",tracepoint=\"%d\"", - tfnum, tpnum); + gdb_printf (mi->event_channel, "traceframe-changed," + "num=\"%d\",tracepoint=\"%d\"", + tfnum, tpnum); else - fprintf_unfiltered (mi->event_channel, "traceframe-changed,end"); + gdb_printf (mi->event_channel, "traceframe-changed,end"); gdb_flush (mi->event_channel); } @@ -765,9 +765,9 @@ mi_tsv_created (const struct trace_state_variable *tsv) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "tsv-created," - "name=\"%s\",initial=\"%s\"", - tsv->name.c_str (), plongest (tsv->initial_value)); + gdb_printf (mi->event_channel, "tsv-created," + "name=\"%s\",initial=\"%s\"", + tsv->name.c_str (), plongest (tsv->initial_value)); gdb_flush (mi->event_channel); } @@ -789,10 +789,10 @@ mi_tsv_deleted (const struct trace_state_variable *tsv) target_terminal::ours_for_output (); if (tsv != NULL) - fprintf_unfiltered (mi->event_channel, "tsv-deleted," - "name=\"%s\"", tsv->name.c_str ()); + gdb_printf (mi->event_channel, "tsv-deleted," + "name=\"%s\"", tsv->name.c_str ()); else - fprintf_unfiltered (mi->event_channel, "tsv-deleted"); + gdb_printf (mi->event_channel, "tsv-deleted"); gdb_flush (mi->event_channel); } @@ -816,8 +816,8 @@ mi_tsv_modified (const struct trace_state_variable *tsv) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "tsv-modified"); + gdb_printf (mi->event_channel, + "tsv-modified"); mi_uiout->redirect (mi->event_channel); @@ -885,8 +885,8 @@ mi_breakpoint_created (struct breakpoint *b) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "breakpoint-created"); + gdb_printf (mi->event_channel, + "breakpoint-created"); mi_print_breakpoint_for_event (mi, b); gdb_flush (mi->event_channel); @@ -914,8 +914,8 @@ mi_breakpoint_deleted (struct breakpoint *b) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "breakpoint-deleted,id=\"%d\"", - b->number); + gdb_printf (mi->event_channel, "breakpoint-deleted,id=\"%d\"", + b->number); gdb_flush (mi->event_channel); } @@ -941,8 +941,8 @@ mi_breakpoint_modified (struct breakpoint *b) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, - "breakpoint-modified"); + gdb_printf (mi->event_channel, + "breakpoint-modified"); mi_print_breakpoint_for_event (mi, b); gdb_flush (mi->event_channel); @@ -959,9 +959,9 @@ mi_output_running (struct thread_info *thread) if (mi == NULL) continue; - fprintf_unfiltered (mi->raw_stdout, - "*running,thread-id=\"%d\"\n", - thread->global_num); + gdb_printf (mi->raw_stdout, + "*running,thread-id=\"%d\"\n", + thread->global_num); } } @@ -997,8 +997,8 @@ mi_on_resume_1 (struct mi_interp *mi, In future (MI3), we'll be outputting "^done" here. */ if (!running_result_record_printed && mi_proceeded) { - fprintf_unfiltered (mi->raw_stdout, "%s^running\n", - current_token ? current_token : ""); + gdb_printf (mi->raw_stdout, "%s^running\n", + current_token ? current_token : ""); } /* Backwards compatibility. If doing a wildcard resume and there's @@ -1006,7 +1006,7 @@ mi_on_resume_1 (struct mi_interp *mi, thread individually. */ if ((ptid == minus_one_ptid || ptid.is_pid ()) && !multiple_inferiors_p ()) - fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"all\"\n"); + gdb_printf (mi->raw_stdout, "*running,thread-id=\"all\"\n"); else for (thread_info *tp : all_non_exited_threads (targ, ptid)) mi_output_running (tp); @@ -1091,7 +1091,7 @@ mi_solib_loaded (struct so_list *solib) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "library-loaded"); + gdb_printf (mi->event_channel, "library-loaded"); uiout->redirect (mi->event_channel); @@ -1119,7 +1119,7 @@ mi_solib_unloaded (struct so_list *solib) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "library-unloaded"); + gdb_printf (mi->event_channel, "library-unloaded"); uiout->redirect (mi->event_channel); @@ -1158,7 +1158,7 @@ mi_command_param_changed (const char *param, const char *value) target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "cmd-param-changed"); + gdb_printf (mi->event_channel, "cmd-param-changed"); mi_uiout->redirect (mi->event_channel); @@ -1194,7 +1194,7 @@ mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr, target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); - fprintf_unfiltered (mi->event_channel, "memory-changed"); + gdb_printf (mi->event_channel, "memory-changed"); mi_uiout->redirect (mi->event_channel); @@ -1260,9 +1260,9 @@ mi_user_selected_context_changed (user_selected_what selection) { print_selected_thread_frame (mi->cli_uiout, selection); - fprintf_unfiltered (mi->event_channel, - "thread-selected,id=\"%d\"", - tp->global_num); + gdb_printf (mi->event_channel, + "thread-selected,id=\"%d\"", + tp->global_num); if (tp->state != THREAD_RUNNING) { diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index ff46af5..18707bf 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -123,9 +123,9 @@ show_mi_async_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether MI is in asynchronous mode is %s.\n"), - value); + gdb_printf (file, + _("Whether MI is in asynchronous mode is %s.\n"), + value); } /* A wrapper for target_can_async_p that takes the MI setting into @@ -1816,9 +1816,9 @@ captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context) case MI_COMMAND: /* A MI command was read from the input stream. */ if (mi_debug_p) - fprintf_unfiltered (gdb_stdlog, - " token=`%s' command=`%s' args=`%s'\n", - context->token, context->command, context->args); + gdb_printf (gdb_stdlog, + " token=`%s' command=`%s' args=`%s'\n", + context->token, context->command, context->args); mi_cmd_execute (context); @@ -1855,7 +1855,7 @@ captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context) /* This "feature" will be removed as soon as we have a complete set of mi commands. */ /* Echo the command on the console. */ - fprintf_unfiltered (gdb_stdlog, "%s\n", context->command); + gdb_printf (gdb_stdlog, "%s\n", context->command); /* Call the "console" interpreter. */ argv[0] = (char *) INTERP_CONSOLE; argv[1] = context->command; @@ -2135,8 +2135,8 @@ mi_execute_cli_command (const char *cmd, bool args_p, const char *args) gdb_assert (args == nullptr); if (mi_debug_p) - fprintf_unfiltered (gdb_stdlog, "cli=%s run=%s\n", - cmd, run.c_str ()); + gdb_printf (gdb_stdlog, "cli=%s run=%s\n", + cmd, run.c_str ()); execute_command (run.c_str (), 0 /* from_tty */ ); } @@ -2258,7 +2258,7 @@ print_diff (struct ui_file *file, struct mi_timestamp *start, duration<double> utime = end->utime - start->utime; duration<double> stime = end->stime - start->stime; - fprintf_unfiltered + gdb_printf (file, ",time={wallclock=\"%0.5f\",user=\"%0.5f\",system=\"%0.5f\"}", wallclock.count (), utime.count (), stime.count ()); diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index c84cc55..567ef83 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -132,11 +132,11 @@ mi_ui_out::do_field_string (int fldno, int width, ui_align align, field_separator (); if (fldname) - fprintf_unfiltered (stream, "%s=", fldname); - fprintf_unfiltered (stream, "\""); + gdb_printf (stream, "%s=", fldname); + gdb_printf (stream, "\""); if (string) stream->putstr (string, '"'); - fprintf_unfiltered (stream, "\""); + gdb_printf (stream, "\""); } void @@ -148,7 +148,7 @@ mi_ui_out::do_field_fmt (int fldno, int width, ui_align align, field_separator (); if (fldname) - fprintf_unfiltered (stream, "%s=\"", fldname); + gdb_printf (stream, "%s=\"", fldname); else gdb_puts ("\"", stream); gdb_vprintf (stream, format, args); @@ -211,7 +211,7 @@ mi_ui_out::open (const char *name, ui_out_type type) m_suppress_field_separator = true; if (name) - fprintf_unfiltered (stream, "%s=", name); + gdb_printf (stream, "%s=", name); switch (type) { diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 4eab8da..a24930b 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -387,10 +387,10 @@ lookup_minimal_symbol (const char *name, const char *sfile, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_minimal_symbol (%s, %s, %s)\n", - name, sfile != NULL ? sfile : "NULL", - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, + "lookup_minimal_symbol (%s, %s, %s)\n", + name, sfile != NULL ? sfile : "NULL", + objfile_debug_name (objfile)); } /* Do two passes: the first over the ordinary hash table, @@ -438,9 +438,9 @@ lookup_minimal_symbol (const char *name, const char *sfile, { minimal_symbol *minsym = found.external_symbol.minsym; - fprintf_unfiltered (gdb_stdlog, - "lookup_minimal_symbol (...) = %s (external)\n", - host_address_to_string (minsym)); + gdb_printf (gdb_stdlog, + "lookup_minimal_symbol (...) = %s (external)\n", + host_address_to_string (minsym)); } return found.external_symbol; } @@ -452,9 +452,9 @@ lookup_minimal_symbol (const char *name, const char *sfile, { minimal_symbol *minsym = found.file_symbol.minsym; - fprintf_unfiltered (gdb_stdlog, - "lookup_minimal_symbol (...) = %s (file-local)\n", - host_address_to_string (minsym)); + gdb_printf (gdb_stdlog, + "lookup_minimal_symbol (...) = %s (file-local)\n", + host_address_to_string (minsym)); } return found.file_symbol; } @@ -466,9 +466,9 @@ lookup_minimal_symbol (const char *name, const char *sfile, { minimal_symbol *minsym = found.trampoline_symbol.minsym; - fprintf_unfiltered (gdb_stdlog, - "lookup_minimal_symbol (...) = %s (trampoline)\n", - host_address_to_string (minsym)); + gdb_printf (gdb_stdlog, + "lookup_minimal_symbol (...) = %s (trampoline)\n", + host_address_to_string (minsym)); } return found.trampoline_symbol; @@ -476,7 +476,7 @@ lookup_minimal_symbol (const char *name, const char *sfile, /* Not found. */ if (symbol_lookup_debug) - fprintf_unfiltered (gdb_stdlog, "lookup_minimal_symbol (...) = NULL\n"); + gdb_printf (gdb_stdlog, "lookup_minimal_symbol (...) = NULL\n"); return {}; } @@ -1187,10 +1187,10 @@ minimal_symbol_reader::record_full (gdb::string_view name, return (NULL); if (symtab_create_debug >= 2) - fprintf_unfiltered (gdb_stdlog, - "Recording minsym: %-21s %18s %4d %.*s\n", - mst_str (ms_type), hex_string (address), section, - (int) name.size (), name.data ()); + gdb_printf (gdb_stdlog, + "Recording minsym: %-21s %18s %4d %.*s\n", + mst_str (ms_type), hex_string (address), section, + (int) name.size (), name.data ()); if (m_msym_bunch_index == BUNCH_SIZE) { @@ -1394,9 +1394,9 @@ minimal_symbol_reader::install () { if (symtab_create_debug) { - fprintf_unfiltered (gdb_stdlog, - "Installing %d minimal symbols of objfile %s.\n", - m_msym_count, objfile_name (m_objfile)); + gdb_printf (gdb_stdlog, + "Installing %d minimal symbols of objfile %s.\n", + m_msym_count, objfile_name (m_objfile)); } /* Allocate enough space, into which we will gather the bunches diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 3756f98..feaf464 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -510,24 +510,24 @@ mips_show_dr (const char *func, CORE_ADDR addr, gdb_puts (func, gdb_stdlog); if (addr || len) - fprintf_unfiltered (gdb_stdlog, - " (addr=%s, len=%d, type=%s)", - paddress (target_gdbarch (), addr), len, - type == hw_write ? "data-write" - : (type == hw_read ? "data-read" - : (type == hw_access ? "data-read/write" - : (type == hw_execute ? "instruction-execute" - : "??unknown??")))); + gdb_printf (gdb_stdlog, + " (addr=%s, len=%d, type=%s)", + paddress (target_gdbarch (), addr), len, + type == hw_write ? "data-write" + : (type == hw_read ? "data-read" + : (type == hw_access ? "data-read/write" + : (type == hw_execute ? "instruction-execute" + : "??unknown??")))); gdb_puts (":\n", gdb_stdlog); for (i = 0; i < MAX_DEBUG_REGISTER; i++) - fprintf_unfiltered (gdb_stdlog, "\tDR%d: lo=%s, hi=%s\n", i, - paddress (target_gdbarch (), - mips_linux_watch_get_watchlo (&watch_mirror, - i)), - paddress (target_gdbarch (), - mips_linux_watch_get_watchhi (&watch_mirror, - i))); + gdb_printf (gdb_stdlog, "\tDR%d: lo=%s, hi=%s\n", i, + paddress (target_gdbarch (), + mips_linux_watch_get_watchlo (&watch_mirror, + i)), + paddress (target_gdbarch (), + mips_linux_watch_get_watchhi (&watch_mirror, + i))); } /* Target to_can_use_hw_breakpoint implementation. Return 1 if we can diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index cedce6c..9394589 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -530,15 +530,15 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, internal_error (__FILE__, __LINE__, _("bad switch")); } if (mips_debug) - fprintf_unfiltered (gdb_stderr, - "xfer $%d, reg offset %d, buf offset %d, length %d, ", - reg_num, reg_offset, buf_offset, length); + gdb_printf (gdb_stderr, + "xfer $%d, reg offset %d, buf offset %d, length %d, ", + reg_num, reg_offset, buf_offset, length); if (mips_debug && out != NULL) { int i; - fprintf_unfiltered (gdb_stdlog, "out "); + gdb_printf (gdb_stdlog, "out "); for (i = 0; i < length; i++) - fprintf_unfiltered (gdb_stdlog, "%02x", out[buf_offset + i]); + gdb_printf (gdb_stdlog, "%02x", out[buf_offset + i]); } if (in != NULL) regcache->cooked_read_part (reg_num, reg_offset, length, in + buf_offset); @@ -547,12 +547,12 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, if (mips_debug && in != NULL) { int i; - fprintf_unfiltered (gdb_stdlog, "in "); + gdb_printf (gdb_stdlog, "in "); for (i = 0; i < length; i++) - fprintf_unfiltered (gdb_stdlog, "%02x", in[buf_offset + i]); + gdb_printf (gdb_stdlog, "%02x", in[buf_offset + i]); } if (mips_debug) - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } /* Determine if a MIPS3 or later cpu is operating in MIPS{1,2} FPU @@ -1190,13 +1190,13 @@ show_mask_address (struct ui_file *file, int from_tty, switch (mask_address_var) { case AUTO_BOOLEAN_TRUE: - fprintf_filtered (file, "The 32 bit mips address mask is enabled\n"); + gdb_printf (file, "The 32 bit mips address mask is enabled\n"); break; case AUTO_BOOLEAN_FALSE: - fprintf_filtered (file, "The 32 bit mips address mask is disabled\n"); + gdb_printf (file, "The 32 bit mips address mask is disabled\n"); break; case AUTO_BOOLEAN_AUTO: - fprintf_filtered + gdb_printf (file, "The 32 bit address mask is set automatically. Currently %s\n", mips_mask_address_p (tdep) ? "enabled" : "disabled"); @@ -4294,7 +4294,7 @@ heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc) particular. This message needs to give people in that situation enough information to determine that it's no big deal. */ - printf_filtered ("\n\ + gdb_printf ("\n\ GDB is unable to find the start of the function at %s\n\ and thus can't determine the size of that function's stack frame.\n\ This means that GDB may be unable to access that stack frame, or\n\ @@ -4305,7 +4305,7 @@ stack pointer.\n\ from %s for code which looks like the beginning of a\n\ function, you can increase the range of the search using the `set\n\ heuristic-fence-post' command.\n", - paddress (gdbarch, pc), paddress (gdbarch, pc)); + paddress (gdbarch, pc), paddress (gdbarch, pc)); blurb_printed = 1; } } @@ -4562,10 +4562,10 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp -= align_up (arg_space, 16); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_eabi_push_dummy_call: sp=%s allocated %ld\n", - paddress (gdbarch, sp), - (long) align_up (arg_space, 16)); + gdb_printf (gdb_stdlog, + "mips_eabi_push_dummy_call: sp=%s allocated %ld\n", + paddress (gdbarch, sp), + (long) align_up (arg_space, 16)); /* Initialize the integer and float register pointers. */ argreg = MIPS_A0_REGNUM; @@ -4575,10 +4575,10 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (return_method == return_method_struct) { if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_eabi_push_dummy_call: " - "struct_return reg=%d %s\n", - argreg, paddress (gdbarch, struct_addr)); + gdb_printf (gdb_stdlog, + "mips_eabi_push_dummy_call: " + "struct_return reg=%d %s\n", + argreg, paddress (gdbarch, struct_addr)); regcache_cooked_write_unsigned (regcache, argreg++, struct_addr); } @@ -4597,9 +4597,9 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, enum type_code typecode = arg_type->code (); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_eabi_push_dummy_call: %d len=%d type=%d", - argnum + 1, len, (int) typecode); + gdb_printf (gdb_stdlog, + "mips_eabi_push_dummy_call: %d len=%d type=%d", + argnum + 1, len, (int) typecode); /* The EABI passes structures that do not fit in a register by reference. */ @@ -4613,7 +4613,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, len = abi_regsize; val = ref_valbuf; if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " push"); + gdb_printf (gdb_stdlog, " push"); } else val = value_contents (arg).data (); @@ -4659,16 +4659,16 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, regval = extract_signed_integer (val + low_offset, 4, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, 4)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, 4)); regcache_cooked_write_signed (regcache, float_argreg++, regval); /* Write the high word of the double to the odd register(s). */ regval = extract_signed_integer (val + 4 - low_offset, 4, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, 4)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, 4)); regcache_cooked_write_signed (regcache, float_argreg++, regval); } else @@ -4679,8 +4679,8 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, above to ensure that it is even register aligned. */ LONGEST regval = extract_signed_integer (val, len, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, len)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, len)); regcache_cooked_write_signed (regcache, float_argreg++, regval); } } @@ -4705,8 +4705,8 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int partial_len = (len < abi_regsize ? len : abi_regsize); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " -- partial=%d", - partial_len); + gdb_printf (gdb_stdlog, " -- partial=%d", + partial_len); /* Write this portion of the argument to the stack. */ if (argreg > mips_last_arg_regnum (gdbarch) @@ -4733,10 +4733,10 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { - fprintf_unfiltered (gdb_stdlog, " - stack_offset=%s", - paddress (gdbarch, stack_offset)); - fprintf_unfiltered (gdb_stdlog, " longword_offset=%s", - paddress (gdbarch, longword_offset)); + gdb_printf (gdb_stdlog, " - stack_offset=%s", + paddress (gdbarch, stack_offset)); + gdb_printf (gdb_stdlog, " longword_offset=%s", + paddress (gdbarch, longword_offset)); } addr = sp + stack_offset + longword_offset; @@ -4744,12 +4744,12 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { int i; - fprintf_unfiltered (gdb_stdlog, " @%s ", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, " @%s ", + paddress (gdbarch, addr)); for (i = 0; i < partial_len; i++) { - fprintf_unfiltered (gdb_stdlog, "%02x", - val[i] & 0xff); + gdb_printf (gdb_stdlog, "%02x", + val[i] & 0xff); } } write_memory (addr, val, partial_len); @@ -4767,9 +4767,9 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, extract_signed_integer (val, partial_len, byte_order); if (mips_debug) - fprintf_filtered (gdb_stdlog, " - reg=%d val=%s", - argreg, - phex (regval, abi_regsize)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, + phex (regval, abi_regsize)); regcache_cooked_write_signed (regcache, argreg, regval); argreg++; } @@ -4788,7 +4788,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } } if (mips_debug) - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp); @@ -4834,14 +4834,14 @@ mips_eabi_return_value (struct gdbarch *gdbarch, struct value *function, /* A floating-point value belongs in the least significant part of FP0/FP1. */ if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n"); + gdb_printf (gdb_stderr, "Return float in $fp0\n"); regnum = mips_regnum (gdbarch)->fp0; } else { /* An integer value goes in V0/V1. */ if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return scalar in $v0\n"); + gdb_printf (gdb_stderr, "Return scalar in $v0\n"); regnum = MIPS_V0_REGNUM; } for (offset = 0; @@ -4955,10 +4955,10 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp -= align_up (arg_space, 16); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_n32n64_push_dummy_call: sp=%s allocated %ld\n", - paddress (gdbarch, sp), - (long) align_up (arg_space, 16)); + gdb_printf (gdb_stdlog, + "mips_n32n64_push_dummy_call: sp=%s allocated %ld\n", + paddress (gdbarch, sp), + (long) align_up (arg_space, 16)); /* Initialize the integer and float register pointers. */ argreg = MIPS_A0_REGNUM; @@ -4968,10 +4968,10 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (return_method == return_method_struct) { if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_n32n64_push_dummy_call: " - "struct_return reg=%d %s\n", - argreg, paddress (gdbarch, struct_addr)); + gdb_printf (gdb_stdlog, + "mips_n32n64_push_dummy_call: " + "struct_return reg=%d %s\n", + argreg, paddress (gdbarch, struct_addr)); regcache_cooked_write_unsigned (regcache, argreg++, struct_addr); } @@ -4987,9 +4987,9 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, enum type_code typecode = arg_type->code (); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_n32n64_push_dummy_call: %d len=%d type=%d", - argnum + 1, len, (int) typecode); + gdb_printf (gdb_stdlog, + "mips_n32n64_push_dummy_call: %d len=%d type=%d", + argnum + 1, len, (int) typecode); val = value_contents (arg).data (); @@ -5011,13 +5011,13 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int reglen = (len <= MIPS64_REGSIZE ? len : MIPS64_REGSIZE); LONGEST regval = extract_unsigned_integer (val, reglen, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, reglen)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, reglen)); regcache_cooked_write_unsigned (regcache, float_argreg, regval); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, reglen)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, reglen)); regcache_cooked_write_unsigned (regcache, argreg, regval); float_argreg++; argreg++; @@ -5026,13 +5026,13 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, regval = extract_unsigned_integer (val + reglen, reglen, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, reglen)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, reglen)); regcache_cooked_write_unsigned (regcache, float_argreg, regval); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, reglen)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, reglen)); regcache_cooked_write_unsigned (regcache, argreg, regval); float_argreg++; argreg++; @@ -5060,8 +5060,8 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int partial_len = (len < MIPS64_REGSIZE ? len : MIPS64_REGSIZE); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " -- partial=%d", - partial_len); + gdb_printf (gdb_stdlog, " -- partial=%d", + partial_len); if (fp_register_arg_p (gdbarch, typecode, arg_type)) gdb_assert (argreg > mips_last_arg_regnum (gdbarch)); @@ -5084,10 +5084,10 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { - fprintf_unfiltered (gdb_stdlog, " - stack_offset=%s", - paddress (gdbarch, stack_offset)); - fprintf_unfiltered (gdb_stdlog, " longword_offset=%s", - paddress (gdbarch, longword_offset)); + gdb_printf (gdb_stdlog, " - stack_offset=%s", + paddress (gdbarch, stack_offset)); + gdb_printf (gdb_stdlog, " longword_offset=%s", + paddress (gdbarch, longword_offset)); } addr = sp + stack_offset + longword_offset; @@ -5095,12 +5095,12 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { int i; - fprintf_unfiltered (gdb_stdlog, " @%s ", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, " @%s ", + paddress (gdbarch, addr)); for (i = 0; i < partial_len; i++) { - fprintf_unfiltered (gdb_stdlog, "%02x", - val[i] & 0xff); + gdb_printf (gdb_stdlog, "%02x", + val[i] & 0xff); } } write_memory (addr, val, partial_len); @@ -5147,18 +5147,18 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, * TARGET_CHAR_BIT); if (mips_debug) - fprintf_filtered (gdb_stdlog, " - reg=%d val=%s", - argreg, - phex (regval, MIPS64_REGSIZE)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, + phex (regval, MIPS64_REGSIZE)); regcache_cooked_write_unsigned (regcache, argreg, regval); if (mips_n32n64_fp_arg_chunk_p (gdbarch, arg_type, TYPE_LENGTH (arg_type) - len)) { if (mips_debug) - fprintf_filtered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, - phex (regval, MIPS64_REGSIZE)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, + phex (regval, MIPS64_REGSIZE)); regcache_cooked_write_unsigned (regcache, float_argreg, regval); } @@ -5181,7 +5181,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } } if (mips_debug) - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp); @@ -5229,7 +5229,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, two registers are used in the same as memory order, so the eight bytes with the lower memory address are in $f0. */ if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return float in $f0 and $f2\n"); + gdb_printf (gdb_stderr, "Return float in $f0 and $f2\n"); mips_xfer_register (gdbarch, regcache, (gdbarch_num_regs (gdbarch) + mips_regnum (gdbarch)->fp0), @@ -5248,7 +5248,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, { /* A single or double floating-point value that fits in FP0. */ if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n"); + gdb_printf (gdb_stderr, "Return float in $fp0\n"); mips_xfer_register (gdbarch, regcache, (gdbarch_num_regs (gdbarch) + mips_regnum (gdbarch)->fp0), @@ -5281,8 +5281,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, { int offset = type->field (field).loc_bitpos () / TARGET_CHAR_BIT; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", - offset); + gdb_printf (gdb_stderr, "Return float struct+%d\n", + offset); if (TYPE_LENGTH (type->field (field).type ()) == 16) { /* A 16-byte long double field goes in two consecutive @@ -5324,8 +5324,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n", - offset, xfer, regnum); + gdb_printf (gdb_stderr, "Return struct+%d:%d in $%d\n", + offset, xfer, regnum); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, @@ -5347,8 +5347,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n", - offset, xfer, regnum); + gdb_printf (gdb_stderr, "Return scalar+%d:%d in $%d\n", + offset, xfer, regnum); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, gdbarch_byte_order (gdbarch), @@ -5420,10 +5420,10 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp -= align_up (arg_space, 16); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o32_push_dummy_call: sp=%s allocated %ld\n", - paddress (gdbarch, sp), - (long) align_up (arg_space, 16)); + gdb_printf (gdb_stdlog, + "mips_o32_push_dummy_call: sp=%s allocated %ld\n", + paddress (gdbarch, sp), + (long) align_up (arg_space, 16)); /* Initialize the integer and float register pointers. */ argreg = MIPS_A0_REGNUM; @@ -5433,10 +5433,10 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (return_method == return_method_struct) { if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o32_push_dummy_call: " - "struct_return reg=%d %s\n", - argreg, paddress (gdbarch, struct_addr)); + gdb_printf (gdb_stdlog, + "mips_o32_push_dummy_call: " + "struct_return reg=%d %s\n", + argreg, paddress (gdbarch, struct_addr)); regcache_cooked_write_unsigned (regcache, argreg++, struct_addr); stack_offset += MIPS32_REGSIZE; } @@ -5453,9 +5453,9 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, enum type_code typecode = arg_type->code (); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o32_push_dummy_call: %d len=%d type=%d", - argnum + 1, len, (int) typecode); + gdb_printf (gdb_stdlog, + "mips_o32_push_dummy_call: %d len=%d type=%d", + argnum + 1, len, (int) typecode); val = value_contents (arg).data (); @@ -5493,29 +5493,29 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* First word. */ regval = extract_unsigned_integer (val, 4, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg + freg_offset, - phex (regval, 4)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg + freg_offset, + phex (regval, 4)); regcache_cooked_write_unsigned (regcache, float_argreg++ + freg_offset, regval); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, 4)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, 4)); regcache_cooked_write_unsigned (regcache, argreg++, regval); /* Second word. */ regval = extract_unsigned_integer (val + 4, 4, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg - freg_offset, - phex (regval, 4)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg - freg_offset, + phex (regval, 4)); regcache_cooked_write_unsigned (regcache, float_argreg++ - freg_offset, regval); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, 4)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, 4)); regcache_cooked_write_unsigned (regcache, argreg++, regval); } else @@ -5526,16 +5526,16 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, above to ensure that it is even register aligned. */ LONGEST regval = extract_unsigned_integer (val, len, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, len)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, len)); regcache_cooked_write_unsigned (regcache, float_argreg++, regval); /* Although two FP registers are reserved for each argument, only one corresponding integer register is reserved. */ if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, len)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, len)); regcache_cooked_write_unsigned (regcache, argreg++, regval); } /* Reserve space for the FP register. */ @@ -5568,8 +5568,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int partial_len = (len < MIPS32_REGSIZE ? len : MIPS32_REGSIZE); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " -- partial=%d", - partial_len); + gdb_printf (gdb_stdlog, " -- partial=%d", + partial_len); /* Write this portion of the argument to the stack. */ if (argreg > mips_last_arg_regnum (gdbarch) @@ -5582,10 +5582,10 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { - fprintf_unfiltered (gdb_stdlog, " - stack_offset=%s", - paddress (gdbarch, stack_offset)); - fprintf_unfiltered (gdb_stdlog, " longword_offset=%s", - paddress (gdbarch, longword_offset)); + gdb_printf (gdb_stdlog, " - stack_offset=%s", + paddress (gdbarch, stack_offset)); + gdb_printf (gdb_stdlog, " longword_offset=%s", + paddress (gdbarch, longword_offset)); } addr = sp + stack_offset + longword_offset; @@ -5593,12 +5593,12 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { int i; - fprintf_unfiltered (gdb_stdlog, " @%s ", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, " @%s ", + paddress (gdbarch, addr)); for (i = 0; i < partial_len; i++) { - fprintf_unfiltered (gdb_stdlog, "%02x", - val[i] & 0xff); + gdb_printf (gdb_stdlog, "%02x", + val[i] & 0xff); } } write_memory (addr, val, partial_len); @@ -5648,9 +5648,9 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, * TARGET_CHAR_BIT); if (mips_debug) - fprintf_filtered (gdb_stdlog, " - reg=%d val=%s", - argreg, - phex (regval, MIPS32_REGSIZE)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, + phex (regval, MIPS32_REGSIZE)); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; @@ -5674,7 +5674,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } } if (mips_debug) - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp); @@ -5711,13 +5711,13 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function, switch (fval_reg) { case mips_fval_fpr: - fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n"); + gdb_printf (gdb_stderr, "Return float in $fp0\n"); break; case mips_fval_gpr: - fprintf_unfiltered (gdb_stderr, "Return float in $2\n"); + gdb_printf (gdb_stderr, "Return float in $2\n"); break; case mips_fval_both: - fprintf_unfiltered (gdb_stderr, "Return float in $fp0 and $2\n"); + gdb_printf (gdb_stderr, "Return float in $fp0 and $2\n"); break; } if (fval_reg != mips_fval_gpr) @@ -5749,14 +5749,14 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function, switch (fval_reg) { case mips_fval_fpr: - fprintf_unfiltered (gdb_stderr, "Return float in $fp1/$fp0\n"); + gdb_printf (gdb_stderr, "Return float in $fp1/$fp0\n"); break; case mips_fval_gpr: - fprintf_unfiltered (gdb_stderr, "Return float in $2/$3\n"); + gdb_printf (gdb_stderr, "Return float in $2/$3\n"); break; case mips_fval_both: - fprintf_unfiltered (gdb_stderr, - "Return float in $fp1/$fp0 and $2/$3\n"); + gdb_printf (gdb_stderr, + "Return float in $fp1/$fp0 and $2/$3\n"); break; } if (fval_reg != mips_fval_gpr) @@ -5832,8 +5832,8 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function, { int offset = (type->fields ()[field].loc_bitpos () / TARGET_CHAR_BIT); if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", - offset); + gdb_printf (gdb_stderr, "Return float struct+%d\n", + offset); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, TYPE_LENGTH (type->field (field).type ()), @@ -5860,8 +5860,8 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n", - offset, xfer, regnum); + gdb_printf (gdb_stderr, "Return struct+%d:%d in $%d\n", + offset, xfer, regnum); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, offset); @@ -5884,8 +5884,8 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n", - offset, xfer, regnum); + gdb_printf (gdb_stderr, "Return scalar+%d:%d in $%d\n", + offset, xfer, regnum); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, gdbarch_byte_order (gdbarch), @@ -5941,10 +5941,10 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp -= align_up (arg_space, 16); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o64_push_dummy_call: sp=%s allocated %ld\n", - paddress (gdbarch, sp), - (long) align_up (arg_space, 16)); + gdb_printf (gdb_stdlog, + "mips_o64_push_dummy_call: sp=%s allocated %ld\n", + paddress (gdbarch, sp), + (long) align_up (arg_space, 16)); /* Initialize the integer and float register pointers. */ argreg = MIPS_A0_REGNUM; @@ -5954,10 +5954,10 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (return_method == return_method_struct) { if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o64_push_dummy_call: " - "struct_return reg=%d %s\n", - argreg, paddress (gdbarch, struct_addr)); + gdb_printf (gdb_stdlog, + "mips_o64_push_dummy_call: " + "struct_return reg=%d %s\n", + argreg, paddress (gdbarch, struct_addr)); regcache_cooked_write_unsigned (regcache, argreg++, struct_addr); stack_offset += MIPS64_REGSIZE; } @@ -5974,9 +5974,9 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, enum type_code typecode = arg_type->code (); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_o64_push_dummy_call: %d len=%d type=%d", - argnum + 1, len, (int) typecode); + gdb_printf (gdb_stdlog, + "mips_o64_push_dummy_call: %d len=%d type=%d", + argnum + 1, len, (int) typecode); val = value_contents (arg).data (); @@ -5995,12 +5995,12 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { LONGEST regval = extract_unsigned_integer (val, len, byte_order); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s", - float_argreg, phex (regval, len)); + gdb_printf (gdb_stdlog, " - fpreg=%d val=%s", + float_argreg, phex (regval, len)); regcache_cooked_write_unsigned (regcache, float_argreg++, regval); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", - argreg, phex (regval, len)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, phex (regval, len)); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; /* Reserve space for the FP register. */ @@ -6022,8 +6022,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int partial_len = (len < MIPS64_REGSIZE ? len : MIPS64_REGSIZE); if (mips_debug) - fprintf_unfiltered (gdb_stdlog, " -- partial=%d", - partial_len); + gdb_printf (gdb_stdlog, " -- partial=%d", + partial_len); /* Write this portion of the argument to the stack. */ if (argreg > mips_last_arg_regnum (gdbarch) @@ -6044,10 +6044,10 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { - fprintf_unfiltered (gdb_stdlog, " - stack_offset=%s", - paddress (gdbarch, stack_offset)); - fprintf_unfiltered (gdb_stdlog, " longword_offset=%s", - paddress (gdbarch, longword_offset)); + gdb_printf (gdb_stdlog, " - stack_offset=%s", + paddress (gdbarch, stack_offset)); + gdb_printf (gdb_stdlog, " longword_offset=%s", + paddress (gdbarch, longword_offset)); } addr = sp + stack_offset + longword_offset; @@ -6055,12 +6055,12 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (mips_debug) { int i; - fprintf_unfiltered (gdb_stdlog, " @%s ", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, " @%s ", + paddress (gdbarch, addr)); for (i = 0; i < partial_len; i++) { - fprintf_unfiltered (gdb_stdlog, "%02x", - val[i] & 0xff); + gdb_printf (gdb_stdlog, "%02x", + val[i] & 0xff); } } write_memory (addr, val, partial_len); @@ -6094,9 +6094,9 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, * TARGET_CHAR_BIT); if (mips_debug) - fprintf_filtered (gdb_stdlog, " - reg=%d val=%s", - argreg, - phex (regval, MIPS64_REGSIZE)); + gdb_printf (gdb_stdlog, " - reg=%d val=%s", + argreg, + phex (regval, MIPS64_REGSIZE)); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; @@ -6120,7 +6120,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } } if (mips_debug) - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp); @@ -6155,13 +6155,13 @@ mips_o64_return_value (struct gdbarch *gdbarch, struct value *function, switch (fval_reg) { case mips_fval_fpr: - fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n"); + gdb_printf (gdb_stderr, "Return float in $fp0\n"); break; case mips_fval_gpr: - fprintf_unfiltered (gdb_stderr, "Return float in $2\n"); + gdb_printf (gdb_stderr, "Return float in $2\n"); break; case mips_fval_both: - fprintf_unfiltered (gdb_stderr, "Return float in $fp0 and $2\n"); + gdb_printf (gdb_stderr, "Return float in $fp0 and $2\n"); break; } if (fval_reg != mips_fval_gpr) @@ -6193,8 +6193,8 @@ mips_o64_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) - fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n", - offset, xfer, regnum); + gdb_printf (gdb_stderr, "Return scalar+%d:%d in $%d\n", + offset, xfer, regnum); mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, gdbarch_byte_order (gdbarch), @@ -6325,10 +6325,10 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, = ((gdb_byte *) alloca (2 * register_size (gdbarch, mips_regnum (gdbarch)->fp0))); - fprintf_filtered (file, "%s:", gdbarch_register_name (gdbarch, regnum)); - fprintf_filtered (file, "%*s", - 4 - (int) strlen (gdbarch_register_name (gdbarch, regnum)), - ""); + gdb_printf (file, "%s:", gdbarch_register_name (gdbarch, regnum)); + gdb_printf (file, "%*s", + 4 - (int) strlen (gdbarch_register_name (gdbarch, regnum)), + ""); if (register_size (gdbarch, regnum) == 4 || mips2_fp_compat (frame)) { @@ -6344,14 +6344,14 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, builtin_type (gdbarch)->builtin_uint32, &opts, 'w', file); - fprintf_filtered (file, " flt: %s", flt_str.c_str ()); + gdb_printf (file, " flt: %s", flt_str.c_str ()); if ((regnum - gdbarch_num_regs (gdbarch)) % 2 == 0) { mips_read_fp_register_double (frame, regnum, raw_buffer); dbl_str = target_float_to_string (raw_buffer, dbl_type, "%-24.17g"); - fprintf_filtered (file, " dbl: %s", dbl_str.c_str ()); + gdb_printf (file, " dbl: %s", dbl_str.c_str ()); } } else @@ -6370,8 +6370,8 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, builtin_type (gdbarch)->builtin_uint64, &opts, 'g', file); - fprintf_filtered (file, " flt: %s", flt_str.c_str ()); - fprintf_filtered (file, " dbl: %s", dbl_str.c_str ()); + gdb_printf (file, " flt: %s", flt_str.c_str ()); + gdb_printf (file, " dbl: %s", dbl_str.c_str ()); } } @@ -6398,9 +6398,9 @@ mips_print_register (struct ui_file *file, struct frame_info *frame, fix it so that either the numeric or the funky (a2, etc.) names are accepted on input. */ if (regnum < MIPS_NUMREGS) - fprintf_filtered (file, "(r%d): ", regnum); + gdb_printf (file, "(r%d): ", regnum); else - fprintf_filtered (file, ": "); + gdb_printf (file, ": "); get_formatted_print_options (&opts, 'x'); value_print_scalar_formatted (val, &opts, 0, file); @@ -6441,23 +6441,23 @@ mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, if (fcsr == -1 || !read_frame_register_unsigned (frame, fcsr, &fcs)) type = MIPS_FPU_NONE; - fprintf_filtered (file, "fpu type: %s\n", - type == MIPS_FPU_DOUBLE ? "double-precision" - : type == MIPS_FPU_SINGLE ? "single-precision" - : "none / unused"); + gdb_printf (file, "fpu type: %s\n", + type == MIPS_FPU_DOUBLE ? "double-precision" + : type == MIPS_FPU_SINGLE ? "single-precision" + : "none / unused"); if (type == MIPS_FPU_NONE) return; - fprintf_filtered (file, "reg size: %d bits\n", - register_size (gdbarch, mips_regnum (gdbarch)->fp0) * 8); + gdb_printf (file, "reg size: %d bits\n", + register_size (gdbarch, mips_regnum (gdbarch)->fp0) * 8); gdb_puts ("cond :", file); if (fcs & (1 << 23)) gdb_puts (" 0", file); for (i = 1; i <= 7; i++) if (fcs & (1 << (24 + i))) - fprintf_filtered (file, " %d", i); + gdb_printf (file, " %d", i); gdb_putc ('\n', file); gdb_puts ("cause :", file); @@ -6487,8 +6487,8 @@ mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, gdb_puts (" no", file); gdb_putc ('\n', file); - fprintf_filtered (file, "nan2008 : %s\n", fcs & (1 << 18) ? "yes" : "no"); - fprintf_filtered (file, "abs2008 : %s\n", fcs & (1 << 19) ? "yes" : "no"); + gdb_printf (file, "nan2008 : %s\n", fcs & (1 << 18) ? "yes" : "no"); + gdb_printf (file, "abs2008 : %s\n", fcs & (1 << 19) ? "yes" : "no"); gdb_putc ('\n', file); default_print_float_info (gdbarch, file, frame, args); @@ -6501,9 +6501,9 @@ static int print_fp_register_row (struct ui_file *file, struct frame_info *frame, int regnum) { - fprintf_filtered (file, " "); + gdb_printf (file, " "); mips_print_fp_register (file, frame, regnum); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); return regnum + 1; } @@ -6540,14 +6540,14 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, /* Print this register on a row by itself. */ mips_print_register (file, frame, regnum); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); return regnum + 1; } if (col == 0) - fprintf_filtered (file, " "); - fprintf_filtered (file, - mips_abi_regsize (gdbarch) == 8 ? "%17s" : "%9s", - gdbarch_register_name (gdbarch, regnum)); + gdb_printf (file, " "); + gdb_printf (file, + mips_abi_regsize (gdbarch) == 8 ? "%17s" : "%9s", + gdbarch_register_name (gdbarch, regnum)); col++; } @@ -6556,10 +6556,10 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, /* Print the R0 to R31 names. */ if ((start_regnum % gdbarch_num_regs (gdbarch)) < MIPS_NUMREGS) - fprintf_filtered (file, "\n R%-4d", - start_regnum % gdbarch_num_regs (gdbarch)); + gdb_printf (file, "\n R%-4d", + start_regnum % gdbarch_num_regs (gdbarch)); else - fprintf_filtered (file, "\n "); + gdb_printf (file, "\n "); /* Now print the values in hex, 4 or 8 to the row. */ for (col = 0, regnum = start_regnum; @@ -6578,10 +6578,10 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, if (value_optimized_out (value) || !value_entirely_available (value)) { - fprintf_filtered (file, "%*s ", - (int) mips_abi_regsize (gdbarch) * 2, - (mips_abi_regsize (gdbarch) == 4 ? "<unavl>" - : "<unavailable>")); + gdb_printf (file, "%*s ", + (int) mips_abi_regsize (gdbarch) * 2, + (mips_abi_regsize (gdbarch) == 4 ? "<unavl>" + : "<unavailable>")); col++; continue; } @@ -6590,22 +6590,22 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, for (byte = 0; byte < (mips_abi_regsize (gdbarch) - register_size (gdbarch, regnum)); byte++) - fprintf_filtered (file, " "); + gdb_printf (file, " "); /* Now print the register value in hex, endian order. */ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) for (byte = register_size (gdbarch, regnum) - register_size (gdbarch, regnum); byte < register_size (gdbarch, regnum); byte++) - fprintf_filtered (file, "%02x", raw_buffer[byte]); + gdb_printf (file, "%02x", raw_buffer[byte]); else for (byte = register_size (gdbarch, regnum) - 1; byte >= 0; byte--) - fprintf_filtered (file, "%02x", raw_buffer[byte]); - fprintf_filtered (file, " "); + gdb_printf (file, "%02x", raw_buffer[byte]); + gdb_printf (file, " "); col++; } if (col > 0) /* ie. if we actually printed anything... */ - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); return regnum; } @@ -6623,7 +6623,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, error (_("Not a valid register for the current processor type")); mips_print_register (file, frame, regnum); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } else /* Do all (or most) registers. */ @@ -6916,7 +6916,7 @@ show_mipsfpu_command (const char *args, int from_tty) if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips) { - printf_filtered + gdb_printf ("The MIPS floating-point coprocessor is unknown " "because the current architecture is not MIPS.\n"); return; @@ -6937,11 +6937,11 @@ show_mipsfpu_command (const char *args, int from_tty) internal_error (__FILE__, __LINE__, _("bad switch")); } if (mips_fpu_type_auto) - printf_filtered ("The MIPS floating-point coprocessor " - "is set automatically (currently %s)\n", - fpu); + gdb_printf ("The MIPS floating-point coprocessor " + "is set automatically (currently %s)\n", + fpu); else - printf_filtered + gdb_printf ("The MIPS floating-point coprocessor is assumed to be %s\n", fpu); } @@ -8093,8 +8093,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) else elf_flags = 0; if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_gdbarch_init: elf_flags = 0x%08x\n", elf_flags); + gdb_printf (gdb_stdlog, + "mips_gdbarch_init: elf_flags = 0x%08x\n", elf_flags); /* Check ELF_FLAGS to see if it specifies the ABI being used. */ switch ((elf_flags & EF_MIPS_ABI)) @@ -8169,14 +8169,14 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) found_abi = MIPS_ABI_N64; if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "mips_gdbarch_init: found_abi = %d\n", - found_abi); + gdb_printf (gdb_stdlog, "mips_gdbarch_init: found_abi = %d\n", + found_abi); /* What has the user specified from the command line? */ wanted_abi = global_mips_abi (); if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "mips_gdbarch_init: wanted_abi = %d\n", - wanted_abi); + gdb_printf (gdb_stdlog, "mips_gdbarch_init: wanted_abi = %d\n", + wanted_abi); /* Now that we have found what the ABI for this binary would be, check whether the user is overriding it. */ @@ -8187,8 +8187,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) else mips_abi = MIPS_ABI_O32; if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, "mips_gdbarch_init: mips_abi = %d\n", - mips_abi); + gdb_printf (gdb_stdlog, "mips_gdbarch_init: mips_abi = %d\n", + mips_abi); /* Make sure we don't use a 32-bit architecture with a 64-bit ABI. */ if (mips_abi != MIPS_ABI_EABI32 @@ -8211,10 +8211,10 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Also used when doing an architecture lookup. */ if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_gdbarch_init: " - "mips64_transfers_32bit_regs_p = %d\n", - mips64_transfers_32bit_regs_p); + gdb_printf (gdb_stdlog, + "mips_gdbarch_init: " + "mips64_transfers_32bit_regs_p = %d\n", + mips64_transfers_32bit_regs_p); /* Determine the MIPS FPU type. */ #ifdef HAVE_ELF @@ -8265,8 +8265,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) else fpu_type = MIPS_FPU_DOUBLE; if (gdbarch_debug) - fprintf_unfiltered (gdb_stdlog, - "mips_gdbarch_init: fpu_type = %d\n", fpu_type); + gdb_printf (gdb_stdlog, + "mips_gdbarch_init: fpu_type = %d\n", fpu_type); /* Check for blatant incompatibilities. */ @@ -8841,7 +8841,7 @@ show_mips_abi (struct ui_file *file, const char *ignored_value) { if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips) - fprintf_filtered + gdb_printf (file, "The MIPS ABI is unknown because the current architecture " "is not MIPS.\n"); @@ -8852,22 +8852,22 @@ show_mips_abi (struct ui_file *file, const char *actual_abi_str = mips_abi_strings[actual_abi]; if (global_abi == MIPS_ABI_UNKNOWN) - fprintf_filtered + gdb_printf (file, "The MIPS ABI is set automatically (currently \"%s\").\n", actual_abi_str); else if (global_abi == actual_abi) - fprintf_filtered + gdb_printf (file, "The MIPS ABI is assumed to be \"%s\" (due to user setting).\n", actual_abi_str); else { /* Probably shouldn't happen... */ - fprintf_filtered (file, - "The (auto detected) MIPS ABI \"%s\" is in use " - "even though the user setting was \"%s\".\n", - actual_abi_str, mips_abi_strings[global_abi]); + gdb_printf (file, + "The (auto detected) MIPS ABI \"%s\" is in use " + "even though the user setting was \"%s\".\n", + actual_abi_str, mips_abi_strings[global_abi]); } } } @@ -8878,8 +8878,8 @@ static void show_mips_compression (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The compressed ISA encoding used is %s.\n"), - value); + gdb_printf (file, _("The compressed ISA encoding used is %s.\n"), + value); } /* Return a textual name for MIPS FPU type FPU_TYPE. */ @@ -8929,34 +8929,34 @@ mips_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) } /* Determine the size of a pointer. */ ef_mips_32bitmode = (tdep->elf_flags & EF_MIPS_32BITMODE); - fprintf_filtered (file, - "mips_dump_tdep: tdep->elf_flags = 0x%x\n", - tdep->elf_flags); - fprintf_filtered (file, - "mips_dump_tdep: ef_mips_32bitmode = %d\n", - ef_mips_32bitmode); - fprintf_filtered (file, - "mips_dump_tdep: ef_mips_arch = %d\n", - ef_mips_arch); - fprintf_filtered (file, - "mips_dump_tdep: tdep->mips_abi = %d (%s)\n", - tdep->mips_abi, mips_abi_strings[tdep->mips_abi]); - fprintf_filtered (file, - "mips_dump_tdep: " - "mips_mask_address_p() %d (default %d)\n", - mips_mask_address_p (tdep), - tdep->default_mask_address_p); + gdb_printf (file, + "mips_dump_tdep: tdep->elf_flags = 0x%x\n", + tdep->elf_flags); + gdb_printf (file, + "mips_dump_tdep: ef_mips_32bitmode = %d\n", + ef_mips_32bitmode); + gdb_printf (file, + "mips_dump_tdep: ef_mips_arch = %d\n", + ef_mips_arch); + gdb_printf (file, + "mips_dump_tdep: tdep->mips_abi = %d (%s)\n", + tdep->mips_abi, mips_abi_strings[tdep->mips_abi]); + gdb_printf (file, + "mips_dump_tdep: " + "mips_mask_address_p() %d (default %d)\n", + mips_mask_address_p (tdep), + tdep->default_mask_address_p); } - fprintf_filtered (file, - "mips_dump_tdep: MIPS_DEFAULT_FPU_TYPE = %d (%s)\n", - MIPS_DEFAULT_FPU_TYPE, - mips_fpu_type_str (MIPS_DEFAULT_FPU_TYPE)); - fprintf_filtered (file, "mips_dump_tdep: MIPS_EABI = %d\n", - mips_eabi (gdbarch)); - fprintf_filtered (file, - "mips_dump_tdep: MIPS_FPU_TYPE = %d (%s)\n", - mips_get_fpu_type (gdbarch), - mips_fpu_type_str (mips_get_fpu_type (gdbarch))); + gdb_printf (file, + "mips_dump_tdep: MIPS_DEFAULT_FPU_TYPE = %d (%s)\n", + MIPS_DEFAULT_FPU_TYPE, + mips_fpu_type_str (MIPS_DEFAULT_FPU_TYPE)); + gdb_printf (file, "mips_dump_tdep: MIPS_EABI = %d\n", + mips_eabi (gdbarch)); + gdb_printf (file, + "mips_dump_tdep: MIPS_FPU_TYPE = %d (%s)\n", + mips_get_fpu_type (gdbarch), + mips_fpu_type_str (mips_get_fpu_type (gdbarch))); } void _initialize_mips_tdep (); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 02efd84..7a41070 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1413,8 +1413,8 @@ static void mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) { mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (gdbarch); - fprintf_filtered (file, "mn10300_dump_tdep: am33_mode = %d\n", - tdep->am33_mode); + gdb_printf (file, "mn10300_dump_tdep: am33_mode = %d\n", + tdep->am33_mode); } void _initialize_mn10300_tdep (); diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index e3507d9..f5cf501 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -279,10 +279,10 @@ moxie_process_readu (CORE_ADDR addr, gdb_byte *buf, if (target_read_memory (addr, buf, length)) { if (record_debug) - fprintf_unfiltered (gdb_stderr, - _("Process record: error reading memory at " - "addr 0x%s len = %d.\n"), - paddress (target_gdbarch (), addr), length); + gdb_printf (gdb_stderr, + _("Process record: error reading memory at " + "addr 0x%s len = %d.\n"), + paddress (target_gdbarch (), addr), length); return -1; } @@ -629,9 +629,9 @@ moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, "Process record: moxie_process_record " - "addr = 0x%s\n", - paddress (target_gdbarch (), addr)); + gdb_printf (gdb_stdlog, "Process record: moxie_process_record " + "addr = 0x%s\n", + paddress (target_gdbarch (), addr)); inst = (uint16_t) moxie_process_readu (addr, buf, 2, byte_order); diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c index b8389ca..f2eeb3f 100644 --- a/gdb/netbsd-nat.c +++ b/gdb/netbsd-nat.c @@ -247,12 +247,12 @@ nbsd_nat_target::find_memory_regions (find_memory_region_ftype func, size_t size = kve->kve_end - kve->kve_start; if (info_verbose) { - printf_filtered ("Save segment, %ld bytes at %s (%c%c%c)\n", - (long) size, - paddress (target_gdbarch (), kve->kve_start), - kve->kve_protection & KVME_PROT_READ ? 'r' : '-', - kve->kve_protection & KVME_PROT_WRITE ? 'w' : '-', - kve->kve_protection & KVME_PROT_EXEC ? 'x' : '-'); + gdb_printf ("Save segment, %ld bytes at %s (%c%c%c)\n", + (long) size, + paddress (target_gdbarch (), kve->kve_start), + kve->kve_protection & KVME_PROT_READ ? 'r' : '-', + kve->kve_protection & KVME_PROT_WRITE ? 'w' : '-', + kve->kve_protection & KVME_PROT_EXEC ? 'x' : '-'); } /* Invoke the callback function to create the corefile segment. @@ -322,13 +322,13 @@ nbsd_nat_target::info_proc (const char *args, enum info_proc_what what) else error (_("Invalid arguments.")); - printf_filtered (_("process %d\n"), pid); + gdb_printf (_("process %d\n"), pid); if (do_cmdline) { gdb::unique_xmalloc_ptr<char[]> cmdline = nbsd_pid_to_cmdline (pid); if (cmdline != nullptr) - printf_filtered ("cmdline = '%s'\n", cmdline.get ()); + gdb_printf ("cmdline = '%s'\n", cmdline.get ()); else warning (_("unable to fetch command line")); } @@ -336,7 +336,7 @@ nbsd_nat_target::info_proc (const char *args, enum info_proc_what what) { std::string cwd = nbsd_pid_to_cwd (pid); if (cwd != "") - printf_filtered ("cwd = '%s'\n", cwd.c_str ()); + gdb_printf ("cwd = '%s'\n", cwd.c_str ()); else warning (_("unable to fetch current working directory")); } @@ -344,7 +344,7 @@ nbsd_nat_target::info_proc (const char *args, enum info_proc_what what) { const char *exe = pid_to_exec_file (pid); if (exe != nullptr) - printf_filtered ("exe = '%s'\n", exe); + gdb_printf ("exe = '%s'\n", exe); else warning (_("unable to fetch executable path name")); } @@ -398,59 +398,59 @@ nbsd_nat_target::info_proc (const char *args, enum info_proc_what what) } }; - printf_filtered ("Name: %s\n", kp.p_comm); - printf_filtered ("State: %s\n", process_status(kp.p_realstat)); - printf_filtered ("Parent process: %" PRId32 "\n", kp.p_ppid); - printf_filtered ("Process group: %" PRId32 "\n", kp.p__pgid); - printf_filtered ("Session id: %" PRId32 "\n", kp.p_sid); - printf_filtered ("TTY: %" PRId32 "\n", kp.p_tdev); - printf_filtered ("TTY owner process group: %" PRId32 "\n", kp.p_tpgid); - printf_filtered ("User IDs (real, effective, saved): " - "%" PRIu32 " %" PRIu32 " %" PRIu32 "\n", - kp.p_ruid, kp.p_uid, kp.p_svuid); - printf_filtered ("Group IDs (real, effective, saved): " - "%" PRIu32 " %" PRIu32 " %" PRIu32 "\n", - kp.p_rgid, kp.p_gid, kp.p_svgid); - - printf_filtered ("Groups:"); + gdb_printf ("Name: %s\n", kp.p_comm); + gdb_printf ("State: %s\n", process_status(kp.p_realstat)); + gdb_printf ("Parent process: %" PRId32 "\n", kp.p_ppid); + gdb_printf ("Process group: %" PRId32 "\n", kp.p__pgid); + gdb_printf ("Session id: %" PRId32 "\n", kp.p_sid); + gdb_printf ("TTY: %" PRId32 "\n", kp.p_tdev); + gdb_printf ("TTY owner process group: %" PRId32 "\n", kp.p_tpgid); + gdb_printf ("User IDs (real, effective, saved): " + "%" PRIu32 " %" PRIu32 " %" PRIu32 "\n", + kp.p_ruid, kp.p_uid, kp.p_svuid); + gdb_printf ("Group IDs (real, effective, saved): " + "%" PRIu32 " %" PRIu32 " %" PRIu32 "\n", + kp.p_rgid, kp.p_gid, kp.p_svgid); + + gdb_printf ("Groups:"); for (int i = 0; i < kp.p_ngroups; i++) - printf_filtered (" %" PRIu32, kp.p_groups[i]); - printf_filtered ("\n"); - printf_filtered ("Minor faults (no memory page): %" PRIu64 "\n", - kp.p_uru_minflt); - printf_filtered ("Major faults (memory page faults): %" PRIu64 "\n", - kp.p_uru_majflt); - printf_filtered ("utime: %" PRIu32 ".%06" PRIu32 "\n", - kp.p_uutime_sec, kp.p_uutime_usec); - printf_filtered ("stime: %" PRIu32 ".%06" PRIu32 "\n", - kp.p_ustime_sec, kp.p_ustime_usec); - printf_filtered ("utime+stime, children: %" PRIu32 ".%06" PRIu32 "\n", - kp.p_uctime_sec, kp.p_uctime_usec); - printf_filtered ("'nice' value: %" PRIu8 "\n", kp.p_nice); - printf_filtered ("Start time: %" PRIu32 ".%06" PRIu32 "\n", - kp.p_ustart_sec, kp.p_ustart_usec); + gdb_printf (" %" PRIu32, kp.p_groups[i]); + gdb_printf ("\n"); + gdb_printf ("Minor faults (no memory page): %" PRIu64 "\n", + kp.p_uru_minflt); + gdb_printf ("Major faults (memory page faults): %" PRIu64 "\n", + kp.p_uru_majflt); + gdb_printf ("utime: %" PRIu32 ".%06" PRIu32 "\n", + kp.p_uutime_sec, kp.p_uutime_usec); + gdb_printf ("stime: %" PRIu32 ".%06" PRIu32 "\n", + kp.p_ustime_sec, kp.p_ustime_usec); + gdb_printf ("utime+stime, children: %" PRIu32 ".%06" PRIu32 "\n", + kp.p_uctime_sec, kp.p_uctime_usec); + gdb_printf ("'nice' value: %" PRIu8 "\n", kp.p_nice); + gdb_printf ("Start time: %" PRIu32 ".%06" PRIu32 "\n", + kp.p_ustart_sec, kp.p_ustart_usec); int pgtok = getpagesize () / 1024; - printf_filtered ("Data size: %" PRIuMAX " kB\n", - (uintmax_t) kp.p_vm_dsize * pgtok); - printf_filtered ("Stack size: %" PRIuMAX " kB\n", - (uintmax_t) kp.p_vm_ssize * pgtok); - printf_filtered ("Text size: %" PRIuMAX " kB\n", - (uintmax_t) kp.p_vm_tsize * pgtok); - printf_filtered ("Resident set size: %" PRIuMAX " kB\n", - (uintmax_t) kp.p_vm_rssize * pgtok); - printf_filtered ("Maximum RSS: %" PRIu64 " kB\n", kp.p_uru_maxrss); - printf_filtered ("Pending Signals:"); + gdb_printf ("Data size: %" PRIuMAX " kB\n", + (uintmax_t) kp.p_vm_dsize * pgtok); + gdb_printf ("Stack size: %" PRIuMAX " kB\n", + (uintmax_t) kp.p_vm_ssize * pgtok); + gdb_printf ("Text size: %" PRIuMAX " kB\n", + (uintmax_t) kp.p_vm_tsize * pgtok); + gdb_printf ("Resident set size: %" PRIuMAX " kB\n", + (uintmax_t) kp.p_vm_rssize * pgtok); + gdb_printf ("Maximum RSS: %" PRIu64 " kB\n", kp.p_uru_maxrss); + gdb_printf ("Pending Signals:"); for (size_t i = 0; i < ARRAY_SIZE (kp.p_siglist.__bits); i++) - printf_filtered (" %08" PRIx32, kp.p_siglist.__bits[i]); - printf_filtered ("\n"); - printf_filtered ("Ignored Signals:"); + gdb_printf (" %08" PRIx32, kp.p_siglist.__bits[i]); + gdb_printf ("\n"); + gdb_printf ("Ignored Signals:"); for (size_t i = 0; i < ARRAY_SIZE (kp.p_sigignore.__bits); i++) - printf_filtered (" %08" PRIx32, kp.p_sigignore.__bits[i]); - printf_filtered ("\n"); - printf_filtered ("Caught Signals:"); + gdb_printf (" %08" PRIx32, kp.p_sigignore.__bits[i]); + gdb_printf ("\n"); + gdb_printf ("Caught Signals:"); for (size_t i = 0; i < ARRAY_SIZE (kp.p_sigcatch.__bits); i++) - printf_filtered (" %08" PRIx32, kp.p_sigcatch.__bits[i]); - printf_filtered ("\n"); + gdb_printf (" %08" PRIx32, kp.p_sigcatch.__bits[i]); + gdb_printf ("\n"); } } @@ -626,8 +626,8 @@ nbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, ourstatus->set_thread_exited (0); if (print_thread_events) - printf_filtered (_("[%s exited]\n"), - target_pid_to_str (wptid).c_str ()); + gdb_printf (_("[%s exited]\n"), + target_pid_to_str (wptid).c_str ()); delete_thread (thr); } @@ -772,11 +772,11 @@ nbsd_nat_target::xfer_partial (enum target_object object, if (res != 0) { if (res == EACCES) - fprintf_unfiltered (gdb_stderr, "Cannot %s process at %s (%s). " - "Is PaX MPROTECT active? See security(7), " - "sysctl(7), paxctl(8)\n", - (writebuf ? "write to" : "read from"), - pulongest (offset), safe_strerror (errno)); + gdb_printf (gdb_stderr, "Cannot %s process at %s (%s). " + "Is PaX MPROTECT active? See security(7), " + "sysctl(7), paxctl(8)\n", + (writebuf ? "write to" : "read from"), + pulongest (offset), safe_strerror (errno)); return TARGET_XFER_E_IO; } if (xfered == 0) diff --git a/gdb/netbsd-tdep.c b/gdb/netbsd-tdep.c index eb89043..38b8a19 100644 --- a/gdb/netbsd-tdep.c +++ b/gdb/netbsd-tdep.c @@ -525,20 +525,20 @@ nbsd_get_siginfo_type (struct gdbarch *gdbarch) void nbsd_info_proc_mappings_header (int addr_bit) { - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (addr_bit == 64) { - printf_filtered (" %18s %18s %10s %10s %9s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "Flags ", "File"); + gdb_printf (" %18s %18s %10s %10s %9s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "Flags ", "File"); } else { - printf_filtered ("\t%10s %10s %10s %10s %9s %s\n", - "Start Addr", - " End Addr", - " Size", " Offset", "Flags ", "File"); + gdb_printf ("\t%10s %10s %10s %10s %9s %s\n", + "Start Addr", + " End Addr", + " Size", " Offset", "Flags ", "File"); } } @@ -572,23 +572,23 @@ nbsd_info_proc_mappings_entry (int addr_bit, ULONGEST kve_start, { if (addr_bit == 64) { - printf_filtered (" %18s %18s %10s %10s %9s %s\n", - hex_string (kve_start), - hex_string (kve_end), - hex_string (kve_end - kve_start), - hex_string (kve_offset), - nbsd_vm_map_entry_flags (kve_flags, kve_protection), - kve_path); + gdb_printf (" %18s %18s %10s %10s %9s %s\n", + hex_string (kve_start), + hex_string (kve_end), + hex_string (kve_end - kve_start), + hex_string (kve_offset), + nbsd_vm_map_entry_flags (kve_flags, kve_protection), + kve_path); } else { - printf_filtered ("\t%10s %10s %10s %10s %9s %s\n", - hex_string (kve_start), - hex_string (kve_end), - hex_string (kve_end - kve_start), - hex_string (kve_offset), - nbsd_vm_map_entry_flags (kve_flags, kve_protection), - kve_path); + gdb_printf ("\t%10s %10s %10s %10s %9s %s\n", + hex_string (kve_start), + hex_string (kve_end), + hex_string (kve_end - kve_start), + hex_string (kve_offset), + nbsd_vm_map_entry_flags (kve_flags, kve_protection), + kve_path); } } diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c index 857c60d..159d31b 100644 --- a/gdb/nios2-tdep.c +++ b/gdb/nios2-tdep.c @@ -1222,10 +1222,10 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, int innermost = (this_frame ? (frame_relative_level (this_frame) == 0) : 1); if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, - "{ nios2_analyze_prologue start=%s, current=%s ", - paddress (gdbarch, start_pc), - paddress (gdbarch, current_pc)); + gdb_printf (gdb_stdlog, + "{ nios2_analyze_prologue start=%s, current=%s ", + paddress (gdbarch, start_pc), + paddress (gdbarch, current_pc)); /* Set up the default values of the registers. */ nios2_setup_default (cache); @@ -1252,7 +1252,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, memcpy (temp_value, value, sizeof (temp_value)); value = temp_value; if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "*"); + gdb_printf (gdb_stdlog, "*"); } op = nios2_fetch_insn (gdbarch, pc, &insn); @@ -1265,9 +1265,9 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, if (nios2_debug) { if (op->size == 2) - fprintf_unfiltered (gdb_stdlog, "[%04X]", insn & 0xffff); + gdb_printf (gdb_stdlog, "[%04X]", insn & 0xffff); else - fprintf_unfiltered (gdb_stdlog, "[%08X]", insn); + gdb_printf (gdb_stdlog, "[%08X]", insn); } /* The following instructions can appear in the prologue. */ @@ -1554,7 +1554,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, cache->return_regnum = NIOS2_EA_REGNUM; if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "\n-> retreg=%d, ", cache->return_regnum); + gdb_printf (gdb_stdlog, "\n-> retreg=%d, ", cache->return_regnum); if (cache->reg_value[NIOS2_FP_REGNUM].reg == NIOS2_SP_REGNUM) /* If the FP now holds an offset from the CFA then this is a @@ -1571,7 +1571,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, /* Somehow the stack pointer has been corrupted. We can't return. */ if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "<can't reach cfa> }\n"); + gdb_printf (gdb_stdlog, "<can't reach cfa> }\n"); return 0; } @@ -1598,7 +1598,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, if (ra == current_pc) { if (nios2_debug) - fprintf_unfiltered + gdb_printf (gdb_stdlog, "<noreturn ADJUST %s, r31@r%d+?>, r%d@r%d+?> }\n", paddress (gdbarch, cache->reg_value[base_reg].offset), @@ -1660,8 +1660,8 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, } if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "cfa=%s }\n", - paddress (gdbarch, cache->cfa)); + gdb_printf (gdb_stdlog, "cfa=%s }\n", + paddress (gdbarch, cache->cfa)); return prologue_end; } diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index da0feae..61374c9 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -220,9 +220,9 @@ nto_procfs_target::open (const char *arg, int from_tty) if (nto_procfs_node == -1) { if (errno == ENOTSUP) - printf_filtered ("QNX Net Manager not found.\n"); - printf_filtered ("Invalid QNX node %s: error %d (%s).\n", nodestr, - errno, safe_strerror (errno)); + gdb_printf ("QNX Net Manager not found.\n"); + gdb_printf ("Invalid QNX node %s: error %d (%s).\n", nodestr, + errno, safe_strerror (errno)); xfree (nodestr); nodestr = NULL; nto_procfs_node = ND_LOCAL_NODE; @@ -241,16 +241,16 @@ nto_procfs_target::open (const char *arg, int from_tty) scoped_fd fd (open (nto_procfs_path, O_RDONLY)); if (fd.get () == -1) { - printf_filtered ("Error opening %s : %d (%s)\n", nto_procfs_path, errno, - safe_strerror (errno)); + gdb_printf ("Error opening %s : %d (%s)\n", nto_procfs_path, errno, + safe_strerror (errno)); error (_("Invalid procfs arg")); } sysinfo = (void *) buffer; if (devctl (fd.get (), DCMD_PROC_SYSINFO, sysinfo, sizeof buffer, 0) != EOK) { - printf_filtered ("Error getting size: %d (%s)\n", errno, - safe_strerror (errno)); + gdb_printf ("Error getting size: %d (%s)\n", errno, + safe_strerror (errno)); error (_("Devctl failed.")); } else @@ -259,8 +259,8 @@ nto_procfs_target::open (const char *arg, int from_tty) sysinfo = alloca (total_size); if (sysinfo == NULL) { - printf_filtered ("Memory error: %d (%s)\n", errno, - safe_strerror (errno)); + gdb_printf ("Memory error: %d (%s)\n", errno, + safe_strerror (errno)); error (_("alloca failed.")); } else @@ -268,8 +268,8 @@ nto_procfs_target::open (const char *arg, int from_tty) if (devctl (fd.get (), DCMD_PROC_SYSINFO, sysinfo, total_size, 0) != EOK) { - printf_filtered ("Error getting sysinfo: %d (%s)\n", errno, - safe_strerror (errno)); + gdb_printf ("Error getting sysinfo: %d (%s)\n", errno, + safe_strerror (errno)); error (_("Devctl failed.")); } else @@ -283,7 +283,7 @@ nto_procfs_target::open (const char *arg, int from_tty) } inf_child_target::open (arg, from_tty); - printf_filtered ("Debugging using %s\n", nto_procfs_path); + gdb_printf ("Debugging using %s\n", nto_procfs_path); } static void @@ -437,8 +437,8 @@ procfs_pidlist (const char *args, int from_tty) gdb_dir_up dp (opendir (procfs_dir)); if (dp == NULL) { - fprintf_unfiltered (gdb_stderr, "failed to opendir \"%s\" - %d (%s)", - procfs_dir, errno, safe_strerror (errno)); + gdb_printf (gdb_stderr, "failed to opendir \"%s\" - %d (%s)", + procfs_dir, errno, safe_strerror (errno)); return; } @@ -464,17 +464,17 @@ procfs_pidlist (const char *args, int from_tty) scoped_fd fd (open (buf, O_RDONLY)); if (fd.get () == -1) { - fprintf_unfiltered (gdb_stderr, "failed to open %s - %d (%s)\n", - buf, errno, safe_strerror (errno)); + gdb_printf (gdb_stderr, "failed to open %s - %d (%s)\n", + buf, errno, safe_strerror (errno)); continue; } pidinfo = (procfs_info *) buf; if (devctl (fd.get (), DCMD_PROC_INFO, pidinfo, sizeof (buf), 0) != EOK) { - fprintf_unfiltered (gdb_stderr, - "devctl DCMD_PROC_INFO failed - %d (%s)\n", - errno, safe_strerror (errno)); + gdb_printf (gdb_stderr, + "devctl DCMD_PROC_INFO failed - %d (%s)\n", + errno, safe_strerror (errno)); break; } num_threads = pidinfo->num_threads; @@ -492,12 +492,12 @@ procfs_pidlist (const char *args, int from_tty) { const int err = devctl (fd.get (), DCMD_PROC_TIDSTATUS, status, sizeof (buf), 0); - printf_filtered ("%s - %d", name, pid); + gdb_printf ("%s - %d", name, pid); if (err == EOK && status->tid != 0) - printf_filtered ("/%d\n", status->tid); + gdb_printf ("/%d\n", status->tid); else { - printf_filtered ("\n"); + gdb_printf ("\n"); break; } } @@ -629,22 +629,22 @@ procfs_meminfo (const char *args, int from_tty) } mapinfo_p->ino = 0; - printf_filtered ("%s\n", printme.name); - printf_filtered ("\ttext=%08x bytes @ 0x%08x\n", printme.text.size, - printme.text.addr); - printf_filtered ("\t\tflags=%08x\n", printme.text.flags); - printf_filtered ("\t\tdebug=%08x\n", printme.text.debug_vaddr); - printf_filtered ("\t\toffset=%s\n", phex (printme.text.offset, 8)); + gdb_printf ("%s\n", printme.name); + gdb_printf ("\ttext=%08x bytes @ 0x%08x\n", printme.text.size, + printme.text.addr); + gdb_printf ("\t\tflags=%08x\n", printme.text.flags); + gdb_printf ("\t\tdebug=%08x\n", printme.text.debug_vaddr); + gdb_printf ("\t\toffset=%s\n", phex (printme.text.offset, 8)); if (printme.data.size) { - printf_filtered ("\tdata=%08x bytes @ 0x%08x\n", printme.data.size, - printme.data.addr); - printf_filtered ("\t\tflags=%08x\n", printme.data.flags); - printf_filtered ("\t\tdebug=%08x\n", printme.data.debug_vaddr); - printf_filtered ("\t\toffset=%s\n", phex (printme.data.offset, 8)); + gdb_printf ("\tdata=%08x bytes @ 0x%08x\n", printme.data.size, + printme.data.addr); + gdb_printf ("\t\tflags=%08x\n", printme.data.flags); + gdb_printf ("\t\tdebug=%08x\n", printme.data.debug_vaddr); + gdb_printf ("\t\toffset=%s\n", phex (printme.data.offset, 8)); } - printf_filtered ("\tdev=0x%x\n", printme.dev); - printf_filtered ("\tino=0x%x\n", (unsigned int) printme.ino); + gdb_printf ("\tdev=0x%x\n", printme.dev); + gdb_printf ("\tino=0x%x\n", (unsigned int) printme.ino); } xfree (mapinfos); return; @@ -656,10 +656,10 @@ nto_procfs_target::files_info () { struct inferior *inf = current_inferior (); - printf_filtered ("\tUsing the running image of %s %s via %s.\n", - inf->attach_flag ? "attached" : "child", - target_pid_to_str (inferior_ptid).c_str (), - (nodestr != NULL) ? nodestr : "local node"); + gdb_printf ("\tUsing the running image of %s %s via %s.\n", + inf->attach_flag ? "attached" : "child", + target_pid_to_str (inferior_ptid).c_str (), + (nodestr != NULL) ? nodestr : "local node"); } /* Target to_pid_to_exec_file implementation. */ @@ -1384,9 +1384,9 @@ nto_procfs_target::store_registers (struct regcache *regcache, int regno) err = devctl (ctl_fd, dev_set, ®, regsize, 0); if (err != EOK) - fprintf_unfiltered (gdb_stderr, - "Warning unable to write regset %d: %s\n", - regno, safe_strerror (err)); + gdb_printf (gdb_stderr, + "Warning unable to write regset %d: %s\n", + regno, safe_strerror (err)); } } else @@ -1409,9 +1409,9 @@ nto_procfs_target::store_registers (struct regcache *regcache, int regno) err = devctl (ctl_fd, dev_set, ®, regsize, 0); if (err != EOK) - fprintf_unfiltered (gdb_stderr, - "Warning unable to write regset %d: %s\n", regno, - safe_strerror (err)); + gdb_printf (gdb_stderr, + "Warning unable to write regset %d: %s\n", regno, + safe_strerror (err)); } } diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 3bb9588..e116fbe 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -621,8 +621,8 @@ info_selectors_command (const char *regexp, int from_tty) } if (matches) { - printf_filtered (_("Selectors matching \"%s\":\n\n"), - regexp ? regexp : "*"); + gdb_printf (_("Selectors matching \"%s\":\n\n"), + regexp ? regexp : "*"); sym_arr = XALLOCAVEC (struct symbol *, matches); matches = 0; @@ -671,8 +671,8 @@ info_selectors_command (const char *regexp, int from_tty) begin_line(); } else - printf_filtered (_("No selectors matching \"%s\"\n"), - regexp ? regexp : "*"); + gdb_printf (_("No selectors matching \"%s\"\n"), + regexp ? regexp : "*"); } /* @@ -763,8 +763,8 @@ info_classes_command (const char *regexp, int from_tty) } if (matches) { - printf_filtered (_("Classes matching \"%s\":\n\n"), - regexp ? regexp : "*"); + gdb_printf (_("Classes matching \"%s\":\n\n"), + regexp ? regexp : "*"); sym_arr = XALLOCAVEC (struct symbol *, matches); matches = 0; for (objfile *objfile : current_program_space->objfiles ()) @@ -805,7 +805,7 @@ info_classes_command (const char *regexp, int from_tty) begin_line(); } else - printf_filtered (_("No classes matching \"%s\"\n"), regexp ? regexp : "*"); + gdb_printf (_("No classes matching \"%s\"\n"), regexp ? regexp : "*"); } static char * @@ -1181,12 +1181,12 @@ print_object_command (const char *args, int from_tty) do { /* Read and print characters up to EOS. */ QUIT; - printf_filtered ("%c", c); + gdb_printf ("%c", c); read_memory (string_addr + i++, &c, 1); } while (c != 0); else - printf_filtered(_("<object returns empty description>")); - printf_filtered ("\n"); + gdb_printf(_("<object returns empty description>")); + gdb_printf ("\n"); } /* The data structure 'methcalls' is used to detect method calls (thru diff --git a/gdb/observable.c b/gdb/observable.c index afe8139..0bc8697 100644 --- a/gdb/observable.c +++ b/gdb/observable.c @@ -89,7 +89,7 @@ static void show_observer_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Observer debugging is %s.\n"), value); + gdb_printf (file, _("Observer debugging is %s.\n"), value); } void _initialize_observer (); diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 2787609..9f7fa2f 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -57,7 +57,7 @@ static void show_or1k_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("OpenRISC debugging is %s.\n"), value); + gdb_printf (file, _("OpenRISC debugging is %s.\n"), value); } @@ -564,14 +564,14 @@ or1k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) CORE_ADDR pc; if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, "or1k_unwind_pc, next_frame=%d\n", - frame_relative_level (next_frame)); + gdb_printf (gdb_stdlog, "or1k_unwind_pc, next_frame=%d\n", + frame_relative_level (next_frame)); pc = frame_unwind_register_unsigned (next_frame, OR1K_NPC_REGNUM); if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, "or1k_unwind_pc, pc=%s\n", - paddress (gdbarch, pc)); + gdb_printf (gdb_stdlog, "or1k_unwind_pc, pc=%s\n", + paddress (gdbarch, pc)); return pc; } @@ -584,14 +584,14 @@ or1k_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) CORE_ADDR sp; if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, "or1k_unwind_sp, next_frame=%d\n", - frame_relative_level (next_frame)); + gdb_printf (gdb_stdlog, "or1k_unwind_sp, next_frame=%d\n", + frame_relative_level (next_frame)); sp = frame_unwind_register_unsigned (next_frame, OR1K_SP_REGNUM); if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, "or1k_unwind_sp, sp=%s\n", - paddress (gdbarch, sp)); + gdb_printf (gdb_stdlog, "or1k_unwind_sp, sp=%s\n", + paddress (gdbarch, sp)); return sp; } @@ -904,9 +904,9 @@ or1k_frame_cache (struct frame_info *this_frame, void **prologue_cache) CORE_ADDR end_addr; if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, - "or1k_frame_cache, prologue_cache = %s\n", - host_address_to_string (*prologue_cache)); + gdb_printf (gdb_stdlog, + "or1k_frame_cache, prologue_cache = %s\n", + host_address_to_string (*prologue_cache)); /* Nothing to do if we already have this info. */ if (NULL != *prologue_cache) @@ -930,7 +930,7 @@ or1k_frame_cache (struct frame_info *this_frame, void **prologue_cache) if (start_addr == 0) { if (or1k_debug) - fprintf_unfiltered (gdb_stdlog, " couldn't find function\n"); + gdb_printf (gdb_stdlog, " couldn't find function\n"); /* JPB: 28-Apr-11. This is a temporary patch, to get round GDB crashing right at the beginning. Build the frame ID as best we @@ -1091,10 +1091,10 @@ or1k_frame_cache (struct frame_info *this_frame, void **prologue_cache) if (or1k_debug) { - fprintf_unfiltered (gdb_stdlog, " this_sp_for_id = %s\n", - paddress (gdbarch, this_sp_for_id)); - fprintf_unfiltered (gdb_stdlog, " start_addr = %s\n", - paddress (gdbarch, start_addr)); + gdb_printf (gdb_stdlog, " this_sp_for_id = %s\n", + paddress (gdbarch, this_sp_for_id)); + gdb_printf (gdb_stdlog, " start_addr = %s\n", + paddress (gdbarch, start_addr)); } return info; @@ -1290,10 +1290,10 @@ or1k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) if (NULL == tdep) return; /* Nothing to report */ - fprintf_filtered (file, "or1k_dump_tdep: %d bytes per word\n", - tdep->bytes_per_word); - fprintf_filtered (file, "or1k_dump_tdep: %d bytes per address\n", - tdep->bytes_per_address); + gdb_printf (file, "or1k_dump_tdep: %d bytes per word\n", + tdep->bytes_per_word); + gdb_printf (file, "or1k_dump_tdep: %d bytes per address\n", + tdep->bytes_per_address); } diff --git a/gdb/osabi.c b/gdb/osabi.c index d4a9806..bbd7635 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -638,17 +638,17 @@ show_osabi (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (user_osabi_state == osabi_auto) - fprintf_filtered (file, - _("The current OS ABI is \"auto\" " - "(currently \"%s\").\n"), - gdbarch_osabi_name (gdbarch_osabi (get_current_arch ()))); + gdb_printf (file, + _("The current OS ABI is \"auto\" " + "(currently \"%s\").\n"), + gdbarch_osabi_name (gdbarch_osabi (get_current_arch ()))); else - fprintf_filtered (file, _("The current OS ABI is \"%s\".\n"), - gdbarch_osabi_name (user_selected_osabi)); + gdb_printf (file, _("The current OS ABI is \"%s\".\n"), + gdbarch_osabi_name (user_selected_osabi)); if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN) - fprintf_filtered (file, _("The default OS ABI is \"%s\".\n"), - gdbarch_osabi_name (GDB_OSABI_DEFAULT)); + gdb_printf (file, _("The default OS ABI is \"%s\".\n"), + gdbarch_osabi_name (GDB_OSABI_DEFAULT)); } void _initialize_gdb_osabi (); diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 3f6ee25..1597e9c 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -159,14 +159,14 @@ pascal_language::print_one_char (int c, struct ui_file *stream, gdb_puts ("''", stream); } else - fprintf_filtered (stream, "%c", c); + gdb_printf (stream, "%c", c); } else { if (*in_quotes) gdb_puts ("'", stream); *in_quotes = 0; - fprintf_filtered (stream, "#%d", (unsigned int) c); + gdb_printf (stream, "#%d", (unsigned int) c); } } @@ -291,9 +291,9 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, in_quotes = 0; } printchar (current_char, elttype, stream); - fprintf_filtered (stream, " %p[<repeats %u times>%p]", - metadata_style.style ().ptr (), - reps, nullptr); + gdb_printf (stream, " %p[<repeats %u times>%p]", + metadata_style.style ().ptr (), + reps, nullptr); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index f8bdf72..0ef8c92 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -87,10 +87,10 @@ pascal_language::print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream) const { type = check_typedef (type); - fprintf_filtered (stream, "type "); - fprintf_filtered (stream, "%s = ", new_symbol->print_name ()); + gdb_printf (stream, "type "); + gdb_printf (stream, "%s = ", new_symbol->print_name ()); type_print (type, "", stream, 0); - fprintf_filtered (stream, ";"); + gdb_printf (stream, ";"); } /* See p-lang.h. */ @@ -105,11 +105,11 @@ pascal_language::type_print_derivation_info (struct ui_file *stream, for (i = 0; i < TYPE_N_BASECLASSES (type); i++) { gdb_puts (i == 0 ? ": " : ", ", stream); - fprintf_filtered (stream, "%s%s ", - BASETYPE_VIA_PUBLIC (type, i) ? "public" : "private", - BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : ""); + gdb_printf (stream, "%s%s ", + BASETYPE_VIA_PUBLIC (type, i) ? "public" : "private", + BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : ""); name = TYPE_BASECLASS (type, i)->name (); - fprintf_filtered (stream, "%s", name ? name : "(null)"); + gdb_printf (stream, "%s", name ? name : "(null)"); } if (i > 0) { @@ -183,7 +183,7 @@ pascal_language::type_print_varspec_prefix (struct type *type, switch (type->code ()) { case TYPE_CODE_PTR: - fprintf_filtered (stream, "^"); + gdb_printf (stream, "^"); type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, flags); break; /* Pointer should be handled normally @@ -191,58 +191,58 @@ pascal_language::type_print_varspec_prefix (struct type *type, case TYPE_CODE_METHOD: if (passed_a_ptr) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); if (TYPE_TARGET_TYPE (type) != NULL && TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, "function "); + gdb_printf (stream, "function "); } else { - fprintf_filtered (stream, "procedure "); + gdb_printf (stream, "procedure "); } if (passed_a_ptr) { - fprintf_filtered (stream, " "); + gdb_printf (stream, " "); type_print_base (TYPE_SELF_TYPE (type), stream, 0, passed_a_ptr, flags); - fprintf_filtered (stream, "::"); + gdb_printf (stream, "::"); } break; case TYPE_CODE_REF: type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, flags); - fprintf_filtered (stream, "&"); + gdb_printf (stream, "&"); break; case TYPE_CODE_FUNC: if (passed_a_ptr) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); if (TYPE_TARGET_TYPE (type) != NULL && TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, "function "); + gdb_printf (stream, "function "); } else { - fprintf_filtered (stream, "procedure "); + gdb_printf (stream, "procedure "); } break; case TYPE_CODE_ARRAY: if (passed_a_ptr) - fprintf_filtered (stream, "("); - fprintf_filtered (stream, "array "); + gdb_printf (stream, "("); + gdb_printf (stream, "array "); if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0 && type->bounds ()->high.kind () != PROP_UNDEFINED) - fprintf_filtered (stream, "[%s..%s] ", - plongest (type->bounds ()->low.const_val ()), - plongest (type->bounds ()->high.const_val ())); - fprintf_filtered (stream, "of "); + gdb_printf (stream, "[%s..%s] ", + plongest (type->bounds ()->low.const_val ()), + plongest (type->bounds ()->high.const_val ())); + gdb_printf (stream, "of "); break; case TYPE_CODE_UNDEF: @@ -280,7 +280,7 @@ pascal_language::print_func_args (struct type *type, struct ui_file *stream, if (len) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); } for (i = 0; i < len; i++) { @@ -292,7 +292,7 @@ pascal_language::print_func_args (struct type *type, struct ui_file *stream, /* Can we find if it is a var parameter ?? if ( TYPE_FIELD(type, i) == ) { - fprintf_filtered (stream, "var "); + gdb_printf (stream, "var "); } */ print_type (type->field (i).type (), "" /* TYPE_FIELD_NAME seems invalid! */ @@ -300,7 +300,7 @@ pascal_language::print_func_args (struct type *type, struct ui_file *stream, } if (len) { - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } } @@ -316,7 +316,7 @@ pascal_language::type_print_func_varspec_suffix (struct type *type, if (TYPE_TARGET_TYPE (type) == NULL || TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, " : "); + gdb_printf (stream, " : "); type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, flags); @@ -352,12 +352,12 @@ pascal_language::type_print_varspec_suffix (struct type *type, { case TYPE_CODE_ARRAY: if (passed_a_ptr) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); break; case TYPE_CODE_METHOD: if (passed_a_ptr) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); type_print_method_args ("", "", stream); type_print_func_varspec_suffix (type, stream, show, passed_a_ptr, 0, flags); @@ -371,7 +371,7 @@ pascal_language::type_print_varspec_suffix (struct type *type, case TYPE_CODE_FUNC: if (passed_a_ptr) - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); if (!demangled_args) print_func_args (type, stream, flags); type_print_func_varspec_suffix (type, stream, show, @@ -470,11 +470,11 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int } if (HAVE_CPLUS_STRUCT (type)) { - fprintf_filtered (stream, "class "); + gdb_printf (stream, "class "); } else { - fprintf_filtered (stream, "record "); + gdb_printf (stream, "record "); } goto struct_union; @@ -484,7 +484,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int gdb_puts (type->name (), stream); gdb_puts (" = ", stream); } - fprintf_filtered (stream, "case <?> of "); + gdb_printf (stream, "case <?> of "); struct_union: stream->wrap_here (4); @@ -492,21 +492,21 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int { /* If we just printed a tag name, no need to print anything else. */ if (type->name () == NULL) - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); } else if (show > 0 || type->name () == NULL) { type_print_derivation_info (stream, type); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); if ((type->num_fields () == 0) && (TYPE_NFN_FIELDS (type) == 0)) { if (type->is_stub ()) - fprintf_filtered (stream, "%*s<incomplete type>\n", - level + 4, ""); + gdb_printf (stream, "%*s<incomplete type>\n", + level + 4, ""); else - fprintf_filtered (stream, "%*s<no data fields>\n", - level + 4, ""); + gdb_printf (stream, "%*s<no data fields>\n", + level + 4, ""); } /* Start off with no specific section type, so we can print @@ -537,8 +537,8 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_protected) { section_type = s_protected; - fprintf_filtered (stream, "%*sprotected\n", - level + 2, ""); + gdb_printf (stream, "%*sprotected\n", + level + 2, ""); } } else if (TYPE_FIELD_PRIVATE (type, i)) @@ -546,8 +546,8 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_private) { section_type = s_private; - fprintf_filtered (stream, "%*sprivate\n", - level + 2, ""); + gdb_printf (stream, "%*sprivate\n", + level + 2, ""); } } else @@ -555,15 +555,15 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_public) { section_type = s_public; - fprintf_filtered (stream, "%*spublic\n", - level + 2, ""); + gdb_printf (stream, "%*spublic\n", + level + 2, ""); } } } print_spaces_filtered (level + 4, stream); if (field_is_static (&type->field (i))) - fprintf_filtered (stream, "static "); + gdb_printf (stream, "static "); print_type (type->field (i).type (), type->field (i).name (), stream, show - 1, level + 4, flags); @@ -575,16 +575,16 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int unnamed fields. This would lead to misleading results if the compiler does not put out fields for such things (I don't know what it does). */ - fprintf_filtered (stream, " : %d", - TYPE_FIELD_BITSIZE (type, i)); + gdb_printf (stream, " : %d", + TYPE_FIELD_BITSIZE (type, i)); } - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } /* If there are both fields and methods, put a space between. */ len = TYPE_NFN_FIELDS (type); if (len && section_type != s_none) - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); /* Object pascal: print out the methods. */ @@ -610,8 +610,8 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_protected) { section_type = s_protected; - fprintf_filtered (stream, "%*sprotected\n", - level + 2, ""); + gdb_printf (stream, "%*sprotected\n", + level + 2, ""); } } else if (TYPE_FN_FIELD_PRIVATE (f, j)) @@ -619,8 +619,8 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_private) { section_type = s_private; - fprintf_filtered (stream, "%*sprivate\n", - level + 2, ""); + gdb_printf (stream, "%*sprivate\n", + level + 2, ""); } } else @@ -628,38 +628,38 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (section_type != s_public) { section_type = s_public; - fprintf_filtered (stream, "%*spublic\n", - level + 2, ""); + gdb_printf (stream, "%*spublic\n", + level + 2, ""); } } print_spaces_filtered (level + 4, stream); if (TYPE_FN_FIELD_STATIC_P (f, j)) - fprintf_filtered (stream, "static "); + gdb_printf (stream, "static "); if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0) { /* Keep GDB from crashing here. */ - fprintf_filtered (stream, "<undefined type> %s;\n", - TYPE_FN_FIELD_PHYSNAME (f, j)); + gdb_printf (stream, "<undefined type> %s;\n", + TYPE_FN_FIELD_PHYSNAME (f, j)); break; } if (is_constructor) { - fprintf_filtered (stream, "constructor "); + gdb_printf (stream, "constructor "); } else if (is_destructor) { - fprintf_filtered (stream, "destructor "); + gdb_printf (stream, "destructor "); } else if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) != 0 && TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE(f, j))->code () != TYPE_CODE_VOID) { - fprintf_filtered (stream, "function "); + gdb_printf (stream, "function "); } else { - fprintf_filtered (stream, "procedure "); + gdb_printf (stream, "procedure "); } /* This does not work, no idea why !! */ @@ -673,12 +673,12 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int "", stream, -1); } if (TYPE_FN_FIELD_VIRTUAL_P (f, j)) - fprintf_filtered (stream, "; virtual"); + gdb_printf (stream, "; virtual"); - fprintf_filtered (stream, ";\n"); + gdb_printf (stream, ";\n"); } } - fprintf_filtered (stream, "%*send", level, ""); + gdb_printf (stream, "%*send", level, ""); } break; @@ -691,49 +691,49 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int } /* enum is just defined by type enume_name = (enum_member1,enum_member2,...) */ - fprintf_filtered (stream, " = "); + gdb_printf (stream, " = "); stream->wrap_here (4); if (show < 0) { /* If we just printed a tag name, no need to print anything else. */ if (type->name () == NULL) - fprintf_filtered (stream, "(...)"); + gdb_printf (stream, "(...)"); } else if (show > 0 || type->name () == NULL) { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); len = type->num_fields (); lastval = 0; for (i = 0; i < len; i++) { QUIT; if (i) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); stream->wrap_here (4); gdb_puts (type->field (i).name (), stream); if (lastval != type->field (i).loc_enumval ()) { - fprintf_filtered (stream, - " := %s", - plongest (type->field (i).loc_enumval ())); + gdb_printf (stream, + " := %s", + plongest (type->field (i).loc_enumval ())); lastval = type->field (i).loc_enumval (); } lastval++; } - fprintf_filtered (stream, ")"); + gdb_printf (stream, ")"); } break; case TYPE_CODE_VOID: - fprintf_filtered (stream, "void"); + gdb_printf (stream, "void"); break; case TYPE_CODE_UNDEF: - fprintf_filtered (stream, "record <unknown>"); + gdb_printf (stream, "record <unknown>"); break; case TYPE_CODE_ERROR: - fprintf_filtered (stream, "%s", TYPE_ERROR_NAME (type)); + gdb_printf (stream, "%s", TYPE_ERROR_NAME (type)); break; /* this probably does not work for enums. */ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index e71aa4c..926b0f1 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -122,20 +122,20 @@ pascal_language::value_print_inner (struct value *val, } else { - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); /* If this is a virtual function table, print the 0th entry specially, and the rest of the members normally. */ if (pascal_object_is_vtbl_ptr_type (elttype)) { i = 1; - fprintf_filtered (stream, "%d vtable entries", len - 1); + gdb_printf (stream, "%d vtable entries", len - 1); } else { i = 0; } value_print_array_elements (val, stream, recurse, options, i); - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } break; } @@ -266,7 +266,7 @@ pascal_language::value_print_inner (struct value *val, current_language); if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } } @@ -292,7 +292,7 @@ pascal_language::value_print_inner (struct value *val, case TYPE_CODE_UNION: if (recurse && !options->unionprint) { - fprintf_filtered (stream, "{...}"); + gdb_printf (stream, "{...}"); break; } /* Fall through. */ @@ -430,9 +430,9 @@ pascal_language::value_print (struct value *val, struct ui_file *stream, } else { - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); type_print (type, "", stream, -1); - fprintf_filtered (stream, ") "); + gdb_printf (stream, ") "); } } common_val_print (val, stream, 0, &opts, current_language); @@ -443,8 +443,8 @@ static void show_pascal_static_field_print (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of pascal static members is %s.\n"), - value); + gdb_printf (file, _("Printing of pascal static members is %s.\n"), + value); } static struct obstack dont_print_vb_obstack; @@ -520,7 +520,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, struct type *type = check_typedef (value_type (val)); - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); len = type->num_fields (); n_baseclasses = TYPE_N_BASECLASSES (type); @@ -553,12 +553,12 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, && field_is_static (&type->field (i))) continue; if (fields_seen) - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); else if (n_baseclasses > 0) { if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); gdb_puts ("members of ", stream); gdb_puts (type->name (), stream); @@ -569,7 +569,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else @@ -670,11 +670,11 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } } - fprintf_filtered (stream, "}"); + gdb_printf (stream, "}"); } /* Special val_print routine to avoid printing multiple copies of virtual @@ -761,7 +761,7 @@ pascal_object_print_value (struct value *val, struct ui_file *stream, if (options->prettyformat) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } gdb_puts ("<", stream); diff --git a/gdb/parse.c b/gdb/parse.c index 866bb9e6..8886ab0 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -57,7 +57,7 @@ static void show_expressiondebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Expression debugging is %s.\n"), value); + gdb_printf (file, _("Expression debugging is %s.\n"), value); } @@ -68,7 +68,7 @@ static void show_parserdebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Parser debugging is %s.\n"), value); + gdb_printf (file, _("Parser debugging is %s.\n"), value); } @@ -635,7 +635,7 @@ parser_fprintf (FILE *x, const char *y, ...) gdb_vprintf (gdb_stderr, y, args); else { - fprintf_unfiltered (gdb_stderr, " Unknown FILE used.\n"); + gdb_printf (gdb_stderr, " Unknown FILE used.\n"); gdb_vprintf (gdb_stderr, y, args); } va_end (args); diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 0b165fe..c482598 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1427,9 +1427,9 @@ ppc_linux_syscall_record (struct regcache *regcache) if (syscall_gdb < 0) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %d\n"), (int) scnum); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %d\n"), (int) scnum); return 0; } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index d142408..b200ccf 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -102,10 +102,10 @@ static void show_max_symbolic_offset (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The largest offset that will be " - "printed in <symbol+1234> form is %s.\n"), - value); + gdb_printf (file, + _("The largest offset that will be " + "printed in <symbol+1234> form is %s.\n"), + value); } /* Append the source filename and linenumber of the symbol when @@ -115,9 +115,9 @@ static void show_print_symbol_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of source filename and " - "line number with <symbol> is %s.\n"), - value); + gdb_printf (file, _("Printing of source filename and " + "line number with <symbol> is %s.\n"), + value); } /* Number of auto-display expression currently being displayed. @@ -569,7 +569,7 @@ print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_puts ("<", stream); fputs_styled (name.c_str (), function_name_style.style (), stream); if (offset != 0) - fprintf_filtered (stream, "%+d", offset); + gdb_printf (stream, "%+d", offset); /* Append source filename and line number if desired. Give specific line # of this addr, if we have it; else line # of the nearest symbol. */ @@ -578,7 +578,7 @@ print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_puts (line == -1 ? " in " : " at ", stream); fputs_styled (filename.c_str (), file_name_style.style (), stream); if (line != -1) - fprintf_filtered (stream, ":%d", line); + gdb_printf (stream, ":%d", line); } if (unmapped) gdb_puts ("*>", stream); @@ -819,11 +819,11 @@ find_instruction_backward (struct gdbarch *gdbarch, CORE_ADDR addr, /* We reach here when line info is not available. In this case, we print a message and just exit the loop. The return value is calculated after the loop. */ - printf_filtered (_("No line number information available " - "for address ")); + gdb_printf (_("No line number information available " + "for address ")); gdb_stdout->wrap_here (2); print_address (gdbarch, loop_start - 1, gdb_stdout); - printf_filtered ("\n"); + gdb_printf ("\n"); break; } @@ -905,8 +905,8 @@ read_memory_backward (struct gdbarch *gdbarch, if (errcode != 0) { /* The read was unsuccessful, so exit the loop. */ - printf_filtered (_("Cannot access memory at address %s\n"), - paddress (gdbarch, memaddr)); + gdb_printf (_("Cannot access memory at address %s\n"), + paddress (gdbarch, memaddr)); break; } } @@ -1140,10 +1140,10 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr) if (!atag.empty ()) { - printf_filtered (_("<Allocation Tag %s for range [%s,%s)>\n"), - atag.c_str (), - paddress (gdbarch, tag_laddr), - paddress (gdbarch, tag_haddr)); + gdb_printf (_("<Allocation Tag %s for range [%s,%s)>\n"), + atag.c_str (), + paddress (gdbarch, tag_laddr), + paddress (gdbarch, tag_haddr)); } } print_range_tag = false; @@ -1152,12 +1152,12 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr) if (format == 'i') gdb_puts (pc_prefix (next_address)); print_address (next_gdbarch, next_address, gdb_stdout); - printf_filtered (":"); + gdb_printf (":"); for (i = maxelts; i > 0 && count > 0; i--, count--) { - printf_filtered ("\t"); + gdb_printf ("\t"); /* Note that print_formatted sets next_address for the next object. */ last_examine_address = next_address; @@ -1185,7 +1185,7 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr) if (tag_haddr <= next_address) print_range_tag = true; } - printf_filtered ("\n"); + gdb_printf ("\n"); } if (need_to_update_next_address) @@ -1246,12 +1246,12 @@ print_value (value *val, const value_print_options &opts) annotate_value_history_begin (histindex, value_type (val)); - printf_filtered ("$%d = ", histindex); + gdb_printf ("$%d = ", histindex); annotate_value_history_value (); print_formatted (val, 0, &opts, gdb_stdout); - printf_filtered ("\n"); + gdb_printf ("\n"); annotate_value_history_end (); } @@ -1343,9 +1343,9 @@ print_command_1 (const char *args, int voidprint) std::string atag = gdbarch_memtag_to_string (target_gdbarch (), tag); - printf_filtered (_("Logical tag (%s) does not match the " - "allocation tag (%s).\n"), - ltag.c_str (), atag.c_str ()); + gdb_printf (_("Logical tag (%s) does not match the " + "allocation tag (%s).\n"), + ltag.c_str (), atag.c_str ()); } } catch (gdb_exception_error &ex) @@ -1353,9 +1353,9 @@ print_command_1 (const char *args, int voidprint) if (ex.error == TARGET_CLOSE_ERROR) throw; - fprintf_filtered (gdb_stderr, - _("Could not validate memory tag: %s\n"), - ex.message->c_str ()); + gdb_printf (gdb_stderr, + _("Could not validate memory tag: %s\n"), + ex.message->c_str ()); } } @@ -1574,41 +1574,41 @@ info_symbol_command (const char *arg, int from_tty) if (current_program_space->multi_objfile_p ()) if (pc_in_unmapped_range (addr, osect)) if (section_is_overlay (osect)) - printf_filtered (_("%s in load address range of " - "%s overlay section %s of %s\n"), - loc_string, mapped, sec_name, obj_name); + gdb_printf (_("%s in load address range of " + "%s overlay section %s of %s\n"), + loc_string, mapped, sec_name, obj_name); else - printf_filtered (_("%s in load address range of " - "section %s of %s\n"), - loc_string, sec_name, obj_name); + gdb_printf (_("%s in load address range of " + "section %s of %s\n"), + loc_string, sec_name, obj_name); else if (section_is_overlay (osect)) - printf_filtered (_("%s in %s overlay section %s of %s\n"), - loc_string, mapped, sec_name, obj_name); + gdb_printf (_("%s in %s overlay section %s of %s\n"), + loc_string, mapped, sec_name, obj_name); else - printf_filtered (_("%s in section %s of %s\n"), - loc_string, sec_name, obj_name); + gdb_printf (_("%s in section %s of %s\n"), + loc_string, sec_name, obj_name); else if (pc_in_unmapped_range (addr, osect)) if (section_is_overlay (osect)) - printf_filtered (_("%s in load address range of %s overlay " - "section %s\n"), - loc_string, mapped, sec_name); + gdb_printf (_("%s in load address range of %s overlay " + "section %s\n"), + loc_string, mapped, sec_name); else - printf_filtered + gdb_printf (_("%s in load address range of section %s\n"), loc_string, sec_name); else if (section_is_overlay (osect)) - printf_filtered (_("%s in %s overlay section %s\n"), - loc_string, mapped, sec_name); + gdb_printf (_("%s in %s overlay section %s\n"), + loc_string, mapped, sec_name); else - printf_filtered (_("%s in section %s\n"), - loc_string, sec_name); + gdb_printf (_("%s in section %s\n"), + loc_string, sec_name); } } if (matches == 0) - printf_filtered (_("No symbol matches %s.\n"), arg); + gdb_printf (_("No symbol matches %s.\n"), arg); } static void @@ -1632,14 +1632,14 @@ info_address_command (const char *exp, int from_tty) { if (is_a_field_of_this.type != NULL) { - printf_filtered ("Symbol \""); + gdb_printf ("Symbol \""); fprintf_symbol_filtered (gdb_stdout, exp, current_language->la_language, DMGL_ANSI); - printf_filtered ("\" is a field of the local class variable "); + gdb_printf ("\" is a field of the local class variable "); if (current_language->la_language == language_objc) - printf_filtered ("`self'\n"); /* ObjC equivalent of "this" */ + gdb_printf ("`self'\n"); /* ObjC equivalent of "this" */ else - printf_filtered ("`this'\n"); + gdb_printf ("`this'\n"); return; } @@ -1652,34 +1652,34 @@ info_address_command (const char *exp, int from_tty) gdbarch = objfile->arch (); load_addr = BMSYMBOL_VALUE_ADDRESS (msymbol); - printf_filtered ("Symbol \""); + gdb_printf ("Symbol \""); fprintf_symbol_filtered (gdb_stdout, exp, current_language->la_language, DMGL_ANSI); - printf_filtered ("\" is at "); + gdb_printf ("\" is at "); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (" in a file compiled without debugging"); + gdb_printf (" in a file compiled without debugging"); section = msymbol.minsym->obj_section (objfile); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); - printf_filtered (",\n -- loaded at "); + gdb_printf (",\n -- loaded at "); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (" in overlay section %s", - section->the_bfd_section->name); + gdb_printf (" in overlay section %s", + section->the_bfd_section->name); } - printf_filtered (".\n"); + gdb_printf (".\n"); } else error (_("No symbol \"%s\" in current context."), exp); return; } - printf_filtered ("Symbol \""); + gdb_printf ("Symbol \""); gdb_puts (sym->print_name ()); - printf_filtered ("\" is "); + gdb_printf ("\" is "); val = SYMBOL_VALUE (sym); if (sym->is_objfile_owned ()) section = sym->obj_section (symbol_objfile (sym)); @@ -1691,7 +1691,7 @@ info_address_command (const char *exp, int from_tty) { SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc, gdb_stdout); - printf_filtered (".\n"); + gdb_printf (".\n"); return; } @@ -1699,22 +1699,22 @@ info_address_command (const char *exp, int from_tty) { case LOC_CONST: case LOC_CONST_BYTES: - printf_filtered ("constant"); + gdb_printf ("constant"); break; case LOC_LABEL: - printf_filtered ("a label at address "); + gdb_printf ("a label at address "); load_addr = SYMBOL_VALUE_ADDRESS (sym); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); - printf_filtered (",\n -- loaded at "); + gdb_printf (",\n -- loaded at "); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (" in overlay section %s", - section->the_bfd_section->name); + gdb_printf (" in overlay section %s", + section->the_bfd_section->name); } break; @@ -1731,65 +1731,65 @@ info_address_command (const char *exp, int from_tty) regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch); if (sym->is_argument ()) - printf_filtered (_("an argument in register %s"), - gdbarch_register_name (gdbarch, regno)); + gdb_printf (_("an argument in register %s"), + gdbarch_register_name (gdbarch, regno)); else - printf_filtered (_("a variable in register %s"), - gdbarch_register_name (gdbarch, regno)); + gdb_printf (_("a variable in register %s"), + gdbarch_register_name (gdbarch, regno)); break; case LOC_STATIC: - printf_filtered (_("static storage at address ")); + gdb_printf (_("static storage at address ")); load_addr = SYMBOL_VALUE_ADDRESS (sym); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); - printf_filtered (_(",\n -- loaded at ")); + gdb_printf (_(",\n -- loaded at ")); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (_(" in overlay section %s"), - section->the_bfd_section->name); + gdb_printf (_(" in overlay section %s"), + section->the_bfd_section->name); } break; case LOC_REGPARM_ADDR: /* Note comment at LOC_REGISTER. */ regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch); - printf_filtered (_("address of an argument in register %s"), - gdbarch_register_name (gdbarch, regno)); + gdb_printf (_("address of an argument in register %s"), + gdbarch_register_name (gdbarch, regno)); break; case LOC_ARG: - printf_filtered (_("an argument at offset %ld"), val); + gdb_printf (_("an argument at offset %ld"), val); break; case LOC_LOCAL: - printf_filtered (_("a local variable at frame offset %ld"), val); + gdb_printf (_("a local variable at frame offset %ld"), val); break; case LOC_REF_ARG: - printf_filtered (_("a reference argument at offset %ld"), val); + gdb_printf (_("a reference argument at offset %ld"), val); break; case LOC_TYPEDEF: - printf_filtered (_("a typedef")); + gdb_printf (_("a typedef")); break; case LOC_BLOCK: - printf_filtered (_("a function at address ")); + gdb_printf (_("a function at address ")); load_addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); - printf_filtered (_(",\n -- loaded at ")); + gdb_printf (_(",\n -- loaded at ")); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (_(" in overlay section %s"), - section->the_bfd_section->name); + gdb_printf (_(" in overlay section %s"), + section->the_bfd_section->name); } break; @@ -1799,7 +1799,7 @@ info_address_command (const char *exp, int from_tty) msym = lookup_bound_minimal_symbol (sym->linkage_name ()); if (msym.minsym == NULL) - printf_filtered ("unresolved"); + gdb_printf ("unresolved"); else { section = msym.obj_section (); @@ -1808,26 +1808,26 @@ info_address_command (const char *exp, int from_tty) && (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) { load_addr = MSYMBOL_VALUE_RAW_ADDRESS (msym.minsym); - printf_filtered (_("a thread-local variable at offset %s " - "in the thread-local storage for `%s'"), - paddress (gdbarch, load_addr), - objfile_name (section->objfile)); + gdb_printf (_("a thread-local variable at offset %s " + "in the thread-local storage for `%s'"), + paddress (gdbarch, load_addr), + objfile_name (section->objfile)); } else { load_addr = BMSYMBOL_VALUE_ADDRESS (msym); - printf_filtered (_("static storage at address ")); + gdb_printf (_("static storage at address ")); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); - printf_filtered (_(",\n -- loaded at ")); + gdb_printf (_(",\n -- loaded at ")); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); - printf_filtered (_(" in overlay section %s"), - section->the_bfd_section->name); + gdb_printf (_(" in overlay section %s"), + section->the_bfd_section->name); } } } @@ -1835,14 +1835,14 @@ info_address_command (const char *exp, int from_tty) break; case LOC_OPTIMIZED_OUT: - printf_filtered (_("optimized out")); + gdb_printf (_("optimized out")); break; default: - printf_filtered (_("of unknown (botched) type")); + gdb_printf (_("of unknown (botched) type")); break; } - printf_filtered (".\n"); + gdb_printf (".\n"); } @@ -2053,7 +2053,7 @@ map_display_numbers (const char *args, return item->number == num; }); if (iter == all_displays.end ()) - printf_filtered (_("No display number %d.\n"), num); + gdb_printf (_("No display number %d.\n"), num); else function (iter->get ()); } @@ -2138,21 +2138,21 @@ do_one_display (struct display *d) = make_scoped_restore (¤t_display_number, d->number); annotate_display_begin (); - printf_filtered ("%d", d->number); + gdb_printf ("%d", d->number); annotate_display_number_end (); - printf_filtered (": "); + gdb_printf (": "); if (d->format.size) { annotate_display_format (); - printf_filtered ("x/"); + gdb_printf ("x/"); if (d->format.count != 1) - printf_filtered ("%d", d->format.count); - printf_filtered ("%c", d->format.format); + gdb_printf ("%d", d->format.count); + gdb_printf ("%c", d->format.format); if (d->format.format != 'i' && d->format.format != 's') - printf_filtered ("%c", d->format.size); - printf_filtered (" "); + gdb_printf ("%c", d->format.size); + gdb_printf (" "); annotate_display_expression (); @@ -2160,9 +2160,9 @@ do_one_display (struct display *d) annotate_display_expression_end (); if (d->format.count != 1 || d->format.format == 'i') - printf_filtered ("\n"); + gdb_printf ("\n"); else - printf_filtered (" "); + gdb_printf (" "); annotate_display_value (); @@ -2179,9 +2179,9 @@ do_one_display (struct display *d) } catch (const gdb_exception_error &ex) { - printf_filtered (_("%p[<error: %s>%p]\n"), - metadata_style.style ().ptr (), ex.what (), - nullptr); + gdb_printf (_("%p[<error: %s>%p]\n"), + metadata_style.style ().ptr (), ex.what (), + nullptr); } } else @@ -2191,14 +2191,14 @@ do_one_display (struct display *d) annotate_display_format (); if (d->format.format) - printf_filtered ("/%c ", d->format.format); + gdb_printf ("/%c ", d->format.format); annotate_display_expression (); gdb_puts (d->exp_string.c_str ()); annotate_display_expression_end (); - printf_filtered (" = "); + gdb_printf (" = "); annotate_display_expression (); @@ -2218,7 +2218,7 @@ do_one_display (struct display *d) _("<error: %s>"), ex.what ()); } - printf_filtered ("\n"); + gdb_printf ("\n"); } annotate_display_end (); @@ -2248,7 +2248,7 @@ disable_display (int num) d->enabled_p = false; return; } - printf_filtered (_("No display number %d.\n"), num); + gdb_printf (_("No display number %d.\n"), num); } void @@ -2257,10 +2257,10 @@ disable_current_display (void) if (current_display_number >= 0) { disable_display (current_display_number); - fprintf_unfiltered (gdb_stderr, - _("Disabling display %d to " - "avoid infinite recursion.\n"), - current_display_number); + gdb_printf (gdb_stderr, + _("Disabling display %d to " + "avoid infinite recursion.\n"), + current_display_number); } current_display_number = -1; } @@ -2269,23 +2269,23 @@ static void info_display_command (const char *ignore, int from_tty) { if (all_displays.empty ()) - printf_filtered (_("There are no auto-display expressions now.\n")); + gdb_printf (_("There are no auto-display expressions now.\n")); else - printf_filtered (_("Auto-display expressions now in effect:\n\ + gdb_printf (_("Auto-display expressions now in effect:\n\ Num Enb Expression\n")); for (auto &d : all_displays) { - printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]); + gdb_printf ("%d: %c ", d->number, "ny"[(int) d->enabled_p]); if (d->format.size) - printf_filtered ("/%d%c%c ", d->format.count, d->format.size, - d->format.format); + gdb_printf ("/%d%c%c ", d->format.count, d->format.size, + d->format.format); else if (d->format.format) - printf_filtered ("/%c ", d->format.format); + gdb_printf ("/%c ", d->format.format); gdb_puts (d->exp_string.c_str ()); if (d->block && !contained_in (get_selected_block (0), d->block, true)) - printf_filtered (_(" (cannot be evaluated in the current context)")); - printf_filtered ("\n"); + gdb_printf (_(" (cannot be evaluated in the current context)")); + gdb_printf ("\n"); } } @@ -2388,8 +2388,8 @@ print_variable_and_value (const char *name, struct symbol *var, if (!name) name = var->print_name (); - fprintf_filtered (stream, "%*s%ps = ", 2 * indent, "", - styled_string (variable_name_style.style (), name)); + gdb_printf (stream, "%*s%ps = ", 2 * indent, "", + styled_string (variable_name_style.style (), name)); try { @@ -2416,7 +2416,7 @@ print_variable_and_value (const char *name, struct symbol *var, except.what ()); } - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } /* Subroutine of ui_printf to simplify it. @@ -2454,7 +2454,7 @@ printf_c_string (struct ui_file *stream, const char *format, { DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, format, "(null)"); + gdb_printf (stream, format, "(null)"); DIAGNOSTIC_POP return; } @@ -2483,7 +2483,7 @@ printf_c_string (struct ui_file *stream, const char *format, DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, format, (char *) str); + gdb_printf (stream, format, (char *) str); DIAGNOSTIC_POP } @@ -2517,7 +2517,7 @@ printf_wide_c_string (struct ui_file *stream, const char *format, { DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, format, "(null)"); + gdb_printf (stream, format, "(null)"); DIAGNOSTIC_POP return; } @@ -2553,7 +2553,7 @@ printf_wide_c_string (struct ui_file *stream, const char *format, DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, format, obstack_base (&output)); + gdb_printf (stream, format, obstack_base (&output)); DIAGNOSTIC_POP } @@ -2685,7 +2685,7 @@ printf_pointer (struct ui_file *stream, const char *format, *fmt_p++ = '\0'; DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, fmt, val); + gdb_printf (stream, fmt, val); DIAGNOSTIC_POP } else @@ -2694,7 +2694,7 @@ printf_pointer (struct ui_file *stream, const char *format, *fmt_p++ = '\0'; DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, fmt, "(nil)"); + gdb_printf (stream, fmt, "(nil)"); DIAGNOSTIC_POP } } @@ -2797,8 +2797,8 @@ ui_printf (const char *arg, struct ui_file *stream) DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, - obstack_base (&output)); + gdb_printf (stream, current_substring, + obstack_base (&output)); DIAGNOSTIC_POP } break; @@ -2809,7 +2809,7 @@ ui_printf (const char *arg, struct ui_file *stream) DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, val); + gdb_printf (stream, current_substring, val); DIAGNOSTIC_POP break; } @@ -2822,7 +2822,7 @@ ui_printf (const char *arg, struct ui_file *stream) DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, val); + gdb_printf (stream, current_substring, val); DIAGNOSTIC_POP break; } @@ -2832,7 +2832,7 @@ ui_printf (const char *arg, struct ui_file *stream) DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, val); + gdb_printf (stream, current_substring, val); DIAGNOSTIC_POP break; } @@ -2842,7 +2842,7 @@ ui_printf (const char *arg, struct ui_file *stream) DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, val); + gdb_printf (stream, current_substring, val); DIAGNOSTIC_POP break; } @@ -2862,14 +2862,14 @@ ui_printf (const char *arg, struct ui_file *stream) /* Print a portion of the format string that has no directives. Note that this will not include any ordinary %-specs, but it might include "%%". That is - why we use printf_filtered and not gdb_puts here. + why we use gdb_printf and not gdb_puts here. Also, we pass a dummy argument because some platforms have modified GCC to include -Wformat-security by default, which will warn here if there is no argument. */ DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL - fprintf_filtered (stream, current_substring, 0); + gdb_printf (stream, current_substring, 0); DIAGNOSTIC_POP break; default: @@ -2961,9 +2961,9 @@ memory_tag_print_tag_command (const char *args, enum memtag_type tag_type) std::string tag = gdbarch_memtag_to_string (target_gdbarch (), tag_value); if (tag.empty ()) - printf_filtered (_("%s tag unavailable.\n"), - tag_type - == memtag_type::logical? "Logical" : "Allocation"); + gdb_printf (_("%s tag unavailable.\n"), + tag_type + == memtag_type::logical? "Logical" : "Allocation"); struct value *v_tag = process_print_command_args (tag.c_str (), &print_opts, @@ -3059,7 +3059,7 @@ memory_tag_with_logical_tag_command (const char *args, int from_tty) /* Length doesn't matter for a logical tag. Pass 0. */ if (!gdbarch_set_memtags (target_gdbarch (), val, 0, tags, memtag_type::logical)) - printf_filtered (_("Could not update the logical tag data.\n")); + gdb_printf (_("Could not update the logical tag data.\n")); else { /* Always print it in hex format. */ @@ -3136,9 +3136,9 @@ memory_tag_set_allocation_tag_command (const char *args, int from_tty) if (!gdbarch_set_memtags (target_gdbarch (), val, length, tags, memtag_type::allocation)) - printf_filtered (_("Could not update the allocation tag(s).\n")); + gdb_printf (_("Could not update the allocation tag(s).\n")); else - printf_filtered (_("Allocation tag(s) updated successfully.\n")); + gdb_printf (_("Allocation tag(s) updated successfully.\n")); } /* Implement the "memory-tag check" command. */ @@ -3178,10 +3178,10 @@ memory_tag_check_command (const char *args, int from_tty) std::string atag = gdbarch_memtag_to_string (target_gdbarch (), tag); - printf_filtered (_("Logical tag (%s) does not match" - " the allocation tag (%s) for address %s.\n"), - ltag.c_str (), atag.c_str (), - paddress (target_gdbarch (), addr)); + gdb_printf (_("Logical tag (%s) does not match" + " the allocation tag (%s) for address %s.\n"), + ltag.c_str (), atag.c_str (), + paddress (target_gdbarch (), addr)); } else { @@ -3190,8 +3190,8 @@ memory_tag_check_command (const char *args, int from_tty) std::string ltag = gdbarch_memtag_to_string (target_gdbarch (), tag); - printf_filtered (_("Memory tags for address %s match (%s).\n"), - paddress (target_gdbarch (), addr), ltag.c_str ()); + gdb_printf (_("Memory tags for address %s match (%s).\n"), + paddress (target_gdbarch (), addr), ltag.c_str ()); } } diff --git a/gdb/procfs.c b/gdb/procfs.c index 4751645..584833a 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1809,7 +1809,7 @@ do_attach (ptid_t ptid) if (!open_procinfo_files (pi, FD_CTL)) { - fprintf_filtered (gdb_stderr, "procfs:%d -- ", __LINE__); + gdb_printf (gdb_stderr, "procfs:%d -- ", __LINE__); xsnprintf (errmsg, sizeof (errmsg), "do_attach: couldn't open /proc file for process %d", ptid.pid ()); @@ -2122,8 +2122,8 @@ wait_again: if (what == SYS_lwp_exit) { if (print_thread_events) - printf_filtered (_("[%s exited]\n"), - target_pid_to_str (retval).c_str ()); + gdb_printf (_("[%s exited]\n"), + target_pid_to_str (retval).c_str ()); delete_thread (find_thread_ptid (this, retval)); target_continue_no_signal (ptid); goto wait_again; @@ -2171,9 +2171,9 @@ wait_again: } else { - printf_filtered (_("procfs: trapped on entry to ")); + gdb_printf (_("procfs: trapped on entry to ")); proc_prettyprint_syscall (proc_what (pi), 0); - printf_filtered ("\n"); + gdb_printf ("\n"); long i, nsysargs, *sysargs; @@ -2182,11 +2182,11 @@ wait_again: if (nsysargs > 0 && sysargs != NULL) { - printf_filtered (_("%ld syscall arguments:\n"), - nsysargs); + gdb_printf (_("%ld syscall arguments:\n"), + nsysargs); for (i = 0; i < nsysargs; i++) - printf_filtered ("#%ld: 0x%08lx\n", - i, sysargs[i]); + gdb_printf ("#%ld: 0x%08lx\n", + i, sysargs[i]); } /* How to keep going without returning to wfi: */ @@ -2229,17 +2229,17 @@ wait_again: else if (what == SYS_lwp_exit) { if (print_thread_events) - printf_filtered (_("[%s exited]\n"), - target_pid_to_str (retval).c_str ()); + gdb_printf (_("[%s exited]\n"), + target_pid_to_str (retval).c_str ()); delete_thread (find_thread_ptid (this, retval)); status->set_spurious (); return retval; } else { - printf_filtered (_("procfs: trapped on exit from ")); + gdb_printf (_("procfs: trapped on exit from ")); proc_prettyprint_syscall (proc_what (pi), 0); - printf_filtered ("\n"); + gdb_printf ("\n"); long i, nsysargs, *sysargs; @@ -2248,11 +2248,11 @@ wait_again: if (nsysargs > 0 && sysargs != NULL) { - printf_filtered (_("%ld syscall arguments:\n"), - nsysargs); + gdb_printf (_("%ld syscall arguments:\n"), + nsysargs); for (i = 0; i < nsysargs; i++) - printf_filtered ("#%ld: 0x%08lx\n", - i, sysargs[i]); + gdb_printf ("#%ld: 0x%08lx\n", + i, sysargs[i]); } target_continue_no_signal (ptid); @@ -2266,7 +2266,7 @@ wait_again: #else if (retry < 5) { - printf_filtered (_("Retry #%d:\n"), retry); + gdb_printf (_("Retry #%d:\n"), retry); pi->status_valid = 0; goto wait_again; } @@ -2297,8 +2297,8 @@ wait_again: } break; default: /* switch (why) unmatched */ - printf_filtered ("procfs:%d -- ", __LINE__); - printf_filtered (_("child stopped for unknown reason:\n")); + gdb_printf ("procfs:%d -- ", __LINE__); + gdb_printf (_("child stopped for unknown reason:\n")); proc_prettyprint_why (why, what, 1); error (_("... giving up...")); break; @@ -2321,8 +2321,8 @@ wait_again: else /* Flags do not indicate STOPPED. */ { /* surely this can't happen... */ - printf_filtered ("procfs:%d -- process not stopped.\n", - __LINE__); + gdb_printf ("procfs:%d -- process not stopped.\n", + __LINE__); proc_prettyprint_flags (flags, 1); error (_("procfs: ...giving up...")); } @@ -2537,9 +2537,9 @@ procfs_target::files_info () { struct inferior *inf = current_inferior (); - printf_filtered (_("\tUsing the running image of %s %s via /proc.\n"), - inf->attach_flag? "attached": "child", - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("\tUsing the running image of %s %s via /proc.\n"), + inf->attach_flag? "attached": "child", + target_pid_to_str (inferior_ptid).c_str ()); } /* Make it die. Wait for it to die. Clean up after it. Note: this @@ -3228,19 +3228,19 @@ info_mappings_callback (struct prmap *map, find_memory_region_ftype ignore, pr_off = (unsigned int) map->pr_offset; if (gdbarch_addr_bit (target_gdbarch ()) == 32) - printf_filtered ("\t%#10lx %#10lx %#10lx %#10x %7s\n", - (unsigned long) map->pr_vaddr, - (unsigned long) map->pr_vaddr + map->pr_size - 1, - (unsigned long) map->pr_size, - pr_off, - mappingflags (map->pr_mflags)); + gdb_printf ("\t%#10lx %#10lx %#10lx %#10x %7s\n", + (unsigned long) map->pr_vaddr, + (unsigned long) map->pr_vaddr + map->pr_size - 1, + (unsigned long) map->pr_size, + pr_off, + mappingflags (map->pr_mflags)); else - printf_filtered (" %#18lx %#18lx %#10lx %#10x %7s\n", - (unsigned long) map->pr_vaddr, - (unsigned long) map->pr_vaddr + map->pr_size - 1, - (unsigned long) map->pr_size, - pr_off, - mappingflags (map->pr_mflags)); + gdb_printf (" %#18lx %#18lx %#10lx %#10x %7s\n", + (unsigned long) map->pr_vaddr, + (unsigned long) map->pr_vaddr + map->pr_size - 1, + (unsigned long) map->pr_size, + pr_off, + mappingflags (map->pr_mflags)); return 0; } @@ -3253,24 +3253,24 @@ info_proc_mappings (procinfo *pi, int summary) if (summary) return; /* No output for summary mode. */ - printf_filtered (_("Mapped address spaces:\n\n")); + gdb_printf (_("Mapped address spaces:\n\n")); if (gdbarch_ptr_bit (target_gdbarch ()) == 32) - printf_filtered ("\t%10s %10s %10s %10s %7s\n", - "Start Addr", - " End Addr", - " Size", - " Offset", - "Flags"); + gdb_printf ("\t%10s %10s %10s %10s %7s\n", + "Start Addr", + " End Addr", + " Size", + " Offset", + "Flags"); else - printf_filtered (" %18s %18s %10s %10s %7s\n", - "Start Addr", - " End Addr", - " Size", - " Offset", - "Flags"); + gdb_printf (" %18s %18s %10s %10s %7s\n", + "Start Addr", + " End Addr", + " Size", + " Offset", + "Flags"); iterate_over_mappings (pi, NULL, NULL, info_mappings_callback); - printf_filtered ("\n"); + gdb_printf ("\n"); } /* Implement the "info proc" command. */ @@ -3339,17 +3339,17 @@ procfs_target::info_proc (const char *args, enum info_proc_what what) if (process) { - printf_filtered (_("process %d flags:\n"), process->pid); + gdb_printf (_("process %d flags:\n"), process->pid); proc_prettyprint_flags (proc_flags (process), 1); if (proc_flags (process) & (PR_STOPPED | PR_ISTOP)) proc_prettyprint_why (proc_why (process), proc_what (process), 1); if (proc_get_nthreads (process) > 1) - printf_filtered ("Process has %d threads.\n", - proc_get_nthreads (process)); + gdb_printf ("Process has %d threads.\n", + proc_get_nthreads (process)); } if (thread) { - printf_filtered (_("thread %d flags:\n"), thread->tid); + gdb_printf (_("thread %d flags:\n"), thread->tid); proc_prettyprint_flags (proc_flags (thread), 1); if (proc_flags (thread) & (PR_STOPPED | PR_ISTOP)) proc_prettyprint_why (proc_why (thread), proc_what (thread), 1); diff --git a/gdb/progspace.c b/gdb/progspace.c index 8dc21fd..1ee4fe3 100644 --- a/gdb/progspace.c +++ b/gdb/progspace.c @@ -346,14 +346,14 @@ print_program_space (struct ui_out *uiout, int requested) if (!printed_header) { printed_header = 1; - printf_filtered ("\n\tBound inferiors: ID %d (%s)", - inf->num, - target_pid_to_str (ptid_t (inf->pid)).c_str ()); + gdb_printf ("\n\tBound inferiors: ID %d (%s)", + inf->num, + target_pid_to_str (ptid_t (inf->pid)).c_str ()); } else - printf_filtered (", ID %d (%s)", - inf->num, - target_pid_to_str (ptid_t (inf->pid)).c_str ()); + gdb_printf (", ID %d (%s)", + inf->num, + target_pid_to_str (ptid_t (inf->pid)).c_str ()); } uiout->text ("\n"); diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 292e4f7..a3aa4ae 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -588,8 +588,8 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst) if (info_verbose) { - printf_filtered (_("Reading in symbols for %s...\n"), - pst->filename); + gdb_printf (_("Reading in symbols for %s...\n"), + pst->filename); gdb_flush (gdb_stdout); } @@ -658,15 +658,15 @@ print_partial_symbols (struct gdbarch *gdbarch, struct objfile *objfile, const std::vector<partial_symbol *> &symbols, const char *what, struct ui_file *outfile) { - fprintf_filtered (outfile, " %s partial symbols:\n", what); + gdb_printf (outfile, " %s partial symbols:\n", what); for (partial_symbol *p : symbols) { QUIT; - fprintf_filtered (outfile, " `%s'", p->ginfo.linkage_name ()); + gdb_printf (outfile, " `%s'", p->ginfo.linkage_name ()); if (p->ginfo.demangled_name () != NULL) { - fprintf_filtered (outfile, " `%s'", - p->ginfo.demangled_name ()); + gdb_printf (outfile, " `%s'", + p->ginfo.demangled_name ()); } gdb_puts (", ", outfile); switch (p->domain) @@ -746,7 +746,7 @@ print_partial_symbols (struct gdbarch *gdbarch, struct objfile *objfile, } gdb_puts (", ", outfile); gdb_puts (paddress (gdbarch, p->unrelocated_address ()), outfile); - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); } } @@ -759,41 +759,41 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, if (psymtab->anonymous) { - fprintf_filtered (outfile, "\nAnonymous partial symtab (%s) ", - psymtab->filename); + gdb_printf (outfile, "\nAnonymous partial symtab (%s) ", + psymtab->filename); } else { - fprintf_filtered (outfile, "\nPartial symtab for source file %s ", - psymtab->filename); + gdb_printf (outfile, "\nPartial symtab for source file %s ", + psymtab->filename); } - fprintf_filtered (outfile, "(object %s)\n\n", - host_address_to_string (psymtab)); - fprintf_filtered (outfile, " Read from object file %s (%s)\n", - objfile_name (objfile), - host_address_to_string (objfile)); + gdb_printf (outfile, "(object %s)\n\n", + host_address_to_string (psymtab)); + gdb_printf (outfile, " Read from object file %s (%s)\n", + objfile_name (objfile), + host_address_to_string (objfile)); if (psymtab->readin_p (objfile)) - fprintf_filtered + gdb_printf (outfile, " Full symtab was read (at %s)\n", host_address_to_string (psymtab->get_compunit_symtab (objfile))); - fprintf_filtered (outfile, " Symbols cover text addresses "); + gdb_printf (outfile, " Symbols cover text addresses "); gdb_puts (paddress (gdbarch, psymtab->text_low (objfile)), outfile); - fprintf_filtered (outfile, "-"); + gdb_printf (outfile, "-"); gdb_puts (paddress (gdbarch, psymtab->text_high (objfile)), outfile); - fprintf_filtered (outfile, "\n"); - fprintf_filtered (outfile, " Address map supported - %s.\n", - psymtab->psymtabs_addrmap_supported ? "yes" : "no"); - fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n", - psymtab->number_of_dependencies); + gdb_printf (outfile, "\n"); + gdb_printf (outfile, " Address map supported - %s.\n", + psymtab->psymtabs_addrmap_supported ? "yes" : "no"); + gdb_printf (outfile, " Depends on %d other partial symtabs.\n", + psymtab->number_of_dependencies); for (i = 0; i < psymtab->number_of_dependencies; i++) - fprintf_filtered (outfile, " %d %s\n", i, - host_address_to_string (psymtab->dependencies[i])); + gdb_printf (outfile, " %d %s\n", i, + host_address_to_string (psymtab->dependencies[i])); if (psymtab->user != NULL) - fprintf_filtered (outfile, " Shared partial symtab with user %s\n", - host_address_to_string (psymtab->user)); + gdb_printf (outfile, " Shared partial symtab with user %s\n", + host_address_to_string (psymtab->user)); if (!psymtab->global_psymbols.empty ()) { print_partial_symbols @@ -806,7 +806,7 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, (gdbarch, objfile, psymtab->static_psymbols, "Static", outfile); } - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); } /* Count the number of partial symbols in OBJFILE. */ @@ -835,8 +835,8 @@ psymbol_functions::print_stats (struct objfile *objfile, bool print_bcache) { int n_psyms = count_psyms (); if (n_psyms > 0) - printf_filtered (_(" Number of \"partial\" symbols read: %d\n"), - n_psyms); + gdb_printf (_(" Number of \"partial\" symbols read: %d\n"), + n_psyms); i = 0; for (partial_symtab *ps : require_partial_symbols (objfile)) @@ -844,14 +844,14 @@ psymbol_functions::print_stats (struct objfile *objfile, bool print_bcache) if (!ps->readin_p (objfile)) i++; } - printf_filtered (_(" Number of psym tables (not yet expanded): %d\n"), - i); - printf_filtered (_(" Total memory used for psymbol cache: %d\n"), - m_partial_symtabs->psymbol_cache.memory_used ()); + gdb_printf (_(" Number of psym tables (not yet expanded): %d\n"), + i); + gdb_printf (_(" Total memory used for psymbol cache: %d\n"), + m_partial_symtabs->psymbol_cache.memory_used ()); } else { - printf_filtered (_("Psymbol byte cache statistics:\n")); + gdb_printf (_("Psymbol byte cache statistics:\n")); m_partial_symtabs->psymbol_cache.print_statistics ("partial symbol cache"); } @@ -867,14 +867,14 @@ psymbol_functions::dump (struct objfile *objfile) if (m_partial_symtabs->psymtabs) { - printf_filtered ("Psymtabs:\n"); + gdb_printf ("Psymtabs:\n"); for (psymtab = m_partial_symtabs->psymtabs; psymtab != NULL; psymtab = psymtab->next) - printf_filtered ("%s at %s\n", - psymtab->filename, - host_address_to_string (psymtab)); - printf_filtered ("\n\n"); + gdb_printf ("%s at %s\n", + psymtab->filename, + host_address_to_string (psymtab)); + gdb_printf ("\n\n"); } } @@ -1398,13 +1398,13 @@ partial_symtab::partial_symtab (const char *filename_, if (last_bfd_name.empty () || last_bfd_name != this_bfd_name) { last_bfd_name = this_bfd_name; - fprintf_filtered (gdb_stdlog, - "Creating one or more psymtabs for %s ...\n", - this_bfd_name); + gdb_printf (gdb_stdlog, + "Creating one or more psymtabs for %s ...\n", + this_bfd_name); } - fprintf_filtered (gdb_stdlog, - "Created psymtab %s for module %s.\n", - host_address_to_string (this), filename); + gdb_printf (gdb_stdlog, + "Created psymtab %s for module %s.\n", + host_address_to_string (this), filename); } } @@ -1425,7 +1425,7 @@ partial_symtab::expand_dependencies (struct objfile *objfile) gdb_stdout->wrap_here (0); gdb_puts ("and "); gdb_stdout->wrap_here (0); - printf_filtered ("%s...", dependencies[i]->filename); + gdb_printf ("%s...", dependencies[i]->filename); gdb_stdout->wrap_here (0); /* Flush output */ gdb_flush (gdb_stdout); } @@ -1472,9 +1472,9 @@ dump_psymtab_addrmap (struct objfile *objfile, && partial_symtabs->psymtabs_addrmap != NULL) { if (psymtab == nullptr) - fprintf_filtered (outfile, _("Entire address map:\n")); + gdb_printf (outfile, _("Entire address map:\n")); else - fprintf_filtered (outfile, _("Address map:\n")); + gdb_printf (outfile, _("Address map:\n")); addrmap_dump (partial_symtabs->psymtabs_addrmap, outfile, psymtab); } } @@ -1678,82 +1678,82 @@ maintenance_info_psymtabs (const char *regexp, int from_tty) { if (! printed_objfile_start) { - printf_filtered ("{ objfile %s ", objfile_name (objfile)); + gdb_printf ("{ objfile %s ", objfile_name (objfile)); gdb_stdout->wrap_here (2); - printf_filtered ("((struct objfile *) %s)\n", - host_address_to_string (objfile)); + gdb_printf ("((struct objfile *) %s)\n", + host_address_to_string (objfile)); printed_objfile_start = 1; } - printf_filtered (" { psymtab %s ", psymtab->filename); + gdb_printf (" { psymtab %s ", psymtab->filename); gdb_stdout->wrap_here (4); - printf_filtered ("((struct partial_symtab *) %s)\n", - host_address_to_string (psymtab)); - - printf_filtered (" readin %s\n", - psymtab->readin_p (objfile) ? "yes" : "no"); - printf_filtered (" fullname %s\n", - psymtab->fullname - ? psymtab->fullname : "(null)"); - printf_filtered (" text addresses "); + gdb_printf ("((struct partial_symtab *) %s)\n", + host_address_to_string (psymtab)); + + gdb_printf (" readin %s\n", + psymtab->readin_p (objfile) ? "yes" : "no"); + gdb_printf (" fullname %s\n", + psymtab->fullname + ? psymtab->fullname : "(null)"); + gdb_printf (" text addresses "); gdb_puts (paddress (gdbarch, psymtab->text_low (objfile))); - printf_filtered (" -- "); + gdb_printf (" -- "); gdb_puts (paddress (gdbarch, psymtab->text_high (objfile))); - printf_filtered ("\n"); - printf_filtered (" psymtabs_addrmap_supported %s\n", - (psymtab->psymtabs_addrmap_supported - ? "yes" : "no")); - printf_filtered (" globals "); + gdb_printf ("\n"); + gdb_printf (" psymtabs_addrmap_supported %s\n", + (psymtab->psymtabs_addrmap_supported + ? "yes" : "no")); + gdb_printf (" globals "); if (!psymtab->global_psymbols.empty ()) - printf_filtered + gdb_printf ("(* (struct partial_symbol **) %s @ %d)\n", host_address_to_string (psymtab->global_psymbols.data ()), (int) psymtab->global_psymbols.size ()); else - printf_filtered ("(none)\n"); - printf_filtered (" statics "); + gdb_printf ("(none)\n"); + gdb_printf (" statics "); if (!psymtab->static_psymbols.empty ()) - printf_filtered + gdb_printf ("(* (struct partial_symbol **) %s @ %d)\n", host_address_to_string (psymtab->static_psymbols.data ()), (int) psymtab->static_psymbols.size ()); else - printf_filtered ("(none)\n"); + gdb_printf ("(none)\n"); if (psymtab->user) - printf_filtered (" user %s " - "((struct partial_symtab *) %s)\n", - psymtab->user->filename, - host_address_to_string (psymtab->user)); - printf_filtered (" dependencies "); + gdb_printf (" user %s " + "((struct partial_symtab *) %s)\n", + psymtab->user->filename, + host_address_to_string (psymtab->user)); + gdb_printf (" dependencies "); if (psymtab->number_of_dependencies) { int i; - printf_filtered ("{\n"); + gdb_printf ("{\n"); for (i = 0; i < psymtab->number_of_dependencies; i++) { struct partial_symtab *dep = psymtab->dependencies[i]; /* Note the string concatenation there --- no comma. */ - printf_filtered (" psymtab %s " - "((struct partial_symtab *) %s)\n", - dep->filename, - host_address_to_string (dep)); + gdb_printf (" psymtab %s " + "((struct partial_symtab *) %s)\n", + dep->filename, + host_address_to_string (dep)); } - printf_filtered (" }\n"); + gdb_printf (" }\n"); } else - printf_filtered ("(none)\n"); - printf_filtered (" }\n"); + gdb_printf ("(none)\n"); + gdb_printf (" }\n"); } } } if (printed_objfile_start) - printf_filtered ("}\n"); + gdb_printf ("}\n"); } } @@ -1788,13 +1788,13 @@ maintenance_check_psymtabs (const char *ignore, int from_tty) /* First do some checks that don't require the associated symtab. */ if (ps->text_high (objfile) < ps->text_low (objfile)) { - printf_filtered ("Psymtab "); + gdb_printf ("Psymtab "); gdb_puts (ps->filename); - printf_filtered (" covers bad range "); + gdb_printf (" covers bad range "); gdb_puts (paddress (gdbarch, ps->text_low (objfile))); - printf_filtered (" - "); + gdb_printf (" - "); gdb_puts (paddress (gdbarch, ps->text_high (objfile))); - printf_filtered ("\n"); + gdb_printf ("\n"); continue; } @@ -1816,11 +1816,11 @@ maintenance_check_psymtabs (const char *ignore, int from_tty) psym->domain); if (!sym) { - printf_filtered ("Static symbol `"); + gdb_printf ("Static symbol `"); gdb_puts (psym->ginfo.linkage_name ()); - printf_filtered ("' only found in "); + gdb_printf ("' only found in "); gdb_puts (ps->filename); - printf_filtered (" psymtab\n"); + gdb_printf (" psymtab\n"); } } b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); @@ -1831,28 +1831,28 @@ maintenance_check_psymtabs (const char *ignore, int from_tty) psym->domain); if (!sym) { - printf_filtered ("Global symbol `"); + gdb_printf ("Global symbol `"); gdb_puts (psym->ginfo.linkage_name ()); - printf_filtered ("' only found in "); + gdb_printf ("' only found in "); gdb_puts (ps->filename); - printf_filtered (" psymtab\n"); + gdb_printf (" psymtab\n"); } } if (ps->raw_text_high () != 0 && (ps->text_low (objfile) < BLOCK_START (b) || ps->text_high (objfile) > BLOCK_END (b))) { - printf_filtered ("Psymtab "); + gdb_printf ("Psymtab "); gdb_puts (ps->filename); - printf_filtered (" covers "); + gdb_printf (" covers "); gdb_puts (paddress (gdbarch, ps->text_low (objfile))); - printf_filtered (" - "); + gdb_printf (" - "); gdb_puts (paddress (gdbarch, ps->text_high (objfile))); - printf_filtered (" but symtab covers only "); + gdb_printf (" but symtab covers only "); gdb_puts (paddress (gdbarch, BLOCK_START (b))); - printf_filtered (" - "); + gdb_printf (" - "); gdb_puts (paddress (gdbarch, BLOCK_END (b))); - printf_filtered ("\n"); + gdb_printf ("\n"); } } } diff --git a/gdb/python/py-auto-load.c b/gdb/python/py-auto-load.c index bdd116d..5d60460 100644 --- a/gdb/python/py-auto-load.c +++ b/gdb/python/py-auto-load.c @@ -37,7 +37,7 @@ static void show_auto_load_python_scripts (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Auto-loading of Python scripts is %s.\n"), value); + gdb_printf (file, _("Auto-loading of Python scripts is %s.\n"), value); } /* See python-internal.h. */ diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 5891c3a..74de0d9 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -44,7 +44,7 @@ static void show_pybp_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Python breakpoint debugging is %s.\n"), value); + gdb_printf (file, _("Python breakpoint debugging is %s.\n"), value); } /* Print a "py-breakpoint" debug statement. */ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index c9b5dd5..366f374 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -1222,7 +1222,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, { /* We've printed all the frames we were asked to print, but more frames existed. */ - printf_filtered (_("(More stack frames follow...)\n")); + gdb_printf (_("(More stack frames follow...)\n")); break; } } diff --git a/gdb/python/py-micmd.c b/gdb/python/py-micmd.c index a0c3071..79e2575 100644 --- a/gdb/python/py-micmd.c +++ b/gdb/python/py-micmd.c @@ -39,7 +39,7 @@ static void show_pymicmd_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Python MI command debugging is %s.\n"), value); + gdb_printf (file, _("Python MI command debugging is %s.\n"), value); } /* Print a "py-micmd" debug statement. */ diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c index d0dd2a9..cac9bd2 100644 --- a/gdb/python/py-param.c +++ b/gdb/python/py-param.c @@ -464,7 +464,7 @@ get_set_value (const char *args, int from_tty, const char *str = set_doc_string.get (); if (str != nullptr && str[0] != '\0') - printf_filtered ("%s\n", str); + gdb_printf ("%s\n", str); } /* A callback function that is registered against the respective @@ -508,7 +508,7 @@ get_show_value (struct ui_file *file, int from_tty, return; } - fprintf_filtered (file, "%s\n", show_doc_string.get ()); + gdb_printf (file, "%s\n", show_doc_string.get ()); } else { @@ -519,8 +519,8 @@ get_show_value (struct ui_file *file, int from_tty, show_doc adjustment is not i18n friendly, so, instead, we just print this generic string. */ std::string cmd_path = full_cmd_name_without_first_prefix (c); - fprintf_filtered (file, _("The current value of '%s' is \"%s\".\n"), - cmd_path.c_str (), value); + gdb_printf (file, _("The current value of '%s' is \"%s\".\n"), + cmd_path.c_str (), value); } } diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index 16277cc..a88a9f5 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -425,8 +425,8 @@ print_children (PyObject *printer, const char *hint, /* The user won't necessarily get a stack trace here, so provide more context. */ if (gdbpy_print_python_errors_p ()) - fprintf_unfiltered (gdb_stderr, - _("Bad result from children iterator.\n")); + gdb_printf (gdb_stderr, + _("Bad result from children iterator.\n")); gdbpy_print_stack (); continue; } @@ -484,7 +484,7 @@ print_children (PyObject *printer, const char *hint, /* We print the index, not whatever the child method returned as the name. */ if (options->print_array_indexes) - fprintf_filtered (stream, "[%d] = ", i); + gdb_printf (stream, "[%d] = ", i); } else if (! is_map) { diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index dd43901..b2fd140 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -39,7 +39,7 @@ static void show_pyuw_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Python unwinder debugging is %s.\n"), value); + gdb_printf (file, _("Python unwinder debugging is %s.\n"), value); } /* Print a "py-unwind" debug statement. */ diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 72b7eaa..63eb4e8 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -372,9 +372,9 @@ gdbpy_handle_exception () { /* An error occurred computing the string representation of the error message. This is rare, but we should inform the user. */ - printf_filtered (_("An error occurred in Python " - "and then another occurred computing the " - "error message.\n")); + gdb_printf (_("An error occurred in Python " + "and then another occurred computing the " + "error message.\n")); gdbpy_print_stack (); } diff --git a/gdb/python/python.c b/gdb/python/python.c index f0d788b..7a9c8c1 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1413,16 +1413,16 @@ gdbpy_write (PyObject *self, PyObject *args, PyObject *kw) { case 1: { - fprintf_filtered (gdb_stderr, "%s", arg); + gdb_printf (gdb_stderr, "%s", arg); break; } case 2: { - fprintf_filtered (gdb_stdlog, "%s", arg); + gdb_printf (gdb_stdlog, "%s", arg); break; } default: - fprintf_filtered (gdb_stdout, "%s", arg); + gdb_printf (gdb_stdout, "%s", arg); } } catch (const gdb_exception &except) @@ -1493,7 +1493,7 @@ gdbpy_print_stack (void) PyErr_Print (); /* PyErr_Print doesn't necessarily end output with a newline. This works because Python's stdout/stderr is fed through - printf_filtered. */ + gdb_printf. */ try { begin_line (); @@ -1520,14 +1520,14 @@ gdbpy_print_stack (void) { /* An error occurred computing the string representation of the error message. */ - fprintf_filtered (gdb_stderr, - _("Error occurred computing Python error" \ - "message.\n")); + gdb_printf (gdb_stderr, + _("Error occurred computing Python error" \ + "message.\n")); PyErr_Clear (); } else - fprintf_filtered (gdb_stderr, "Python Exception %s: %s\n", - type.get (), msg.get ()); + gdb_printf (gdb_stderr, "Python Exception %s: %s\n", + type.get (), msg.get ()); } catch (const gdb_exception &except) { @@ -1796,8 +1796,8 @@ static void show_python_ignore_environment (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Python's ignore-environment setting is %s.\n"), - value); + gdb_printf (file, _("Python's ignore-environment setting is %s.\n"), + value); } /* Implement 'set python ignore-environment'. This sets Python's internal @@ -1830,13 +1830,13 @@ show_python_dont_write_bytecode (struct ui_file *file, int from_tty, = (python_ignore_environment || getenv ("PYTHONDONTWRITEBYTECODE") == nullptr) ? "off" : "on"; - fprintf_filtered (file, - _("Python's dont-write-bytecode setting is %s (currently %s).\n"), - value, auto_string); + gdb_printf (file, + _("Python's dont-write-bytecode setting is %s (currently %s).\n"), + value, auto_string); } else - fprintf_filtered (file, _("Python's dont-write-bytecode setting is %s.\n"), - value); + gdb_printf (file, _("Python's dont-write-bytecode setting is %s.\n"), + value); } /* Implement 'set python dont-write-bytecode'. This sets Python's internal diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index 60fc353..cbc3508 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -703,10 +703,10 @@ show_ravenscar_task_switching_command (struct ui_file *file, int from_tty, const char *value) { if (ravenscar_task_support) - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Support for Ravenscar task/thread switching is enabled\n")); else - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Support for Ravenscar task/thread switching is disabled\n")); } diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 3dfdf59..1d5f839 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -211,8 +211,8 @@ static struct cmd_list_element *set_record_btrace_cpu_cmdlist; do \ { \ if (record_debug != 0) \ - fprintf_unfiltered (gdb_stdlog, \ - "[record-btrace] " msg "\n", ##args); \ + gdb_printf (gdb_stdlog, \ + "[record-btrace] " msg "\n", ##args); \ } \ while (0) @@ -506,7 +506,7 @@ record_btrace_print_bts_conf (const struct btrace_config_bts *conf) if (size > 0) { suffix = record_btrace_adjust_size (&size); - printf_filtered (_("Buffer size: %u%s.\n"), size, suffix); + gdb_printf (_("Buffer size: %u%s.\n"), size, suffix); } } @@ -522,7 +522,7 @@ record_btrace_print_pt_conf (const struct btrace_config_pt *conf) if (size > 0) { suffix = record_btrace_adjust_size (&size); - printf_filtered (_("Buffer size: %u%s.\n"), size, suffix); + gdb_printf (_("Buffer size: %u%s.\n"), size, suffix); } } @@ -531,8 +531,8 @@ record_btrace_print_pt_conf (const struct btrace_config_pt *conf) static void record_btrace_print_conf (const struct btrace_config *conf) { - printf_filtered (_("Recording format: %s.\n"), - btrace_format_string (conf->format)); + gdb_printf (_("Recording format: %s.\n"), + btrace_format_string (conf->format)); switch (conf->format) { @@ -602,14 +602,14 @@ record_btrace_target::info_record () gaps = btinfo->ngaps; } - printf_filtered (_("Recorded %u instructions in %u functions (%u gaps) " - "for thread %s (%s).\n"), insns, calls, gaps, - print_thread_id (tp), - target_pid_to_str (tp->ptid).c_str ()); + gdb_printf (_("Recorded %u instructions in %u functions (%u gaps) " + "for thread %s (%s).\n"), insns, calls, gaps, + print_thread_id (tp), + target_pid_to_str (tp->ptid).c_str ()); if (btrace_is_replaying (tp)) - printf_filtered (_("Replay in progress. At instruction %u.\n"), - btrace_insn_number (btinfo->replay)); + gdb_printf (_("Replay in progress. At instruction %u.\n"), + btrace_insn_number (btinfo->replay)); } /* Print a decode error. */ @@ -938,9 +938,9 @@ record_btrace_target::insn_history (int size, gdb_disassembly_flags flags) else { if (size < 0) - printf_filtered (_("At the start of the branch trace record.\n")); + gdb_printf (_("At the start of the branch trace record.\n")); else - printf_filtered (_("At the end of the branch trace record.\n")); + gdb_printf (_("At the end of the branch trace record.\n")); } btrace_set_insn_history (btinfo, &begin, &end); @@ -1295,9 +1295,9 @@ record_btrace_target::call_history (int size, record_print_flags flags) else { if (size < 0) - printf_filtered (_("At the start of the branch trace record.\n")); + gdb_printf (_("At the start of the branch trace record.\n")); else - printf_filtered (_("At the end of the branch trace record.\n")); + gdb_printf (_("At the end of the branch trace record.\n")); } btrace_set_call_history (btinfo, &begin, &end); @@ -2956,8 +2956,8 @@ static void cmd_show_replay_memory_access (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Replay memory access is %s.\n"), - replay_memory_access); + gdb_printf (file, _("Replay memory access is %s.\n"), + replay_memory_access); } /* The "set record btrace cpu none" command. */ @@ -3037,11 +3037,11 @@ cmd_show_record_btrace_cpu (const char *args, int from_tty) switch (record_btrace_cpu_state) { case CS_AUTO: - printf_filtered (_("btrace cpu is 'auto'.\n")); + gdb_printf (_("btrace cpu is 'auto'.\n")); return; case CS_NONE: - printf_filtered (_("btrace cpu is 'none'.\n")); + gdb_printf (_("btrace cpu is 'none'.\n")); return; case CS_CPU: @@ -3049,14 +3049,14 @@ cmd_show_record_btrace_cpu (const char *args, int from_tty) { case CV_INTEL: if (record_btrace_cpu.stepping == 0) - printf_filtered (_("btrace cpu is 'intel: %u/%u'.\n"), - record_btrace_cpu.family, - record_btrace_cpu.model); + gdb_printf (_("btrace cpu is 'intel: %u/%u'.\n"), + record_btrace_cpu.family, + record_btrace_cpu.model); else - printf_filtered (_("btrace cpu is 'intel: %u/%u/%u'.\n"), - record_btrace_cpu.family, - record_btrace_cpu.model, - record_btrace_cpu.stepping); + gdb_printf (_("btrace cpu is 'intel: %u/%u/%u'.\n"), + record_btrace_cpu.family, + record_btrace_cpu.model, + record_btrace_cpu.stepping); return; } } @@ -3071,8 +3071,8 @@ show_record_bts_buffer_size_value (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The record/replay bts buffer size is %s.\n"), - value); + gdb_printf (file, _("The record/replay bts buffer size is %s.\n"), + value); } /* The "record pt buffer-size" show value function. */ @@ -3082,8 +3082,8 @@ show_record_pt_buffer_size_value (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The record/replay pt buffer size is %s.\n"), - value); + gdb_printf (file, _("The record/replay pt buffer size is %s.\n"), + value); } /* Initialize btrace commands. */ diff --git a/gdb/record-full.c b/gdb/record-full.c index bd8c49c..38e0215 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -565,9 +565,9 @@ static void record_full_arch_list_add (struct record_full_entry *rec) { if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_arch_list_add %s.\n", - host_address_to_string (rec)); + gdb_printf (gdb_stdlog, + "Process record: record_full_arch_list_add %s.\n", + host_address_to_string (rec)); if (record_full_arch_list_tail) { @@ -612,10 +612,10 @@ record_full_arch_list_add_reg (struct regcache *regcache, int regnum) struct record_full_entry *rec; if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: add register num = %d to " - "record list.\n", - regnum); + gdb_printf (gdb_stdlog, + "Process record: add register num = %d to " + "record list.\n", + regnum); rec = record_full_reg_alloc (regcache, regnum); @@ -635,10 +635,10 @@ record_full_arch_list_add_mem (CORE_ADDR addr, int len) struct record_full_entry *rec; if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: add mem addr = %s len = %d to " - "record list.\n", - paddress (target_gdbarch (), addr), len); + gdb_printf (gdb_stdlog, + "Process record: add mem addr = %s len = %d to " + "record list.\n", + paddress (target_gdbarch (), addr), len); if (!addr) /* FIXME: Why? Some arch must permit it... */ return 0; @@ -666,8 +666,8 @@ record_full_arch_list_add_end (void) struct record_full_entry *rec; if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: add end to arch list.\n"); + gdb_printf (gdb_stdlog, + "Process record: add end to arch list.\n"); rec = record_full_end_alloc (); rec->u.end.sigval = GDB_SIGNAL_0; @@ -824,11 +824,11 @@ record_full_exec_insn (struct regcache *regcache, gdb::byte_vector reg (entry->u.reg.len); if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_reg %s to " - "inferior num = %d.\n", - host_address_to_string (entry), - entry->u.reg.num); + gdb_printf (gdb_stdlog, + "Process record: record_full_reg %s to " + "inferior num = %d.\n", + host_address_to_string (entry), + entry->u.reg.num); regcache->cooked_read (entry->u.reg.num, reg.data ()); regcache->cooked_write (entry->u.reg.num, record_full_get_loc (entry)); @@ -844,12 +844,12 @@ record_full_exec_insn (struct regcache *regcache, gdb::byte_vector mem (entry->u.mem.len); if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_mem %s to " - "inferior addr = %s len = %d.\n", - host_address_to_string (entry), - paddress (gdbarch, entry->u.mem.addr), - entry->u.mem.len); + gdb_printf (gdb_stdlog, + "Process record: record_full_mem %s to " + "inferior addr = %s len = %d.\n", + host_address_to_string (entry), + paddress (gdbarch, entry->u.mem.addr), + entry->u.mem.len); if (record_read_memory (gdbarch, entry->u.mem.addr, mem.data (), @@ -934,7 +934,7 @@ static void record_full_open_1 (const char *name, int from_tty) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Process record: record_full_open_1\n"); + gdb_printf (gdb_stdlog, "Process record: record_full_open_1\n"); /* check exec */ if (!target_has_execution ()) @@ -958,7 +958,7 @@ static void record_full_open (const char *name, int from_tty) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Process record: record_full_open\n"); + gdb_printf (gdb_stdlog, "Process record: record_full_open\n"); record_preopen (); @@ -991,7 +991,7 @@ record_full_base_target::close () struct record_full_core_buf_entry *entry; if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Process record: record_full_close\n"); + gdb_printf (gdb_stdlog, "Process record: record_full_close\n"); record_full_list_release (record_full_list); @@ -1105,7 +1105,7 @@ static void record_full_sig_handler (int signo) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Process record: get a signal\n"); + gdb_printf (gdb_stdlog, "Process record: get a signal\n"); /* It will break the running inferior in replay mode. */ record_full_resume_step = 1; @@ -1137,13 +1137,13 @@ record_full_wait_1 (struct target_ops *ops, = record_full_gdb_operation_disable_set (); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_wait " - "record_full_resume_step = %d, " - "record_full_resumed = %d, direction=%s\n", - record_full_resume_step, record_full_resumed, - record_full_execution_dir == EXEC_FORWARD - ? "forward" : "reverse"); + gdb_printf (gdb_stdlog, + "Process record: record_full_wait " + "record_full_resume_step = %d, " + "record_full_resumed = %d, direction=%s\n", + record_full_resume_step, record_full_resumed, + record_full_execution_dir == EXEC_FORWARD + ? "forward" : "reverse"); if (!record_full_resumed) { @@ -1180,9 +1180,9 @@ record_full_wait_1 (struct target_ops *ops, if (status->kind () == TARGET_WAITKIND_IGNORE) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_wait " - "target beneath not done yet\n"); + gdb_printf (gdb_stdlog, + "Process record: record_full_wait " + "target beneath not done yet\n"); return ret; } @@ -1254,10 +1254,10 @@ record_full_wait_1 (struct target_ops *ops, } if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: record_full_wait " - "issuing one more step in the " - "target beneath\n"); + gdb_printf (gdb_stdlog, + "Process record: record_full_wait " + "issuing one more step in the " + "target beneath\n"); ops->beneath ()->resume (ptid, step, GDB_SIGNAL_0); proc_target->commit_resumed_state = true; proc_target->commit_resumed (); @@ -1298,9 +1298,9 @@ record_full_wait_1 (struct target_ops *ops, &record_full_stop_reason)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: break at %s.\n", - paddress (gdbarch, tmp_pc)); + gdb_printf (gdb_stdlog, + "Process record: break at %s.\n", + paddress (gdbarch, tmp_pc)); goto replay_out; } } @@ -1342,7 +1342,7 @@ record_full_wait_1 (struct target_ops *ops, if (record_full_list->type == record_full_end) { if (record_debug > 1) - fprintf_unfiltered + gdb_printf (gdb_stdlog, "Process record: record_full_end %s to " "inferior.\n", @@ -1366,8 +1366,8 @@ record_full_wait_1 (struct target_ops *ops, if (record_full_resume_step) { if (record_debug > 1) - fprintf_unfiltered (gdb_stdlog, - "Process record: step.\n"); + gdb_printf (gdb_stdlog, + "Process record: step.\n"); continue_flag = 0; } @@ -1377,10 +1377,10 @@ record_full_wait_1 (struct target_ops *ops, (aspace, tmp_pc, &record_full_stop_reason)) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: break " - "at %s.\n", - paddress (gdbarch, tmp_pc)); + gdb_printf (gdb_stdlog, + "Process record: break " + "at %s.\n", + paddress (gdbarch, tmp_pc)); continue_flag = 0; } @@ -1389,9 +1389,9 @@ record_full_wait_1 (struct target_ops *ops, == TARGET_STOPPED_BY_WATCHPOINT) { if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: hit hw " - "watchpoint.\n"); + gdb_printf (gdb_stdlog, + "Process record: hit hw " + "watchpoint.\n"); continue_flag = 0; } /* Check target signal */ @@ -1658,18 +1658,18 @@ record_full_target::xfer_partial (enum target_object object, { record_full_list_release (record_full_arch_list_tail); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: failed to record " - "execution log."); + gdb_printf (gdb_stdlog, + "Process record: failed to record " + "execution log."); return TARGET_XFER_E_IO; } if (record_full_arch_list_add_end ()) { record_full_list_release (record_full_arch_list_tail); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "Process record: failed to record " - "execution log."); + gdb_printf (gdb_stdlog, + "Process record: failed to record " + "execution log."); return TARGET_XFER_E_IO; } record_full_list->next = record_full_arch_list_head; @@ -1842,11 +1842,11 @@ record_full_base_target::get_bookmark (const char *args, int from_tty) if (record_debug) { if (ret) - fprintf_unfiltered (gdb_stdlog, - "record_full_get_bookmark returns %s\n", ret); + gdb_printf (gdb_stdlog, + "record_full_get_bookmark returns %s\n", ret); else - fprintf_unfiltered (gdb_stdlog, - "record_full_get_bookmark returns NULL\n"); + gdb_printf (gdb_stdlog, + "record_full_get_bookmark returns NULL\n"); } return (gdb_byte *) ret; } @@ -1860,8 +1860,8 @@ record_full_base_target::goto_bookmark (const gdb_byte *raw_bookmark, const char *bookmark = (const char *) raw_bookmark; if (record_debug) - fprintf_unfiltered (gdb_stdlog, - "record_full_goto_bookmark receives %s\n", bookmark); + gdb_printf (gdb_stdlog, + "record_full_goto_bookmark receives %s\n", bookmark); std::string name_holder; if (bookmark[0] == '\'' || bookmark[0] == '\"') @@ -1896,9 +1896,9 @@ record_full_base_target::info_record () struct record_full_entry *p; if (RECORD_FULL_IS_REPLAY) - printf_filtered (_("Replay mode:\n")); + gdb_printf (_("Replay mode:\n")); else - printf_filtered (_("Record mode:\n")); + gdb_printf (_("Record mode:\n")); /* Find entry for first actual instruction in the log. */ for (p = record_full_first.next; @@ -1910,28 +1910,28 @@ record_full_base_target::info_record () if (p != NULL && p->type == record_full_end) { /* Display instruction number for first instruction in the log. */ - printf_filtered (_("Lowest recorded instruction number is %s.\n"), - pulongest (p->u.end.insn_num)); + gdb_printf (_("Lowest recorded instruction number is %s.\n"), + pulongest (p->u.end.insn_num)); /* If in replay mode, display where we are in the log. */ if (RECORD_FULL_IS_REPLAY) - printf_filtered (_("Current instruction number is %s.\n"), - pulongest (record_full_list->u.end.insn_num)); + gdb_printf (_("Current instruction number is %s.\n"), + pulongest (record_full_list->u.end.insn_num)); /* Display instruction number for last instruction in the log. */ - printf_filtered (_("Highest recorded instruction number is %s.\n"), - pulongest (record_full_insn_count)); + gdb_printf (_("Highest recorded instruction number is %s.\n"), + pulongest (record_full_insn_count)); /* Display log count. */ - printf_filtered (_("Log contains %u instructions.\n"), - record_full_insn_num); + gdb_printf (_("Log contains %u instructions.\n"), + record_full_insn_num); } else - printf_filtered (_("No instructions have been logged.\n")); + gdb_printf (_("No instructions have been logged.\n")); /* Display max log size. */ - printf_filtered (_("Max logged instructions is %u.\n"), - record_full_insn_max_num); + gdb_printf (_("Max logged instructions is %u.\n"), + record_full_insn_max_num); } bool @@ -1979,14 +1979,14 @@ record_full_goto_entry (struct record_full_entry *p) error (_("Already at target insn.")); else if (p->u.end.insn_num > record_full_list->u.end.insn_num) { - printf_filtered (_("Go forward to insn number %s\n"), - pulongest (p->u.end.insn_num)); + gdb_printf (_("Go forward to insn number %s\n"), + pulongest (p->u.end.insn_num)); record_full_goto_insn (p, EXEC_FORWARD); } else { - printf_filtered (_("Go backward to insn number %s\n"), - pulongest (p->u.end.insn_num)); + gdb_printf (_("Go backward to insn number %s\n"), + pulongest (p->u.end.insn_num)); record_full_goto_insn (p, EXEC_REVERSE); } @@ -2065,7 +2065,7 @@ void record_full_core_target::kill () { if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Process record: record_full_core_kill\n"); + gdb_printf (gdb_stdlog, "Process record: record_full_core_kill\n"); current_inferior ()->unpush_target (this); } @@ -2324,18 +2324,18 @@ record_full_restore (void) gdb_assert (record_full_first.next == NULL); if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Restoring recording from core file.\n"); + gdb_printf (gdb_stdlog, "Restoring recording from core file.\n"); /* Now need to find our special note section. */ osec = bfd_get_section_by_name (core_bfd, "null0"); if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Find precord section %s.\n", - osec ? "succeeded" : "failed"); + gdb_printf (gdb_stdlog, "Find precord section %s.\n", + osec ? "succeeded" : "failed"); if (osec == NULL) return; osec_size = bfd_section_size (osec); if (record_debug) - fprintf_unfiltered (gdb_stdlog, "%s", bfd_section_name (osec)); + gdb_printf (gdb_stdlog, "%s", bfd_section_name (osec)); /* Check the magic code. */ bfdcore_read (core_bfd, osec, &magic, sizeof (magic), &bfd_offset); @@ -2343,10 +2343,10 @@ record_full_restore (void) error (_("Version mis-match or file format error in core file %s."), bfd_get_filename (core_bfd)); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Reading 4-byte magic cookie " - "RECORD_FULL_FILE_MAGIC (0x%s)\n", - phex_nz (netorder32 (magic), 4)); + gdb_printf (gdb_stdlog, + " Reading 4-byte magic cookie " + "RECORD_FULL_FILE_MAGIC (0x%s)\n", + phex_nz (netorder32 (magic), 4)); /* Restore the entries in recfd into record_full_arch_list_head and record_full_arch_list_tail. */ @@ -2384,12 +2384,12 @@ record_full_restore (void) rec->u.reg.len, &bfd_offset); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Reading register %d (1 " - "plus %lu plus %d bytes)\n", - rec->u.reg.num, - (unsigned long) sizeof (regnum), - rec->u.reg.len); + gdb_printf (gdb_stdlog, + " Reading register %d (1 " + "plus %lu plus %d bytes)\n", + rec->u.reg.num, + (unsigned long) sizeof (regnum), + rec->u.reg.len); break; case record_full_mem: /* mem */ @@ -2410,14 +2410,14 @@ record_full_restore (void) rec->u.mem.len, &bfd_offset); if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Reading memory %s (1 plus " - "%lu plus %lu plus %d bytes)\n", - paddress (get_current_arch (), - rec->u.mem.addr), - (unsigned long) sizeof (addr), - (unsigned long) sizeof (len), - rec->u.mem.len); + gdb_printf (gdb_stdlog, + " Reading memory %s (1 plus " + "%lu plus %lu plus %d bytes)\n", + paddress (get_current_arch (), + rec->u.mem.addr), + (unsigned long) sizeof (addr), + (unsigned long) sizeof (len), + rec->u.mem.len); break; case record_full_end: /* end */ @@ -2437,13 +2437,13 @@ record_full_restore (void) rec->u.end.insn_num = count; record_full_insn_count = count + 1; if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Reading record_full_end (1 + " - "%lu + %lu bytes), offset == %s\n", - (unsigned long) sizeof (signal), - (unsigned long) sizeof (count), - paddress (get_current_arch (), - bfd_offset)); + gdb_printf (gdb_stdlog, + " Reading record_full_end (1 + " + "%lu + %lu bytes), offset == %s\n", + (unsigned long) sizeof (signal), + (unsigned long) sizeof (count), + paddress (get_current_arch (), + bfd_offset)); break; default: @@ -2477,8 +2477,8 @@ record_full_restore (void) } /* Succeeded. */ - printf_filtered (_("Restored records from core file %s.\n"), - bfd_get_filename (core_bfd)); + gdb_printf (_("Restored records from core file %s.\n"), + bfd_get_filename (core_bfd)); print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1); } @@ -2524,8 +2524,8 @@ record_full_base_target::save_record (const char *recfilename) /* Open the save file. */ if (record_debug) - fprintf_unfiltered (gdb_stdlog, "Saving execution log to core file '%s'\n", - recfilename); + gdb_printf (gdb_stdlog, "Saving execution log to core file '%s'\n", + recfilename); /* Open the output file. */ gdb_bfd_ref_ptr obfd (create_gcore_bfd (recfilename)); @@ -2593,10 +2593,10 @@ record_full_base_target::save_record (const char *recfilename) /* Write the magic code. */ magic = RECORD_FULL_FILE_MAGIC; if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Writing 4-byte magic cookie " - "RECORD_FULL_FILE_MAGIC (0x%s)\n", - phex_nz (magic, 4)); + gdb_printf (gdb_stdlog, + " Writing 4-byte magic cookie " + "RECORD_FULL_FILE_MAGIC (0x%s)\n", + phex_nz (magic, 4)); bfdcore_write (obfd.get (), osec, &magic, sizeof (magic), &bfd_offset); /* Save the entries to recfd and forward execute to the end of @@ -2618,12 +2618,12 @@ record_full_base_target::save_record (const char *recfilename) { case record_full_reg: /* reg */ if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Writing register %d (1 " - "plus %lu plus %d bytes)\n", - record_full_list->u.reg.num, - (unsigned long) sizeof (regnum), - record_full_list->u.reg.len); + gdb_printf (gdb_stdlog, + " Writing register %d (1 " + "plus %lu plus %d bytes)\n", + record_full_list->u.reg.num, + (unsigned long) sizeof (regnum), + record_full_list->u.reg.len); /* Write regnum. */ regnum = netorder32 (record_full_list->u.reg.num); @@ -2638,14 +2638,14 @@ record_full_base_target::save_record (const char *recfilename) case record_full_mem: /* mem */ if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Writing memory %s (1 plus " - "%lu plus %lu plus %d bytes)\n", - paddress (gdbarch, - record_full_list->u.mem.addr), - (unsigned long) sizeof (addr), - (unsigned long) sizeof (len), - record_full_list->u.mem.len); + gdb_printf (gdb_stdlog, + " Writing memory %s (1 plus " + "%lu plus %lu plus %d bytes)\n", + paddress (gdbarch, + record_full_list->u.mem.addr), + (unsigned long) sizeof (addr), + (unsigned long) sizeof (len), + record_full_list->u.mem.len); /* Write memlen. */ len = netorder32 (record_full_list->u.mem.len); @@ -2665,11 +2665,11 @@ record_full_base_target::save_record (const char *recfilename) case record_full_end: if (record_debug) - fprintf_unfiltered (gdb_stdlog, - " Writing record_full_end (1 + " - "%lu + %lu bytes)\n", - (unsigned long) sizeof (signal), - (unsigned long) sizeof (count)); + gdb_printf (gdb_stdlog, + " Writing record_full_end (1 + " + "%lu + %lu bytes)\n", + (unsigned long) sizeof (signal), + (unsigned long) sizeof (count)); /* Write signal value. */ signal = netorder32 (record_full_list->u.end.sigval); bfdcore_write (obfd.get (), osec, &signal, @@ -2708,8 +2708,8 @@ record_full_base_target::save_record (const char *recfilename) unlink_file.keep (); /* Succeeded. */ - printf_filtered (_("Saved core file %s with execution log.\n"), - recfilename); + gdb_printf (_("Saved core file %s with execution log.\n"), + recfilename); } /* record_full_goto_insn -- rewind the record log (forward or backward, diff --git a/gdb/record.c b/gdb/record.c index 3c93681..17a5df2 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -55,7 +55,7 @@ struct cmd_list_element *info_record_cmdlist = NULL; #define DEBUG(msg, args...) \ if (record_debug) \ - fprintf_unfiltered (gdb_stdlog, "record: " msg "\n", ##args) + gdb_printf (gdb_stdlog, "record: " msg "\n", ##args) /* See record.h. */ @@ -257,8 +257,8 @@ static void show_record_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of process record target is %s.\n"), - value); + gdb_printf (file, _("Debugging of process record target is %s.\n"), + value); } /* Alias for "target record". */ @@ -279,14 +279,14 @@ cmd_record_delete (const char *args, int from_tty) if (!target_record_is_replaying (inferior_ptid)) { - printf_filtered (_("Already at end of record list.\n")); + gdb_printf (_("Already at end of record list.\n")); return; } if (!target_supports_delete_record ()) { - printf_filtered (_("The current record target does not support " - "this operation.\n")); + gdb_printf (_("The current record target does not support " + "this operation.\n")); return; } @@ -308,8 +308,8 @@ cmd_record_stop (const char *args, int from_tty) record_stop (t); record_unpush (t); - printf_filtered (_("Process record is stopped and all execution " - "logs are deleted.\n")); + gdb_printf (_("Process record is stopped and all execution " + "logs are deleted.\n")); gdb::observers::record_changed.notify (current_inferior (), 0, NULL, NULL); } @@ -325,11 +325,11 @@ info_record_command (const char *args, int from_tty) t = find_record_target (); if (t == NULL) { - printf_filtered (_("No recording is currently active.\n")); + gdb_printf (_("No recording is currently active.\n")); return; } - printf_filtered (_("Active record target: %s\n"), t->shortname ()); + gdb_printf (_("Active record target: %s\n"), t->shortname ()); t->info_record (); } diff --git a/gdb/regcache-dump.c b/gdb/regcache-dump.c index f593450..2a25785 100644 --- a/gdb/regcache-dump.c +++ b/gdb/regcache-dump.c @@ -43,9 +43,9 @@ protected: if (regnum < 0) { if (m_dump_pseudo) - fprintf_filtered (file, "Cooked value"); + gdb_printf (file, "Cooked value"); else - fprintf_filtered (file, "Raw value"); + gdb_printf (file, "Raw value"); } else { @@ -60,9 +60,9 @@ protected: auto status = m_regcache->cooked_read (regnum, buf.data ()); if (status == REG_UNKNOWN) - fprintf_filtered (file, "<invalid>"); + gdb_printf (file, "<invalid>"); else if (status == REG_UNAVAILABLE) - fprintf_filtered (file, "<unavailable>"); + gdb_printf (file, "<unavailable>"); else { print_hex_chars (file, buf.data (), size, @@ -73,7 +73,7 @@ protected: { /* Just print "<cooked>" for pseudo register when regcache_dump_raw. */ - fprintf_filtered (file, "<cooked>"); + gdb_printf (file, "<cooked>"); } } } @@ -102,9 +102,9 @@ protected: if (regnum < 0) { if (m_has_pseudo) - fprintf_filtered (file, "Cooked value"); + gdb_printf (file, "Cooked value"); else - fprintf_filtered (file, "Raw value"); + gdb_printf (file, "Raw value"); } else { @@ -120,15 +120,15 @@ protected: gdb_assert (status != REG_VALID); if (status == REG_UNKNOWN) - fprintf_filtered (file, "<invalid>"); + gdb_printf (file, "<invalid>"); else - fprintf_filtered (file, "<unavailable>"); + gdb_printf (file, "<unavailable>"); } else { /* Just print "<cooked>" for pseudo register when regcache_dump_raw. */ - fprintf_filtered (file, "<cooked>"); + gdb_printf (file, "<cooked>"); } } } @@ -162,7 +162,7 @@ protected: { if (regnum < 0) { - fprintf_filtered (file, "Rmt Nr g/G Offset"); + gdb_printf (file, "Rmt Nr g/G Offset"); } else if (regnum < gdbarch_num_regs (m_gdbarch)) { @@ -170,7 +170,7 @@ protected: if (remote_register_number_and_offset (m_gdbarch, regnum, &pnum, &poffset)) - fprintf_filtered (file, "%7d %11d", pnum, poffset); + gdb_printf (file, "%7d %11d", pnum, poffset); } } }; @@ -188,7 +188,7 @@ protected: void dump_reg (ui_file *file, int regnum) override { if (regnum < 0) - fprintf_filtered (file, "Groups"); + gdb_printf (file, "Groups"); else { const char *sep = ""; @@ -200,8 +200,8 @@ protected: { if (gdbarch_register_reggroup_p (m_gdbarch, regnum, group)) { - fprintf_filtered (file, - "%s%s", sep, reggroup_name (group)); + gdb_printf (file, + "%s%s", sep, reggroup_name (group)); sep = ","; } } diff --git a/gdb/regcache.c b/gdb/regcache.c index 00d7a10..a5e83da 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1383,34 +1383,34 @@ regcache::debug_print_register (const char *func, int regno) { struct gdbarch *gdbarch = arch (); - fprintf_unfiltered (gdb_stdlog, "%s ", func); + gdb_printf (gdb_stdlog, "%s ", func); if (regno >= 0 && regno < gdbarch_num_regs (gdbarch) && gdbarch_register_name (gdbarch, regno) != NULL && gdbarch_register_name (gdbarch, regno)[0] != '\0') - fprintf_unfiltered (gdb_stdlog, "(%s)", - gdbarch_register_name (gdbarch, regno)); + gdb_printf (gdb_stdlog, "(%s)", + gdbarch_register_name (gdbarch, regno)); else - fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + gdb_printf (gdb_stdlog, "(%d)", regno); if (regno >= 0 && regno < gdbarch_num_regs (gdbarch)) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int size = register_size (gdbarch, regno); gdb_byte *buf = register_buffer (regno); - fprintf_unfiltered (gdb_stdlog, " = "); + gdb_printf (gdb_stdlog, " = "); for (int i = 0; i < size; i++) { - fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + gdb_printf (gdb_stdlog, "%02x", buf[i]); } if (size <= sizeof (LONGEST)) { ULONGEST val = extract_unsigned_integer (buf, size, byte_order); - fprintf_unfiltered (gdb_stdlog, " %s %s", - core_addr_to_string_nz (val), plongest (val)); + gdb_printf (gdb_stdlog, " %s %s", + core_addr_to_string_nz (val), plongest (val)); } } - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } /* Implement 'maint flush register-cache' command. */ @@ -1421,7 +1421,7 @@ reg_flush_command (const char *command, int from_tty) /* Force-flush the register cache. */ registers_changed (); if (from_tty) - printf_filtered (_("Register cache flushed.\n")); + gdb_printf (_("Register cache flushed.\n")); } void @@ -1441,7 +1441,7 @@ register_dump::dump (ui_file *file) { /* Name. */ if (regnum < 0) - fprintf_filtered (file, " %-10s", "Name"); + gdb_printf (file, " %-10s", "Name"); else { const char *p = gdbarch_register_name (m_gdbarch, regnum); @@ -1450,31 +1450,31 @@ register_dump::dump (ui_file *file) p = ""; else if (p[0] == '\0') p = "''"; - fprintf_filtered (file, " %-10s", p); + gdb_printf (file, " %-10s", p); } /* Number. */ if (regnum < 0) - fprintf_filtered (file, " %4s", "Nr"); + gdb_printf (file, " %4s", "Nr"); else - fprintf_filtered (file, " %4d", regnum); + gdb_printf (file, " %4d", regnum); /* Relative number. */ if (regnum < 0) - fprintf_filtered (file, " %4s", "Rel"); + gdb_printf (file, " %4s", "Rel"); else if (regnum < gdbarch_num_regs (m_gdbarch)) - fprintf_filtered (file, " %4d", regnum); + gdb_printf (file, " %4d", regnum); else - fprintf_filtered (file, " %4d", - (regnum - gdbarch_num_regs (m_gdbarch))); + gdb_printf (file, " %4d", + (regnum - gdbarch_num_regs (m_gdbarch))); /* Offset. */ if (regnum < 0) - fprintf_filtered (file, " %6s ", "Offset"); + gdb_printf (file, " %6s ", "Offset"); else { - fprintf_filtered (file, " %6ld", - descr->register_offset[regnum]); + gdb_printf (file, " %6ld", + descr->register_offset[regnum]); if (register_offset != descr->register_offset[regnum] || (regnum > 0 && (descr->register_offset[regnum] @@ -1484,19 +1484,19 @@ register_dump::dump (ui_file *file) { if (!footnote_register_offset) footnote_register_offset = ++footnote_nr; - fprintf_filtered (file, "*%d", footnote_register_offset); + gdb_printf (file, "*%d", footnote_register_offset); } else - fprintf_filtered (file, " "); + gdb_printf (file, " "); register_offset = (descr->register_offset[regnum] + descr->sizeof_register[regnum]); } /* Size. */ if (regnum < 0) - fprintf_filtered (file, " %5s ", "Size"); + gdb_printf (file, " %5s ", "Size"); else - fprintf_filtered (file, " %5ld", descr->sizeof_register[regnum]); + gdb_printf (file, " %5ld", descr->sizeof_register[regnum]); /* Type. */ { @@ -1522,24 +1522,24 @@ register_dump::dump (ui_file *file) if (startswith (t, blt)) t += strlen (blt); } - fprintf_filtered (file, " %-15s", t); + gdb_printf (file, " %-15s", t); } /* Leading space always present. */ - fprintf_filtered (file, " "); + gdb_printf (file, " "); dump_reg (file, regnum); - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } if (footnote_register_offset) - fprintf_filtered (file, "*%d: Inconsistent register offsets.\n", - footnote_register_offset); + gdb_printf (file, "*%d: Inconsistent register offsets.\n", + footnote_register_offset); if (footnote_register_type_name_null) - fprintf_filtered (file, - "*%d: Register type's name NULL.\n", - footnote_register_type_name_null); + gdb_printf (file, + "*%d: Register type's name NULL.\n", + footnote_register_type_name_null); } #if GDB_SELF_TEST diff --git a/gdb/reggroups.c b/gdb/reggroups.c index 1ad2a9c..b6afa2f 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -251,7 +251,7 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file) name = "Group"; else name = reggroup_name (group); - fprintf_filtered (file, " %-10s", name); + gdb_printf (file, " %-10s", name); } /* Group type. */ @@ -274,13 +274,13 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file) internal_error (__FILE__, __LINE__, _("bad switch")); } } - fprintf_filtered (file, " %-10s", type); + gdb_printf (file, " %-10s", type); } /* Note: If you change this, be sure to also update the documentation. */ - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); group = reggroup_next (gdbarch, group); } diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 9963f1e..fe191fb 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -1290,8 +1290,8 @@ show_system_call_allowed (const char *args, int from_tty) if (args) error (_("Garbage after \"show remote " "system-call-allowed\" command: `%s'"), args); - printf_filtered ("Calling host system(3) call from target is %sallowed\n", - remote_fio_system_call_allowed ? "" : "not "); + gdb_printf ("Calling host system(3) call from target is %sallowed\n", + remote_fio_system_call_allowed ? "" : "not "); } void diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c index 0973733..95b45e3 100644 --- a/gdb/remote-notif.c +++ b/gdb/remote-notif.c @@ -63,8 +63,8 @@ remote_notif_ack (remote_target *remote, notif_event_up event = nc->alloc_event (); if (notif_debug) - fprintf_unfiltered (gdb_stdlog, "notif: ack '%s'\n", - nc->ack_command); + gdb_printf (gdb_stdlog, "notif: ack '%s'\n", + nc->ack_command); nc->parse (remote, nc, buf, event.get ()); nc->ack (remote, nc, buf, event.release ()); @@ -79,7 +79,7 @@ remote_notif_parse (remote_target *remote, notif_event_up event = nc->alloc_event (); if (notif_debug) - fprintf_unfiltered (gdb_stdlog, "notif: parse '%s'\n", nc->name); + gdb_printf (gdb_stdlog, "notif: parse '%s'\n", nc->name); nc->parse (remote, nc, buf, event.get ()); @@ -145,8 +145,8 @@ handle_notification (struct remote_notif_state *state, const char *buf) reason thought we didn't, possibly due to timeout on its side. Just ignore it. */ if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: ignoring resent notification\n"); + gdb_printf (gdb_stdlog, + "notif: ignoring resent notification\n"); } else { @@ -202,9 +202,9 @@ handle_notification (struct remote_notif_state *state, const char *buf) } if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: Notification '%s' captured\n", - nc->name); + gdb_printf (gdb_stdlog, + "notif: Notification '%s' captured\n", + nc->name); } } diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 2bf79c0..4b8afd2 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -62,7 +62,7 @@ static void gdb_os_flush_stderr (host_callback *); static int gdb_os_poll_quit (host_callback *); -/* printf_filtered is depreciated. */ +/* gdb_printf is depreciated. */ static void gdb_os_printf_filtered (host_callback *, const char *, ...); static void gdb_os_vprintf_filtered (host_callback *, const char *, va_list); @@ -301,16 +301,16 @@ dump_mem (const gdb_byte *buf, int len) uint32_t l[2]; memcpy (l, buf, len); - fprintf_unfiltered (gdb_stdlog, "0x%08x", l[0]); + gdb_printf (gdb_stdlog, "0x%08x", l[0]); if (len == 8) - fprintf_unfiltered (gdb_stdlog, " 0x%08x", l[1]); + gdb_printf (gdb_stdlog, " 0x%08x", l[1]); } else { int i; for (i = 0; i < len; i++) - fprintf_unfiltered (gdb_stdlog, "0x%02x ", buf[i]); + gdb_printf (gdb_stdlog, "0x%02x ", buf[i]); } gdb_puts ("\n", gdb_stdlog); @@ -393,7 +393,7 @@ gdb_os_flush_stderr (host_callback *p) gdb_stdtargerr->flush (); } -/* GDB version of printf_filtered callback. */ +/* GDB version of gdb_printf callback. */ static void ATTRIBUTE_PRINTF (2, 3) gdb_os_printf_filtered (host_callback * p, const char *format, ...) @@ -482,13 +482,13 @@ gdbsim_target::fetch_registers (struct regcache *regcache, int regno) buf.data (), regsize); if (nr_bytes > 0 && nr_bytes != regsize && warn_user) { - fprintf_unfiltered (gdb_stderr, - "Size of register %s (%d/%d) " - "incorrect (%d instead of %d))", - gdbarch_register_name (gdbarch, regno), - regno, - gdbarch_register_sim_regno (gdbarch, regno), - nr_bytes, regsize); + gdb_printf (gdb_stderr, + "Size of register %s (%d/%d) " + "incorrect (%d instead of %d))", + gdbarch_register_name (gdbarch, regno), + regno, + gdbarch_register_sim_regno (gdbarch, regno), + nr_bytes, regsize); warn_user = 0; } /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0' @@ -499,8 +499,8 @@ gdbsim_target::fetch_registers (struct regcache *regcache, int regno) regcache->raw_supply (regno, buf.data ()); if (remote_debug) { - fprintf_unfiltered (gdb_stdlog, - "gdbsim_fetch_register: %d", regno); + gdb_printf (gdb_stdlog, + "gdbsim_fetch_register: %d", regno); /* FIXME: We could print something more intelligible. */ dump_mem (buf.data (), regsize); } @@ -548,7 +548,7 @@ gdbsim_target::store_registers (struct regcache *regcache, int regno) if (remote_debug) { - fprintf_unfiltered (gdb_stdlog, "gdbsim_store_register: %d", regno); + gdb_printf (gdb_stdlog, "gdbsim_store_register: %d", regno); /* FIXME: We could print something more intelligible. */ dump_mem (tmp.data (), regsize); } @@ -562,7 +562,7 @@ void gdbsim_target::kill () { if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_kill\n"); + gdb_printf (gdb_stdlog, "gdbsim_kill\n"); /* There is no need to `kill' running simulator - the simulator is not running. Mourning it is enough. */ @@ -591,7 +591,7 @@ gdbsim_target::load (const char *args, int fromtty) error (_("GDB sim does not yet support a load offset.")); if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_load: prog \"%s\"\n", prog); + gdb_printf (gdb_stdlog, "gdbsim_load: prog \"%s\"\n", prog); /* FIXME: We will print two messages on error. Need error to either not print anything if passed NULL or need @@ -631,10 +631,10 @@ gdbsim_target::create_inferior (const char *exec_file, warning (_("No program loaded.")); if (remote_debug) - fprintf_unfiltered (gdb_stdlog, - "gdbsim_create_inferior: exec_file \"%s\", args \"%s\"\n", - (exec_file ? exec_file : "(NULL)"), - args); + gdb_printf (gdb_stdlog, + "gdbsim_create_inferior: exec_file \"%s\", args \"%s\"\n", + (exec_file ? exec_file : "(NULL)"), + args); if (inferior_ptid == sim_data->remote_sim_ptid) kill (); @@ -688,8 +688,8 @@ gdbsim_target_open (const char *args, int from_tty) sysroot += strlen (TARGET_SYSROOT_PREFIX); if (remote_debug) - fprintf_unfiltered (gdb_stdlog, - "gdbsim_open: args \"%s\"\n", args ? args : "(null)"); + gdb_printf (gdb_stdlog, + "gdbsim_open: args \"%s\"\n", args ? args : "(null)"); /* Ensure that the sim target is not on the target stack. This is necessary, because if it is on the target stack, the call to @@ -764,7 +764,7 @@ gdbsim_target_open (const char *args, int from_tty) sim_data->gdbsim_desc = gdbsim_desc; current_inferior ()->push_target (&gdbsim_ops); - printf_filtered ("Connected to the simulator.\n"); + gdb_printf ("Connected to the simulator.\n"); /* There's nothing running after "target sim" or "load"; not until "run". */ @@ -804,7 +804,7 @@ void gdbsim_target::close () { if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_close\n"); + gdb_printf (gdb_stdlog, "gdbsim_close\n"); for (inferior *inf : all_inferiors (this)) close_one_inferior (inf); @@ -832,11 +832,11 @@ void gdbsim_target::detach (inferior *inf, int from_tty) { if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_detach\n"); + gdb_printf (gdb_stdlog, "gdbsim_detach\n"); inf->unpush_target (this); /* calls gdbsim_close to do the real work */ if (from_tty) - printf_filtered ("Ending simulator %s debugging\n", target_shortname ()); + gdb_printf ("Ending simulator %s debugging\n", target_shortname ()); } /* Resume execution of the target process. STEP says whether to single-step @@ -856,9 +856,9 @@ gdbsim_target::resume_one_inferior (inferior *inf, bool step, sim_data->resume_step = step; if (remote_debug) - fprintf_unfiltered (gdb_stdlog, - _("gdbsim_resume: pid %d, step %d, signal %d\n"), - inf->pid, step, siggnal); + gdb_printf (gdb_stdlog, + _("gdbsim_resume: pid %d, step %d, signal %d\n"), + inf->pid, step, siggnal); } } @@ -956,7 +956,7 @@ gdbsim_target::wait (ptid_t ptid, struct target_waitstatus *status, } if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_wait\n"); + gdb_printf (gdb_stdlog, "gdbsim_wait\n"); #if defined (HAVE_SIGACTION) && defined (SA_RESTART) { @@ -1050,13 +1050,13 @@ gdbsim_xfer_memory (struct target_ops *target, gdb_assert (sim_data->gdbsim_desc != NULL); if (remote_debug) - fprintf_unfiltered (gdb_stdlog, - "gdbsim_xfer_memory: readbuf %s, writebuf %s, " - "memaddr %s, len %s\n", - host_address_to_string (readbuf), - host_address_to_string (writebuf), - paddress (target_gdbarch (), memaddr), - pulongest (len)); + gdb_printf (gdb_stdlog, + "gdbsim_xfer_memory: readbuf %s, writebuf %s, " + "memaddr %s, len %s\n", + host_address_to_string (readbuf), + host_address_to_string (writebuf), + paddress (target_gdbarch (), memaddr), + pulongest (len)); if (writebuf) { @@ -1111,12 +1111,12 @@ gdbsim_target::files_info () file = bfd_get_filename (current_program_space->exec_bfd ()); if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_files_info: file \"%s\"\n", file); + gdb_printf (gdb_stdlog, "gdbsim_files_info: file \"%s\"\n", file); if (current_program_space->exec_bfd ()) { - printf_filtered ("\tAttached to %s running program %s\n", - target_shortname (), file); + gdb_printf ("\tAttached to %s running program %s\n", + target_shortname (), file); sim_info (sim_data->gdbsim_desc, 0); } } @@ -1127,7 +1127,7 @@ void gdbsim_target::mourn_inferior () { if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "gdbsim_mourn_inferior:\n"); + gdb_printf (gdb_stdlog, "gdbsim_mourn_inferior:\n"); remove_breakpoints (); generic_mourn_inferior (); diff --git a/gdb/remote.c b/gdb/remote.c index fb09a9b..bc308bd 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1390,7 +1390,7 @@ static void show_remote_exec_file (struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value) { - fprintf_filtered (file, "%s\n", get_remote_exec_file ()); + gdb_printf (file, "%s\n", get_remote_exec_file ()); } static int @@ -1572,19 +1572,19 @@ show_interrupt_sequence (struct ui_file *file, int from_tty, const char *value) { if (interrupt_sequence_mode == interrupt_sequence_control_c) - fprintf_filtered (file, - _("Send the ASCII ETX character (Ctrl-c) " - "to the remote target to interrupt the " - "execution of the program.\n")); + gdb_printf (file, + _("Send the ASCII ETX character (Ctrl-c) " + "to the remote target to interrupt the " + "execution of the program.\n")); else if (interrupt_sequence_mode == interrupt_sequence_break) - fprintf_filtered (file, - _("send a break signal to the remote target " - "to interrupt the execution of the program.\n")); + gdb_printf (file, + _("send a break signal to the remote target " + "to interrupt the execution of the program.\n")); else if (interrupt_sequence_mode == interrupt_sequence_break_g) - fprintf_filtered (file, - _("Send a break signal and 'g' a.k.a. Magic SysRq g to " - "the remote target to interrupt the execution " - "of Linux kernel.\n")); + gdb_printf (file, + _("Send a break signal and 'g' a.k.a. Magic SysRq g to " + "the remote target to interrupt the execution " + "of Linux kernel.\n")); else internal_error (__FILE__, __LINE__, _("Invalid value for interrupt_sequence_mode: %s."), @@ -1760,19 +1760,19 @@ static void show_memory_packet_size (struct memory_packet_config *config) { if (config->size == 0) - printf_filtered (_("The %s is 0 (default). "), config->name); + gdb_printf (_("The %s is 0 (default). "), config->name); else - printf_filtered (_("The %s is %ld. "), config->name, config->size); + gdb_printf (_("The %s is %ld. "), config->name, config->size); if (config->fixed_p) - printf_filtered (_("Packets are fixed at %ld bytes.\n"), - get_fixed_memory_packet_size (config)); + gdb_printf (_("Packets are fixed at %ld bytes.\n"), + get_fixed_memory_packet_size (config)); else { remote_target *remote = get_current_remote_target (); if (remote != NULL) - printf_filtered (_("Packets are limited to %ld bytes.\n"), - remote->get_memory_packet_size (config)); + gdb_printf (_("Packets are limited to %ld bytes.\n"), + remote->get_memory_packet_size (config)); else gdb_puts ("The actual limit will be further reduced " "dependent on the target.\n"); @@ -1804,8 +1804,8 @@ show_hardware_watchpoint_limit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The maximum number of target hardware " - "watchpoints is %s.\n"), value); + gdb_printf (file, _("The maximum number of target hardware " + "watchpoints is %s.\n"), value); } /* Show the length limit (in bytes) for hardware watchpoints. */ @@ -1815,8 +1815,8 @@ show_hardware_watchpoint_length_limit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The maximum length (in bytes) of a target " - "hardware watchpoint is %s.\n"), value); + gdb_printf (file, _("The maximum length (in bytes) of a target " + "hardware watchpoint is %s.\n"), value); } /* Show the number of hardware breakpoints that can be used. */ @@ -1826,8 +1826,8 @@ show_hardware_breakpoint_limit (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The maximum number of target hardware " - "breakpoints is %s.\n"), value); + gdb_printf (file, _("The maximum number of target hardware " + "breakpoints is %s.\n"), value); } /* Controls the maximum number of characters to display in the debug output @@ -1843,8 +1843,8 @@ show_remote_packet_max_chars (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Number of remote packet characters to " - "display is %s.\n"), value); + gdb_printf (file, _("Number of remote packet characters to " + "display is %s.\n"), value); } long @@ -1928,16 +1928,16 @@ show_packet_config_cmd (ui_file *file, struct packet_config *config) switch (config->detect) { case AUTO_BOOLEAN_AUTO: - fprintf_filtered (file, - _("Support for the `%s' packet " - "is auto-detected, currently %s.\n"), - config->name, support); + gdb_printf (file, + _("Support for the `%s' packet " + "is auto-detected, currently %s.\n"), + config->name, support); break; case AUTO_BOOLEAN_TRUE: case AUTO_BOOLEAN_FALSE: - fprintf_filtered (file, - _("Support for the `%s' packet is currently %s.\n"), - config->name, support); + gdb_printf (file, + _("Support for the `%s' packet is currently %s.\n"), + config->name, support); break; } } @@ -5027,7 +5027,7 @@ remote_target::start_remote_1 (int from_tty, int extended_p) struct uploaded_tp *uploaded_tps = NULL; if (current_trace_status ()->running) - printf_filtered (_("Trace is already running on the target.\n")); + gdb_printf (_("Trace is already running on the target.\n")); upload_tracepoints (&uploaded_tps); @@ -6005,8 +6005,8 @@ remote_target::remote_detach_1 (inferior *inf, int from_tty) target_mourn_inferior (inferior_ptid); if (print_inferior_events) - printf_filtered (_("[Inferior %d (%s) detached]\n"), - inf->num, infpid.c_str ()); + gdb_printf (_("[Inferior %d (%s) detached]\n"), + inf->num, infpid.c_str ()); } else { @@ -7421,9 +7421,9 @@ remote_target::remote_notif_remove_queued_reply (ptid_t ptid) } if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: discard queued event: 'Stop' in %s\n", - ptid.to_string ().c_str ()); + gdb_printf (gdb_stdlog, + "notif: discard queued event: 'Stop' in %s\n", + ptid.to_string ().c_str ()); return result; } @@ -7459,10 +7459,10 @@ remote_target::push_stop_reply (struct stop_reply *new_event) rs->stop_reply_queue.push_back (stop_reply_up (new_event)); if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: push 'Stop' %s to queue %d\n", - new_event->ptid.to_string ().c_str (), - int (rs->stop_reply_queue.size ())); + gdb_printf (gdb_stdlog, + "notif: push 'Stop' %s to queue %d\n", + new_event->ptid.to_string ().c_str (), + int (rs->stop_reply_queue.size ())); /* Mark the pending event queue only if async mode is currently enabled. If async mode is not currently enabled, then, if it later becomes @@ -7885,9 +7885,9 @@ remote_target::remote_notif_get_pending_events (notif_client *nc) if (rs->notif_state->pending_event[nc->id] != NULL) { if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: process: '%s' ack pending event\n", - nc->name); + gdb_printf (gdb_stdlog, + "notif: process: '%s' ack pending event\n", + nc->name); /* acknowledge */ nc->ack (this, nc, rs->buf.data (), @@ -7906,9 +7906,9 @@ remote_target::remote_notif_get_pending_events (notif_client *nc) else { if (notif_debug) - fprintf_unfiltered (gdb_stdlog, - "notif: process: '%s' no pending reply\n", - nc->name); + gdb_printf (gdb_stdlog, + "notif: process: '%s' no pending reply\n", + nc->name); } } @@ -8261,7 +8261,7 @@ remote_target::wait_as (ptid_t ptid, target_waitstatus *status, /* Zero length reply means that we tried 'S' or 'C' and the remote system doesn't support it. */ target_terminal::ours_for_output (); - printf_filtered + gdb_printf ("Can't send signals to this remote system. %s not sent.\n", gdb_signal_to_name (rs->last_sent_signal)); rs->last_sent_signal = GDB_SIGNAL_0; @@ -9825,7 +9825,7 @@ remote_target::read_frame (gdb::char_vector *buf_p) } buf[bc] = '\0'; - printf_filtered (_("Invalid run length encoding: %s\n"), buf); + gdb_printf (_("Invalid run length encoding: %s\n"), buf); return -1; } default: @@ -9854,7 +9854,7 @@ static void show_watchdog (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Watchdog timer is %s.\n"), value); + gdb_printf (file, _("Watchdog timer is %s.\n"), value); } /* Read a packet from the remote machine, with error checking, and @@ -9961,7 +9961,7 @@ remote_target::getpkt_or_notif_sane_1 (gdb::char_vector *buf, { /* We have tried hard enough, and just can't receive the packet/notification. Give up. */ - printf_filtered (_("Ignoring packet error, continuing...\n")); + gdb_printf (_("Ignoring packet error, continuing...\n")); /* Skip the ack char if we're in no-ack mode. */ if (!rs->noack_mode) @@ -11054,14 +11054,14 @@ compare_sections_command (const char *args, int from_tty) paddress (target_gdbarch (), lma), paddress (target_gdbarch (), lma + size)); - printf_filtered ("Section %s, range %s -- %s: ", sectname, - paddress (target_gdbarch (), lma), - paddress (target_gdbarch (), lma + size)); + gdb_printf ("Section %s, range %s -- %s: ", sectname, + paddress (target_gdbarch (), lma), + paddress (target_gdbarch (), lma + size)); if (res) - printf_filtered ("matched.\n"); + gdb_printf ("matched.\n"); else { - printf_filtered ("MIS-MATCHED!\n"); + gdb_printf ("MIS-MATCHED!\n"); mismatched++; } } @@ -11069,7 +11069,7 @@ compare_sections_command (const char *args, int from_tty) warning (_("One or more sections of the target image does not match\n\ the loaded file\n")); if (args && !matched) - printf_filtered (_("No loaded section named '%s'.\n"), args); + gdb_printf (_("No loaded section named '%s'.\n"), args); } /* Write LEN bytes from WRITEBUF into OBJECT_NAME/ANNEX at OFFSET @@ -11631,7 +11631,7 @@ private: if (isprint (c)) gdb_putc (c, &stb); else - fprintf_unfiltered (&stb, "\\x%02x", (unsigned char) c); + gdb_printf (&stb, "\\x%02x", (unsigned char) c); } gdb_puts (stb.string ().c_str ()); @@ -11703,7 +11703,7 @@ threadset_test_cmd (const char *cmd, int tty) { int sample_thread = SAMPLE_THREAD; - printf_filtered (_("Remote threadset test\n")); + gdb_printf (_("Remote threadset test\n")); set_general_thread (sample_thread); } @@ -11716,9 +11716,9 @@ threadalive_test (const char *cmd, int tty) ptid_t ptid = ptid_t (pid, sample_thread, 0); if (remote_thread_alive (ptid)) - printf_filtered ("PASS: Thread alive test\n"); + gdb_printf ("PASS: Thread alive test\n"); else - printf_filtered ("FAIL: Thread alive test\n"); + gdb_printf ("FAIL: Thread alive test\n"); } void output_threadid (char *title, threadref *ref); @@ -11730,7 +11730,7 @@ output_threadid (char *title, threadref *ref) pack_threadid (&hexid[0], ref); /* Convert thread id into hex. */ hexid[16] = 0; - printf_filtered ("%s %s\n", title, (&hexid[0])); + gdb_printf ("%s %s\n", title, (&hexid[0])); } static void @@ -11741,10 +11741,10 @@ threadlist_test_cmd (const char *cmd, int tty) int done, result_count; threadref threadlist[3]; - printf_filtered ("Remote Threadlist test\n"); + gdb_printf ("Remote Threadlist test\n"); if (!remote_get_threadlist (startflag, &nextthread, 3, &done, &result_count, &threadlist[0])) - printf_filtered ("FAIL: threadlist test\n"); + gdb_printf ("FAIL: threadlist test\n"); else { threadref *scan = threadlist; @@ -11759,9 +11759,9 @@ void display_thread_info (struct gdb_ext_thread_info *info) { output_threadid ("Threadid: ", &info->threadid); - printf_filtered ("Name: %s\n ", info->shortname); - printf_filtered ("State: %s\n", info->display); - printf_filtered ("other: %s\n\n", info->more_display); + gdb_printf ("Name: %s\n ", info->shortname); + gdb_printf ("State: %s\n", info->display); + gdb_printf ("other: %s\n\n", info->more_display); } int @@ -11786,9 +11786,9 @@ threadinfo_test_cmd (const char *cmd, int tty) int set; int_to_threadref (&thread, athread); - printf_filtered ("Remote Threadinfo test\n"); + gdb_printf ("Remote Threadinfo test\n"); if (!get_and_display_threadinfo (&thread)) - printf_filtered ("FAIL cannot get thread info\n"); + gdb_printf ("FAIL cannot get thread info\n"); } static int @@ -11801,7 +11801,7 @@ thread_display_step (threadref *ref, void *context) static void threadlist_update_test_cmd (const char *cmd, int tty) { - printf_filtered ("Remote Threadlist update test\n"); + gdb_printf ("Remote Threadlist update test\n"); remote_threadlist_iterator (thread_display_step, 0, CRAZY_MAX_THREADS); } @@ -12312,8 +12312,8 @@ remote_target::remote_hostio_open (inferior *inf, const char *filename, { static int warning_issued = 0; - printf_filtered (_("Reading %s from remote target...\n"), - filename); + gdb_printf (_("Reading %s from remote target...\n"), + filename); if (!warning_issued) { @@ -12901,7 +12901,7 @@ remote_target::remote_file_put (const char *local_file, const char *remote_file, remote_hostio_error (remote_errno); if (from_tty) - printf_filtered (_("Successfully sent file \"%s\".\n"), local_file); + gdb_printf (_("Successfully sent file \"%s\".\n"), local_file); } void @@ -12960,7 +12960,7 @@ remote_target::remote_file_get (const char *remote_file, const char *local_file, remote_hostio_error (remote_errno); if (from_tty) - printf_filtered (_("Successfully fetched file \"%s\".\n"), remote_file); + gdb_printf (_("Successfully fetched file \"%s\".\n"), remote_file); } void @@ -12984,7 +12984,7 @@ remote_target::remote_file_delete (const char *remote_file, int from_tty) remote_hostio_error (remote_errno); if (from_tty) - printf_filtered (_("Successfully deleted file \"%s\".\n"), remote_file); + gdb_printf (_("Successfully deleted file \"%s\".\n"), remote_file); } static void @@ -14151,8 +14151,8 @@ remote_target::remote_btrace_maybe_reopen () { btrace_target_pushed = 1; record_btrace_push_target (); - printf_filtered (_("Target is recording using %s.\n"), - btrace_format_string (rs->btrace_config.format)); + gdb_printf (_("Target is recording using %s.\n"), + btrace_format_string (rs->btrace_config.format)); } tp->btrace.target = XCNEW (struct btrace_target_info); @@ -14651,9 +14651,9 @@ show_range_stepping (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's willingness to use range stepping " - "is %s.\n"), value); + gdb_printf (file, + _("Debugger's willingness to use range stepping " + "is %s.\n"), value); } /* Return true if the vCont;r action is supported by the remote @@ -14690,17 +14690,17 @@ static void show_remote_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of remote protocol is %s.\n"), - value); + gdb_printf (file, _("Debugging of remote protocol is %s.\n"), + value); } static void show_remote_timeout (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Timeout limit to wait for target to respond is %s.\n"), - value); + gdb_printf (file, + _("Timeout limit to wait for target to respond is %s.\n"), + value); } /* Implement the "supports_memory_tagging" target_ops method. */ diff --git a/gdb/reverse.c b/gdb/reverse.c index d0652b8..dc41749 100644 --- a/gdb/reverse.c +++ b/gdb/reverse.c @@ -150,8 +150,8 @@ save_bookmark_command (const char *args, int from_tty) b1 = b1->next; b1->next = b; } - printf_filtered (_("Saved bookmark %d at %s\n"), b->number, - paddress (gdbarch, b->sal.pc)); + gdb_printf (_("Saved bookmark %d at %s\n"), b->number, + paddress (gdbarch, b->sal.pc)); } /* Implement "delete bookmark" command. */ @@ -288,16 +288,16 @@ bookmark_1 (int bnum) { if (bnum == -1 || bnum == b->number) { - printf_filtered (" %d %s '%s'\n", - b->number, - paddress (gdbarch, b->pc), - b->opaque_data); + gdb_printf (" %d %s '%s'\n", + b->number, + paddress (gdbarch, b->pc), + b->opaque_data); matched++; } } if (bnum > 0 && matched == 0) - printf_filtered ("No bookmark #%d\n", bnum); + gdb_printf ("No bookmark #%d\n", bnum); return matched; } @@ -308,7 +308,7 @@ static void info_bookmarks_command (const char *args, int from_tty) { if (!bookmark_chain) - printf_filtered (_("No bookmarks.\n")); + gdb_printf (_("No bookmarks.\n")); else if (args == NULL || *args == '\0') bookmark_1 (-1); else diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 35287c8..8d1ecf0 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -701,9 +701,9 @@ show_use_compressed_breakpoints (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's use of compressed breakpoints is set " - "to %s.\n"), value); + gdb_printf (file, + _("Debugger's use of compressed breakpoints is set " + "to %s.\n"), value); } /* The set and show lists for 'set riscv' and 'show riscv' prefixes. */ @@ -723,9 +723,9 @@ show_riscv_debug_variable (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("RiscV debug variable `%s' is set to: %s\n"), - c->name, value); + gdb_printf (file, + _("RiscV debug variable `%s' is set to: %s\n"), + c->name, value); } /* See riscv-tdep.h. */ @@ -832,13 +832,13 @@ riscv_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr) const char *bp = (unaligned_p || riscv_insn_length (buf[0]) == 2 ? "C.EBREAK" : "EBREAK"); - fprintf_unfiltered (gdb_stdlog, "Using %s for breakpoint at %s ", - bp, paddress (gdbarch, *pcptr)); + gdb_printf (gdb_stdlog, "Using %s for breakpoint at %s ", + bp, paddress (gdbarch, *pcptr)); if (unaligned_p) - fprintf_unfiltered (gdb_stdlog, "(unaligned address)\n"); + gdb_printf (gdb_stdlog, "(unaligned address)\n"); else - fprintf_unfiltered (gdb_stdlog, "(instruction length %d)\n", - riscv_insn_length (buf[0])); + gdb_printf (gdb_stdlog, "(instruction length %d)\n", + riscv_insn_length (buf[0])); } if (unaligned_p || riscv_insn_length (buf[0]) == 2) return 2; @@ -1049,7 +1049,7 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, { /* Handle failure to read a register without interrupting the entire 'info registers' flow. */ - fprintf_filtered (file, "%s\n", ex.what ()); + gdb_printf (file, "%s\n", ex.what ()); return; } @@ -1078,10 +1078,10 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, if (print_raw_format) { - fprintf_filtered (file, "\t(raw "); + gdb_printf (file, "\t(raw "); print_hex_chars (file, valaddr, TYPE_LENGTH (regtype), byte_order, true); - fprintf_filtered (file, ")"); + gdb_printf (file, ")"); } } else @@ -1105,28 +1105,28 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, of the number of bits in MSTATUS. */ d = value_as_long (val); xlen = size * 8; - fprintf_filtered (file, - "\tSD:%X VM:%02X MXR:%X PUM:%X MPRV:%X XS:%X " - "FS:%X MPP:%x HPP:%X SPP:%X MPIE:%X HPIE:%X " - "SPIE:%X UPIE:%X MIE:%X HIE:%X SIE:%X UIE:%X", - (int) ((d >> (xlen - 1)) & 0x1), - (int) ((d >> 24) & 0x1f), - (int) ((d >> 19) & 0x1), - (int) ((d >> 18) & 0x1), - (int) ((d >> 17) & 0x1), - (int) ((d >> 15) & 0x3), - (int) ((d >> 13) & 0x3), - (int) ((d >> 11) & 0x3), - (int) ((d >> 9) & 0x3), - (int) ((d >> 8) & 0x1), - (int) ((d >> 7) & 0x1), - (int) ((d >> 6) & 0x1), - (int) ((d >> 5) & 0x1), - (int) ((d >> 4) & 0x1), - (int) ((d >> 3) & 0x1), - (int) ((d >> 2) & 0x1), - (int) ((d >> 1) & 0x1), - (int) ((d >> 0) & 0x1)); + gdb_printf (file, + "\tSD:%X VM:%02X MXR:%X PUM:%X MPRV:%X XS:%X " + "FS:%X MPP:%x HPP:%X SPP:%X MPIE:%X HPIE:%X " + "SPIE:%X UPIE:%X MIE:%X HIE:%X SIE:%X UIE:%X", + (int) ((d >> (xlen - 1)) & 0x1), + (int) ((d >> 24) & 0x1f), + (int) ((d >> 19) & 0x1), + (int) ((d >> 18) & 0x1), + (int) ((d >> 17) & 0x1), + (int) ((d >> 15) & 0x3), + (int) ((d >> 13) & 0x3), + (int) ((d >> 11) & 0x3), + (int) ((d >> 9) & 0x3), + (int) ((d >> 8) & 0x1), + (int) ((d >> 7) & 0x1), + (int) ((d >> 6) & 0x1), + (int) ((d >> 5) & 0x1), + (int) ((d >> 4) & 0x1), + (int) ((d >> 3) & 0x1), + (int) ((d >> 2) & 0x1), + (int) ((d >> 1) & 0x1), + (int) ((d >> 0) & 0x1)); } else if (regnum == RISCV_CSR_MISA_REGNUM) { @@ -1144,12 +1144,12 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, for (; base > 0; base--) xlen *= 2; - fprintf_filtered (file, "\tRV%d", xlen); + gdb_printf (file, "\tRV%d", xlen); for (i = 0; i < 26; i++) { if (d & (1 << i)) - fprintf_filtered (file, "%c", 'A' + i); + gdb_printf (file, "%c", 'A' + i); } } else if (regnum == RISCV_CSR_FCSR_REGNUM @@ -1160,16 +1160,16 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, d = value_as_long (val); - fprintf_filtered (file, "\t"); + gdb_printf (file, "\t"); if (regnum != RISCV_CSR_FRM_REGNUM) - fprintf_filtered (file, - "RD:%01X NV:%d DZ:%d OF:%d UF:%d NX:%d", - (int) ((d >> 5) & 0x7), - (int) ((d >> 4) & 0x1), - (int) ((d >> 3) & 0x1), - (int) ((d >> 2) & 0x1), - (int) ((d >> 1) & 0x1), - (int) ((d >> 0) & 0x1)); + gdb_printf (file, + "RD:%01X NV:%d DZ:%d OF:%d UF:%d NX:%d", + (int) ((d >> 5) & 0x7), + (int) ((d >> 4) & 0x1), + (int) ((d >> 3) & 0x1), + (int) ((d >> 2) & 0x1), + (int) ((d >> 1) & 0x1), + (int) ((d >> 0) & 0x1)); if (regnum != RISCV_CSR_FFLAGS_REGNUM) { @@ -1187,10 +1187,10 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, int frm = ((regnum == RISCV_CSR_FCSR_REGNUM) ? (d >> 5) : d) & 0x3; - fprintf_filtered (file, "%sFRM:%i [%s]", - (regnum == RISCV_CSR_FCSR_REGNUM - ? " " : ""), - frm, sfrm[frm]); + gdb_printf (file, "%sFRM:%i [%s]", + (regnum == RISCV_CSR_FCSR_REGNUM + ? " " : ""), + frm, sfrm[frm]); } } else if (regnum == RISCV_PRIV_REGNUM) @@ -1210,11 +1210,11 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, "Hypervisor", "Machine" }; - fprintf_filtered (file, "\tprv:%d [%s]", - priv, sprv[priv]); + gdb_printf (file, "\tprv:%d [%s]", + priv, sprv[priv]); } else - fprintf_filtered (file, "\tprv:%d [INVALID]", priv); + gdb_printf (file, "\tprv:%d [INVALID]", priv); } else { @@ -1224,13 +1224,13 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, { get_user_print_options (&opts); opts.deref_ref = 1; - fprintf_filtered (file, "\t"); + gdb_printf (file, "\t"); common_val_print (val, file, 0, &opts, current_language); } } } } - fprintf_filtered (file, "\n"); + gdb_printf (file, "\n"); } /* Return true if REGNUM is a valid CSR register. The CSR register space @@ -1858,7 +1858,7 @@ riscv_scan_prologue (struct gdbarch *gdbarch, pv_area stack (RISCV_SP_REGNUM, gdbarch_addr_bit (gdbarch)); if (riscv_debug_unwinder) - fprintf_unfiltered + gdb_printf (gdb_stdlog, "Prologue scan for function starting at %s (limit %s)\n", core_addr_to_string (start_pc), @@ -1995,8 +1995,8 @@ riscv_scan_prologue (struct gdbarch *gdbarch, end_prologue_addr = cur_pc; if (riscv_debug_unwinder) - fprintf_unfiltered (gdb_stdlog, "End of prologue at %s\n", - core_addr_to_string (end_prologue_addr)); + gdb_printf (gdb_stdlog, "End of prologue at %s\n", + core_addr_to_string (end_prologue_addr)); if (cache != NULL) { @@ -2031,10 +2031,10 @@ riscv_scan_prologue (struct gdbarch *gdbarch, the frame base address to the registers location on the stack, with a descending stack this means the offsets are always negative. */ - fprintf_unfiltered (gdb_stdlog, - "Register $%s at stack offset %s\n", - gdbarch_register_name (gdbarch, i), - plongest ((LONGEST) offset)); + gdb_printf (gdb_stdlog, + "Register $%s at stack offset %s\n", + gdbarch_register_name (gdbarch, i), + plongest ((LONGEST) offset)); } cache->regs[i].set_addr (offset); } @@ -2109,11 +2109,11 @@ riscv_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, int status = target_write_memory (*bp_addr, nop_insn, sizeof (nop_insn)); if (riscv_debug_breakpoints || riscv_debug_infcall) - fprintf_unfiltered (gdb_stdlog, - "Writing %s-byte nop instruction to %s: %s\n", - plongest (sizeof (nop_insn)), - paddress (gdbarch, *bp_addr), - (status == 0 ? "success" : "failed")); + gdb_printf (gdb_stdlog, + "Writing %s-byte nop instruction to %s: %s\n", + plongest (sizeof (nop_insn)), + paddress (gdbarch, *bp_addr), + (status == 0 ? "success" : "failed")); return sp; } @@ -2815,12 +2815,12 @@ riscv_print_arg_location (ui_file *stream, struct gdbarch *gdbarch, struct riscv_arg_info *info, CORE_ADDR sp_refs, CORE_ADDR sp_args) { - fprintf_unfiltered (stream, "type: '%s', length: 0x%x, alignment: 0x%x", - TYPE_SAFE_NAME (info->type), info->length, info->align); + gdb_printf (stream, "type: '%s', length: 0x%x, alignment: 0x%x", + TYPE_SAFE_NAME (info->type), info->length, info->align); switch (info->argloc[0].loc_type) { case riscv_arg_info::location::in_reg: - fprintf_unfiltered + gdb_printf (stream, ", register %s", gdbarch_register_name (gdbarch, info->argloc[0].loc_data.regno)); if (info->argloc[0].c_length < info->length) @@ -2828,15 +2828,15 @@ riscv_print_arg_location (ui_file *stream, struct gdbarch *gdbarch, switch (info->argloc[1].loc_type) { case riscv_arg_info::location::in_reg: - fprintf_unfiltered + gdb_printf (stream, ", register %s", gdbarch_register_name (gdbarch, info->argloc[1].loc_data.regno)); break; case riscv_arg_info::location::on_stack: - fprintf_unfiltered (stream, ", on stack at offset 0x%x", - info->argloc[1].loc_data.offset); + gdb_printf (stream, ", on stack at offset 0x%x", + info->argloc[1].loc_data.offset); break; case riscv_arg_info::location::by_ref: @@ -2849,31 +2849,31 @@ riscv_print_arg_location (ui_file *stream, struct gdbarch *gdbarch, } if (info->argloc[1].c_offset > info->argloc[0].c_length) - fprintf_unfiltered (stream, " (offset 0x%x)", - info->argloc[1].c_offset); + gdb_printf (stream, " (offset 0x%x)", + info->argloc[1].c_offset); } break; case riscv_arg_info::location::on_stack: - fprintf_unfiltered (stream, ", on stack at offset 0x%x", - info->argloc[0].loc_data.offset); + gdb_printf (stream, ", on stack at offset 0x%x", + info->argloc[0].loc_data.offset); break; case riscv_arg_info::location::by_ref: - fprintf_unfiltered + gdb_printf (stream, ", by reference, data at offset 0x%x (%s)", info->argloc[0].loc_data.offset, core_addr_to_string (sp_refs + info->argloc[0].loc_data.offset)); if (info->argloc[1].loc_type == riscv_arg_info::location::in_reg) - fprintf_unfiltered + gdb_printf (stream, ", address in register %s", gdbarch_register_name (gdbarch, info->argloc[1].loc_data.regno)); else { gdb_assert (info->argloc[1].loc_type == riscv_arg_info::location::on_stack); - fprintf_unfiltered + gdb_printf (stream, ", address on stack at offset 0x%x (%s)", info->argloc[1].loc_data.offset, core_addr_to_string (sp_args + info->argloc[1].loc_data.offset)); @@ -2961,33 +2961,33 @@ riscv_push_dummy_call (struct gdbarch *gdbarch, if (riscv_debug_infcall > 0) { - fprintf_unfiltered (gdb_stdlog, "dummy call args:\n"); - fprintf_unfiltered (gdb_stdlog, ": floating point ABI %s in use\n", - (riscv_has_fp_abi (gdbarch) ? "is" : "is not")); - fprintf_unfiltered (gdb_stdlog, ": xlen: %d\n: flen: %d\n", - call_info.xlen, call_info.flen); + gdb_printf (gdb_stdlog, "dummy call args:\n"); + gdb_printf (gdb_stdlog, ": floating point ABI %s in use\n", + (riscv_has_fp_abi (gdbarch) ? "is" : "is not")); + gdb_printf (gdb_stdlog, ": xlen: %d\n: flen: %d\n", + call_info.xlen, call_info.flen); if (return_method == return_method_struct) - fprintf_unfiltered (gdb_stdlog, - "[*] struct return pointer in register $A0\n"); + gdb_printf (gdb_stdlog, + "[*] struct return pointer in register $A0\n"); for (i = 0; i < nargs; ++i) { struct riscv_arg_info *info = &arg_info [i]; - fprintf_unfiltered (gdb_stdlog, "[%2d] ", i); + gdb_printf (gdb_stdlog, "[%2d] ", i); riscv_print_arg_location (gdb_stdlog, gdbarch, info, sp_refs, sp_args); - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } if (call_info.memory.arg_offset > 0 || call_info.memory.ref_offset > 0) { - fprintf_unfiltered (gdb_stdlog, " Original sp: %s\n", - core_addr_to_string (osp)); - fprintf_unfiltered (gdb_stdlog, "Stack required (for args): 0x%x\n", - call_info.memory.arg_offset); - fprintf_unfiltered (gdb_stdlog, "Stack required (for refs): 0x%x\n", - call_info.memory.ref_offset); - fprintf_unfiltered (gdb_stdlog, " Stack allocated: %s\n", - core_addr_to_string_nz (osp - sp)); + gdb_printf (gdb_stdlog, " Original sp: %s\n", + core_addr_to_string (osp)); + gdb_printf (gdb_stdlog, "Stack required (for args): 0x%x\n", + call_info.memory.arg_offset); + gdb_printf (gdb_stdlog, "Stack required (for refs): 0x%x\n", + call_info.memory.ref_offset); + gdb_printf (gdb_stdlog, " Stack allocated: %s\n", + core_addr_to_string_nz (osp - sp)); } } @@ -3086,15 +3086,15 @@ riscv_push_dummy_call (struct gdbarch *gdbarch, A dummy breakpoint will be setup to execute the call. */ if (riscv_debug_infcall > 0) - fprintf_unfiltered (gdb_stdlog, ": writing $ra = %s\n", - core_addr_to_string (bp_addr)); + gdb_printf (gdb_stdlog, ": writing $ra = %s\n", + core_addr_to_string (bp_addr)); regcache_cooked_write_unsigned (regcache, RISCV_RA_REGNUM, bp_addr); /* Finally, update the stack pointer. */ if (riscv_debug_infcall > 0) - fprintf_unfiltered (gdb_stdlog, ": writing $sp = %s\n", - core_addr_to_string (sp)); + gdb_printf (gdb_stdlog, ": writing $sp = %s\n", + core_addr_to_string (sp)); regcache_cooked_write_unsigned (regcache, RISCV_SP_REGNUM, sp); return sp; @@ -3119,10 +3119,10 @@ riscv_return_value (struct gdbarch *gdbarch, if (riscv_debug_infcall > 0) { - fprintf_unfiltered (gdb_stdlog, "riscv return value:\n"); - fprintf_unfiltered (gdb_stdlog, "[R] "); + gdb_printf (gdb_stdlog, "riscv return value:\n"); + gdb_printf (gdb_stdlog, "[R] "); riscv_print_arg_location (gdb_stdlog, gdbarch, &info, 0, 0); - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } if (readbuf != nullptr || writebuf != nullptr) @@ -3344,11 +3344,11 @@ riscv_frame_cache (struct frame_info *this_frame, void **this_cache) = (get_frame_register_unsigned (this_frame, cache->frame_base_reg) + cache->frame_base_offset); if (riscv_debug_unwinder) - fprintf_unfiltered (gdb_stdlog, "Frame base is %s ($%s + 0x%x)\n", - core_addr_to_string (cache->frame_base), - gdbarch_register_name (gdbarch, - cache->frame_base_reg), - cache->frame_base_offset); + gdb_printf (gdb_stdlog, "Frame base is %s ($%s + 0x%x)\n", + core_addr_to_string (cache->frame_base), + gdbarch_register_name (gdbarch, + cache->frame_base_reg), + cache->frame_base_offset); /* The prologue scanner sets the address of registers stored to the stack as the offset of that register from the frame base. The prologue @@ -3687,7 +3687,7 @@ riscv_gdbarch_init (struct gdbarch_info info, gdb_assert (tdesc != nullptr); if (riscv_debug_gdbarch) - fprintf_unfiltered (gdb_stdlog, "Have got a target description\n"); + gdb_printf (gdb_stdlog, "Have got a target description\n"); tdesc_arch_data_up tdesc_data = tdesc_data_alloc (); std::vector<riscv_pending_register_alias> pending_aliases; @@ -3705,7 +3705,7 @@ riscv_gdbarch_init (struct gdbarch_info info, if (!valid_p) { if (riscv_debug_gdbarch) - fprintf_unfiltered (gdb_stdlog, "Target description is not valid\n"); + gdb_printf (gdb_stdlog, "Target description is not valid\n"); return NULL; } diff --git a/gdb/rs6000-aix-nat.c b/gdb/rs6000-aix-nat.c index 5cf1214..8563aea 100644 --- a/gdb/rs6000-aix-nat.c +++ b/gdb/rs6000-aix-nat.c @@ -210,9 +210,9 @@ fetch_register (struct regcache *regcache, int regno) else if (nr < 0) { if (regno >= gdbarch_num_regs (gdbarch)) - fprintf_unfiltered (gdb_stderr, - "gdb error: register no %d not implemented.\n", - regno); + gdb_printf (gdb_stderr, + "gdb error: register no %d not implemented.\n", + regno); return; } @@ -272,9 +272,9 @@ store_register (struct regcache *regcache, int regno) else if (nr < 0) { if (regno >= gdbarch_num_regs (gdbarch)) - fprintf_unfiltered (gdb_stderr, - "gdb error: register no %d not implemented.\n", - regno); + gdb_printf (gdb_stderr, + "gdb error: register no %d not implemented.\n", + regno); } /* Fixed-point registers. */ @@ -519,9 +519,9 @@ rs6000_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, if (pid == -1) { - fprintf_unfiltered (gdb_stderr, - _("Child process unexpectedly missing: %s.\n"), - safe_strerror (save_errno)); + gdb_printf (gdb_stderr, + _("Child process unexpectedly missing: %s.\n"), + safe_strerror (save_errno)); /* Claim it exited with unknown signal. */ ourstatus->set_signalled (GDB_SIGNAL_UNKNOWN); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index ee3f051..c246ce8 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -4520,8 +4520,8 @@ ppc_process_record_op4 (struct gdbarch *gdbarch, struct regcache *regcache, return 0; } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 4-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 4-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -4572,8 +4572,8 @@ ppc_process_record_op19 (struct gdbarch *gdbarch, struct regcache *regcache, return 0; } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 19-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 19-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -5169,8 +5169,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, } UNKNOWN_OP: - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 31-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 31-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -5263,8 +5263,8 @@ ppc_process_record_op59 (struct gdbarch *gdbarch, struct regcache *regcache, return 0; } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -5625,8 +5625,8 @@ ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache, return 0; } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 60-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 60-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -5684,8 +5684,8 @@ ppc_process_record_op61 (struct gdbarch *gdbarch, struct regcache *regcache, return 0; } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s.\n", insn, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s.\n", insn, paddress (gdbarch, addr)); return -1; } @@ -5942,8 +5942,8 @@ ppc_process_record_op63 (struct gdbarch *gdbarch, struct regcache *regcache, } } - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, 63-%d.\n", insn, paddress (gdbarch, addr), ext); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, 63-%d.\n", insn, paddress (gdbarch, addr), ext); return -1; } @@ -5986,7 +5986,7 @@ ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache, } else { - fprintf_unfiltered (gdb_stderr, _("no syscall record support\n")); + gdb_printf (gdb_stderr, _("no syscall record support\n")); return -1; } break; @@ -6235,8 +6235,8 @@ ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache, default: UNKNOWN_OP: - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x " - "at %s, %d.\n", insn, paddress (gdbarch, addr), op6); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %08x " + "at %s, %d.\n", insn, paddress (gdbarch, addr), op6); return -1; } @@ -7361,7 +7361,7 @@ show_powerpc_exact_watchpoints (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Use of exact watchpoints is %s.\n"), value); + gdb_printf (file, _("Use of exact watchpoints is %s.\n"), value); } /* Read a PPC instruction from memory. */ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 6738243..45a6d2f 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -343,7 +343,7 @@ rust_language::val_print_struct if (!is_tuple) { if (type->name () != NULL) - fprintf_filtered (stream, "%s", type->name ()); + gdb_printf (stream, "%s", type->name ()); if (type->num_fields () == 0) return; @@ -423,9 +423,9 @@ rust_language::print_enum (struct value *val, struct ui_file *stream, if (rust_empty_enum_p (type)) { /* Print the enum type name here to be more clear. */ - fprintf_filtered (stream, _("%s {%p[<No data fields>%p]}"), - type->name (), - metadata_style.style ().ptr (), nullptr); + gdb_printf (stream, _("%s {%p[<No data fields>%p]}"), + type->name (), + metadata_style.style ().ptr (), nullptr); return; } @@ -437,7 +437,7 @@ rust_language::print_enum (struct value *val, struct ui_file *stream, bool is_tuple = rust_tuple_struct_type_p (variant_type); - fprintf_filtered (stream, "%s", variant_type->name ()); + gdb_printf (stream, "%s", variant_type->name ()); if (nfields == 0) { /* In case of a nullary variant like 'None', just output @@ -447,11 +447,11 @@ rust_language::print_enum (struct value *val, struct ui_file *stream, /* In case of a non-nullary variant, we output 'Foo(x,y,z)'. */ if (is_tuple) - fprintf_filtered (stream, "("); + gdb_printf (stream, "("); else { /* struct variant. */ - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); } bool first_field = true; @@ -462,9 +462,9 @@ rust_language::print_enum (struct value *val, struct ui_file *stream, first_field = false; if (!is_tuple) - fprintf_filtered (stream, "%ps: ", - styled_string (variable_name_style.style (), - variant_type->field (j).name ())); + gdb_printf (stream, "%ps: ", + styled_string (variable_name_style.style (), + variant_type->field (j).name ())); common_val_print (value_field (val, j), stream, recurse + 1, &opts, this); @@ -712,9 +712,9 @@ rust_print_struct_def (struct type *type, const char *varstring, fputs_styled (type->field (i).name (), variable_name_style.style (), stream); else if (!is_tuple_struct) - fprintf_filtered (stream, "%ps: ", - styled_string (variable_name_style.style (), - type->field (i).name ())); + gdb_printf (stream, "%ps: ", + styled_string (variable_name_style.style (), + type->field (i).name ())); rust_internal_print_type (type->field (i).type (), NULL, stream, (is_enum ? show : show - 1), @@ -812,10 +812,10 @@ rust_internal_print_type (struct type *type, const char *varstring, if (type->bounds ()->high.kind () == PROP_LOCEXPR || type->bounds ()->high.kind () == PROP_LOCLIST) - fprintf_filtered (stream, "; variable length"); + gdb_printf (stream, "; variable length"); else if (get_array_bounds (type, &low_bound, &high_bound)) - fprintf_filtered (stream, "; %s", - plongest (high_bound - low_bound + 1)); + gdb_printf (stream, "; %s", + plongest (high_bound - low_bound + 1)); gdb_puts ("]", stream); } break; @@ -850,10 +850,10 @@ rust_internal_print_type (struct type *type, const char *varstring, && name[len] == ':' && name[len + 1] == ':') name += len + 2; - fprintf_filtered (stream, "%*s%ps,\n", - level + 2, "", - styled_string (variable_name_style.style (), - name)); + gdb_printf (stream, "%*s%ps,\n", + level + 2, "", + styled_string (variable_name_style.style (), + name)); } gdb_puts ("}", stream); @@ -1598,7 +1598,7 @@ rust_language::emitchar (int ch, struct type *chtype, generic_emit_char (ch, chtype, stream, quoter, target_charset (chtype->arch ())); else if (ch == '\\' || ch == quoter) - fprintf_filtered (stream, "\\%c", ch); + gdb_printf (stream, "\\%c", ch); else if (ch == '\n') gdb_puts ("\\n", stream); else if (ch == '\r') @@ -1610,9 +1610,9 @@ rust_language::emitchar (int ch, struct type *chtype, else if (ch >= 32 && ch <= 127 && isprint (ch)) gdb_putc (ch, stream); else if (ch <= 255) - fprintf_filtered (stream, "\\x%02x", ch); + gdb_printf (stream, "\\x%02x", ch); else - fprintf_filtered (stream, "\\u{%06x}", ch); + gdb_printf (stream, "\\u{%06x}", ch); } /* See language.h. */ diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h index 97454d8..0e89b88 100644 --- a/gdb/rust-lang.h +++ b/gdb/rust-lang.h @@ -133,11 +133,11 @@ public: if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "rust_lookup_symbol_non_local" - " (%s, %s (scope %s), %s)\n", - name, host_address_to_string (block), - block_scope (block), domain_name (domain)); + gdb_printf (gdb_stdlog, + "rust_lookup_symbol_non_local" + " (%s, %s (scope %s), %s)\n", + name, host_address_to_string (block), + block_scope (block), domain_name (domain)); } /* Look up bare names in the block's scope. */ @@ -196,9 +196,9 @@ public: struct ui_file *stream) const override { type = check_typedef (type); - fprintf_filtered (stream, "type %s = ", new_symbol->print_name ()); + gdb_printf (stream, "type %s = ", new_symbol->print_name ()); type_print (type, "", stream, 0); - fprintf_filtered (stream, ";"); + gdb_printf (stream, ";"); } /* See language.h. */ diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c index 77dda56..bf6a71c 100644 --- a/gdb/s12z-tdep.c +++ b/gdb/s12z-tdep.c @@ -524,7 +524,7 @@ s12z_print_ccw_info (struct gdbarch *gdbarch, const int stop_2 = 17; for (int i = 0; i < stop_1 - len; ++i) gdb_putc (' ', file); - fprintf_filtered (file, "0x%04x", ccw); + gdb_printf (file, "0x%04x", ccw); for (int i = 0; i < stop_2 - len; ++i) gdb_putc (' ', file); for (int b = 15; b >= 0; --b) @@ -631,7 +631,7 @@ show_bdccsr_command (const char *args, int from_tty) struct string_file output; target_rcmd ("bdccsr", &output); - printf_filtered ("The current BDCCSR value is %s\n", output.string().c_str()); + gdb_printf ("The current BDCCSR value is %s\n", output.string().c_str()); } static struct gdbarch * diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c index 3d41789..73961c8 100644 --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c @@ -878,8 +878,8 @@ s390_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len, } } - fprintf_unfiltered (gdb_stderr, - "Attempt to remove nonexistent watchpoint.\n"); + gdb_printf (gdb_stderr, + "Attempt to remove nonexistent watchpoint.\n"); return -1; } @@ -931,8 +931,8 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, } } - fprintf_unfiltered (gdb_stderr, - "Attempt to remove nonexistent breakpoint.\n"); + gdb_printf (gdb_stderr, + "Attempt to remove nonexistent breakpoint.\n"); return -1; } diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 56cc147..9d4e2d0 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -815,10 +815,10 @@ s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native) if (syscall_gdb < 0) { - fprintf_unfiltered (gdb_stderr, - _("Process record and replay target doesn't " - "support syscall number %s\n"), - plongest (syscall_native)); + gdb_printf (gdb_stderr, + _("Process record and replay target doesn't " + "support syscall number %s\n"), + plongest (syscall_native)); return -1; } diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 153f0ed..91aee63 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -2797,7 +2797,7 @@ s390_record_address_mask (struct gdbarch *gdbarch, struct regcache *regcache, case 3: return val; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Addressing mode %d used.", am); + gdb_printf (gdb_stdlog, "Warning: Addressing mode %d used.", am); return 0; } } @@ -3031,8 +3031,8 @@ ex: return -1; break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PFPO OFC %02x at %s.\n", - ofc, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown PFPO OFC %02x at %s.\n", + ofc, paddress (gdbarch, addr)); return -1; } @@ -3103,7 +3103,7 @@ ex: } else { - fprintf_unfiltered (gdb_stderr, _("no syscall record support\n")); + gdb_printf (gdb_stderr, _("no syscall record support\n")); return -1; } break; @@ -3318,8 +3318,8 @@ ex: case 0x44: /* EX - execute */ if (ex != -1) { - fprintf_unfiltered (gdb_stdlog, "Warning: Double execute at %s.\n", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Double execute at %s.\n", + paddress (gdbarch, addr)); return -1; } addr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0); @@ -4304,8 +4304,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (tmp != 0) @@ -4369,8 +4369,8 @@ ex: /* For other instructions... */ /* Fall through. */ default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KM* function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown KM* function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (tmp != 0) @@ -4453,8 +4453,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PCC function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown PCC function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM)) @@ -4488,8 +4488,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMCTR function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown KMCTR function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (tmp != 0) @@ -4559,8 +4559,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KM function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown KM function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (tmp != 0) @@ -4626,8 +4626,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PPNO function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown PPNO function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } /* DXC may be written */ @@ -4678,8 +4678,8 @@ ex: /* For KLMD... */ /* Fall through. */ default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n", - (int)tmp, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n", + (int)tmp, paddress (gdbarch, addr)); return -1; } if (tmp != 0) @@ -4984,8 +4984,8 @@ ex: case 0xc60: /* EXRL - execute relative long */ if (ex != -1) { - fprintf_unfiltered (gdb_stdlog, "Warning: Double execute at %s.\n", - paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Double execute at %s.\n", + paddress (gdbarch, addr)); return -1; } addr = s390_record_calc_rl (gdbarch, regcache, addr, insn[1], insn[2]); @@ -5073,8 +5073,8 @@ ex: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n", - fc, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n", + fc, paddress (gdbarch, addr)); return -1; } @@ -5082,8 +5082,8 @@ ex: oaddr2 = s390_record_calc_disp (gdbarch, regcache, 0, insn[2], 0); if (sc > 4) { - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n", - sc, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n", + sc, paddress (gdbarch, addr)); return -1; } @@ -6708,8 +6708,8 @@ CSSTX: break; default: - fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PLO FC %02x at %s.\n", - fc, paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Unknown PLO FC %02x at %s.\n", + fc, paddress (gdbarch, addr)); return -1; } } @@ -6771,8 +6771,8 @@ CSSTX: default: UNKNOWN_OP: - fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %04x " - "at %s.\n", insn[0], paddress (gdbarch, addr)); + gdb_printf (gdb_stdlog, "Warning: Don't know how to record %04x " + "at %s.\n", insn[0], paddress (gdbarch, addr)); return -1; } diff --git a/gdb/ser-base.c b/gdb/ser-base.c index 687cf0f..91c0ab8 100644 --- a/gdb/ser-base.c +++ b/gdb/ser-base.c @@ -108,13 +108,13 @@ reschedule (struct serial *scb) { case FD_SCHEDULED: if (scb->async_state != FD_SCHEDULED) - fprintf_unfiltered (gdb_stdlog, "[fd%d->fd-scheduled]\n", - scb->fd); + gdb_printf (gdb_stdlog, "[fd%d->fd-scheduled]\n", + scb->fd); break; default: /* TIMER SCHEDULED */ if (scb->async_state == FD_SCHEDULED) - fprintf_unfiltered (gdb_stdlog, "[fd%d->timer-scheduled]\n", - scb->fd); + gdb_printf (gdb_stdlog, "[fd%d->timer-scheduled]\n", + scb->fd); break; } } @@ -592,8 +592,8 @@ ser_base_async (struct serial *scb, /* Force a re-schedule. */ scb->async_state = NOTHING_SCHEDULED; if (serial_debug_p (scb)) - fprintf_unfiltered (gdb_stdlog, "[fd%d->asynchronous]\n", - scb->fd); + gdb_printf (gdb_stdlog, "[fd%d->asynchronous]\n", + scb->fd); reschedule (scb); if (scb->error_fd != -1) @@ -602,8 +602,8 @@ ser_base_async (struct serial *scb, else { if (serial_debug_p (scb)) - fprintf_unfiltered (gdb_stdlog, "[fd%d->synchronous]\n", - scb->fd); + gdb_printf (gdb_stdlog, "[fd%d->synchronous]\n", + scb->fd); /* De-schedule whatever tasks are currently scheduled. */ switch (scb->async_state) { diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c index 0b2fa93..2ccad41 100644 --- a/gdb/ser-go32.c +++ b/gdb/ser-go32.c @@ -584,11 +584,11 @@ dos_close (struct serial *scb) /* Check for overflow errors. */ if (port->oflo) { - fprintf_unfiltered (gdb_stderr, - "Serial input overruns occurred.\n"); - fprintf_unfiltered (gdb_stderr, "This system %s handle %d baud.\n", - port->fifo ? "cannot" : "needs a 16550 to", - port->baudrate); + gdb_printf (gdb_stderr, + "Serial input overruns occurred.\n"); + gdb_printf (gdb_stderr, "This system %s handle %d baud.\n", + port->fifo ? "cannot" : "needs a 16550 to", + port->baudrate); } } @@ -745,7 +745,7 @@ dos_setbaudrate (struct serial *scb, int rate) x = dos_baudconv (rate); if (x <= 0) { - fprintf_unfiltered (gdb_stderr, "%d: impossible baudrate\n", rate); + gdb_printf (gdb_stderr, "%d: impossible baudrate\n", rate); errno = EINVAL; return -1; } @@ -898,20 +898,20 @@ info_serial_command (const char *arg, int from_tty) { if (port->baudrate == 0) continue; - printf_filtered ("Port:\tCOM%ld (%sactive)\n", (long)(port - ports) + 1, - port->intrupt ? "" : "not "); - printf_filtered ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq); - printf_filtered ("16550:\t%s\n", port->fifo ? "yes" : "no"); - printf_filtered ("Speed:\t%d baud\n", port->baudrate); - printf_filtered ("Errs:\tframing %d parity %d overflow %d\n\n", - port->ferr, port->perr, port->oflo); + gdb_printf ("Port:\tCOM%ld (%sactive)\n", (long)(port - ports) + 1, + port->intrupt ? "" : "not "); + gdb_printf ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq); + gdb_printf ("16550:\t%s\n", port->fifo ? "yes" : "no"); + gdb_printf ("Speed:\t%d baud\n", port->baudrate); + gdb_printf ("Errs:\tframing %d parity %d overflow %d\n\n", + port->ferr, port->perr, port->oflo); } #ifdef DOS_STATS - printf_filtered ("\nTotal interrupts: %d\n", intrcnt); + gdb_printf ("\nTotal interrupts: %d\n", intrcnt); for (i = 0; i < NCNT; i++) if (cnts[i]) - printf_filtered ("%s:\t%lu\n", cntnames[i], (unsigned long) cnts[i]); + gdb_printf ("%s:\t%lu\n", cntnames[i], (unsigned long) cnts[i]); #endif } diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index e7d2cc9..ffc039b 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -296,8 +296,8 @@ net_open (struct serial *scb, const char *name) if (r != 0) { - fprintf_unfiltered (gdb_stderr, _("%s: cannot resolve name: %s\n"), - name, gai_strerror (r)); + gdb_printf (gdb_stderr, _("%s: cannot resolve name: %s\n"), + name, gai_strerror (r)); errno = ENOENT; return -1; } diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 9de950a..37ac0b6 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -46,7 +46,7 @@ static void show_serial_hwflow (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Hardware flow control is %s.\n"), value); + gdb_printf (file, _("Hardware flow control is %s.\n"), value); } #endif @@ -142,21 +142,21 @@ hardwire_print_tty_state (struct serial *scb, struct hardwire_ttystate *state = (struct hardwire_ttystate *) ttystate; int i; - fprintf_filtered (stream, "c_iflag = 0x%x, c_oflag = 0x%x,\n", - (int) state->termios.c_iflag, - (int) state->termios.c_oflag); - fprintf_filtered (stream, "c_cflag = 0x%x, c_lflag = 0x%x\n", - (int) state->termios.c_cflag, - (int) state->termios.c_lflag); + gdb_printf (stream, "c_iflag = 0x%x, c_oflag = 0x%x,\n", + (int) state->termios.c_iflag, + (int) state->termios.c_oflag); + gdb_printf (stream, "c_cflag = 0x%x, c_lflag = 0x%x\n", + (int) state->termios.c_cflag, + (int) state->termios.c_lflag); #if 0 /* This not in POSIX, and is not really documented by those systems which have it (at least not Sun). */ - fprintf_filtered (stream, "c_line = 0x%x.\n", state->termios.c_line); + gdb_printf (stream, "c_line = 0x%x.\n", state->termios.c_line); #endif - fprintf_filtered (stream, "c_cc: "); + gdb_printf (stream, "c_cc: "); for (i = 0; i < NCCS; i += 1) - fprintf_filtered (stream, "0x%x ", state->termios.c_cc[i]); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "0x%x ", state->termios.c_cc[i]); + gdb_printf (stream, "\n"); } /* Wait for the output to drain away, as opposed to flushing @@ -197,8 +197,8 @@ hardwire_raw (struct serial *scb) struct hardwire_ttystate state; if (get_tty_state (scb, &state)) - fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n", - safe_strerror (errno)); + gdb_printf (gdb_stderr, "get_tty_state failed: %s\n", + safe_strerror (errno)); state.termios.c_iflag = 0; state.termios.c_oflag = 0; @@ -222,8 +222,8 @@ hardwire_raw (struct serial *scb) state.termios.c_cc[VTIME] = 0; if (set_tty_state (scb, &state)) - fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n", - safe_strerror (errno)); + gdb_printf (gdb_stderr, "set_tty_state failed: %s\n", + safe_strerror (errno)); } #ifndef B19200 diff --git a/gdb/serial.c b/gdb/serial.c index 1508c5d..0a8c7ab 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -65,7 +65,7 @@ serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout) { if (ch_type != serial_current_type) { - fprintf_unfiltered (stream, "\n%c ", ch_type); + gdb_printf (stream, "\n%c ", ch_type); serial_current_type = ch_type; } @@ -75,10 +75,10 @@ serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout) switch (ch) { case SERIAL_TIMEOUT: - fprintf_unfiltered (stream, "<Timeout: %d seconds>", timeout); + gdb_printf (stream, "<Timeout: %d seconds>", timeout); return; case SERIAL_ERROR: - fprintf_unfiltered (stream, "<Error: %s>", safe_strerror (errno)); + gdb_printf (stream, "<Error: %s>", safe_strerror (errno)); return; case SERIAL_EOF: gdb_puts ("<Eof>", stream); @@ -88,9 +88,9 @@ serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout) return; default: if (serial_logbase == logbase_hex) - fprintf_unfiltered (stream, "%02x", ch & 0xff); + gdb_printf (stream, "%02x", ch & 0xff); else if (serial_logbase == logbase_octal) - fprintf_unfiltered (stream, "%03o", ch & 0xff); + gdb_printf (stream, "%03o", ch & 0xff); else switch (ch) { @@ -116,8 +116,8 @@ serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout) gdb_puts ("\\v", stream); break; default: - fprintf_unfiltered (stream, - isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF); + gdb_printf (stream, + isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF); break; } } @@ -401,9 +401,9 @@ serial_readchar (struct serial *scb, int timeout) } if (serial_debug_p (scb)) { - fprintf_unfiltered (gdb_stdlog, "["); + gdb_printf (gdb_stdlog, "["); serial_logchar (gdb_stdlog, 'r', ch, timeout); - fprintf_unfiltered (gdb_stdlog, "]"); + gdb_printf (gdb_stdlog, "]"); gdb_flush (gdb_stdlog); } @@ -432,9 +432,9 @@ serial_write (struct serial *scb, const void *buf, size_t count) for (c = 0; c < count; c++) { - fprintf_unfiltered (gdb_stdlog, "["); + gdb_printf (gdb_stdlog, "["); serial_logchar (gdb_stdlog, 'w', str[c] & 0xff, 0); - fprintf_unfiltered (gdb_stdlog, "]"); + gdb_printf (gdb_stdlog, "]"); } gdb_flush (gdb_stdlog); } @@ -626,8 +626,8 @@ static void serial_baud_show_cmd (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Baud rate for remote serial I/O is %s.\n"), - value); + gdb_printf (file, _("Baud rate for remote serial I/O is %s.\n"), + value); } /* See serial.h. */ diff --git a/gdb/serial.h b/gdb/serial.h index 4c12618..bc74813 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -169,7 +169,7 @@ extern serial_ttystate serial_copy_tty_state (struct serial *scb, extern int serial_set_tty_state (struct serial *scb, serial_ttystate ttystate); -/* printf_filtered a user-comprehensible description of ttystate on +/* gdb_printf a user-comprehensible description of ttystate on the specified STREAM. FIXME: At present this sends output to the default stream - GDB_STDOUT. */ @@ -184,7 +184,7 @@ skip_file_command (const char *arg, int from_tty) skiplist_entry::add_entry (false, std::string (filename), false, std::string ()); - printf_filtered (_("File %s will be skipped when stepping.\n"), filename); + gdb_printf (_("File %s will be skipped when stepping.\n"), filename); } /* Create a skiplist entry for the given function NAME and add it to the @@ -195,7 +195,7 @@ skip_function (const char *name) { skiplist_entry::add_entry (false, std::string (), false, std::string (name)); - printf_filtered (_("Function %s will be skipped when stepping.\n"), name); + gdb_printf (_("Function %s will be skipped when stepping.\n"), name); } static void @@ -331,20 +331,20 @@ skip_command (const char *arg, int from_tty) if (function_to_print == NULL) { - printf_filtered (_("%s %s will be skipped when stepping.\n"), - file_text, file_to_print); + gdb_printf (_("%s %s will be skipped when stepping.\n"), + file_text, file_to_print); } else if (file_to_print == NULL) { - printf_filtered (_("%s %s will be skipped when stepping.\n"), - function_text, function_to_print); + gdb_printf (_("%s %s will be skipped when stepping.\n"), + function_text, function_to_print); } else { - printf_filtered (_("%s %s in %s %s will be skipped" - " when stepping.\n"), - function_text, function_to_print, - lower_file_text, file_to_print); + gdb_printf (_("%s %s in %s %s will be skipped" + " when stepping.\n"), + function_text, function_to_print, + lower_file_text, file_to_print); } } } @@ -486,9 +486,9 @@ bool skiplist_entry::do_skip_file_p (const symtab_and_line &function_sal) const { if (debug_skip) - fprintf_unfiltered (gdb_stdlog, - "skip: checking if file %s matches non-glob %s...", - function_sal.symtab->filename, m_file.c_str ()); + gdb_printf (gdb_stdlog, + "skip: checking if file %s matches non-glob %s...", + function_sal.symtab->filename, m_file.c_str ()); bool result; @@ -513,7 +513,7 @@ skiplist_entry::do_skip_file_p (const symtab_and_line &function_sal) const } if (debug_skip) - fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n"); + gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n"); return result; } @@ -522,9 +522,9 @@ bool skiplist_entry::do_skip_gfile_p (const symtab_and_line &function_sal) const { if (debug_skip) - fprintf_unfiltered (gdb_stdlog, - "skip: checking if file %s matches glob %s...", - function_sal.symtab->filename, m_file.c_str ()); + gdb_printf (gdb_stdlog, + "skip: checking if file %s matches glob %s...", + function_sal.symtab->filename, m_file.c_str ()); bool result; @@ -553,7 +553,7 @@ skiplist_entry::do_skip_gfile_p (const symtab_and_line &function_sal) const } if (debug_skip) - fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n"); + gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n"); return result; } @@ -584,9 +584,9 @@ skiplist_entry::skip_function_p (const char *function_name) const if (m_function_is_regexp) { if (debug_skip) - fprintf_unfiltered (gdb_stdlog, - "skip: checking if function %s matches regex %s...", - function_name, m_function.c_str ()); + gdb_printf (gdb_stdlog, + "skip: checking if function %s matches regex %s...", + function_name, m_function.c_str ()); gdb_assert (m_compiled_function_regexp); result @@ -595,15 +595,15 @@ skiplist_entry::skip_function_p (const char *function_name) const else { if (debug_skip) - fprintf_unfiltered (gdb_stdlog, - ("skip: checking if function %s matches non-regex " - "%s..."), - function_name, m_function.c_str ()); + gdb_printf (gdb_stdlog, + ("skip: checking if function %s matches non-regex " + "%s..."), + function_name, m_function.c_str ()); result = (strcmp_iw (function_name, m_function.c_str ()) == 0); } if (debug_skip) - fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n"); + gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n"); return result; } diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index f1991be..2a05026 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -638,7 +638,7 @@ check_for_thread_db (void) break; case TD_OK: - printf_filtered (_("[Thread debugging using libthread_db enabled]\n")); + gdb_printf (_("[Thread debugging using libthread_db enabled]\n")); /* The thread library was detected. Activate the sol_thread target. */ current_inferior ()->push_target (&sol_thread_ops); @@ -1043,32 +1043,32 @@ info_cb (const td_thrhandle_t *th, void *s) ret = p_td_thr_get_info (th, &ti); if (ret == TD_OK) { - printf_filtered ("%s thread #%d, lwp %d, ", - ti.ti_type == TD_THR_SYSTEM ? "system" : "user ", - ti.ti_tid, ti.ti_lid); + gdb_printf ("%s thread #%d, lwp %d, ", + ti.ti_type == TD_THR_SYSTEM ? "system" : "user ", + ti.ti_tid, ti.ti_lid); switch (ti.ti_state) { default: case TD_THR_UNKNOWN: - printf_filtered ("<unknown state>"); + gdb_printf ("<unknown state>"); break; case TD_THR_STOPPED: - printf_filtered ("(stopped)"); + gdb_printf ("(stopped)"); break; case TD_THR_RUN: - printf_filtered ("(run) "); + gdb_printf ("(run) "); break; case TD_THR_ACTIVE: - printf_filtered ("(active) "); + gdb_printf ("(active) "); break; case TD_THR_ZOMBIE: - printf_filtered ("(zombie) "); + gdb_printf ("(zombie) "); break; case TD_THR_SLEEP: - printf_filtered ("(asleep) "); + gdb_printf ("(asleep) "); break; case TD_THR_STOPPED_ASLEEP: - printf_filtered ("(stopped asleep)"); + gdb_printf ("(stopped asleep)"); break; } /* Print thr_create start function. */ @@ -1077,10 +1077,10 @@ info_cb (const td_thrhandle_t *th, void *s) const struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (ti.ti_startfunc); - printf_filtered (" startfunc=%s", - msym.minsym - ? msym.minsym->print_name () - : paddress (target_gdbarch (), ti.ti_startfunc)); + gdb_printf (" startfunc=%s", + msym.minsym + ? msym.minsym->print_name () + : paddress (target_gdbarch (), ti.ti_startfunc)); } /* If thread is asleep, print function that went to sleep. */ @@ -1089,13 +1089,13 @@ info_cb (const td_thrhandle_t *th, void *s) const struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (ti.ti_pc); - printf_filtered (" sleepfunc=%s", - msym.minsym - ? msym.minsym->print_name () - : paddress (target_gdbarch (), ti.ti_pc)); + gdb_printf (" sleepfunc=%s", + msym.minsym + ? msym.minsym->print_name () + : paddress (target_gdbarch (), ti.ti_pc)); } - printf_filtered ("\n"); + gdb_printf ("\n"); } else warning (_("info sol-thread: failed to get info for thread.")); @@ -1194,7 +1194,7 @@ _initialize_sol_thread () return; die: - fprintf_unfiltered (gdb_stderr, "\ + gdb_printf (gdb_stderr, "\ [GDB will not be able to debug user-mode threads: %s]\n", dlerror ()); if (dlhandle) diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 2223749..3a8debf 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -713,7 +713,7 @@ static void show_solib_aix_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("solib-aix debugging is %s.\n"), value); + gdb_printf (file, _("solib-aix debugging is %s.\n"), value); } /* The target_so_ops for AIX targets. */ diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index 3736499..a0735ea 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -188,23 +188,23 @@ dsbt_print_loadmap (struct int_elf32_dsbt_loadmap *map) int i; if (map == NULL) - printf_filtered ("(null)\n"); + gdb_printf ("(null)\n"); else if (map->version != 0) - printf_filtered (_("Unsupported map version: %d\n"), map->version); + gdb_printf (_("Unsupported map version: %d\n"), map->version); else { - printf_filtered ("version %d\n", map->version); + gdb_printf ("version %d\n", map->version); for (i = 0; i < map->nsegs; i++) - printf_filtered ("%s:%s -> %s:%s\n", - print_core_address (target_gdbarch (), - map->segs[i].p_vaddr), - print_core_address (target_gdbarch (), - map->segs[i].p_vaddr - + map->segs[i].p_memsz), - print_core_address (target_gdbarch (), map->segs[i].addr), - print_core_address (target_gdbarch (), map->segs[i].addr - + map->segs[i].p_memsz)); + gdb_printf ("%s:%s -> %s:%s\n", + print_core_address (target_gdbarch (), + map->segs[i].p_vaddr), + print_core_address (target_gdbarch (), + map->segs[i].p_vaddr + + map->segs[i].p_memsz), + print_core_address (target_gdbarch (), map->segs[i].addr), + print_core_address (target_gdbarch (), map->segs[i].addr + + map->segs[i].p_memsz)); } } @@ -461,9 +461,9 @@ lm_base (void) { addr = BMSYMBOL_VALUE_ADDRESS (got_sym); if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: get addr %x by _GLOBAL_OFFSET_TABLE_.\n", - (unsigned int) addr); + gdb_printf (gdb_stdlog, + "lm_base: get addr %x by _GLOBAL_OFFSET_TABLE_.\n", + (unsigned int) addr); } else if (gdb_bfd_scan_elf_dyntag (DT_PLTGOT, current_program_space->exec_bfd (), @@ -475,32 +475,32 @@ lm_base (void) ldm = info->exec_loadmap; addr += displacement_from_map (ldm, addr); if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: get addr %x by DT_PLTGOT.\n", - (unsigned int) addr); + gdb_printf (gdb_stdlog, + "lm_base: get addr %x by DT_PLTGOT.\n", + (unsigned int) addr); } else { if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: _GLOBAL_OFFSET_TABLE_ not found.\n"); + gdb_printf (gdb_stdlog, + "lm_base: _GLOBAL_OFFSET_TABLE_ not found.\n"); return 0; } addr += GOT_MODULE_OFFSET; if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: _GLOBAL_OFFSET_TABLE_ + %d = %s\n", - GOT_MODULE_OFFSET, hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "lm_base: _GLOBAL_OFFSET_TABLE_ + %d = %s\n", + GOT_MODULE_OFFSET, hex_string_custom (addr, 8)); if (target_read_memory (addr, buf, sizeof buf) != 0) return 0; info->lm_base_cache = extract_unsigned_integer (buf, sizeof buf, byte_order); if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: lm_base_cache = %s\n", - hex_string_custom (info->lm_base_cache, 8)); + gdb_printf (gdb_stdlog, + "lm_base: lm_base_cache = %s\n", + hex_string_custom (info->lm_base_cache, 8)); return info->lm_base_cache; } @@ -553,9 +553,9 @@ dsbt_current_sos (void) int ret; if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "current_sos: reading link_map entry at %s\n", - hex_string_custom (lm_addr, 8)); + gdb_printf (gdb_stdlog, + "current_sos: reading link_map entry at %s\n", + hex_string_custom (lm_addr, 8)); ret = target_read_memory (lm_addr, (gdb_byte *) &lm_buf, sizeof (lm_buf)); if (ret) @@ -614,8 +614,8 @@ dsbt_current_sos (void) else { if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, "current_sos: name = %s\n", - name_buf.get ()); + gdb_printf (gdb_stdlog, "current_sos: name = %s\n", + name_buf.get ()); strncpy (sop->so_name, name_buf.get (), SO_NAME_MAX_PATH_SIZE - 1); sop->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; @@ -763,15 +763,15 @@ enable_break (void) if (addr != 0) { if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_state (prior to relocation) = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_state (prior to relocation) = %s\n", + hex_string_custom (addr, 8)); addr += displacement_from_map (ldm, addr); if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_state (after relocation) = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_state (after relocation) = %s\n", + hex_string_custom (addr, 8)); /* Now (finally!) create the solib breakpoint. */ create_solib_event_breakpoint (target_gdbarch (), addr); @@ -781,8 +781,8 @@ enable_break (void) else { if (solib_dsbt_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_state is not found\n"); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_state is not found\n"); ret = 0; } @@ -921,7 +921,7 @@ static void show_dsbt_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("solib-dsbt debugging is %s.\n"), value); + gdb_printf (file, _("solib-dsbt debugging is %s.\n"), value); } struct target_so_ops dsbt_so_ops; diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 9618817..925ec71 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -291,26 +291,26 @@ lm_base (void) if (got_sym.minsym == 0) { if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: _GLOBAL_OFFSET_TABLE_ not found.\n"); + gdb_printf (gdb_stdlog, + "lm_base: _GLOBAL_OFFSET_TABLE_ not found.\n"); return 0; } addr = BMSYMBOL_VALUE_ADDRESS (got_sym) + 8; if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: _GLOBAL_OFFSET_TABLE_ + 8 = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "lm_base: _GLOBAL_OFFSET_TABLE_ + 8 = %s\n", + hex_string_custom (addr, 8)); if (target_read_memory (addr, buf, sizeof buf) != 0) return 0; lm_base_cache = extract_unsigned_integer (buf, sizeof buf, byte_order); if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "lm_base: lm_base_cache = %s\n", - hex_string_custom (lm_base_cache, 8)); + gdb_printf (gdb_stdlog, + "lm_base: lm_base_cache = %s\n", + hex_string_custom (lm_base_cache, 8)); return lm_base_cache; } @@ -355,9 +355,9 @@ frv_current_sos (void) CORE_ADDR got_addr; if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "current_sos: reading link_map entry at %s\n", - hex_string_custom (lm_addr, 8)); + gdb_printf (gdb_stdlog, + "current_sos: reading link_map entry at %s\n", + hex_string_custom (lm_addr, 8)); if (target_read_memory (lm_addr, (gdb_byte *) &lm_buf, sizeof (lm_buf)) != 0) @@ -406,8 +406,8 @@ frv_current_sos (void) = target_read_string (addr, SO_NAME_MAX_PATH_SIZE - 1); if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, "current_sos: name = %s\n", - name_buf.get ()); + gdb_printf (gdb_stdlog, "current_sos: name = %s\n", + name_buf.get ()); if (name_buf == nullptr) warning (_("Can't read pathname for link map entry.")); @@ -583,9 +583,9 @@ enable_break2 (void) } if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: interp_loadmap_addr = %s\n", - hex_string_custom (interp_loadmap_addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: interp_loadmap_addr = %s\n", + hex_string_custom (interp_loadmap_addr, 8)); ldm = fetch_loadmap (interp_loadmap_addr); if (ldm == NULL) @@ -628,18 +628,18 @@ enable_break2 (void) } if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_addr " - "(prior to relocation) = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_addr " + "(prior to relocation) = %s\n", + hex_string_custom (addr, 8)); addr += displacement_from_map (ldm, addr); if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_addr " - "(after relocation) = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_addr " + "(after relocation) = %s\n", + hex_string_custom (addr, 8)); /* Fetch the address of the r_debug struct. */ if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0) @@ -651,17 +651,17 @@ enable_break2 (void) addr = extract_unsigned_integer (addr_buf, sizeof addr_buf, byte_order); if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: _dl_debug_addr[0..3] = %s\n", - hex_string_custom (addr, 8)); + gdb_printf (gdb_stdlog, + "enable_break: _dl_debug_addr[0..3] = %s\n", + hex_string_custom (addr, 8)); /* If it's zero, then the ldso hasn't initialized yet, and so there are no shared libs yet loaded. */ if (addr == 0) { if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: ldso not yet initialized\n"); + gdb_printf (gdb_stdlog, + "enable_break: ldso not yet initialized\n"); /* Do not warn, but mark to run again. */ return 0; } @@ -720,16 +720,16 @@ enable_break (void) if (current_program_space->symfile_object_file == NULL) { if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: No symbol file found.\n"); + gdb_printf (gdb_stdlog, + "enable_break: No symbol file found.\n"); return 0; } if (!entry_point_address_query (&entry_point)) { if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: Symbol file has no entry point.\n"); + gdb_printf (gdb_stdlog, + "enable_break: Symbol file has no entry point.\n"); return 0; } @@ -742,18 +742,18 @@ enable_break (void) if (interp_sect == NULL) { if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: No .interp section found.\n"); + gdb_printf (gdb_stdlog, + "enable_break: No .interp section found.\n"); return 0; } create_solib_event_breakpoint (target_gdbarch (), entry_point); if (solib_frv_debug) - fprintf_unfiltered (gdb_stdlog, - "enable_break: solib event breakpoint " - "placed at entry point: %s\n", - hex_string_custom (entry_point, 8)); + gdb_printf (gdb_stdlog, + "enable_break: solib event breakpoint " + "placed at entry point: %s\n", + hex_string_custom (entry_point, 8)); return 1; } diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 37fc898..2624ec2 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -292,10 +292,10 @@ lm_addr_check (const struct so_list *so, bfd *abfd) && (l_addr & align) == ((l_dynaddr - dynaddr) & align)) { if (info_verbose) - printf_filtered (_("Using PIC (Position Independent Code) " - "prelink displacement %s for \"%s\".\n"), - paddress (target_gdbarch (), l_addr), - so->so_name); + gdb_printf (_("Using PIC (Position Independent Code) " + "prelink displacement %s for \"%s\".\n"), + paddress (target_gdbarch (), l_addr), + so->so_name); } else { @@ -2834,10 +2834,10 @@ svr4_exec_displacement (CORE_ADDR *displacementp) the executable symbols/file has been already relocated to displacement. */ - printf_filtered (_("Using PIE (Position Independent Executable) " - "displacement %s for \"%s\".\n"), - paddress (target_gdbarch (), exec_displacement), - bfd_get_filename (current_program_space->exec_bfd ())); + gdb_printf (_("Using PIE (Position Independent Executable) " + "displacement %s for \"%s\".\n"), + paddress (target_gdbarch (), exec_displacement), + bfd_get_filename (current_program_space->exec_bfd ())); } *displacementp = exec_displacement; diff --git a/gdb/solib.c b/gdb/solib.c index 935341d..c64ef8c 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -106,9 +106,9 @@ static void show_solib_search_path (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The search path for loading non-absolute " - "shared library symbol files is %s.\n"), - value); + gdb_printf (file, _("The search path for loading non-absolute " + "shared library symbol files is %s.\n"), + value); } /* Same as HAVE_DOS_BASED_FILE_SYSTEM, but useable as an rvalue. */ @@ -1022,11 +1022,11 @@ solib_add (const char *pattern, int from_tty, int readsyms) { if (pattern != NULL) { - printf_filtered (_("Loading symbols for shared libraries: %s\n"), - pattern); + gdb_printf (_("Loading symbols for shared libraries: %s\n"), + pattern); } else - printf_filtered (_("Loading symbols for shared libraries.\n")); + gdb_printf (_("Loading symbols for shared libraries.\n")); } current_program_space->solib_add_generation++; @@ -1071,8 +1071,8 @@ solib_add (const char *pattern, int from_tty, int readsyms) /* If no pattern was given, be quiet for shared libraries we have already loaded. */ if (pattern && (from_tty || info_verbose)) - printf_filtered (_("Symbols already loaded for %s\n"), - gdb->so_name); + gdb_printf (_("Symbols already loaded for %s\n"), + gdb->so_name); } else if (solib_read_symbols (gdb, add_flags)) loaded_any_symbols = true; @@ -1083,7 +1083,7 @@ solib_add (const char *pattern, int from_tty, int readsyms) breakpoint_re_set (); if (from_tty && pattern && ! any_matches) - printf_filtered + gdb_printf ("No loaded shared libraries match the pattern `%s'.\n", pattern); if (loaded_any_symbols) @@ -1359,7 +1359,7 @@ static void reload_shared_libraries_1 (int from_tty) { if (print_symbol_loading_p (from_tty, 0, 0)) - printf_filtered (_("Loading symbols for shared libraries.\n")); + gdb_printf (_("Loading symbols for shared libraries.\n")); for (struct so_list *so : current_program_space->solibs ()) { @@ -1503,8 +1503,8 @@ static void show_auto_solib_add (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Autoloading of shared library symbols is %s.\n"), - value); + gdb_printf (file, _("Autoloading of shared library symbols is %s.\n"), + value); } diff --git a/gdb/source-cache.c b/gdb/source-cache.c index bfd4760..3f0683b 100644 --- a/gdb/source-cache.c +++ b/gdb/source-cache.c @@ -60,9 +60,9 @@ show_use_gnu_source_highlight_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Use of GNU Source Highlight library is \"%s\".\n"), - value); + gdb_printf (file, + _("Use of GNU Source Highlight library is \"%s\".\n"), + value); } /* The "maint set gnu-source-highlight enabled" command. */ @@ -373,7 +373,7 @@ static void source_cache_flush_command (const char *command, int from_tty) { forget_cached_source_info (); - printf_filtered (_("Source cache flushed.\n")); + gdb_printf (_("Source cache flushed.\n")); } #if GDB_SELF_TEST diff --git a/gdb/source.c b/gdb/source.c index 8901c19..954f479 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -128,10 +128,10 @@ static void show_lines_to_list (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Number of source lines gdb " - "will list by default is %s.\n"), - value); + gdb_printf (file, + _("Number of source lines gdb " + "will list by default is %s.\n"), + value); } /* Possible values of 'set filename-display'. */ @@ -152,7 +152,7 @@ static void show_filename_display_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Filenames are displayed as \"%s\".\n"), value); + gdb_printf (file, _("Filenames are displayed as \"%s\".\n"), value); } /* When true GDB will stat and open source files as required, but when @@ -166,7 +166,7 @@ static void show_source_open (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Source opening is \"%s\".\n"), value); + gdb_printf (file, _("Source opening is \"%s\".\n"), value); } /* Line number of last line printed. Default for various commands. @@ -616,7 +616,7 @@ add_path (const char *dirname, char **which_path, int parse_separators) { int save_errno = errno; - fprintf_unfiltered (gdb_stderr, "Warning: "); + gdb_printf (gdb_stderr, "Warning: "); print_sys_errmsg (name, save_errno); } else if ((st.st_mode & S_IFMT) != S_IFDIR) @@ -707,31 +707,31 @@ info_source_command (const char *ignore, int from_tty) if (!s) { - printf_filtered (_("No current source file.\n")); + gdb_printf (_("No current source file.\n")); return; } cust = s->compunit (); - printf_filtered (_("Current source file is %s\n"), s->filename); + gdb_printf (_("Current source file is %s\n"), s->filename); if (s->dirname () != NULL) - printf_filtered (_("Compilation directory is %s\n"), s->dirname ()); + gdb_printf (_("Compilation directory is %s\n"), s->dirname ()); if (s->fullname) - printf_filtered (_("Located in %s\n"), s->fullname); + gdb_printf (_("Located in %s\n"), s->fullname); const std::vector<off_t> *offsets; if (g_source_cache.get_line_charpos (s, &offsets)) - printf_filtered (_("Contains %d line%s.\n"), (int) offsets->size (), - offsets->size () == 1 ? "" : "s"); - - printf_filtered (_("Source language is %s.\n"), - language_str (s->language ())); - printf_filtered (_("Producer is %s.\n"), - (cust->producer ()) != nullptr - ? cust->producer () : _("unknown")); - printf_filtered (_("Compiled with %s debugging format.\n"), - cust->debugformat ()); - printf_filtered (_("%s preprocessor macro info.\n"), - (cust->macro_table () != nullptr - ? "Includes" : "Does not include")); + gdb_printf (_("Contains %d line%s.\n"), (int) offsets->size (), + offsets->size () == 1 ? "" : "s"); + + gdb_printf (_("Source language is %s.\n"), + language_str (s->language ())); + gdb_printf (_("Producer is %s.\n"), + (cust->producer ()) != nullptr + ? cust->producer () : _("unknown")); + gdb_printf (_("Compiled with %s debugging format.\n"), + cust->debugformat ()); + gdb_printf (_("%s preprocessor macro info.\n"), + (cust->macro_table () != nullptr + ? "Includes" : "Does not include")); } @@ -1542,19 +1542,19 @@ info_line_command (const char *arg, int from_tty) { struct gdbarch *gdbarch = get_current_arch (); - printf_filtered (_("No line number information available")); + gdb_printf (_("No line number information available")); if (sal.pc != 0) { /* This is useful for "info line *0x7f34". If we can't tell the user about a source line, at least let them have the symbolic address. */ - printf_filtered (" for address "); + gdb_printf (" for address "); gdb_stdout->wrap_here (2); print_address (gdbarch, sal.pc, gdb_stdout); } else - printf_filtered ("."); - printf_filtered ("\n"); + gdb_printf ("."); + gdb_printf ("\n"); } else if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc)) @@ -1563,27 +1563,27 @@ info_line_command (const char *arg, int from_tty) if (start_pc == end_pc) { - printf_filtered ("Line %d of \"%s\"", - sal.line, - symtab_to_filename_for_display (sal.symtab)); + gdb_printf ("Line %d of \"%s\"", + sal.line, + symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); - printf_filtered (" is at address "); + gdb_printf (" is at address "); print_address (gdbarch, start_pc, gdb_stdout); gdb_stdout->wrap_here (2); - printf_filtered (" but contains no code.\n"); + gdb_printf (" but contains no code.\n"); } else { - printf_filtered ("Line %d of \"%s\"", - sal.line, - symtab_to_filename_for_display (sal.symtab)); + gdb_printf ("Line %d of \"%s\"", + sal.line, + symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); - printf_filtered (" starts at address "); + gdb_printf (" starts at address "); print_address (gdbarch, start_pc, gdb_stdout); gdb_stdout->wrap_here (2); - printf_filtered (" and ends at "); + gdb_printf (" and ends at "); print_address (gdbarch, end_pc, gdb_stdout); - printf_filtered (".\n"); + gdb_printf (".\n"); } /* x/i should display this line's code. */ @@ -1601,8 +1601,8 @@ info_line_command (const char *arg, int from_tty) /* Is there any case in which we get here, and have an address which the user would want to see? If we have debugging symbols and no line numbers? */ - printf_filtered (_("Line number %d is out of range for \"%s\".\n"), - sal.line, symtab_to_filename_for_display (sal.symtab)); + gdb_printf (_("Line number %d is out of range for \"%s\".\n"), + sal.line, symtab_to_filename_for_display (sal.symtab)); } } @@ -1699,7 +1699,7 @@ search_command_helper (const char *regex, int from_tty, bool forward) } } - printf_filtered (_("Expression not found\n")); + gdb_printf (_("Expression not found\n")); } static void @@ -1757,16 +1757,16 @@ show_substitute_path_command (const char *args, int from_tty) /* Print the substitution rules. */ if (from != NULL) - printf_filtered + gdb_printf (_("Source path substitution rule matching `%s':\n"), from); else - printf_filtered (_("List of all source path substitution rules:\n")); + gdb_printf (_("List of all source path substitution rules:\n")); for (substitute_path_rule &rule : substitute_path_rules) { if (from == NULL || substitute_path_rule_matches (&rule, from) != 0) - printf_filtered (" `%s' -> `%s'.\n", rule.from.c_str (), - rule.to.c_str ()); + gdb_printf (" `%s' -> `%s'.\n", rule.from.c_str (), + rule.to.c_str ()); } } diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 7d9b313..95496d3 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -389,19 +389,19 @@ adi_print_versions (CORE_ADDR vaddr, size_t cnt, gdb_byte *tags) while (cnt > 0) { QUIT; - printf_filtered ("%s:\t", - paddress (target_gdbarch (), vaddr * adi_stat.blksize)); + gdb_printf ("%s:\t", + paddress (target_gdbarch (), vaddr * adi_stat.blksize)); for (int i = maxelts; i > 0 && cnt > 0; i--, cnt--) { if (tags[v_idx] == 0xff) /* no version tag */ - printf_filtered ("-"); + gdb_printf ("-"); else - printf_filtered ("%1X", tags[v_idx]); + gdb_printf ("%1X", tags[v_idx]); if (cnt > 1) - printf_filtered (" "); + gdb_printf (" "); ++v_idx; } - printf_filtered ("\n"); + gdb_printf ("\n"); vaddr += maxelts; } } diff --git a/gdb/stack.c b/gdb/stack.c index f956704..3a6a01b 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -399,8 +399,8 @@ print_frame_nameless_args (struct frame_info *frame, long start, int num, arg_value = read_memory_integer (argsaddr + start, sizeof (int), byte_order); if (!first) - fprintf_filtered (stream, ", "); - fprintf_filtered (stream, "%ld", arg_value); + gdb_printf (stream, ", "); + gdb_printf (stream, "%ld", arg_value); first = 0; start += sizeof (int); } @@ -949,10 +949,10 @@ show_disassemble_next_line (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Debugger's willingness to use " - "disassemble-next-line is %s.\n"), - value); + gdb_printf (file, + _("Debugger's willingness to use " + "disassemble-next-line is %s.\n"), + value); } /* Use TRY_CATCH to catch the exception from the gdb_disassembly @@ -1542,16 +1542,16 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) if (selected_frame_p && frame_relative_level (fi) >= 0) { - printf_filtered (_("Stack level %d, frame at "), - frame_relative_level (fi)); + gdb_printf (_("Stack level %d, frame at "), + frame_relative_level (fi)); } else { - printf_filtered (_("Stack frame at ")); + gdb_printf (_("Stack frame at ")); } gdb_puts (paddress (gdbarch, get_frame_base (fi))); - printf_filtered (":\n"); - printf_filtered (" %s = ", pc_regname); + gdb_printf (":\n"); + gdb_printf (" %s = ", pc_regname); if (frame_pc_p) gdb_puts (paddress (gdbarch, get_frame_pc (fi))); else @@ -1560,19 +1560,19 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) gdb_stdout->wrap_here (3); if (funname) { - printf_filtered (" in "); + gdb_printf (" in "); gdb_puts (funname); } gdb_stdout->wrap_here (3); if (sal.symtab) - printf_filtered + gdb_printf (" (%ps:%d)", styled_string (file_name_style.style (), symtab_to_filename_for_display (sal.symtab)), sal.line); gdb_puts ("; "); gdb_stdout->wrap_here (4); - printf_filtered ("saved %s = ", pc_regname); + gdb_printf ("saved %s = ", pc_regname); if (!frame_id_p (frame_unwind_caller_id (fi))) val_print_not_saved (gdb_stdout); @@ -1604,7 +1604,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) if (caller_pc_p) gdb_puts (paddress (gdbarch, caller_pc)); - printf_filtered ("\n"); + gdb_printf ("\n"); if (calling_frame_info == NULL) { @@ -1612,17 +1612,17 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) reason = get_frame_unwind_stop_reason (fi); if (reason != UNWIND_NO_REASON) - printf_filtered (_(" Outermost frame: %s\n"), - frame_stop_reason_string (fi)); + gdb_printf (_(" Outermost frame: %s\n"), + frame_stop_reason_string (fi)); } else if (get_frame_type (fi) == TAILCALL_FRAME) gdb_puts (" tail call frame"); else if (get_frame_type (fi) == INLINE_FRAME) - printf_filtered (" inlined into frame %d", - frame_relative_level (get_prev_frame (fi))); + gdb_printf (" inlined into frame %d", + frame_relative_level (get_prev_frame (fi))); else { - printf_filtered (" called by frame at "); + gdb_printf (" called by frame at "); gdb_puts (paddress (gdbarch, get_frame_base (calling_frame_info))); } if (get_next_frame (fi) && calling_frame_info) @@ -1630,15 +1630,15 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) gdb_stdout->wrap_here (3); if (get_next_frame (fi)) { - printf_filtered (" caller of frame at "); + gdb_printf (" caller of frame at "); gdb_puts (paddress (gdbarch, get_frame_base (get_next_frame (fi)))); } if (get_next_frame (fi) || calling_frame_info) gdb_puts ("\n"); if (s) - printf_filtered (" source language %s.\n", - language_str (s->language ())); + gdb_printf (" source language %s.\n", + language_str (s->language ())); { /* Address of the argument list for this frame, or 0. */ @@ -1647,12 +1647,12 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) int numargs; if (arg_list == 0) - printf_filtered (" Arglist at unknown address.\n"); + gdb_printf (" Arglist at unknown address.\n"); else { - printf_filtered (" Arglist at "); + gdb_printf (" Arglist at "); gdb_puts (paddress (gdbarch, arg_list)); - printf_filtered (","); + gdb_printf (","); if (!gdbarch_frame_num_args_p (gdbarch)) { @@ -1668,7 +1668,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) else if (numargs == 1) gdb_puts (" 1 arg: "); else - printf_filtered (" %d args: ", numargs); + gdb_printf (" %d args: ", numargs); } print_frame_args (user_frame_print_options, func, fi, numargs, gdb_stdout); @@ -1680,12 +1680,12 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) CORE_ADDR arg_list = get_frame_locals_address (fi); if (arg_list == 0) - printf_filtered (" Locals at unknown address,"); + gdb_printf (" Locals at unknown address,"); else { - printf_filtered (" Locals at "); + gdb_printf (" Locals at "); gdb_puts (paddress (gdbarch, arg_list)); - printf_filtered (","); + gdb_printf (","); } } @@ -1718,21 +1718,21 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) sp = extract_unsigned_integer (value_contents_all (value).data (), sp_size, byte_order); - printf_filtered (" Previous frame's sp is "); + gdb_printf (" Previous frame's sp is "); gdb_puts (paddress (gdbarch, sp)); - printf_filtered ("\n"); + gdb_printf ("\n"); } else if (VALUE_LVAL (value) == lval_memory) { - printf_filtered (" Previous frame's sp at "); + gdb_printf (" Previous frame's sp at "); gdb_puts (paddress (gdbarch, value_address (value))); - printf_filtered ("\n"); + gdb_printf ("\n"); } else if (VALUE_LVAL (value) == lval_register) { - printf_filtered (" Previous frame's sp in %s\n", - gdbarch_register_name (gdbarch, - VALUE_REGNUM (value))); + gdb_printf (" Previous frame's sp in %s\n", + gdbarch_register_name (gdbarch, + VALUE_REGNUM (value))); } release_value (value); @@ -1766,8 +1766,8 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) else gdb_puts (","); gdb_stdout->wrap_here (1); - printf_filtered (" %s at ", - gdbarch_register_name (gdbarch, i)); + gdb_printf (" %s at ", + gdbarch_register_name (gdbarch, i)); gdb_puts (paddress (gdbarch, addr)); count++; } @@ -2089,7 +2089,7 @@ backtrace_command_1 (const frame_print_options &fp_opts, /* If we've stopped before the end, mention that. */ if (fi && from_tty) - printf_filtered (_("(More stack frames follow...)\n")); + gdb_printf (_("(More stack frames follow...)\n")); /* If we've run out of frames, and the reason appears to be an error condition, print it. */ @@ -2099,8 +2099,8 @@ backtrace_command_1 (const frame_print_options &fp_opts, reason = get_frame_unwind_stop_reason (trailing); if (reason >= UNWIND_FIRST_ERROR) - printf_filtered (_("Backtrace stopped: %s\n"), - frame_stop_reason_string (trailing)); + gdb_printf (_("Backtrace stopped: %s\n"), + frame_stop_reason_string (trailing)); } } } @@ -2366,8 +2366,8 @@ print_frame_local_vars (struct frame_info *frame, if (!get_frame_pc_if_available (frame, &pc)) { if (!quiet) - fprintf_filtered (stream, - _("PC unavailable, cannot determine locals.\n")); + gdb_printf (stream, + _("PC unavailable, cannot determine locals.\n")); return; } @@ -2375,7 +2375,7 @@ print_frame_local_vars (struct frame_info *frame, if (block == 0) { if (!quiet) - fprintf_filtered (stream, "No symbol table info available.\n"); + gdb_printf (stream, "No symbol table info available.\n"); return; } @@ -2397,9 +2397,9 @@ print_frame_local_vars (struct frame_info *frame, if (!cb_data.values_printed && !quiet) { if (regexp == NULL && t_regexp == NULL) - fprintf_filtered (stream, _("No locals.\n")); + gdb_printf (stream, _("No locals.\n")); else - fprintf_filtered (stream, _("No matching locals.\n")); + gdb_printf (stream, _("No matching locals.\n")); } } @@ -2534,8 +2534,8 @@ print_frame_arg_vars (struct frame_info *frame, if (!get_frame_pc_if_available (frame, &pc)) { if (!quiet) - fprintf_filtered (stream, - _("PC unavailable, cannot determine args.\n")); + gdb_printf (stream, + _("PC unavailable, cannot determine args.\n")); return; } @@ -2543,7 +2543,7 @@ print_frame_arg_vars (struct frame_info *frame, if (func == NULL) { if (!quiet) - fprintf_filtered (stream, _("No symbol table info available.\n")); + gdb_printf (stream, _("No symbol table info available.\n")); return; } @@ -2562,9 +2562,9 @@ print_frame_arg_vars (struct frame_info *frame, if (!cb_data.values_printed && !quiet) { if (regexp == NULL && t_regexp == NULL) - fprintf_filtered (stream, _("No arguments.\n")); + gdb_printf (stream, _("No arguments.\n")); else - fprintf_filtered (stream, _("No matching arguments.\n")); + gdb_printf (stream, _("No matching arguments.\n")); } } @@ -3031,7 +3031,7 @@ frame_apply_command_count (const char *which_command, { if (!flags.quiet) print_stack_frame (fi, 1, LOCATION, 0); - printf_filtered ("%s", cmd_result.c_str ()); + gdb_printf ("%s", cmd_result.c_str ()); } } catch (const gdb_exception_error &ex) @@ -3043,7 +3043,7 @@ frame_apply_command_count (const char *which_command, if (!flags.quiet) print_stack_frame (fi, 1, LOCATION, 0); if (flags.cont) - printf_filtered ("%s\n", ex.what ()); + gdb_printf ("%s\n", ex.what ()); else throw; } diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index 436ff4d..8488ddb 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -281,8 +281,8 @@ static void show_stapexpressiondebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("SystemTap Probe expression debugging is %s.\n"), - value); + gdb_printf (file, _("SystemTap Probe expression debugging is %s.\n"), + value); } /* Returns the operator precedence level of OP, or STAP_OPERAND_PREC_NONE diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index f1a8f5e..efceef3 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -94,8 +94,8 @@ objfile::has_partial_symbols () } if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->has_symbols (%s) = %d\n", - objfile_debug_name (this), retval); + gdb_printf (gdb_stdlog, "qf->has_symbols (%s) = %d\n", + objfile_debug_name (this), retval); return retval; } @@ -105,8 +105,8 @@ bool objfile::has_unexpanded_symtabs () { if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->has_unexpanded_symtabs (%s)\n", - objfile_debug_name (this)); + gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s)\n", + objfile_debug_name (this)); bool result = false; for (const auto &iter : qf) @@ -119,8 +119,8 @@ objfile::has_unexpanded_symtabs () } if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->has_unexpanded_symtabs (%s) = %d\n", - objfile_debug_name (this), (result ? 1 : 0)); + gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s) = %d\n", + objfile_debug_name (this), (result ? 1 : 0)); return result; } @@ -131,8 +131,8 @@ objfile::find_last_source_symtab () struct symtab *retval = nullptr; if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->find_last_source_symtab (%s)\n", - objfile_debug_name (this)); + gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (%s)\n", + objfile_debug_name (this)); for (const auto &iter : qf) { @@ -142,8 +142,8 @@ objfile::find_last_source_symtab () } if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->find_last_source_symtab (...) = %s\n", - retval ? debug_symtab_name (retval) : "NULL"); + gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (...) = %s\n", + retval ? debug_symtab_name (retval) : "NULL"); return retval; } @@ -152,8 +152,8 @@ void objfile::forget_cached_source_info () { if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->forget_cached_source_info (%s)\n", - objfile_debug_name (this)); + gdb_printf (gdb_stdlog, "qf->forget_cached_source_info (%s)\n", + objfile_debug_name (this)); for (const auto &iter : qf) iter->forget_cached_source_info (this); @@ -165,12 +165,12 @@ objfile::map_symtabs_matching_filename gdb::function_view<bool (symtab *)> callback) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->map_symtabs_matching_filename (%s, \"%s\", " - "\"%s\", %s)\n", - objfile_debug_name (this), name, - real_path ? real_path : NULL, - host_address_to_string (&callback)); + gdb_printf (gdb_stdlog, + "qf->map_symtabs_matching_filename (%s, \"%s\", " + "\"%s\", %s)\n", + objfile_debug_name (this), name, + real_path ? real_path : NULL, + host_address_to_string (&callback)); bool retval = true; const char *name_basename = lbasename (name); @@ -220,9 +220,9 @@ objfile::map_symtabs_matching_filename } if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->map_symtabs_matching_filename (...) = %d\n", - retval); + gdb_printf (gdb_stdlog, + "qf->map_symtabs_matching_filename (...) = %d\n", + retval); /* We must re-invert the return value here to match the caller's expectations. */ @@ -235,10 +235,10 @@ objfile::lookup_symbol (block_enum kind, const char *name, domain_enum domain) struct compunit_symtab *retval = nullptr; if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->lookup_symbol (%s, %d, \"%s\", %s)\n", - objfile_debug_name (this), kind, name, - domain_name (domain)); + gdb_printf (gdb_stdlog, + "qf->lookup_symbol (%s, %d, \"%s\", %s)\n", + objfile_debug_name (this), kind, name, + domain_name (domain)); lookup_name_info lookup_name (name, symbol_name_match_type::FULL); @@ -287,10 +287,10 @@ objfile::lookup_symbol (block_enum kind, const char *name, domain_enum domain) } if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->lookup_symbol (...) = %s\n", - retval - ? debug_symtab_name (retval->primary_filetab ()) - : "NULL"); + gdb_printf (gdb_stdlog, "qf->lookup_symbol (...) = %s\n", + retval + ? debug_symtab_name (retval->primary_filetab ()) + : "NULL"); return retval; } @@ -299,8 +299,8 @@ void objfile::print_stats (bool print_bcache) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->print_stats (%s, %d)\n", - objfile_debug_name (this), print_bcache); + gdb_printf (gdb_stdlog, "qf->print_stats (%s, %d)\n", + objfile_debug_name (this), print_bcache); for (const auto &iter : qf) iter->print_stats (this, print_bcache); @@ -310,8 +310,8 @@ void objfile::dump () { if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->dump (%s)\n", - objfile_debug_name (this)); + gdb_printf (gdb_stdlog, "qf->dump (%s)\n", + objfile_debug_name (this)); for (const auto &iter : qf) iter->dump (this); @@ -321,9 +321,9 @@ void objfile::expand_symtabs_for_function (const char *func_name) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->expand_symtabs_for_function (%s, \"%s\")\n", - objfile_debug_name (this), func_name); + gdb_printf (gdb_stdlog, + "qf->expand_symtabs_for_function (%s, \"%s\")\n", + objfile_debug_name (this), func_name); lookup_name_info base_lookup (func_name, symbol_name_match_type::FULL); lookup_name_info lookup_name = base_lookup.make_ignore_params (); @@ -344,8 +344,8 @@ void objfile::expand_all_symtabs () { if (debug_symfile) - fprintf_filtered (gdb_stdlog, "qf->expand_all_symtabs (%s)\n", - objfile_debug_name (this)); + gdb_printf (gdb_stdlog, "qf->expand_all_symtabs (%s)\n", + objfile_debug_name (this)); for (const auto &iter : qf) iter->expand_all_symtabs (this); @@ -355,9 +355,9 @@ void objfile::expand_symtabs_with_fullname (const char *fullname) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->expand_symtabs_with_fullname (%s, \"%s\")\n", - objfile_debug_name (this), fullname); + gdb_printf (gdb_stdlog, + "qf->expand_symtabs_with_fullname (%s, \"%s\")\n", + objfile_debug_name (this), fullname); const char *basename = lbasename (fullname); auto file_matcher = [&] (const char *filename, bool basenames) @@ -384,11 +384,11 @@ objfile::expand_matching_symbols symbol_compare_ftype *ordered_compare) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->expand_matching_symbols (%s, %s, %d, %s)\n", - objfile_debug_name (this), - domain_name (domain), global, - host_address_to_string (ordered_compare)); + gdb_printf (gdb_stdlog, + "qf->expand_matching_symbols (%s, %s, %d, %s)\n", + objfile_debug_name (this), + domain_name (domain), global, + host_address_to_string (ordered_compare)); for (const auto &iter : qf) iter->expand_matching_symbols (this, name, domain, global, @@ -409,13 +409,13 @@ objfile::expand_symtabs_matching gdb_assert (lookup_name != nullptr || symbol_matcher == nullptr); if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n", - objfile_debug_name (this), - host_address_to_string (&file_matcher), - host_address_to_string (&symbol_matcher), - host_address_to_string (&expansion_notify), - search_domain_name (kind)); + gdb_printf (gdb_stdlog, + "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n", + objfile_debug_name (this), + host_address_to_string (&file_matcher), + host_address_to_string (&symbol_matcher), + host_address_to_string (&expansion_notify), + search_domain_name (kind)); for (const auto &iter : qf) if (!iter->expand_symtabs_matching (this, file_matcher, lookup_name, @@ -434,13 +434,13 @@ objfile::find_pc_sect_compunit_symtab (struct bound_minimal_symbol msymbol, struct compunit_symtab *retval = nullptr; if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n", - objfile_debug_name (this), - host_address_to_string (msymbol.minsym), - hex_string (pc), - host_address_to_string (section), - warn_if_readin); + gdb_printf (gdb_stdlog, + "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n", + objfile_debug_name (this), + host_address_to_string (msymbol.minsym), + hex_string (pc), + host_address_to_string (section), + warn_if_readin); for (const auto &iter : qf) { @@ -451,11 +451,11 @@ objfile::find_pc_sect_compunit_symtab (struct bound_minimal_symbol msymbol, } if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->find_pc_sect_compunit_symtab (...) = %s\n", - retval - ? debug_symtab_name (retval->primary_filetab ()) - : "NULL"); + gdb_printf (gdb_stdlog, + "qf->find_pc_sect_compunit_symtab (...) = %s\n", + retval + ? debug_symtab_name (retval->primary_filetab ()) + : "NULL"); return retval; } @@ -465,10 +465,10 @@ objfile::map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun, bool need_fullname) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->map_symbol_filenames (%s, ..., %d)\n", - objfile_debug_name (this), - need_fullname); + gdb_printf (gdb_stdlog, + "qf->map_symbol_filenames (%s, ..., %d)\n", + objfile_debug_name (this), + need_fullname); for (const auto &iter : qf) iter->map_symbol_filenames (this, fun, need_fullname); @@ -478,10 +478,10 @@ struct compunit_symtab * objfile::find_compunit_symtab_by_address (CORE_ADDR address) { if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->find_compunit_symtab_by_address (%s, %s)\n", - objfile_debug_name (this), - hex_string (address)); + gdb_printf (gdb_stdlog, + "qf->find_compunit_symtab_by_address (%s, %s)\n", + objfile_debug_name (this), + hex_string (address)); struct compunit_symtab *result = NULL; for (const auto &iter : qf) @@ -492,11 +492,11 @@ objfile::find_compunit_symtab_by_address (CORE_ADDR address) } if (debug_symfile) - fprintf_filtered (gdb_stdlog, - "qf->find_compunit_symtab_by_address (...) = %s\n", - result - ? debug_symtab_name (result->primary_filetab ()) - : "NULL"); + gdb_printf (gdb_stdlog, + "qf->find_compunit_symtab_by_address (...) = %s\n", + result + ? debug_symtab_name (result->primary_filetab ()) + : "NULL"); return result; } @@ -534,16 +534,16 @@ objfile::require_partial_symbols (bool verbose) { if (verbose && !printed) { - printf_filtered (_("Reading symbols from %s...\n"), - objfile_name (this)); + gdb_printf (_("Reading symbols from %s...\n"), + objfile_name (this)); printed = true; } iter->read_partial_symbols (this); } } if (printed && !objfile_has_symbols (this)) - printf_filtered (_("(No debugging symbols found in %s)\n"), - objfile_name (this)); + gdb_printf (_("(No debugging symbols found in %s)\n"), + objfile_name (this)); } } @@ -559,10 +559,10 @@ debug_sym_get_probes (struct objfile *objfile) const std::vector<std::unique_ptr<probe>> &retval = debug_data->real_sf->sym_probe_fns->sym_get_probes (objfile); - fprintf_filtered (gdb_stdlog, - "probes->sym_get_probes (%s) = %s\n", - objfile_debug_name (objfile), - host_address_to_string (retval.data ())); + gdb_printf (gdb_stdlog, + "probes->sym_get_probes (%s) = %s\n", + objfile_debug_name (objfile), + host_address_to_string (retval.data ())); return retval; } @@ -580,8 +580,8 @@ debug_sym_new_init (struct objfile *objfile) const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_new_init (%s)\n", - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, "sf->sym_new_init (%s)\n", + objfile_debug_name (objfile)); debug_data->real_sf->sym_new_init (objfile); } @@ -592,8 +592,8 @@ debug_sym_init (struct objfile *objfile) const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_init (%s)\n", - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, "sf->sym_init (%s)\n", + objfile_debug_name (objfile)); debug_data->real_sf->sym_init (objfile); } @@ -604,8 +604,8 @@ debug_sym_read (struct objfile *objfile, symfile_add_flags symfile_flags) const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n", - objfile_debug_name (objfile), (unsigned) symfile_flags); + gdb_printf (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n", + objfile_debug_name (objfile), (unsigned) symfile_flags); debug_data->real_sf->sym_read (objfile, symfile_flags); } @@ -616,8 +616,8 @@ debug_sym_finish (struct objfile *objfile) const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_finish (%s)\n", - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, "sf->sym_finish (%s)\n", + objfile_debug_name (objfile)); debug_data->real_sf->sym_finish (objfile); } @@ -629,9 +629,9 @@ debug_sym_offsets (struct objfile *objfile, const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_offsets (%s, %s)\n", - objfile_debug_name (objfile), - host_address_to_string (&info)); + gdb_printf (gdb_stdlog, "sf->sym_offsets (%s, %s)\n", + objfile_debug_name (objfile), + host_address_to_string (&info)); debug_data->real_sf->sym_offsets (objfile, info); } @@ -651,8 +651,8 @@ debug_sym_read_linetable (struct objfile *objfile) const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); - fprintf_filtered (gdb_stdlog, "sf->sym_read_linetable (%s)\n", - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, "sf->sym_read_linetable (%s)\n", + objfile_debug_name (objfile)); debug_data->real_sf->sym_read_linetable (objfile); } @@ -666,12 +666,12 @@ debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf) retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf); - fprintf_filtered (gdb_stdlog, - "sf->sym_relocate (%s, %s, %s) = %s\n", - objfile_debug_name (objfile), - host_address_to_string (sectp), - host_address_to_string (buf), - host_address_to_string (retval)); + gdb_printf (gdb_stdlog, + "sf->sym_relocate (%s, %s, %s) = %s\n", + objfile_debug_name (objfile), + host_address_to_string (sectp), + host_address_to_string (buf), + host_address_to_string (retval)); return retval; } @@ -797,7 +797,7 @@ static void show_debug_symfile (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Symfile debugging is %s.\n"), value); + gdb_printf (file, _("Symfile debugging is %s.\n"), value); } void _initialize_symfile_debug (); diff --git a/gdb/symfile.c b/gdb/symfile.c index 790ceec..dcd217c 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1082,8 +1082,8 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, if (deprecated_pre_add_symbol_hook) deprecated_pre_add_symbol_hook (name); else - printf_filtered (_("Reading symbols from %ps...\n"), - styled_string (file_name_style.style (), name)); + gdb_printf (_("Reading symbols from %ps...\n"), + styled_string (file_name_style.style (), name)); } syms_from_objfile (objfile, addrs, add_flags); @@ -1095,8 +1095,8 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, if ((flags & OBJF_READNOW)) { if (should_print) - printf_filtered (_("Expanding full symbols from %ps...\n"), - styled_string (file_name_style.style (), name)); + gdb_printf (_("Expanding full symbols from %ps...\n"), + styled_string (file_name_style.style (), name)); objfile->expand_all_symtabs (); } @@ -1107,8 +1107,8 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, file, and so printing it twice is just redundant. */ if (should_print && !objfile_has_symbols (objfile) && objfile->separate_debug_objfile == nullptr) - printf_filtered (_("(No debugging symbols found in %ps)\n"), - styled_string (file_name_style.style (), name)); + gdb_printf (_("(No debugging symbols found in %ps)\n"), + styled_string (file_name_style.style (), name)); if (should_print) { @@ -1235,7 +1235,7 @@ symbol_file_clear (int from_tty) gdb_assert (current_program_space->symfile_object_file == NULL); if (from_tty) - printf_filtered (_("No symbol file now.\n")); + gdb_printf (_("No symbol file now.\n")); } /* See symfile.h. */ @@ -1262,7 +1262,7 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, if (separate_debug_file_debug) { - fprintf_filtered (gdb_stdlog, _(" Trying %s..."), name.c_str ()); + gdb_printf (gdb_stdlog, _(" Trying %s..."), name.c_str ()); gdb_flush (gdb_stdlog); } @@ -1271,7 +1271,7 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, if (abfd == NULL) { if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, _(" no, unable to open.\n")); + gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); return 0; } @@ -1295,8 +1295,8 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, && abfd_stat.st_ino == parent_stat.st_ino) { if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, - _(" no, same file as the objfile.\n")); + gdb_printf (gdb_stdlog, + _(" no, same file as the objfile.\n")); return 0; } @@ -1310,7 +1310,7 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, if (!file_crc_p) { if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, _(" no, error computing CRC.\n")); + gdb_printf (gdb_stdlog, _(" no, error computing CRC.\n")); return 0; } @@ -1328,8 +1328,8 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, if (!gdb_bfd_crc (parent_objfile->obfd, &parent_crc)) { if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, - _(" no, error computing CRC.\n")); + gdb_printf (gdb_stdlog, + _(" no, error computing CRC.\n")); return 0; } @@ -1341,13 +1341,13 @@ separate_debug_file_exists (const std::string &name, unsigned long crc, name.c_str (), objfile_name (parent_objfile)); if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, _(" no, CRC doesn't match.\n")); + gdb_printf (gdb_stdlog, _(" no, CRC doesn't match.\n")); return 0; } if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, _(" yes!\n")); + gdb_printf (gdb_stdlog, _(" yes!\n")); return 1; } @@ -1357,10 +1357,10 @@ static void show_debug_file_directory (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The directory where separate debug " - "symbols are searched for is \"%s\".\n"), - value); + gdb_printf (file, + _("The directory where separate debug " + "symbols are searched for is \"%s\".\n"), + value); } #if ! defined (DEBUG_SUBDIRECTORY) @@ -1382,9 +1382,9 @@ find_separate_debug_file (const char *dir, unsigned long crc32, struct objfile *objfile) { if (separate_debug_file_debug) - fprintf_filtered (gdb_stdlog, - _("\nLooking for separate debug info (debug link) for " - "%s\n"), objfile_name (objfile)); + gdb_printf (gdb_stdlog, + _("\nLooking for separate debug info (debug link) for " + "%s\n"), objfile_name (objfile)); /* First try in the same directory as the original file. */ std::string debugfile = dir; @@ -2277,8 +2277,8 @@ add_symbol_file_command (const char *args, int from_tty) statements because hex_string returns a local static string. */ - printf_filtered (_("add symbol table from file \"%s\""), - filename.get ()); + gdb_printf (_("add symbol table from file \"%s\""), + filename.get ()); section_addr_info section_addrs; std::vector<sect_opt>::const_iterator it = sect_opts.begin (); if (!seen_addr) @@ -2290,7 +2290,7 @@ add_symbol_file_command (const char *args, int from_tty) const char *sec = it->name; if (section_addrs.empty ()) - printf_filtered (_(" at\n")); + gdb_printf (_(" at\n")); addr = parse_and_eval_address (val); /* Here we store the section offsets in the order they were @@ -2300,8 +2300,8 @@ add_symbol_file_command (const char *args, int from_tty) index is not used for any other purpose. */ section_addrs.emplace_back (addr, sec, section_addrs.size ()); - printf_filtered ("\t%s_addr = %s\n", sec, - paddress (gdbarch, addr)); + gdb_printf ("\t%s_addr = %s\n", sec, + paddress (gdbarch, addr)); /* The object's sections are initialized when a call is made to build_objfile_section_table (objfile). @@ -2310,13 +2310,13 @@ add_symbol_file_command (const char *args, int from_tty) so we can't determine what section names are valid. */ } if (seen_offset) - printf_filtered (_("%s offset by %s\n"), - (section_addrs.empty () - ? _(" with all sections") - : _("with other sections")), - paddress (gdbarch, offset)); + gdb_printf (_("%s offset by %s\n"), + (section_addrs.empty () + ? _(" with all sections") + : _("with other sections")), + paddress (gdbarch, offset)); else if (section_addrs.empty ()) - printf_filtered ("\n"); + gdb_printf ("\n"); if (from_tty && (!query ("%s", ""))) error (_("Not confirmed.")); @@ -2442,15 +2442,15 @@ reread_symbols (int from_tty) if (res != 0) { /* FIXME, should use print_sys_errmsg but it's not filtered. */ - printf_filtered (_("`%s' has disappeared; keeping its symbols.\n"), - objfile_name (objfile)); + gdb_printf (_("`%s' has disappeared; keeping its symbols.\n"), + objfile_name (objfile)); continue; } new_modtime = new_statbuf.st_mtime; if (new_modtime != objfile->mtime) { - printf_filtered (_("`%s' has changed; re-reading symbols.\n"), - objfile_name (objfile)); + gdb_printf (_("`%s' has changed; re-reading symbols.\n"), + objfile_name (objfile)); /* There are various functions like symbol_file_add, symfile_bfd_open, syms_from_objfile, etc., which might @@ -2598,9 +2598,9 @@ reread_symbols (int from_tty) const int should_print = (print_symbol_loading_p (from_tty, mainline, 1) && readnow_symbol_files); if (should_print) - printf_filtered (_("Expanding full symbols from %ps...\n"), - styled_string (file_name_style.style (), - objfile_name (objfile))); + gdb_printf (_("Expanding full symbols from %ps...\n"), + styled_string (file_name_style.style (), + objfile_name (objfile))); objfile->expand_all_symtabs (); } @@ -2608,7 +2608,7 @@ reread_symbols (int from_tty) if (!objfile_has_symbols (objfile)) { gdb_stdout->wrap_here (0); - printf_filtered (_("(no debugging symbols found)\n")); + gdb_printf (_("(no debugging symbols found)\n")); gdb_stdout->wrap_here (0); } @@ -2677,10 +2677,10 @@ static void show_ext_args (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Mapping between filename extension " - "and source language is \"%s\".\n"), - value); + gdb_printf (file, + _("Mapping between filename extension " + "and source language is \"%s\".\n"), + value); } static void @@ -2745,11 +2745,11 @@ set_ext_lang_command (const char *args, static void info_ext_lang_command (const char *args, int from_tty) { - printf_filtered (_("Filename extensions and the languages they represent:")); - printf_filtered ("\n\n"); + gdb_printf (_("Filename extensions and the languages they represent:")); + gdb_printf ("\n\n"); for (const filename_language &entry : filename_language_table) - printf_filtered ("\t%s\t- %s\n", entry.ext.c_str (), - language_str (entry.lang)); + gdb_printf ("\t%s\t- %s\n", entry.ext.c_str (), + language_str (entry.lang)); } enum language @@ -2794,13 +2794,13 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename) if (last_objfile_name.empty () || last_objfile_name != this_objfile_name) { last_objfile_name = this_objfile_name; - fprintf_filtered (gdb_stdlog, - "Creating one or more symtabs for objfile %s ...\n", - this_objfile_name); + gdb_printf (gdb_stdlog, + "Creating one or more symtabs for objfile %s ...\n", + this_objfile_name); } - fprintf_filtered (gdb_stdlog, - "Created symtab %s for module %s.\n", - host_address_to_string (symtab), filename); + gdb_printf (gdb_stdlog, + "Created symtab %s for module %s.\n", + host_address_to_string (symtab), filename); } /* Add it to CUST's list of symtabs. */ @@ -2835,10 +2835,10 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) if (symtab_create_debug) { - fprintf_filtered (gdb_stdlog, - "Created compunit symtab %s for %s.\n", - host_address_to_string (cu), - cu->name); + gdb_printf (gdb_stdlog, + "Created compunit symtab %s for %s.\n", + host_address_to_string (cu), + cu->name); } return cu; @@ -3201,11 +3201,11 @@ list_overlays_command (const char *args, int from_tty) size = bfd_section_size (osect->the_bfd_section); name = bfd_section_name (osect->the_bfd_section); - printf_filtered ("Section %s, loaded at ", name); + gdb_printf ("Section %s, loaded at ", name); gdb_puts (paddress (gdbarch, lma)); gdb_puts (" - "); gdb_puts (paddress (gdbarch, lma + size)); - printf_filtered (", mapped at "); + gdb_printf (", mapped at "); gdb_puts (paddress (gdbarch, vma)); gdb_puts (" - "); gdb_puts (paddress (gdbarch, vma + size)); @@ -3215,7 +3215,7 @@ list_overlays_command (const char *args, int from_tty) } } if (nmapped == 0) - printf_filtered (_("No sections are mapped.\n")); + gdb_printf (_("No sections are mapped.\n")); } /* Function: map_overlay_command @@ -3254,8 +3254,8 @@ map_overlay_command (const char *args, int from_tty) sec2)) { if (info_verbose) - printf_filtered (_("Note: section %s unmapped by overlap\n"), - bfd_section_name (sec2->the_bfd_section)); + gdb_printf (_("Note: section %s unmapped by overlap\n"), + bfd_section_name (sec2->the_bfd_section)); sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2. */ } return; @@ -3303,7 +3303,7 @@ overlay_auto_command (const char *args, int from_tty) overlay_debugging = ovly_auto; enable_overlay_breakpoints (); if (info_verbose) - printf_filtered (_("Automatic overlay debugging enabled.")); + gdb_printf (_("Automatic overlay debugging enabled.")); } /* Function: overlay_manual_command @@ -3316,7 +3316,7 @@ overlay_manual_command (const char *args, int from_tty) overlay_debugging = ovly_on; disable_overlay_breakpoints (); if (info_verbose) - printf_filtered (_("Overlay debugging enabled.")); + gdb_printf (_("Overlay debugging enabled.")); } /* Function: overlay_off_command @@ -3329,7 +3329,7 @@ overlay_off_command (const char *args, int from_tty) overlay_debugging = ovly_off; disable_overlay_breakpoints (); if (info_verbose) - printf_filtered (_("Overlay debugging disabled.")); + gdb_printf (_("Overlay debugging disabled.")); } static void diff --git a/gdb/symmisc.c b/gdb/symmisc.c index e77f8ff..8de20d6 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -57,19 +57,19 @@ print_objfile_statistics (void) for (objfile *objfile : pspace->objfiles ()) { QUIT; - printf_filtered (_("Statistics for '%s':\n"), objfile_name (objfile)); + gdb_printf (_("Statistics for '%s':\n"), objfile_name (objfile)); if (OBJSTAT (objfile, n_stabs) > 0) - printf_filtered (_(" Number of \"stab\" symbols read: %d\n"), - OBJSTAT (objfile, n_stabs)); + gdb_printf (_(" Number of \"stab\" symbols read: %d\n"), + OBJSTAT (objfile, n_stabs)); if (objfile->per_bfd->n_minsyms > 0) - printf_filtered (_(" Number of \"minimal\" symbols read: %d\n"), - objfile->per_bfd->n_minsyms); + gdb_printf (_(" Number of \"minimal\" symbols read: %d\n"), + objfile->per_bfd->n_minsyms); if (OBJSTAT (objfile, n_syms) > 0) - printf_filtered (_(" Number of \"full\" symbols read: %d\n"), - OBJSTAT (objfile, n_syms)); + gdb_printf (_(" Number of \"full\" symbols read: %d\n"), + OBJSTAT (objfile, n_syms)); if (OBJSTAT (objfile, n_types) > 0) - printf_filtered (_(" Number of \"types\" defined: %d\n"), - OBJSTAT (objfile, n_types)); + gdb_printf (_(" Number of \"types\" defined: %d\n"), + OBJSTAT (objfile, n_types)); i = linetables = 0; for (compunit_symtab *cu : objfile->compunits ()) @@ -83,28 +83,28 @@ print_objfile_statistics (void) } blockvectors = std::distance (objfile->compunits ().begin (), objfile->compunits ().end ()); - printf_filtered (_(" Number of symbol tables: %d\n"), i); - printf_filtered (_(" Number of symbol tables with line tables: %d\n"), - linetables); - printf_filtered (_(" Number of symbol tables with blockvectors: %d\n"), - blockvectors); + gdb_printf (_(" Number of symbol tables: %d\n"), i); + gdb_printf (_(" Number of symbol tables with line tables: %d\n"), + linetables); + gdb_printf (_(" Number of symbol tables with blockvectors: %d\n"), + blockvectors); objfile->print_stats (false); if (OBJSTAT (objfile, sz_strtab) > 0) - printf_filtered (_(" Space used by string tables: %d\n"), - OBJSTAT (objfile, sz_strtab)); - printf_filtered (_(" Total memory used for objfile obstack: %s\n"), - pulongest (obstack_memory_used (&objfile - ->objfile_obstack))); - printf_filtered (_(" Total memory used for BFD obstack: %s\n"), - pulongest (obstack_memory_used (&objfile->per_bfd - ->storage_obstack))); - - printf_filtered (_(" Total memory used for string cache: %d\n"), - objfile->per_bfd->string_cache.memory_used ()); - printf_filtered (_("Byte cache statistics for '%s':\n"), - objfile_name (objfile)); + gdb_printf (_(" Space used by string tables: %d\n"), + OBJSTAT (objfile, sz_strtab)); + gdb_printf (_(" Total memory used for objfile obstack: %s\n"), + pulongest (obstack_memory_used (&objfile + ->objfile_obstack))); + gdb_printf (_(" Total memory used for BFD obstack: %s\n"), + pulongest (obstack_memory_used (&objfile->per_bfd + ->storage_obstack))); + + gdb_printf (_(" Total memory used for string cache: %d\n"), + objfile->per_bfd->string_cache.memory_used ()); + gdb_printf (_("Byte cache statistics for '%s':\n"), + objfile_name (objfile)); objfile->per_bfd->string_cache.print_statistics ("string cache"); objfile->print_stats (true); } @@ -113,30 +113,30 @@ print_objfile_statistics (void) static void dump_objfile (struct objfile *objfile) { - printf_filtered ("\nObject file %s: ", objfile_name (objfile)); - printf_filtered ("Objfile at %s, bfd at %s, %d minsyms\n\n", - host_address_to_string (objfile), - host_address_to_string (objfile->obfd), - objfile->per_bfd->minimal_symbol_count); + gdb_printf ("\nObject file %s: ", objfile_name (objfile)); + gdb_printf ("Objfile at %s, bfd at %s, %d minsyms\n\n", + host_address_to_string (objfile), + host_address_to_string (objfile->obfd), + objfile->per_bfd->minimal_symbol_count); objfile->dump (); if (objfile->compunit_symtabs != NULL) { - printf_filtered ("Symtabs:\n"); + gdb_printf ("Symtabs:\n"); for (compunit_symtab *cu : objfile->compunits ()) { for (symtab *symtab : cu->filetabs ()) { - printf_filtered ("%s at %s", - symtab_to_filename_for_display (symtab), - host_address_to_string (symtab)); + gdb_printf ("%s at %s", + symtab_to_filename_for_display (symtab), + host_address_to_string (symtab)); if (symtab->objfile () != objfile) - printf_filtered (", NOT ON CHAIN!"); - printf_filtered ("\n"); + gdb_printf (", NOT ON CHAIN!"); + gdb_printf ("\n"); } } - printf_filtered ("\n\n"); + gdb_printf ("\n\n"); } } @@ -149,10 +149,10 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) int index; char ms_type; - fprintf_filtered (outfile, "\nObject file %s:\n\n", objfile_name (objfile)); + gdb_printf (outfile, "\nObject file %s:\n\n", objfile_name (objfile)); if (objfile->per_bfd->minimal_symbol_count == 0) { - fprintf_filtered (outfile, "No minimal symbols found.\n"); + gdb_printf (outfile, "No minimal symbols found.\n"); return; } index = 0; @@ -197,29 +197,29 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) ms_type = '?'; break; } - fprintf_filtered (outfile, "[%2d] %c ", index, ms_type); + gdb_printf (outfile, "[%2d] %c ", index, ms_type); /* Use the relocated address as shown in the symbol here -- do not try to respect copy relocations. */ CORE_ADDR addr = (msymbol->value.address + objfile->section_offsets[msymbol->section_index ()]); gdb_puts (paddress (gdbarch, addr), outfile); - fprintf_filtered (outfile, " %s", msymbol->linkage_name ()); + gdb_printf (outfile, " %s", msymbol->linkage_name ()); if (section) { if (section->the_bfd_section != NULL) - fprintf_filtered (outfile, " section %s", - bfd_section_name (section->the_bfd_section)); + gdb_printf (outfile, " section %s", + bfd_section_name (section->the_bfd_section)); else - fprintf_filtered (outfile, " spurious section %ld", - (long) (section - objfile->sections)); + gdb_printf (outfile, " spurious section %ld", + (long) (section - objfile->sections)); } if (msymbol->demangled_name () != NULL) { - fprintf_filtered (outfile, " %s", msymbol->demangled_name ()); + gdb_printf (outfile, " %s", msymbol->demangled_name ()); } if (msymbol->filename) - fprintf_filtered (outfile, " %s", msymbol->filename); + gdb_printf (outfile, " %s", msymbol->filename); gdb_puts ("\n", outfile); index++; } @@ -228,7 +228,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) warning (_("internal error: minimal symbol count %d != %d"), objfile->per_bfd->minimal_symbol_count, index); } - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); } static void @@ -245,70 +245,70 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) const struct block *b; int depth; - fprintf_filtered (outfile, "\nSymtab for file %s at %s\n", - symtab_to_filename_for_display (symtab), - host_address_to_string (symtab)); + gdb_printf (outfile, "\nSymtab for file %s at %s\n", + symtab_to_filename_for_display (symtab), + host_address_to_string (symtab)); if (symtab->dirname () != NULL) - fprintf_filtered (outfile, "Compilation directory is %s\n", - symtab->dirname ()); - fprintf_filtered (outfile, "Read from object file %s (%s)\n", - objfile_name (objfile), - host_address_to_string (objfile)); - fprintf_filtered (outfile, "Language: %s\n", - language_str (symtab->language ())); + gdb_printf (outfile, "Compilation directory is %s\n", + symtab->dirname ()); + gdb_printf (outfile, "Read from object file %s (%s)\n", + objfile_name (objfile), + host_address_to_string (objfile)); + gdb_printf (outfile, "Language: %s\n", + language_str (symtab->language ())); /* First print the line table. */ l = symtab->linetable (); if (l) { - fprintf_filtered (outfile, "\nLine table:\n\n"); + gdb_printf (outfile, "\nLine table:\n\n"); len = l->nitems; for (i = 0; i < len; i++) { - fprintf_filtered (outfile, " line %d at ", l->item[i].line); + gdb_printf (outfile, " line %d at ", l->item[i].line); gdb_puts (paddress (gdbarch, l->item[i].pc), outfile); if (l->item[i].is_stmt) - fprintf_filtered (outfile, "\t(stmt)"); - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\t(stmt)"); + gdb_printf (outfile, "\n"); } } /* Now print the block info, but only for compunit symtabs since we will print lots of duplicate info otherwise. */ if (is_main_symtab_of_compunit_symtab (symtab)) { - fprintf_filtered (outfile, "\nBlockvector:\n\n"); + gdb_printf (outfile, "\nBlockvector:\n\n"); bv = symtab->blockvector (); len = BLOCKVECTOR_NBLOCKS (bv); for (i = 0; i < len; i++) { b = BLOCKVECTOR_BLOCK (bv, i); depth = block_depth (b) * 2; - fprintf_filtered (outfile, "%*sblock #%03d, object at %s", - depth, "", i, - host_address_to_string (b)); + gdb_printf (outfile, "%*sblock #%03d, object at %s", + depth, "", i, + host_address_to_string (b)); if (BLOCK_SUPERBLOCK (b)) - fprintf_filtered (outfile, " under %s", - host_address_to_string (BLOCK_SUPERBLOCK (b))); + gdb_printf (outfile, " under %s", + host_address_to_string (BLOCK_SUPERBLOCK (b))); /* drow/2002-07-10: We could save the total symbols count even if we're using a hashtable, but nothing else but this message wants it. */ - fprintf_filtered (outfile, ", %d syms/buckets in ", - mdict_size (BLOCK_MULTIDICT (b))); + gdb_printf (outfile, ", %d syms/buckets in ", + mdict_size (BLOCK_MULTIDICT (b))); gdb_puts (paddress (gdbarch, BLOCK_START (b)), outfile); - fprintf_filtered (outfile, ".."); + gdb_printf (outfile, ".."); gdb_puts (paddress (gdbarch, BLOCK_END (b)), outfile); if (BLOCK_FUNCTION (b)) { - fprintf_filtered (outfile, ", function %s", - BLOCK_FUNCTION (b)->linkage_name ()); + gdb_printf (outfile, ", function %s", + BLOCK_FUNCTION (b)->linkage_name ()); if (BLOCK_FUNCTION (b)->demangled_name () != NULL) { - fprintf_filtered (outfile, ", %s", - BLOCK_FUNCTION (b)->demangled_name ()); + gdb_printf (outfile, ", %s", + BLOCK_FUNCTION (b)->demangled_name ()); } } - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); /* Now print each symbol in this block (in no particular order, if we're using a hashtable). Note that we only want this block, not any blocks from included symtabs. */ @@ -325,7 +325,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) } } } - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); } else { @@ -333,9 +333,9 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) const char *compunit_filename = symtab_to_filename_for_display (compunit->primary_filetab ()); - fprintf_filtered (outfile, - "\nBlockvector same as owning compunit: %s\n\n", - compunit_filename); + gdb_printf (outfile, + "\nBlockvector same as owning compunit: %s\n\n", + compunit_filename); } /* Print info about the user of this compunit_symtab, and the @@ -348,7 +348,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) { const char *addr = host_address_to_string (cust->user->primary_filetab ()); - fprintf_filtered (outfile, "Compunit user: %s\n", addr); + gdb_printf (outfile, "Compunit user: %s\n", addr); } if (cust->includes != nullptr) for (i = 0; ; ++i) @@ -358,7 +358,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) break; const char *addr = host_address_to_string (include->primary_filetab ()); - fprintf_filtered (outfile, "Compunit include: %s\n", addr); + gdb_printf (outfile, "Compunit include: %s\n", addr); } } } @@ -510,14 +510,14 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, print_spaces_filtered (depth, outfile); if (symbol->domain () == LABEL_DOMAIN) { - fprintf_filtered (outfile, "label %s at ", symbol->print_name ()); + gdb_printf (outfile, "label %s at ", symbol->print_name ()); gdb_puts (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (symbol)), outfile); if (section) - fprintf_filtered (outfile, " section %s\n", - bfd_section_name (section->the_bfd_section)); + gdb_printf (outfile, " section %s\n", + bfd_section_name (section->the_bfd_section)); else - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); return; } @@ -530,21 +530,21 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, } else { - fprintf_filtered (outfile, "%s %s = ", - (symbol->type ()->code () == TYPE_CODE_ENUM - ? "enum" - : (symbol->type ()->code () == TYPE_CODE_STRUCT - ? "struct" : "union")), - symbol->linkage_name ()); + gdb_printf (outfile, "%s %s = ", + (symbol->type ()->code () == TYPE_CODE_ENUM + ? "enum" + : (symbol->type ()->code () == TYPE_CODE_STRUCT + ? "struct" : "union")), + symbol->linkage_name ()); current_language->print_type (symbol->type (), "", outfile, 1, depth, &type_print_raw_options); } - fprintf_filtered (outfile, ";\n"); + gdb_printf (outfile, ";\n"); } else { if (symbol->aclass () == LOC_TYPEDEF) - fprintf_filtered (outfile, "typedef "); + gdb_printf (outfile, "typedef "); if (symbol->type ()) { /* Print details of types, except for enums where it's clutter. */ @@ -553,17 +553,17 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, symbol->type ()->code () != TYPE_CODE_ENUM, depth, &type_print_raw_options); - fprintf_filtered (outfile, "; "); + gdb_printf (outfile, "; "); } else - fprintf_filtered (outfile, "%s ", symbol->print_name ()); + gdb_printf (outfile, "%s ", symbol->print_name ()); switch (symbol->aclass ()) { case LOC_CONST: - fprintf_filtered (outfile, "const %s (%s)", - plongest (SYMBOL_VALUE (symbol)), - hex_string (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "const %s (%s)", + plongest (SYMBOL_VALUE (symbol)), + hex_string (SYMBOL_VALUE (symbol))); break; case LOC_CONST_BYTES: @@ -571,94 +571,94 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, unsigned i; struct type *type = check_typedef (symbol->type ()); - fprintf_filtered (outfile, "const %s hex bytes:", - pulongest (TYPE_LENGTH (type))); + gdb_printf (outfile, "const %s hex bytes:", + pulongest (TYPE_LENGTH (type))); for (i = 0; i < TYPE_LENGTH (type); i++) - fprintf_filtered (outfile, " %02x", - (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); + gdb_printf (outfile, " %02x", + (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); } break; case LOC_STATIC: - fprintf_filtered (outfile, "static at "); + gdb_printf (outfile, "static at "); gdb_puts (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (symbol)), outfile); if (section) - fprintf_filtered (outfile, " section %s", - bfd_section_name (section->the_bfd_section)); + gdb_printf (outfile, " section %s", + bfd_section_name (section->the_bfd_section)); break; case LOC_REGISTER: if (symbol->is_argument ()) - fprintf_filtered (outfile, "parameter register %s", - plongest (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "parameter register %s", + plongest (SYMBOL_VALUE (symbol))); else - fprintf_filtered (outfile, "register %s", - plongest (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "register %s", + plongest (SYMBOL_VALUE (symbol))); break; case LOC_ARG: - fprintf_filtered (outfile, "arg at offset %s", - hex_string (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "arg at offset %s", + hex_string (SYMBOL_VALUE (symbol))); break; case LOC_REF_ARG: - fprintf_filtered (outfile, "reference arg at %s", - hex_string (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "reference arg at %s", + hex_string (SYMBOL_VALUE (symbol))); break; case LOC_REGPARM_ADDR: - fprintf_filtered (outfile, "address parameter register %s", - plongest (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "address parameter register %s", + plongest (SYMBOL_VALUE (symbol))); break; case LOC_LOCAL: - fprintf_filtered (outfile, "local at offset %s", - hex_string (SYMBOL_VALUE (symbol))); + gdb_printf (outfile, "local at offset %s", + hex_string (SYMBOL_VALUE (symbol))); break; case LOC_TYPEDEF: break; case LOC_LABEL: - fprintf_filtered (outfile, "label at "); + gdb_printf (outfile, "label at "); gdb_puts (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (symbol)), outfile); if (section) - fprintf_filtered (outfile, " section %s", - bfd_section_name (section->the_bfd_section)); + gdb_printf (outfile, " section %s", + bfd_section_name (section->the_bfd_section)); break; case LOC_BLOCK: - fprintf_filtered + gdb_printf (outfile, "block object %s, %s..%s", host_address_to_string (SYMBOL_BLOCK_VALUE (symbol)), paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))), paddress (gdbarch, BLOCK_END (SYMBOL_BLOCK_VALUE (symbol)))); if (section) - fprintf_filtered (outfile, " section %s", - bfd_section_name (section->the_bfd_section)); + gdb_printf (outfile, " section %s", + bfd_section_name (section->the_bfd_section)); break; case LOC_COMPUTED: - fprintf_filtered (outfile, "computed at runtime"); + gdb_printf (outfile, "computed at runtime"); break; case LOC_UNRESOLVED: - fprintf_filtered (outfile, "unresolved"); + gdb_printf (outfile, "unresolved"); break; case LOC_OPTIMIZED_OUT: - fprintf_filtered (outfile, "optimized out"); + gdb_printf (outfile, "optimized out"); break; default: - fprintf_filtered (outfile, "botched symbol class %x", - symbol->aclass ()); + gdb_printf (outfile, "botched symbol class %x", + symbol->aclass ()); break; } } - fprintf_filtered (outfile, "\n"); + gdb_printf (outfile, "\n"); } static void @@ -766,36 +766,36 @@ maintenance_info_symtabs (const char *regexp, int from_tty) { if (! printed_objfile_start) { - printf_filtered ("{ objfile %s ", objfile_name (objfile)); + gdb_printf ("{ objfile %s ", objfile_name (objfile)); gdb_stdout->wrap_here (2); - printf_filtered ("((struct objfile *) %s)\n", - host_address_to_string (objfile)); + gdb_printf ("((struct objfile *) %s)\n", + host_address_to_string (objfile)); printed_objfile_start = 1; } if (! printed_compunit_symtab_start) { - printf_filtered (" { ((struct compunit_symtab *) %s)\n", - host_address_to_string (cust)); - printf_filtered (" debugformat %s\n", - cust->debugformat ()); - printf_filtered (" producer %s\n", - (cust->producer () != nullptr - ? cust->producer () : "(null)")); - printf_filtered (" dirname %s\n", - (cust->dirname () != NULL - ? cust->dirname () : "(null)")); - printf_filtered (" blockvector" - " ((struct blockvector *) %s)\n", - host_address_to_string - (cust->blockvector ())); - printf_filtered (" user" - " ((struct compunit_symtab *) %s)\n", - cust->user != nullptr - ? host_address_to_string (cust->user) - : "(null)"); + gdb_printf (" { ((struct compunit_symtab *) %s)\n", + host_address_to_string (cust)); + gdb_printf (" debugformat %s\n", + cust->debugformat ()); + gdb_printf (" producer %s\n", + (cust->producer () != nullptr + ? cust->producer () : "(null)")); + gdb_printf (" dirname %s\n", + (cust->dirname () != NULL + ? cust->dirname () : "(null)")); + gdb_printf (" blockvector" + " ((struct blockvector *) %s)\n", + host_address_to_string + (cust->blockvector ())); + gdb_printf (" user" + " ((struct compunit_symtab *) %s)\n", + cust->user != nullptr + ? host_address_to_string (cust->user) + : "(null)"); if (cust->includes != nullptr) { - printf_filtered (" ( includes\n"); + gdb_printf (" ( includes\n"); for (int i = 0; ; ++i) { struct compunit_symtab *include @@ -804,38 +804,38 @@ maintenance_info_symtabs (const char *regexp, int from_tty) break; const char *addr = host_address_to_string (include); - printf_filtered (" (%s %s)\n", - "(struct compunit_symtab *)", - addr); + gdb_printf (" (%s %s)\n", + "(struct compunit_symtab *)", + addr); } - printf_filtered (" )\n"); + gdb_printf (" )\n"); } printed_compunit_symtab_start = 1; } - printf_filtered ("\t{ symtab %s ", - symtab_to_filename_for_display (symtab)); + gdb_printf ("\t{ symtab %s ", + symtab_to_filename_for_display (symtab)); gdb_stdout->wrap_here (4); - printf_filtered ("((struct symtab *) %s)\n", - host_address_to_string (symtab)); - printf_filtered ("\t fullname %s\n", - symtab->fullname != NULL - ? symtab->fullname - : "(null)"); - printf_filtered ("\t " - "linetable ((struct linetable *) %s)\n", - host_address_to_string - (symtab->linetable ())); - printf_filtered ("\t}\n"); + gdb_printf ("((struct symtab *) %s)\n", + host_address_to_string (symtab)); + gdb_printf ("\t fullname %s\n", + symtab->fullname != NULL + ? symtab->fullname + : "(null)"); + gdb_printf ("\t " + "linetable ((struct linetable *) %s)\n", + host_address_to_string + (symtab->linetable ())); + gdb_printf ("\t}\n"); } } if (printed_compunit_symtab_start) - printf_filtered (" }\n"); + gdb_printf (" }\n"); } if (printed_objfile_start) - printf_filtered ("}\n"); + gdb_printf ("}\n"); } } @@ -872,22 +872,22 @@ maintenance_check_symtabs (const char *ignore, int from_tty) { if (! printed_objfile_start) { - printf_filtered ("{ objfile %s ", objfile_name (objfile)); + gdb_printf ("{ objfile %s ", objfile_name (objfile)); gdb_stdout->wrap_here (2); - printf_filtered ("((struct objfile *) %s)\n", - host_address_to_string (objfile)); + gdb_printf ("((struct objfile *) %s)\n", + host_address_to_string (objfile)); printed_objfile_start = 1; } - printf_filtered (" { symtab %s\n", - symtab_to_filename_for_display (symtab)); + gdb_printf (" { symtab %s\n", + symtab_to_filename_for_display (symtab)); if (cust->blockvector () == NULL) - printf_filtered (" NULL blockvector\n"); - printf_filtered (" }\n"); + gdb_printf (" NULL blockvector\n"); + gdb_printf (" }\n"); } } if (printed_objfile_start) - printf_filtered ("}\n"); + gdb_printf ("}\n"); } } @@ -958,25 +958,25 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data) struct objfile *objfile; objfile = symtab->compunit ()->objfile (); - printf_filtered (_("objfile: %ps ((struct objfile *) %s)\n"), - styled_string (file_name_style.style (), - objfile_name (objfile)), - host_address_to_string (objfile)); - printf_filtered (_("compunit_symtab: %s ((struct compunit_symtab *) %s)\n"), - symtab->compunit ()->name, - host_address_to_string (symtab->compunit ())); - printf_filtered (_("symtab: %ps ((struct symtab *) %s)\n"), - styled_string (file_name_style.style (), - symtab_to_fullname (symtab)), - host_address_to_string (symtab)); + gdb_printf (_("objfile: %ps ((struct objfile *) %s)\n"), + styled_string (file_name_style.style (), + objfile_name (objfile)), + host_address_to_string (objfile)); + gdb_printf (_("compunit_symtab: %s ((struct compunit_symtab *) %s)\n"), + symtab->compunit ()->name, + host_address_to_string (symtab->compunit ())); + gdb_printf (_("symtab: %ps ((struct symtab *) %s)\n"), + styled_string (file_name_style.style (), + symtab_to_fullname (symtab)), + host_address_to_string (symtab)); linetable = symtab->linetable (); - printf_filtered (_("linetable: ((struct linetable *) %s):\n"), - host_address_to_string (linetable)); + gdb_printf (_("linetable: ((struct linetable *) %s):\n"), + host_address_to_string (linetable)); if (linetable == NULL) - printf_filtered (_("No line table.\n")); + gdb_printf (_("No line table.\n")); else if (linetable->nitems <= 0) - printf_filtered (_("Line table has no lines.\n")); + gdb_printf (_("Line table has no lines.\n")); else { /* Leave space for 6 digits of index and line number. After that the @@ -1033,7 +1033,7 @@ maintenance_info_line_tables (const char *regexp, int from_tty) || re_exec (symtab_to_filename_for_display (symtab))) { maintenance_print_one_line_table (symtab, NULL); - printf_filtered ("\n"); + gdb_printf ("\n"); } } } diff --git a/gdb/symtab.c b/gdb/symtab.c index cf72d91..804b882 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1416,12 +1416,12 @@ symbol_cache_lookup (struct symbol_cache *cache, if (eq_symbol_entry (slot, objfile_context, name, domain)) { if (symbol_lookup_debug) - fprintf_unfiltered (gdb_stdlog, - "%s block symbol cache hit%s for %s, %s\n", - block == GLOBAL_BLOCK ? "Global" : "Static", - slot->state == SYMBOL_SLOT_NOT_FOUND - ? " (not found)" : "", - name, domain_name (domain)); + gdb_printf (gdb_stdlog, + "%s block symbol cache hit%s for %s, %s\n", + block == GLOBAL_BLOCK ? "Global" : "Static", + slot->state == SYMBOL_SLOT_NOT_FOUND + ? " (not found)" : "", + name, domain_name (domain)); ++bsc->hits; if (slot->state == SYMBOL_SLOT_NOT_FOUND) return SYMBOL_LOOKUP_FAILED; @@ -1432,10 +1432,10 @@ symbol_cache_lookup (struct symbol_cache *cache, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "%s block symbol cache miss for %s, %s\n", - block == GLOBAL_BLOCK ? "Global" : "Static", - name, domain_name (domain)); + gdb_printf (gdb_stdlog, + "%s block symbol cache miss for %s, %s\n", + block == GLOBAL_BLOCK ? "Global" : "Static", + name, domain_name (domain)); } ++bsc->misses; return {}; @@ -1543,7 +1543,7 @@ symbol_cache_dump (const struct symbol_cache *cache) if (cache->global_symbols == NULL) { - printf_filtered (" <disabled>\n"); + gdb_printf (" <disabled>\n"); return; } @@ -1554,9 +1554,9 @@ symbol_cache_dump (const struct symbol_cache *cache) unsigned int i; if (pass == 0) - printf_filtered ("Global symbols:\n"); + gdb_printf ("Global symbols:\n"); else - printf_filtered ("Static symbols:\n"); + gdb_printf ("Static symbols:\n"); for (i = 0; i < bsc->size; ++i) { @@ -1569,20 +1569,20 @@ symbol_cache_dump (const struct symbol_cache *cache) case SYMBOL_SLOT_UNUSED: break; case SYMBOL_SLOT_NOT_FOUND: - printf_filtered (" [%4u] = %s, %s %s (not found)\n", i, - host_address_to_string (slot->objfile_context), - slot->value.not_found.name, - domain_name (slot->value.not_found.domain)); + gdb_printf (" [%4u] = %s, %s %s (not found)\n", i, + host_address_to_string (slot->objfile_context), + slot->value.not_found.name, + domain_name (slot->value.not_found.domain)); break; case SYMBOL_SLOT_FOUND: { struct symbol *found = slot->value.found.symbol; const struct objfile *context = slot->objfile_context; - printf_filtered (" [%4u] = %s, %s %s\n", i, - host_address_to_string (context), - found->print_name (), - domain_name (found->domain ())); + gdb_printf (" [%4u] = %s, %s %s\n", i, + host_address_to_string (context), + found->print_name (), + domain_name (found->domain ())); break; } } @@ -1599,16 +1599,16 @@ maintenance_print_symbol_cache (const char *args, int from_tty) { struct symbol_cache *cache; - printf_filtered (_("Symbol cache for pspace %d\n%s:\n"), - pspace->num, - pspace->symfile_object_file != NULL - ? objfile_name (pspace->symfile_object_file) - : "(no object file)"); + gdb_printf (_("Symbol cache for pspace %d\n%s:\n"), + pspace->num, + pspace->symfile_object_file != NULL + ? objfile_name (pspace->symfile_object_file) + : "(no object file)"); /* If the cache hasn't been created yet, avoid creating one. */ cache = symbol_cache_key.get (pspace); if (cache == NULL) - printf_filtered (" <empty>\n"); + gdb_printf (" <empty>\n"); else symbol_cache_dump (cache); } @@ -1634,7 +1634,7 @@ symbol_cache_stats (struct symbol_cache *cache) if (cache->global_symbols == NULL) { - printf_filtered (" <disabled>\n"); + gdb_printf (" <disabled>\n"); return; } @@ -1646,14 +1646,14 @@ symbol_cache_stats (struct symbol_cache *cache) QUIT; if (pass == 0) - printf_filtered ("Global block cache stats:\n"); + gdb_printf ("Global block cache stats:\n"); else - printf_filtered ("Static block cache stats:\n"); + gdb_printf ("Static block cache stats:\n"); - printf_filtered (" size: %u\n", bsc->size); - printf_filtered (" hits: %u\n", bsc->hits); - printf_filtered (" misses: %u\n", bsc->misses); - printf_filtered (" collisions: %u\n", bsc->collisions); + gdb_printf (" size: %u\n", bsc->size); + gdb_printf (" hits: %u\n", bsc->hits); + gdb_printf (" misses: %u\n", bsc->misses); + gdb_printf (" collisions: %u\n", bsc->collisions); } } @@ -1666,16 +1666,16 @@ maintenance_print_symbol_cache_statistics (const char *args, int from_tty) { struct symbol_cache *cache; - printf_filtered (_("Symbol cache statistics for pspace %d\n%s:\n"), - pspace->num, - pspace->symfile_object_file != NULL - ? objfile_name (pspace->symfile_object_file) - : "(no object file)"); + gdb_printf (_("Symbol cache statistics for pspace %d\n%s:\n"), + pspace->num, + pspace->symfile_object_file != NULL + ? objfile_name (pspace->symfile_object_file) + : "(no object file)"); /* If the cache hasn't been created yet, avoid creating one. */ cache = symbol_cache_key.get (pspace); if (cache == NULL) - printf_filtered (" empty, no stats available\n"); + gdb_printf (" empty, no stats available\n"); else symbol_cache_stats (cache); } @@ -1991,10 +1991,10 @@ lookup_language_this (const struct language_defn *lang, { struct objfile *objfile = block_objfile (block); - fprintf_unfiltered (gdb_stdlog, - "lookup_language_this (%s, %s (objfile %s))", - lang->name (), host_address_to_string (block), - objfile_debug_name (objfile)); + gdb_printf (gdb_stdlog, + "lookup_language_this (%s, %s (objfile %s))", + lang->name (), host_address_to_string (block), + objfile_debug_name (objfile)); } while (block) @@ -2008,10 +2008,10 @@ lookup_language_this (const struct language_defn *lang, { if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, " = %s (%s, block %s)\n", - sym->print_name (), - host_address_to_string (sym), - host_address_to_string (block)); + gdb_printf (gdb_stdlog, " = %s (%s, block %s)\n", + sym->print_name (), + host_address_to_string (sym), + host_address_to_string (block)); } return (struct block_symbol) {sym, block}; } @@ -2021,7 +2021,7 @@ lookup_language_this (const struct language_defn *lang, } if (symbol_lookup_debug > 1) - fprintf_unfiltered (gdb_stdlog, " = NULL\n"); + gdb_printf (gdb_stdlog, " = NULL\n"); return {}; } @@ -2087,12 +2087,12 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type, struct objfile *objfile = (block == nullptr ? nullptr : block_objfile (block)); - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_aux (%s, %s (objfile %s), %s, %s)\n", - name, host_address_to_string (block), - objfile != NULL - ? objfile_debug_name (objfile) : "NULL", - domain_name (domain), language_str (language)); + gdb_printf (gdb_stdlog, + "lookup_symbol_aux (%s, %s (objfile %s), %s, %s)\n", + name, host_address_to_string (block), + objfile != NULL + ? objfile_debug_name (objfile) : "NULL", + domain_name (domain), language_str (language)); } /* Make sure we do something sensible with is_a_field_of_this, since @@ -2110,8 +2110,8 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", - host_address_to_string (result.symbol)); + gdb_printf (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", + host_address_to_string (result.symbol)); } return result; } @@ -2147,8 +2147,8 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_aux (...) = NULL\n"); + gdb_printf (gdb_stdlog, + "lookup_symbol_aux (...) = NULL\n"); } return {}; } @@ -2163,8 +2163,8 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", - host_address_to_string (result.symbol)); + gdb_printf (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", + host_address_to_string (result.symbol)); } return result; } @@ -2175,10 +2175,10 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type, result = lookup_static_symbol (name, domain); if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", - result.symbol != NULL - ? host_address_to_string (result.symbol) - : "NULL"); + gdb_printf (gdb_stdlog, "lookup_symbol_aux (...) = %s\n", + result.symbol != NULL + ? host_address_to_string (result.symbol) + : "NULL"); } return result; } @@ -2242,11 +2242,11 @@ lookup_symbol_in_block (const char *name, symbol_name_match_type match_type, struct objfile *objfile = (block == nullptr ? nullptr : block_objfile (block)); - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_block (%s, %s (objfile %s), %s)", - name, host_address_to_string (block), - objfile_debug_name (objfile), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_block (%s, %s (objfile %s), %s)", + name, host_address_to_string (block), + objfile_debug_name (objfile), + domain_name (domain)); } sym = block_lookup_symbol (block, name, match_type, domain); @@ -2254,14 +2254,14 @@ lookup_symbol_in_block (const char *name, symbol_name_match_type match_type, { if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, " = %s\n", - host_address_to_string (sym)); + gdb_printf (gdb_stdlog, " = %s\n", + host_address_to_string (sym)); } return fixup_symbol_section (sym, NULL); } if (symbol_lookup_debug > 1) - fprintf_unfiltered (gdb_stdlog, " = NULL\n"); + gdb_printf (gdb_stdlog, " = NULL\n"); return NULL; } @@ -2301,12 +2301,12 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_objfile_symtabs (%s, %s, %s, %s)", - objfile_debug_name (objfile), - block_index == GLOBAL_BLOCK - ? "GLOBAL_BLOCK" : "STATIC_BLOCK", - name, domain_name (domain)); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_objfile_symtabs (%s, %s, %s, %s)", + objfile_debug_name (objfile), + block_index == GLOBAL_BLOCK + ? "GLOBAL_BLOCK" : "STATIC_BLOCK", + name, domain_name (domain)); } struct block_symbol other; @@ -2345,16 +2345,16 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, { if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, " = %s (block %s)\n", - host_address_to_string (other.symbol), - host_address_to_string (other.block)); + gdb_printf (gdb_stdlog, " = %s (block %s)\n", + host_address_to_string (other.symbol), + host_address_to_string (other.block)); } other.symbol = fixup_symbol_section (other.symbol, objfile); return other; } if (symbol_lookup_debug > 1) - fprintf_unfiltered (gdb_stdlog, " = NULL\n"); + gdb_printf (gdb_stdlog, " = NULL\n"); return {}; } @@ -2431,12 +2431,12 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_via_quick_fns (%s, %s, %s, %s)\n", - objfile_debug_name (objfile), - block_index == GLOBAL_BLOCK - ? "GLOBAL_BLOCK" : "STATIC_BLOCK", - name, domain_name (domain)); + gdb_printf (gdb_stdlog, + "lookup_symbol_via_quick_fns (%s, %s, %s, %s)\n", + objfile_debug_name (objfile), + block_index == GLOBAL_BLOCK + ? "GLOBAL_BLOCK" : "STATIC_BLOCK", + name, domain_name (domain)); } cust = objfile->lookup_symbol (block_index, name, domain); @@ -2444,8 +2444,8 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, { if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_via_quick_fns (...) = NULL\n"); + gdb_printf (gdb_stdlog, + "lookup_symbol_via_quick_fns (...) = NULL\n"); } return {}; } @@ -2459,10 +2459,10 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_via_quick_fns (...) = %s (block %s)\n", - host_address_to_string (result.symbol), - host_address_to_string (block)); + gdb_printf (gdb_stdlog, + "lookup_symbol_via_quick_fns (...) = %s (block %s)\n", + host_address_to_string (result.symbol), + host_address_to_string (block)); } result.symbol = fixup_symbol_section (result.symbol, objfile); @@ -2529,13 +2529,13 @@ lookup_symbol_in_static_block (const char *name, struct objfile *objfile = (block == nullptr ? nullptr : block_objfile (block)); - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_static_block (%s, %s (objfile %s)," - " %s)\n", - name, - host_address_to_string (block), - objfile_debug_name (objfile), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_static_block (%s, %s (objfile %s)," + " %s)\n", + name, + host_address_to_string (block), + objfile_debug_name (objfile), + domain_name (domain)); } sym = lookup_symbol_in_block (name, @@ -2543,9 +2543,9 @@ lookup_symbol_in_static_block (const char *name, static_block, domain); if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_static_block (...) = %s\n", - sym != NULL ? host_address_to_string (sym) : "NULL"); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_static_block (...) = %s\n", + sym != NULL ? host_address_to_string (sym) : "NULL"); } return (struct block_symbol) {sym, static_block}; } @@ -2565,12 +2565,12 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_objfile (%s, %s, %s, %s)\n", - objfile_debug_name (objfile), - block_index == GLOBAL_BLOCK - ? "GLOBAL_BLOCK" : "STATIC_BLOCK", - name, domain_name (domain)); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_objfile (%s, %s, %s, %s)\n", + objfile_debug_name (objfile), + block_index == GLOBAL_BLOCK + ? "GLOBAL_BLOCK" : "STATIC_BLOCK", + name, domain_name (domain)); } result = lookup_symbol_in_objfile_symtabs (objfile, block_index, @@ -2579,10 +2579,10 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_objfile (...) = %s" - " (in symtabs)\n", - host_address_to_string (result.symbol)); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_objfile (...) = %s" + " (in symtabs)\n", + host_address_to_string (result.symbol)); } return result; } @@ -2591,12 +2591,12 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index, name, domain); if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "lookup_symbol_in_objfile (...) = %s%s\n", - result.symbol != NULL - ? host_address_to_string (result.symbol) - : "NULL", - result.symbol != NULL ? " (via quick fns)" : ""); + gdb_printf (gdb_stdlog, + "lookup_symbol_in_objfile (...) = %s%s\n", + result.symbol != NULL + ? host_address_to_string (result.symbol) + : "NULL", + result.symbol != NULL ? " (via quick fns)" : ""); } return result; } @@ -4653,9 +4653,9 @@ treg_matches_sym_type_name (const compiled_regex &treg, if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - "treg_matches_sym_type_name\n sym %s\n", - sym->natural_name ()); + gdb_printf (gdb_stdlog, + "treg_matches_sym_type_name\n sym %s\n", + sym->natural_name ()); } sym_type = sym->type (); @@ -4671,9 +4671,9 @@ treg_matches_sym_type_name (const compiled_regex &treg, if (symbol_lookup_debug > 1) { - fprintf_unfiltered (gdb_stdlog, - " sym_type_name %s\n", - printed_sym_type_name.c_str ()); + gdb_printf (gdb_stdlog, + " sym_type_name %s\n", + printed_sym_type_name.c_str ()); } @@ -5094,19 +5094,19 @@ print_symbol_info (enum search_domain kind, if (filename_cmp (last, s_filename) != 0) { - printf_filtered (_("\nFile %ps:\n"), - styled_string (file_name_style.style (), - s_filename)); + gdb_printf (_("\nFile %ps:\n"), + styled_string (file_name_style.style (), + s_filename)); } if (sym->line () != 0) - printf_filtered ("%d:\t", sym->line ()); + gdb_printf ("%d:\t", sym->line ()); else gdb_puts ("\t"); } std::string str = symbol_to_info_string (sym, block, kind); - printf_filtered ("%s\n", str.c_str ()); + gdb_printf ("%s\n", str.c_str ()); } /* This help function for symtab_symbol_info() prints information @@ -5130,9 +5130,9 @@ print_msymbol_info (struct bound_minimal_symbol msymbol) ? function_name_style.style () : ui_file_style ()); - printf_filtered (_("%ps %ps\n"), - styled_string (address_style.style (), tmp), - styled_string (sym_style, msymbol.minsym->print_name ())); + gdb_printf (_("%ps %ps\n"), + styled_string (address_style.style (), tmp), + styled_string (sym_style, msymbol.minsym->print_name ())); } /* This is the guts of the commands "info functions", "info types", and @@ -5165,23 +5165,23 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms, if (regexp != NULL) { if (t_regexp != NULL) - printf_filtered + gdb_printf (_("All %ss matching regular expression \"%s\"" " with type matching regular expression \"%s\":\n"), classnames[kind], regexp, t_regexp); else - printf_filtered (_("All %ss matching regular expression \"%s\":\n"), - classnames[kind], regexp); + gdb_printf (_("All %ss matching regular expression \"%s\":\n"), + classnames[kind], regexp); } else { if (t_regexp != NULL) - printf_filtered + gdb_printf (_("All defined %ss" " with type matching regular expression \"%s\" :\n"), classnames[kind], t_regexp); else - printf_filtered (_("All defined %ss:\n"), classnames[kind]); + gdb_printf (_("All defined %ss:\n"), classnames[kind]); } } @@ -5194,7 +5194,7 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms, if (first) { if (!quiet) - printf_filtered (_("\nNon-debugging symbols:\n")); + gdb_printf (_("\nNon-debugging symbols:\n")); first = 0; } print_msymbol_info (p.msymbol); @@ -5440,8 +5440,8 @@ rbreak_command (const char *regexp, int from_tty) p.msymbol.minsym->linkage_name ()); break_command (&string[0], from_tty); - printf_filtered ("<function, no debug info> %s;\n", - p.msymbol.minsym->print_name ()); + gdb_printf ("<function, no debug info> %s;\n", + p.msymbol.minsym->print_name ()); } } } @@ -6687,11 +6687,11 @@ info_module_subcommand (bool quiet, const char *module_regexp, if (type_regexp == nullptr) { if (regexp == nullptr) - printf_filtered ((kind == VARIABLES_DOMAIN - ? _("All variables in all modules:") - : _("All functions in all modules:"))); + gdb_printf ((kind == VARIABLES_DOMAIN + ? _("All variables in all modules:") + : _("All functions in all modules:"))); else - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables matching regular expression" " \"%s\" in all modules:") @@ -6702,7 +6702,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, else { if (regexp == nullptr) - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables with type matching regular " "expression \"%s\" in all modules:") @@ -6710,7 +6710,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, "expression \"%s\" in all modules:")), type_regexp); else - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables matching regular expression " "\"%s\",\n\twith type matching regular " @@ -6726,7 +6726,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, if (type_regexp == nullptr) { if (regexp == nullptr) - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables in all modules matching regular " "expression \"%s\":") @@ -6734,7 +6734,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, "expression \"%s\":")), module_regexp); else - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables matching regular expression " "\"%s\",\n\tin all modules matching regular " @@ -6747,7 +6747,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, else { if (regexp == nullptr) - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables with type matching regular " "expression \"%s\"\n\tin all modules matching " @@ -6757,7 +6757,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, "regular expression \"%s\":")), type_regexp, module_regexp); else - printf_filtered + gdb_printf ((kind == VARIABLES_DOMAIN ? _("All variables matching regular expression " "\"%s\",\n\twith type matching regular expression " @@ -6770,7 +6770,7 @@ info_module_subcommand (bool quiet, const char *module_regexp, regexp, type_regexp, module_regexp); } } - printf_filtered ("\n"); + gdb_printf ("\n"); } /* Find all symbols of type KIND matching the given regular expressions @@ -6801,8 +6801,8 @@ info_module_subcommand (bool quiet, const char *module_regexp, if (last_module_symbol != p.symbol) { - printf_filtered ("\n"); - printf_filtered (_("Module \"%s\":\n"), p.symbol->print_name ()); + gdb_printf ("\n"); + gdb_printf (_("Module \"%s\":\n"), p.symbol->print_name ()); last_module_symbol = p.symbol; last_filename = ""; } diff --git a/gdb/target-dcache.c b/gdb/target-dcache.c index 96d4611..0aa5330 100644 --- a/gdb/target-dcache.c +++ b/gdb/target-dcache.c @@ -102,7 +102,7 @@ static void show_stack_cache (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Cache use for stack accesses is %s.\n"), value); + gdb_printf (file, _("Cache use for stack accesses is %s.\n"), value); } /* Return true if "stack cache" is enabled, otherwise, return false. */ @@ -142,7 +142,7 @@ static void show_code_cache (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Cache use for code accesses is %s.\n"), value); + gdb_printf (file, _("Cache use for code accesses is %s.\n"), value); } /* Return true if "code cache" is enabled, otherwise, return false. */ @@ -160,7 +160,7 @@ maint_flush_dcache_command (const char *command, int from_tty) { target_dcache_invalidate (); if (from_tty) - printf_filtered (_("The dcache was flushed.\n")); + gdb_printf (_("The dcache was flushed.\n")); } void _initialize_target_dcache (); diff --git a/gdb/target-debug.h b/gdb/target-debug.h index ee494d0..c2b1db1 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -206,8 +206,8 @@ target_debug_print_signals (gdb::array_view<const unsigned char> sigs) for (size_t i = 0; i < sigs.size (); i++) if (sigs[i] != 0) { - fprintf_unfiltered (gdb_stdlog, " %s", - gdb_signal_to_name ((enum gdb_signal) i)); + gdb_printf (gdb_stdlog, " %s", + gdb_signal_to_name ((enum gdb_signal) i)); } gdb_puts (" }", gdb_stdlog); } @@ -215,7 +215,7 @@ target_debug_print_signals (gdb::array_view<const unsigned char> sigs) static void target_debug_print_size_t (size_t size) { - fprintf_unfiltered (gdb_stdlog, "%s", pulongest (size)); + gdb_printf (gdb_stdlog, "%s", pulongest (size)); } static void @@ -225,8 +225,8 @@ target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector) for (size_t i = 0; i < vector.size (); i++) { - fprintf_unfiltered (gdb_stdlog, " %s", - phex_nz (vector[i], 1)); + gdb_printf (gdb_stdlog, " %s", + phex_nz (vector[i], 1)); } gdb_puts (" }", gdb_stdlog); } diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 26ec8d9..4e653e8 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -386,9 +386,9 @@ dummy_target::post_attach (int arg0) void debug_target::post_attach (int arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->post_attach (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->post_attach (...)\n", this->beneath ()->shortname ()); this->beneath ()->post_attach (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->post_attach (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->post_attach (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -407,9 +407,9 @@ dummy_target::detach (inferior *arg0, int arg1) void debug_target::detach (inferior *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->detach (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->detach (...)\n", this->beneath ()->shortname ()); this->beneath ()->detach (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->detach (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->detach (", this->beneath ()->shortname ()); target_debug_print_inferior_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -431,9 +431,9 @@ dummy_target::disconnect (const char *arg0, int arg1) void debug_target::disconnect (const char *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->disconnect (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->disconnect (...)\n", this->beneath ()->shortname ()); this->beneath ()->disconnect (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->disconnect (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->disconnect (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -455,9 +455,9 @@ dummy_target::resume (ptid_t arg0, int arg1, enum gdb_signal arg2) void debug_target::resume (ptid_t arg0, int arg1, enum gdb_signal arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->resume (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->resume (...)\n", this->beneath ()->shortname ()); this->beneath ()->resume (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->resume (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->resume (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_step (arg1); @@ -480,9 +480,9 @@ dummy_target::commit_resumed () void debug_target::commit_resumed () { - fprintf_unfiltered (gdb_stdlog, "-> %s->commit_resumed (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->commit_resumed (...)\n", this->beneath ()->shortname ()); this->beneath ()->commit_resumed (); - fprintf_unfiltered (gdb_stdlog, "<- %s->commit_resumed (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->commit_resumed (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -502,9 +502,9 @@ ptid_t debug_target::wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_flags arg2) { ptid_t result; - fprintf_unfiltered (gdb_stdlog, "-> %s->wait (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->wait (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->wait (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->wait (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->wait (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_target_waitstatus_p (arg1); @@ -530,9 +530,9 @@ dummy_target::fetch_registers (struct regcache *arg0, int arg1) void debug_target::fetch_registers (struct regcache *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->fetch_registers (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->fetch_registers (...)\n", this->beneath ()->shortname ()); this->beneath ()->fetch_registers (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->fetch_registers (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->fetch_registers (", this->beneath ()->shortname ()); target_debug_print_struct_regcache_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -554,9 +554,9 @@ dummy_target::store_registers (struct regcache *arg0, int arg1) void debug_target::store_registers (struct regcache *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->store_registers (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->store_registers (...)\n", this->beneath ()->shortname ()); this->beneath ()->store_registers (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->store_registers (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->store_registers (", this->beneath ()->shortname ()); target_debug_print_struct_regcache_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -578,9 +578,9 @@ dummy_target::prepare_to_store (struct regcache *arg0) void debug_target::prepare_to_store (struct regcache *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->prepare_to_store (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->prepare_to_store (...)\n", this->beneath ()->shortname ()); this->beneath ()->prepare_to_store (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->prepare_to_store (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->prepare_to_store (", this->beneath ()->shortname ()); target_debug_print_struct_regcache_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -599,9 +599,9 @@ dummy_target::files_info () void debug_target::files_info () { - fprintf_unfiltered (gdb_stdlog, "-> %s->files_info (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->files_info (...)\n", this->beneath ()->shortname ()); this->beneath ()->files_info (); - fprintf_unfiltered (gdb_stdlog, "<- %s->files_info (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->files_info (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -621,9 +621,9 @@ int debug_target::insert_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_breakpoint (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_breakpoint (", this->beneath ()->shortname ()); target_debug_print_struct_gdbarch_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_bp_target_info_p (arg1); @@ -649,9 +649,9 @@ int debug_target::remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1, enum remove_bp_reason arg2) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_breakpoint (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_breakpoint (", this->beneath ()->shortname ()); target_debug_print_struct_gdbarch_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_bp_target_info_p (arg1); @@ -679,9 +679,9 @@ bool debug_target::stopped_by_sw_breakpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->stopped_by_sw_breakpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_sw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stopped_by_sw_breakpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -704,9 +704,9 @@ bool debug_target::supports_stopped_by_sw_breakpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_stopped_by_sw_breakpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_stopped_by_sw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_stopped_by_sw_breakpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -729,9 +729,9 @@ bool debug_target::stopped_by_hw_breakpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->stopped_by_hw_breakpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_hw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stopped_by_hw_breakpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -754,9 +754,9 @@ bool debug_target::supports_stopped_by_hw_breakpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_stopped_by_hw_breakpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_stopped_by_hw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_stopped_by_hw_breakpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -779,9 +779,9 @@ int debug_target::can_use_hw_breakpoint (enum bptype arg0, int arg1, int arg2) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_use_hw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_use_hw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_use_hw_breakpoint (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_use_hw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_use_hw_breakpoint (", this->beneath ()->shortname ()); target_debug_print_enum_bptype (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -809,9 +809,9 @@ int debug_target::ranged_break_num_registers () { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->ranged_break_num_registers (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->ranged_break_num_registers (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->ranged_break_num_registers (); - fprintf_unfiltered (gdb_stdlog, "<- %s->ranged_break_num_registers (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->ranged_break_num_registers (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); gdb_puts ("\n", gdb_stdlog); @@ -834,9 +834,9 @@ int debug_target::insert_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_hw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_hw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_hw_breakpoint (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_hw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_hw_breakpoint (", this->beneath ()->shortname ()); target_debug_print_struct_gdbarch_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_bp_target_info_p (arg1); @@ -862,9 +862,9 @@ int debug_target::remove_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_hw_breakpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_hw_breakpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_hw_breakpoint (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_hw_breakpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_hw_breakpoint (", this->beneath ()->shortname ()); target_debug_print_struct_gdbarch_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_bp_target_info_p (arg1); @@ -890,9 +890,9 @@ int debug_target::remove_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_watchpoint (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -922,9 +922,9 @@ int debug_target::insert_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_watchpoint (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -954,9 +954,9 @@ int debug_target::insert_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_mask_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_mask_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_mask_watchpoint (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_mask_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_mask_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -984,9 +984,9 @@ int debug_target::remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_mask_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_mask_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_mask_watchpoint (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_mask_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_mask_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -1014,9 +1014,9 @@ bool debug_target::stopped_by_watchpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stopped_by_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->stopped_by_watchpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stopped_by_watchpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -1039,9 +1039,9 @@ bool debug_target::have_steppable_watchpoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->have_steppable_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->have_steppable_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->have_steppable_watchpoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->have_steppable_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->have_steppable_watchpoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -1064,9 +1064,9 @@ bool debug_target::stopped_data_address (CORE_ADDR *arg0) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_data_address (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stopped_data_address (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->stopped_data_address (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_data_address (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stopped_data_address (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); @@ -1090,9 +1090,9 @@ bool debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->watchpoint_addr_within_range (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->watchpoint_addr_within_range (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->watchpoint_addr_within_range (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -1120,9 +1120,9 @@ int debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->region_ok_for_hw_watchpoint (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -1148,9 +1148,9 @@ bool debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -1180,9 +1180,9 @@ int debug_target::masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->masked_watch_num_registers (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->masked_watch_num_registers (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->masked_watch_num_registers (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->masked_watch_num_registers (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->masked_watch_num_registers (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -1208,9 +1208,9 @@ int debug_target::can_do_single_step () { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_do_single_step (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_do_single_step (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_do_single_step (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_do_single_step (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_do_single_step (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); gdb_puts ("\n", gdb_stdlog); @@ -1233,9 +1233,9 @@ bool debug_target::supports_terminal_ours () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_terminal_ours (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_terminal_ours (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_terminal_ours (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_terminal_ours (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_terminal_ours (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -1256,9 +1256,9 @@ dummy_target::terminal_init () void debug_target::terminal_init () { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_init (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_init (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_init (); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_init (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_init (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1276,9 +1276,9 @@ dummy_target::terminal_inferior () void debug_target::terminal_inferior () { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_inferior (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_inferior (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_inferior (); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_inferior (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_inferior (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1296,9 +1296,9 @@ dummy_target::terminal_save_inferior () void debug_target::terminal_save_inferior () { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_save_inferior (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_save_inferior (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_save_inferior (); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_save_inferior (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_save_inferior (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1316,9 +1316,9 @@ dummy_target::terminal_ours_for_output () void debug_target::terminal_ours_for_output () { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_ours_for_output (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_ours_for_output (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_ours_for_output (); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_ours_for_output (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_ours_for_output (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1336,9 +1336,9 @@ dummy_target::terminal_ours () void debug_target::terminal_ours () { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_ours (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_ours (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_ours (); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_ours (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_ours (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1357,9 +1357,9 @@ dummy_target::terminal_info (const char *arg0, int arg1) void debug_target::terminal_info (const char *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->terminal_info (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->terminal_info (...)\n", this->beneath ()->shortname ()); this->beneath ()->terminal_info (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->terminal_info (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->terminal_info (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -1381,9 +1381,9 @@ dummy_target::kill () void debug_target::kill () { - fprintf_unfiltered (gdb_stdlog, "-> %s->kill (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->kill (...)\n", this->beneath ()->shortname ()); this->beneath ()->kill (); - fprintf_unfiltered (gdb_stdlog, "<- %s->kill (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->kill (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1402,9 +1402,9 @@ dummy_target::load (const char *arg0, int arg1) void debug_target::load (const char *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->load (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->load (...)\n", this->beneath ()->shortname ()); this->beneath ()->load (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->load (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->load (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -1427,9 +1427,9 @@ int debug_target::insert_fork_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_fork_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_fork_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_fork_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_fork_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_fork_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1453,9 +1453,9 @@ int debug_target::remove_fork_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_fork_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_fork_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_fork_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_fork_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_fork_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1479,9 +1479,9 @@ int debug_target::insert_vfork_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_vfork_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_vfork_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_vfork_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_vfork_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_vfork_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1505,9 +1505,9 @@ int debug_target::remove_vfork_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_vfork_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_vfork_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_vfork_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_vfork_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_vfork_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1530,9 +1530,9 @@ dummy_target::follow_fork (inferior *arg0, ptid_t arg1, target_waitkind arg2, bo void debug_target::follow_fork (inferior *arg0, ptid_t arg1, target_waitkind arg2, bool arg3, bool arg4) { - fprintf_unfiltered (gdb_stdlog, "-> %s->follow_fork (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->follow_fork (...)\n", this->beneath ()->shortname ()); this->beneath ()->follow_fork (arg0, arg1, arg2, arg3, arg4); - fprintf_unfiltered (gdb_stdlog, "<- %s->follow_fork (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->follow_fork (", this->beneath ()->shortname ()); target_debug_print_inferior_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ptid_t (arg1); @@ -1561,9 +1561,9 @@ int debug_target::insert_exec_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->insert_exec_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insert_exec_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->insert_exec_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->insert_exec_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insert_exec_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1587,9 +1587,9 @@ int debug_target::remove_exec_catchpoint (int arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->remove_exec_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->remove_exec_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->remove_exec_catchpoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->remove_exec_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->remove_exec_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -1611,9 +1611,9 @@ dummy_target::follow_exec (inferior *arg0, ptid_t arg1, const char *arg2) void debug_target::follow_exec (inferior *arg0, ptid_t arg1, const char *arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->follow_exec (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->follow_exec (...)\n", this->beneath ()->shortname ()); this->beneath ()->follow_exec (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->follow_exec (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->follow_exec (", this->beneath ()->shortname ()); target_debug_print_inferior_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ptid_t (arg1); @@ -1638,9 +1638,9 @@ int debug_target::set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->set_syscall_catchpoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_syscall_catchpoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->set_syscall_catchpoint (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_syscall_catchpoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_syscall_catchpoint (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_bool (arg1); @@ -1669,9 +1669,9 @@ dummy_target::mourn_inferior () void debug_target::mourn_inferior () { - fprintf_unfiltered (gdb_stdlog, "-> %s->mourn_inferior (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->mourn_inferior (...)\n", this->beneath ()->shortname ()); this->beneath ()->mourn_inferior (); - fprintf_unfiltered (gdb_stdlog, "<- %s->mourn_inferior (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->mourn_inferior (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1689,9 +1689,9 @@ dummy_target::pass_signals (gdb::array_view<const unsigned char> arg0) void debug_target::pass_signals (gdb::array_view<const unsigned char> arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->pass_signals (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->pass_signals (...)\n", this->beneath ()->shortname ()); this->beneath ()->pass_signals (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->pass_signals (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->pass_signals (", this->beneath ()->shortname ()); target_debug_print_signals (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -1710,9 +1710,9 @@ dummy_target::program_signals (gdb::array_view<const unsigned char> arg0) void debug_target::program_signals (gdb::array_view<const unsigned char> arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->program_signals (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->program_signals (...)\n", this->beneath ()->shortname ()); this->beneath ()->program_signals (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->program_signals (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->program_signals (", this->beneath ()->shortname ()); target_debug_print_signals (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -1733,9 +1733,9 @@ bool debug_target::thread_alive (ptid_t arg0) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_alive (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_alive (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_alive (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_alive (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_alive (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); @@ -1757,9 +1757,9 @@ dummy_target::update_thread_list () void debug_target::update_thread_list () { - fprintf_unfiltered (gdb_stdlog, "-> %s->update_thread_list (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->update_thread_list (...)\n", this->beneath ()->shortname ()); this->beneath ()->update_thread_list (); - fprintf_unfiltered (gdb_stdlog, "<- %s->update_thread_list (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->update_thread_list (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1779,9 +1779,9 @@ std::string debug_target::pid_to_str (ptid_t arg0) { std::string result; - fprintf_unfiltered (gdb_stdlog, "-> %s->pid_to_str (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->pid_to_str (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->pid_to_str (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->pid_to_str (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->pid_to_str (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_std_string (result); @@ -1805,9 +1805,9 @@ const char * debug_target::extra_thread_info (thread_info *arg0) { const char * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->extra_thread_info (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->extra_thread_info (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->extra_thread_info (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->extra_thread_info (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->extra_thread_info (", this->beneath ()->shortname ()); target_debug_print_thread_info_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_char_p (result); @@ -1831,9 +1831,9 @@ const char * debug_target::thread_name (thread_info *arg0) { const char * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_name (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_name (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_name (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_name (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_name (", this->beneath ()->shortname ()); target_debug_print_thread_info_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_char_p (result); @@ -1857,9 +1857,9 @@ thread_info * debug_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) { thread_info * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_handle_to_thread_info (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_handle_to_thread_info (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_handle_to_thread_info (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_handle_to_thread_info (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_handle_to_thread_info (", this->beneath ()->shortname ()); target_debug_print_const_gdb_byte_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -1887,9 +1887,9 @@ gdb::byte_vector debug_target::thread_info_to_thread_handle (struct thread_info *arg0) { gdb::byte_vector result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_info_to_thread_handle (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ()); target_debug_print_struct_thread_info_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_gdb_byte_vector (result); @@ -1911,9 +1911,9 @@ dummy_target::stop (ptid_t arg0) void debug_target::stop (ptid_t arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->stop (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stop (...)\n", this->beneath ()->shortname ()); this->beneath ()->stop (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->stop (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stop (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -1932,9 +1932,9 @@ dummy_target::interrupt () void debug_target::interrupt () { - fprintf_unfiltered (gdb_stdlog, "-> %s->interrupt (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->interrupt (...)\n", this->beneath ()->shortname ()); this->beneath ()->interrupt (); - fprintf_unfiltered (gdb_stdlog, "<- %s->interrupt (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->interrupt (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1953,9 +1953,9 @@ dummy_target::pass_ctrlc () void debug_target::pass_ctrlc () { - fprintf_unfiltered (gdb_stdlog, "-> %s->pass_ctrlc (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->pass_ctrlc (...)\n", this->beneath ()->shortname ()); this->beneath ()->pass_ctrlc (); - fprintf_unfiltered (gdb_stdlog, "<- %s->pass_ctrlc (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->pass_ctrlc (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -1974,9 +1974,9 @@ dummy_target::rcmd (const char *arg0, struct ui_file *arg1) void debug_target::rcmd (const char *arg0, struct ui_file *arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->rcmd (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->rcmd (...)\n", this->beneath ()->shortname ()); this->beneath ()->rcmd (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->rcmd (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->rcmd (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_ui_file_p (arg1); @@ -1999,9 +1999,9 @@ char * debug_target::pid_to_exec_file (int arg0) { char * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->pid_to_exec_file (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->pid_to_exec_file (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->pid_to_exec_file (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->pid_to_exec_file (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->pid_to_exec_file (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_char_p (result); @@ -2023,9 +2023,9 @@ dummy_target::log_command (const char *arg0) void debug_target::log_command (const char *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->log_command (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->log_command (...)\n", this->beneath ()->shortname ()); this->beneath ()->log_command (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->log_command (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->log_command (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -2046,9 +2046,9 @@ const target_section_table * debug_target::get_section_table () { const target_section_table * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_section_table (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_section_table (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_section_table (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_section_table (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_section_table (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_target_section_table_p (result); gdb_puts ("\n", gdb_stdlog); @@ -2071,9 +2071,9 @@ thread_control_capabilities debug_target::get_thread_control_capabilities () { thread_control_capabilities result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_thread_control_capabilities (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_thread_control_capabilities (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_thread_control_capabilities (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_thread_control_capabilities (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_thread_control_capabilities (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_thread_control_capabilities (result); gdb_puts ("\n", gdb_stdlog); @@ -2096,9 +2096,9 @@ bool debug_target::attach_no_wait () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->attach_no_wait (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->attach_no_wait (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->attach_no_wait (); - fprintf_unfiltered (gdb_stdlog, "<- %s->attach_no_wait (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->attach_no_wait (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2121,9 +2121,9 @@ bool debug_target::can_async_p () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_async_p (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_async_p (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_async_p (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_async_p (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_async_p (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2146,9 +2146,9 @@ bool debug_target::is_async_p () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->is_async_p (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->is_async_p (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->is_async_p (); - fprintf_unfiltered (gdb_stdlog, "<- %s->is_async_p (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->is_async_p (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2170,9 +2170,9 @@ dummy_target::async (int arg0) void debug_target::async (int arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->async (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->async (...)\n", this->beneath ()->shortname ()); this->beneath ()->async (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->async (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->async (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -2193,9 +2193,9 @@ int debug_target::async_wait_fd () { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->async_wait_fd (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->async_wait_fd (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->async_wait_fd (); - fprintf_unfiltered (gdb_stdlog, "<- %s->async_wait_fd (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->async_wait_fd (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); gdb_puts ("\n", gdb_stdlog); @@ -2218,9 +2218,9 @@ bool debug_target::has_pending_events () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->has_pending_events (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->has_pending_events (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->has_pending_events (); - fprintf_unfiltered (gdb_stdlog, "<- %s->has_pending_events (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->has_pending_events (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2241,9 +2241,9 @@ dummy_target::thread_events (int arg0) void debug_target::thread_events (int arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_events (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_events (...)\n", this->beneath ()->shortname ()); this->beneath ()->thread_events (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_events (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_events (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -2264,9 +2264,9 @@ bool debug_target::supports_non_stop () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_non_stop (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_non_stop (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_non_stop (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_non_stop (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_non_stop (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2289,9 +2289,9 @@ bool debug_target::always_non_stop_p () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->always_non_stop_p (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->always_non_stop_p (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->always_non_stop_p (); - fprintf_unfiltered (gdb_stdlog, "<- %s->always_non_stop_p (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->always_non_stop_p (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2314,9 +2314,9 @@ int debug_target::find_memory_regions (find_memory_region_ftype arg0, void *arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->find_memory_regions (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->find_memory_regions (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->find_memory_regions (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->find_memory_regions (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->find_memory_regions (", this->beneath ()->shortname ()); target_debug_print_find_memory_region_ftype (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_void_p (arg1); @@ -2342,9 +2342,9 @@ gdb::unique_xmalloc_ptr<char> debug_target::make_corefile_notes (bfd *arg0, int *arg1) { gdb::unique_xmalloc_ptr<char> result; - fprintf_unfiltered (gdb_stdlog, "-> %s->make_corefile_notes (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->make_corefile_notes (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->make_corefile_notes (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->make_corefile_notes (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->make_corefile_notes (", this->beneath ()->shortname ()); target_debug_print_bfd_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int_p (arg1); @@ -2370,9 +2370,9 @@ gdb_byte * debug_target::get_bookmark (const char *arg0, int arg1) { gdb_byte * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_bookmark (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_bookmark (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_bookmark (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_bookmark (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_bookmark (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -2397,9 +2397,9 @@ dummy_target::goto_bookmark (const gdb_byte *arg0, int arg1) void debug_target::goto_bookmark (const gdb_byte *arg0, int arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->goto_bookmark (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->goto_bookmark (...)\n", this->beneath ()->shortname ()); this->beneath ()->goto_bookmark (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->goto_bookmark (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->goto_bookmark (", this->beneath ()->shortname ()); target_debug_print_const_gdb_byte_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -2422,9 +2422,9 @@ CORE_ADDR debug_target::get_thread_local_address (ptid_t arg0, CORE_ADDR arg1, CORE_ADDR arg2) { CORE_ADDR result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_thread_local_address (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_thread_local_address (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_thread_local_address (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_thread_local_address (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_thread_local_address (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -2452,9 +2452,9 @@ enum target_xfer_status debug_target::xfer_partial (enum target_object arg0, const char *arg1, gdb_byte *arg2, const gdb_byte *arg3, ULONGEST arg4, ULONGEST arg5, ULONGEST *arg6) { enum target_xfer_status result; - fprintf_unfiltered (gdb_stdlog, "-> %s->xfer_partial (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->xfer_partial (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->xfer_partial (arg0, arg1, arg2, arg3, arg4, arg5, arg6); - fprintf_unfiltered (gdb_stdlog, "<- %s->xfer_partial (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->xfer_partial (", this->beneath ()->shortname ()); target_debug_print_enum_target_object (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_const_char_p (arg1); @@ -2490,9 +2490,9 @@ ULONGEST debug_target::get_memory_xfer_limit () { ULONGEST result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_memory_xfer_limit (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_memory_xfer_limit (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_memory_xfer_limit (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_memory_xfer_limit (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_memory_xfer_limit (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_ULONGEST (result); gdb_puts ("\n", gdb_stdlog); @@ -2515,9 +2515,9 @@ std::vector<mem_region> debug_target::memory_map () { std::vector<mem_region> result; - fprintf_unfiltered (gdb_stdlog, "-> %s->memory_map (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->memory_map (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->memory_map (); - fprintf_unfiltered (gdb_stdlog, "<- %s->memory_map (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->memory_map (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_std_vector_mem_region (result); gdb_puts ("\n", gdb_stdlog); @@ -2539,9 +2539,9 @@ dummy_target::flash_erase (ULONGEST arg0, LONGEST arg1) void debug_target::flash_erase (ULONGEST arg0, LONGEST arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->flash_erase (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->flash_erase (...)\n", this->beneath ()->shortname ()); this->beneath ()->flash_erase (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->flash_erase (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->flash_erase (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_LONGEST (arg1); @@ -2563,9 +2563,9 @@ dummy_target::flash_done () void debug_target::flash_done () { - fprintf_unfiltered (gdb_stdlog, "-> %s->flash_done (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->flash_done (...)\n", this->beneath ()->shortname ()); this->beneath ()->flash_done (); - fprintf_unfiltered (gdb_stdlog, "<- %s->flash_done (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->flash_done (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -2585,9 +2585,9 @@ const struct target_desc * debug_target::read_description () { const struct target_desc * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->read_description (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->read_description (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->read_description (); - fprintf_unfiltered (gdb_stdlog, "<- %s->read_description (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->read_description (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_struct_target_desc_p (result); gdb_puts ("\n", gdb_stdlog); @@ -2610,9 +2610,9 @@ ptid_t debug_target::get_ada_task_ptid (long arg0, ULONGEST arg1) { ptid_t result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_ada_task_ptid (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_ada_task_ptid (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_ada_task_ptid (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_ada_task_ptid (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_ada_task_ptid (", this->beneath ()->shortname ()); target_debug_print_long (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ULONGEST (arg1); @@ -2638,9 +2638,9 @@ int debug_target::auxv_parse (gdb_byte **arg0, gdb_byte *arg1, CORE_ADDR *arg2, CORE_ADDR *arg3) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->auxv_parse (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->auxv_parse (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->auxv_parse (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->auxv_parse (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->auxv_parse (", this->beneath ()->shortname ()); target_debug_print_gdb_byte_pp (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_gdb_byte_p (arg1); @@ -2670,9 +2670,9 @@ int debug_target::search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2, ULONGEST arg3, CORE_ADDR *arg4) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->search_memory (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->search_memory (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->search_memory (arg0, arg1, arg2, arg3, arg4); - fprintf_unfiltered (gdb_stdlog, "<- %s->search_memory (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->search_memory (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ULONGEST (arg1); @@ -2704,9 +2704,9 @@ bool debug_target::can_execute_reverse () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_execute_reverse (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_execute_reverse (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_execute_reverse (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_execute_reverse (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_execute_reverse (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2729,9 +2729,9 @@ enum exec_direction_kind debug_target::execution_direction () { enum exec_direction_kind result; - fprintf_unfiltered (gdb_stdlog, "-> %s->execution_direction (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->execution_direction (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->execution_direction (); - fprintf_unfiltered (gdb_stdlog, "<- %s->execution_direction (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->execution_direction (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_enum_exec_direction_kind (result); gdb_puts ("\n", gdb_stdlog); @@ -2754,9 +2754,9 @@ bool debug_target::supports_multi_process () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_multi_process (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_multi_process (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_multi_process (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_multi_process (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_multi_process (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2779,9 +2779,9 @@ bool debug_target::supports_enable_disable_tracepoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_enable_disable_tracepoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_enable_disable_tracepoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_enable_disable_tracepoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_enable_disable_tracepoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_enable_disable_tracepoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2804,9 +2804,9 @@ bool debug_target::supports_disable_randomization () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_disable_randomization (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_disable_randomization (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_disable_randomization (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_disable_randomization (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_disable_randomization (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2829,9 +2829,9 @@ bool debug_target::supports_string_tracing () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_string_tracing (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_string_tracing (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_string_tracing (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_string_tracing (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_string_tracing (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2854,9 +2854,9 @@ bool debug_target::supports_evaluation_of_breakpoint_conditions () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_evaluation_of_breakpoint_conditions (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_evaluation_of_breakpoint_conditions (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_evaluation_of_breakpoint_conditions (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_evaluation_of_breakpoint_conditions (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_evaluation_of_breakpoint_conditions (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2879,9 +2879,9 @@ bool debug_target::supports_dumpcore () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_dumpcore (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_dumpcore (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_dumpcore (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_dumpcore (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_dumpcore (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2902,9 +2902,9 @@ dummy_target::dumpcore (const char *arg0) void debug_target::dumpcore (const char *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->dumpcore (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->dumpcore (...)\n", this->beneath ()->shortname ()); this->beneath ()->dumpcore (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->dumpcore (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->dumpcore (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -2925,9 +2925,9 @@ bool debug_target::can_run_breakpoint_commands () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_run_breakpoint_commands (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_run_breakpoint_commands (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_run_breakpoint_commands (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_run_breakpoint_commands (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_run_breakpoint_commands (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -2950,9 +2950,9 @@ struct gdbarch * debug_target::thread_architecture (ptid_t arg0) { struct gdbarch * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_architecture (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_architecture (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_architecture (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_architecture (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_architecture (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_struct_gdbarch_p (result); @@ -2976,9 +2976,9 @@ struct address_space * debug_target::thread_address_space (ptid_t arg0) { struct address_space * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->thread_address_space (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->thread_address_space (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->thread_address_space (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->thread_address_space (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->thread_address_space (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_struct_address_space_p (result); @@ -3002,9 +3002,9 @@ bool debug_target::filesystem_is_local () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->filesystem_is_local (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->filesystem_is_local (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->filesystem_is_local (); - fprintf_unfiltered (gdb_stdlog, "<- %s->filesystem_is_local (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->filesystem_is_local (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -3026,9 +3026,9 @@ dummy_target::trace_init () void debug_target::trace_init () { - fprintf_unfiltered (gdb_stdlog, "-> %s->trace_init (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->trace_init (...)\n", this->beneath ()->shortname ()); this->beneath ()->trace_init (); - fprintf_unfiltered (gdb_stdlog, "<- %s->trace_init (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->trace_init (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3047,9 +3047,9 @@ dummy_target::download_tracepoint (struct bp_location *arg0) void debug_target::download_tracepoint (struct bp_location *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->download_tracepoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->download_tracepoint (...)\n", this->beneath ()->shortname ()); this->beneath ()->download_tracepoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->download_tracepoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->download_tracepoint (", this->beneath ()->shortname ()); target_debug_print_struct_bp_location_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3070,9 +3070,9 @@ bool debug_target::can_download_tracepoint () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_download_tracepoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_download_tracepoint (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_download_tracepoint (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_download_tracepoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_download_tracepoint (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -3094,9 +3094,9 @@ dummy_target::download_trace_state_variable (const trace_state_variable &arg0) void debug_target::download_trace_state_variable (const trace_state_variable &arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->download_trace_state_variable (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->download_trace_state_variable (...)\n", this->beneath ()->shortname ()); this->beneath ()->download_trace_state_variable (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->download_trace_state_variable (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->download_trace_state_variable (", this->beneath ()->shortname ()); target_debug_print_const_trace_state_variable_r (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3116,9 +3116,9 @@ dummy_target::enable_tracepoint (struct bp_location *arg0) void debug_target::enable_tracepoint (struct bp_location *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->enable_tracepoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->enable_tracepoint (...)\n", this->beneath ()->shortname ()); this->beneath ()->enable_tracepoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->enable_tracepoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->enable_tracepoint (", this->beneath ()->shortname ()); target_debug_print_struct_bp_location_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3138,9 +3138,9 @@ dummy_target::disable_tracepoint (struct bp_location *arg0) void debug_target::disable_tracepoint (struct bp_location *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->disable_tracepoint (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->disable_tracepoint (...)\n", this->beneath ()->shortname ()); this->beneath ()->disable_tracepoint (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->disable_tracepoint (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->disable_tracepoint (", this->beneath ()->shortname ()); target_debug_print_struct_bp_location_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3160,9 +3160,9 @@ dummy_target::trace_set_readonly_regions () void debug_target::trace_set_readonly_regions () { - fprintf_unfiltered (gdb_stdlog, "-> %s->trace_set_readonly_regions (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->trace_set_readonly_regions (...)\n", this->beneath ()->shortname ()); this->beneath ()->trace_set_readonly_regions (); - fprintf_unfiltered (gdb_stdlog, "<- %s->trace_set_readonly_regions (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->trace_set_readonly_regions (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3181,9 +3181,9 @@ dummy_target::trace_start () void debug_target::trace_start () { - fprintf_unfiltered (gdb_stdlog, "-> %s->trace_start (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->trace_start (...)\n", this->beneath ()->shortname ()); this->beneath ()->trace_start (); - fprintf_unfiltered (gdb_stdlog, "<- %s->trace_start (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->trace_start (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3203,9 +3203,9 @@ int debug_target::get_trace_status (struct trace_status *arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_trace_status (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_trace_status (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_trace_status (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_trace_status (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_trace_status (", this->beneath ()->shortname ()); target_debug_print_struct_trace_status_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -3228,9 +3228,9 @@ dummy_target::get_tracepoint_status (struct breakpoint *arg0, struct uploaded_tp void debug_target::get_tracepoint_status (struct breakpoint *arg0, struct uploaded_tp *arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->get_tracepoint_status (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_tracepoint_status (...)\n", this->beneath ()->shortname ()); this->beneath ()->get_tracepoint_status (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_tracepoint_status (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_tracepoint_status (", this->beneath ()->shortname ()); target_debug_print_struct_breakpoint_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_uploaded_tp_p (arg1); @@ -3252,9 +3252,9 @@ dummy_target::trace_stop () void debug_target::trace_stop () { - fprintf_unfiltered (gdb_stdlog, "-> %s->trace_stop (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->trace_stop (...)\n", this->beneath ()->shortname ()); this->beneath ()->trace_stop (); - fprintf_unfiltered (gdb_stdlog, "<- %s->trace_stop (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->trace_stop (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3274,9 +3274,9 @@ int debug_target::trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, CORE_ADDR arg3, int *arg4) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->trace_find (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->trace_find (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->trace_find (arg0, arg1, arg2, arg3, arg4); - fprintf_unfiltered (gdb_stdlog, "<- %s->trace_find (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->trace_find (", this->beneath ()->shortname ()); target_debug_print_enum_trace_find_type (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -3308,9 +3308,9 @@ bool debug_target::get_trace_state_variable_value (int arg0, LONGEST *arg1) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_trace_state_variable_value (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_trace_state_variable_value (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_trace_state_variable_value (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_trace_state_variable_value (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_trace_state_variable_value (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_LONGEST_p (arg1); @@ -3336,9 +3336,9 @@ int debug_target::save_trace_data (const char *arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->save_trace_data (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->save_trace_data (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->save_trace_data (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->save_trace_data (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->save_trace_data (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -3362,9 +3362,9 @@ int debug_target::upload_tracepoints (struct uploaded_tp **arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->upload_tracepoints (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->upload_tracepoints (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->upload_tracepoints (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->upload_tracepoints (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->upload_tracepoints (", this->beneath ()->shortname ()); target_debug_print_struct_uploaded_tp_pp (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -3388,9 +3388,9 @@ int debug_target::upload_trace_state_variables (struct uploaded_tsv **arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->upload_trace_state_variables (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->upload_trace_state_variables (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->upload_trace_state_variables (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->upload_trace_state_variables (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->upload_trace_state_variables (", this->beneath ()->shortname ()); target_debug_print_struct_uploaded_tsv_pp (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -3414,9 +3414,9 @@ LONGEST debug_target::get_raw_trace_data (gdb_byte *arg0, ULONGEST arg1, LONGEST arg2) { LONGEST result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_raw_trace_data (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_raw_trace_data (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_raw_trace_data (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_raw_trace_data (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_raw_trace_data (", this->beneath ()->shortname ()); target_debug_print_gdb_byte_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ULONGEST (arg1); @@ -3444,9 +3444,9 @@ int debug_target::get_min_fast_tracepoint_insn_len () { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_min_fast_tracepoint_insn_len (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_min_fast_tracepoint_insn_len (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_min_fast_tracepoint_insn_len (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_min_fast_tracepoint_insn_len (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_min_fast_tracepoint_insn_len (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); gdb_puts ("\n", gdb_stdlog); @@ -3467,9 +3467,9 @@ dummy_target::set_disconnected_tracing (int arg0) void debug_target::set_disconnected_tracing (int arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->set_disconnected_tracing (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_disconnected_tracing (...)\n", this->beneath ()->shortname ()); this->beneath ()->set_disconnected_tracing (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_disconnected_tracing (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_disconnected_tracing (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3488,9 +3488,9 @@ dummy_target::set_circular_trace_buffer (int arg0) void debug_target::set_circular_trace_buffer (int arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->set_circular_trace_buffer (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_circular_trace_buffer (...)\n", this->beneath ()->shortname ()); this->beneath ()->set_circular_trace_buffer (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_circular_trace_buffer (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_circular_trace_buffer (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3509,9 +3509,9 @@ dummy_target::set_trace_buffer_size (LONGEST arg0) void debug_target::set_trace_buffer_size (LONGEST arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->set_trace_buffer_size (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_trace_buffer_size (...)\n", this->beneath ()->shortname ()); this->beneath ()->set_trace_buffer_size (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_trace_buffer_size (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_trace_buffer_size (", this->beneath ()->shortname ()); target_debug_print_LONGEST (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3532,9 +3532,9 @@ bool debug_target::set_trace_notes (const char *arg0, const char *arg1, const char *arg2) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->set_trace_notes (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_trace_notes (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->set_trace_notes (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_trace_notes (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_trace_notes (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_const_char_p (arg1); @@ -3562,9 +3562,9 @@ int debug_target::core_of_thread (ptid_t arg0) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->core_of_thread (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->core_of_thread (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->core_of_thread (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->core_of_thread (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->core_of_thread (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_int (result); @@ -3588,9 +3588,9 @@ int debug_target::verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->verify_memory (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->verify_memory (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->verify_memory (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->verify_memory (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->verify_memory (", this->beneath ()->shortname ()); target_debug_print_const_gdb_byte_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); @@ -3618,9 +3618,9 @@ bool debug_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_tib_address (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_tib_address (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_tib_address (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_tib_address (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_tib_address (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_CORE_ADDR_p (arg1); @@ -3644,9 +3644,9 @@ dummy_target::set_permissions () void debug_target::set_permissions () { - fprintf_unfiltered (gdb_stdlog, "-> %s->set_permissions (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->set_permissions (...)\n", this->beneath ()->shortname ()); this->beneath ()->set_permissions (); - fprintf_unfiltered (gdb_stdlog, "<- %s->set_permissions (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->set_permissions (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3666,9 +3666,9 @@ bool debug_target::static_tracepoint_marker_at (CORE_ADDR arg0, static_tracepoint_marker *arg1) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->static_tracepoint_marker_at (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->static_tracepoint_marker_at (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->static_tracepoint_marker_at (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->static_tracepoint_marker_at (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->static_tracepoint_marker_at (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_static_tracepoint_marker_p (arg1); @@ -3694,9 +3694,9 @@ std::vector<static_tracepoint_marker> debug_target::static_tracepoint_markers_by_strid (const char *arg0) { std::vector<static_tracepoint_marker> result; - fprintf_unfiltered (gdb_stdlog, "-> %s->static_tracepoint_markers_by_strid (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->static_tracepoint_markers_by_strid (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->static_tracepoint_markers_by_strid (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->static_tracepoint_markers_by_strid (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->static_tracepoint_markers_by_strid (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_std_vector_static_tracepoint_marker (result); @@ -3720,9 +3720,9 @@ traceframe_info_up debug_target::traceframe_info () { traceframe_info_up result; - fprintf_unfiltered (gdb_stdlog, "-> %s->traceframe_info (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->traceframe_info (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->traceframe_info (); - fprintf_unfiltered (gdb_stdlog, "<- %s->traceframe_info (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->traceframe_info (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_traceframe_info_up (result); gdb_puts ("\n", gdb_stdlog); @@ -3745,9 +3745,9 @@ bool debug_target::use_agent (bool arg0) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->use_agent (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->use_agent (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->use_agent (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->use_agent (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->use_agent (", this->beneath ()->shortname ()); target_debug_print_bool (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); @@ -3771,9 +3771,9 @@ bool debug_target::can_use_agent () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_use_agent (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->can_use_agent (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->can_use_agent (); - fprintf_unfiltered (gdb_stdlog, "<- %s->can_use_agent (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->can_use_agent (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -3796,9 +3796,9 @@ struct btrace_target_info * debug_target::enable_btrace (thread_info *arg0, const struct btrace_config *arg1) { struct btrace_target_info * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->enable_btrace (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->enable_btrace (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->enable_btrace (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->enable_btrace (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->enable_btrace (", this->beneath ()->shortname ()); target_debug_print_thread_info_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_const_struct_btrace_config_p (arg1); @@ -3823,9 +3823,9 @@ dummy_target::disable_btrace (struct btrace_target_info *arg0) void debug_target::disable_btrace (struct btrace_target_info *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->disable_btrace (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->disable_btrace (...)\n", this->beneath ()->shortname ()); this->beneath ()->disable_btrace (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->disable_btrace (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->disable_btrace (", this->beneath ()->shortname ()); target_debug_print_struct_btrace_target_info_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3845,9 +3845,9 @@ dummy_target::teardown_btrace (struct btrace_target_info *arg0) void debug_target::teardown_btrace (struct btrace_target_info *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->teardown_btrace (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->teardown_btrace (...)\n", this->beneath ()->shortname ()); this->beneath ()->teardown_btrace (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->teardown_btrace (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->teardown_btrace (", this->beneath ()->shortname ()); target_debug_print_struct_btrace_target_info_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -3868,9 +3868,9 @@ enum btrace_error debug_target::read_btrace (struct btrace_data *arg0, struct btrace_target_info *arg1, enum btrace_read_type arg2) { enum btrace_error result; - fprintf_unfiltered (gdb_stdlog, "-> %s->read_btrace (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->read_btrace (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->read_btrace (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->read_btrace (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->read_btrace (", this->beneath ()->shortname ()); target_debug_print_struct_btrace_data_p (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_struct_btrace_target_info_p (arg1); @@ -3898,9 +3898,9 @@ const struct btrace_config * debug_target::btrace_conf (const struct btrace_target_info *arg0) { const struct btrace_config * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->btrace_conf (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->btrace_conf (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->btrace_conf (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->btrace_conf (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->btrace_conf (", this->beneath ()->shortname ()); target_debug_print_const_struct_btrace_target_info_p (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_struct_btrace_config_p (result); @@ -3924,9 +3924,9 @@ enum record_method debug_target::record_method (ptid_t arg0) { enum record_method result; - fprintf_unfiltered (gdb_stdlog, "-> %s->record_method (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->record_method (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->record_method (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->record_method (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->record_method (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_enum_record_method (result); @@ -3948,9 +3948,9 @@ dummy_target::stop_recording () void debug_target::stop_recording () { - fprintf_unfiltered (gdb_stdlog, "-> %s->stop_recording (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->stop_recording (...)\n", this->beneath ()->shortname ()); this->beneath ()->stop_recording (); - fprintf_unfiltered (gdb_stdlog, "<- %s->stop_recording (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->stop_recording (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3968,9 +3968,9 @@ dummy_target::info_record () void debug_target::info_record () { - fprintf_unfiltered (gdb_stdlog, "-> %s->info_record (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->info_record (...)\n", this->beneath ()->shortname ()); this->beneath ()->info_record (); - fprintf_unfiltered (gdb_stdlog, "<- %s->info_record (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->info_record (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -3989,9 +3989,9 @@ dummy_target::save_record (const char *arg0) void debug_target::save_record (const char *arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->save_record (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->save_record (...)\n", this->beneath ()->shortname ()); this->beneath ()->save_record (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->save_record (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->save_record (", this->beneath ()->shortname ()); target_debug_print_const_char_p (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -4012,9 +4012,9 @@ bool debug_target::supports_delete_record () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_delete_record (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_delete_record (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_delete_record (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_delete_record (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_delete_record (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -4036,9 +4036,9 @@ dummy_target::delete_record () void debug_target::delete_record () { - fprintf_unfiltered (gdb_stdlog, "-> %s->delete_record (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->delete_record (...)\n", this->beneath ()->shortname ()); this->beneath ()->delete_record (); - fprintf_unfiltered (gdb_stdlog, "<- %s->delete_record (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->delete_record (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4058,9 +4058,9 @@ bool debug_target::record_is_replaying (ptid_t arg0) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->record_is_replaying (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->record_is_replaying (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->record_is_replaying (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->record_is_replaying (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->record_is_replaying (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); @@ -4084,9 +4084,9 @@ bool debug_target::record_will_replay (ptid_t arg0, int arg1) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->record_will_replay (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->record_will_replay (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->record_will_replay (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->record_will_replay (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->record_will_replay (", this->beneath ()->shortname ()); target_debug_print_ptid_t (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -4110,9 +4110,9 @@ dummy_target::record_stop_replaying () void debug_target::record_stop_replaying () { - fprintf_unfiltered (gdb_stdlog, "-> %s->record_stop_replaying (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->record_stop_replaying (...)\n", this->beneath ()->shortname ()); this->beneath ()->record_stop_replaying (); - fprintf_unfiltered (gdb_stdlog, "<- %s->record_stop_replaying (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->record_stop_replaying (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4131,9 +4131,9 @@ dummy_target::goto_record_begin () void debug_target::goto_record_begin () { - fprintf_unfiltered (gdb_stdlog, "-> %s->goto_record_begin (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->goto_record_begin (...)\n", this->beneath ()->shortname ()); this->beneath ()->goto_record_begin (); - fprintf_unfiltered (gdb_stdlog, "<- %s->goto_record_begin (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->goto_record_begin (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4152,9 +4152,9 @@ dummy_target::goto_record_end () void debug_target::goto_record_end () { - fprintf_unfiltered (gdb_stdlog, "-> %s->goto_record_end (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->goto_record_end (...)\n", this->beneath ()->shortname ()); this->beneath ()->goto_record_end (); - fprintf_unfiltered (gdb_stdlog, "<- %s->goto_record_end (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->goto_record_end (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4173,9 +4173,9 @@ dummy_target::goto_record (ULONGEST arg0) void debug_target::goto_record (ULONGEST arg0) { - fprintf_unfiltered (gdb_stdlog, "-> %s->goto_record (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->goto_record (...)\n", this->beneath ()->shortname ()); this->beneath ()->goto_record (arg0); - fprintf_unfiltered (gdb_stdlog, "<- %s->goto_record (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->goto_record (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (")\n", gdb_stdlog); } @@ -4195,9 +4195,9 @@ dummy_target::insn_history (int arg0, gdb_disassembly_flags arg1) void debug_target::insn_history (int arg0, gdb_disassembly_flags arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->insn_history (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insn_history (...)\n", this->beneath ()->shortname ()); this->beneath ()->insn_history (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->insn_history (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insn_history (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_gdb_disassembly_flags (arg1); @@ -4219,9 +4219,9 @@ dummy_target::insn_history_from (ULONGEST arg0, int arg1, gdb_disassembly_flags void debug_target::insn_history_from (ULONGEST arg0, int arg1, gdb_disassembly_flags arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->insn_history_from (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insn_history_from (...)\n", this->beneath ()->shortname ()); this->beneath ()->insn_history_from (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->insn_history_from (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insn_history_from (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -4245,9 +4245,9 @@ dummy_target::insn_history_range (ULONGEST arg0, ULONGEST arg1, gdb_disassembly_ void debug_target::insn_history_range (ULONGEST arg0, ULONGEST arg1, gdb_disassembly_flags arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->insn_history_range (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->insn_history_range (...)\n", this->beneath ()->shortname ()); this->beneath ()->insn_history_range (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->insn_history_range (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->insn_history_range (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ULONGEST (arg1); @@ -4271,9 +4271,9 @@ dummy_target::call_history (int arg0, record_print_flags arg1) void debug_target::call_history (int arg0, record_print_flags arg1) { - fprintf_unfiltered (gdb_stdlog, "-> %s->call_history (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->call_history (...)\n", this->beneath ()->shortname ()); this->beneath ()->call_history (arg0, arg1); - fprintf_unfiltered (gdb_stdlog, "<- %s->call_history (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->call_history (", this->beneath ()->shortname ()); target_debug_print_int (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_record_print_flags (arg1); @@ -4295,9 +4295,9 @@ dummy_target::call_history_from (ULONGEST arg0, int arg1, record_print_flags arg void debug_target::call_history_from (ULONGEST arg0, int arg1, record_print_flags arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->call_history_from (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->call_history_from (...)\n", this->beneath ()->shortname ()); this->beneath ()->call_history_from (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->call_history_from (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->call_history_from (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_int (arg1); @@ -4321,9 +4321,9 @@ dummy_target::call_history_range (ULONGEST arg0, ULONGEST arg1, record_print_fla void debug_target::call_history_range (ULONGEST arg0, ULONGEST arg1, record_print_flags arg2) { - fprintf_unfiltered (gdb_stdlog, "-> %s->call_history_range (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->call_history_range (...)\n", this->beneath ()->shortname ()); this->beneath ()->call_history_range (arg0, arg1, arg2); - fprintf_unfiltered (gdb_stdlog, "<- %s->call_history_range (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->call_history_range (", this->beneath ()->shortname ()); target_debug_print_ULONGEST (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_ULONGEST (arg1); @@ -4348,9 +4348,9 @@ bool debug_target::augmented_libraries_svr4_read () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->augmented_libraries_svr4_read (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->augmented_libraries_svr4_read (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->augmented_libraries_svr4_read (); - fprintf_unfiltered (gdb_stdlog, "<- %s->augmented_libraries_svr4_read (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->augmented_libraries_svr4_read (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -4373,9 +4373,9 @@ const struct frame_unwind * debug_target::get_unwinder () { const struct frame_unwind * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_unwinder (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_unwinder (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_unwinder (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_unwinder (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_unwinder (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_struct_frame_unwind_p (result); gdb_puts ("\n", gdb_stdlog); @@ -4398,9 +4398,9 @@ const struct frame_unwind * debug_target::get_tailcall_unwinder () { const struct frame_unwind * result; - fprintf_unfiltered (gdb_stdlog, "-> %s->get_tailcall_unwinder (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->get_tailcall_unwinder (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->get_tailcall_unwinder (); - fprintf_unfiltered (gdb_stdlog, "<- %s->get_tailcall_unwinder (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->get_tailcall_unwinder (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_const_struct_frame_unwind_p (result); gdb_puts ("\n", gdb_stdlog); @@ -4421,9 +4421,9 @@ dummy_target::prepare_to_generate_core () void debug_target::prepare_to_generate_core () { - fprintf_unfiltered (gdb_stdlog, "-> %s->prepare_to_generate_core (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->prepare_to_generate_core (...)\n", this->beneath ()->shortname ()); this->beneath ()->prepare_to_generate_core (); - fprintf_unfiltered (gdb_stdlog, "<- %s->prepare_to_generate_core (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->prepare_to_generate_core (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4441,9 +4441,9 @@ dummy_target::done_generating_core () void debug_target::done_generating_core () { - fprintf_unfiltered (gdb_stdlog, "-> %s->done_generating_core (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->done_generating_core (...)\n", this->beneath ()->shortname ()); this->beneath ()->done_generating_core (); - fprintf_unfiltered (gdb_stdlog, "<- %s->done_generating_core (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->done_generating_core (", this->beneath ()->shortname ()); gdb_puts (")\n", gdb_stdlog); } @@ -4463,9 +4463,9 @@ bool debug_target::supports_memory_tagging () { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->supports_memory_tagging (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->supports_memory_tagging (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->supports_memory_tagging (); - fprintf_unfiltered (gdb_stdlog, "<- %s->supports_memory_tagging (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->supports_memory_tagging (", this->beneath ()->shortname ()); gdb_puts (") = ", gdb_stdlog); target_debug_print_bool (result); gdb_puts ("\n", gdb_stdlog); @@ -4488,9 +4488,9 @@ bool debug_target::fetch_memtags (CORE_ADDR arg0, size_t arg1, gdb::byte_vector &arg2, int arg3) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->fetch_memtags (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->fetch_memtags (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->fetch_memtags (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->fetch_memtags (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->fetch_memtags (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_size_t (arg1); @@ -4520,9 +4520,9 @@ bool debug_target::store_memtags (CORE_ADDR arg0, size_t arg1, const gdb::byte_vector &arg2, int arg3) { bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->store_memtags (...)\n", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "-> %s->store_memtags (...)\n", this->beneath ()->shortname ()); result = this->beneath ()->store_memtags (arg0, arg1, arg2, arg3); - fprintf_unfiltered (gdb_stdlog, "<- %s->store_memtags (", this->beneath ()->shortname ()); + gdb_printf (gdb_stdlog, "<- %s->store_memtags (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); gdb_puts (", ", gdb_stdlog); target_debug_print_size_t (arg1); diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index d5e07fc..ae3b821 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -1303,13 +1303,13 @@ show_tdesc_filename_cmd (struct ui_file *file, int from_tty, value = get_tdesc_info (current_inferior ())->filename.data (); if (value != NULL && *value != '\0') - fprintf_filtered (file, - _("The target description will be read from \"%s\".\n"), - value); + gdb_printf (file, + _("The target description will be read from \"%s\".\n"), + value); else - fprintf_filtered (file, - _("The target description will be " - "read from the target.\n")); + gdb_printf (file, + _("The target description will be " + "read from the target.\n")); } static void @@ -1347,9 +1347,9 @@ public: *outp = '\0'; /* Standard boilerplate. */ - printf_filtered ("/* THIS FILE IS GENERATED. " - "-*- buffer-read-only: t -*- vi" - ":set ro:\n"); + gdb_printf ("/* THIS FILE IS GENERATED. " + "-*- buffer-read-only: t -*- vi" + ":set ro:\n"); } ~print_c_tdesc () @@ -1359,56 +1359,56 @@ public: void visit_pre (const target_desc *e) override { - printf_filtered (" Original: %s */\n\n", - lbasename (m_filename_after_features.c_str ())); - - printf_filtered ("#include \"defs.h\"\n"); - printf_filtered ("#include \"osabi.h\"\n"); - printf_filtered ("#include \"target-descriptions.h\"\n"); - printf_filtered ("\n"); - - printf_filtered ("struct target_desc *tdesc_%s;\n", m_function); - printf_filtered ("static void\n"); - printf_filtered ("initialize_tdesc_%s (void)\n", m_function); - printf_filtered ("{\n"); - printf_filtered + gdb_printf (" Original: %s */\n\n", + lbasename (m_filename_after_features.c_str ())); + + gdb_printf ("#include \"defs.h\"\n"); + gdb_printf ("#include \"osabi.h\"\n"); + gdb_printf ("#include \"target-descriptions.h\"\n"); + gdb_printf ("\n"); + + gdb_printf ("struct target_desc *tdesc_%s;\n", m_function); + gdb_printf ("static void\n"); + gdb_printf ("initialize_tdesc_%s (void)\n", m_function); + gdb_printf ("{\n"); + gdb_printf (" target_desc_up result = allocate_target_description ();\n"); if (tdesc_architecture (e) != NULL) { - printf_filtered + gdb_printf (" set_tdesc_architecture (result.get (), bfd_scan_arch (\"%s\"));\n", tdesc_architecture (e)->printable_name); - printf_filtered ("\n"); + gdb_printf ("\n"); } if (tdesc_osabi (e) > GDB_OSABI_UNKNOWN && tdesc_osabi (e) < GDB_OSABI_INVALID) { - printf_filtered + gdb_printf (" set_tdesc_osabi (result.get (), osabi_from_tdesc_string (\"%s\"));\n", gdbarch_osabi_name (tdesc_osabi (e))); - printf_filtered ("\n"); + gdb_printf ("\n"); } for (const tdesc_compatible_info_up &compatible : e->compatible) - printf_filtered + gdb_printf (" tdesc_add_compatible (result.get (), bfd_scan_arch (\"%s\"));\n", compatible->arch ()->printable_name); if (!e->compatible.empty ()) - printf_filtered ("\n"); + gdb_printf ("\n"); for (const property &prop : e->properties) - printf_filtered (" set_tdesc_property (result.get (), \"%s\", \"%s\");\n", - prop.key.c_str (), prop.value.c_str ()); + gdb_printf (" set_tdesc_property (result.get (), \"%s\", \"%s\");\n", + prop.key.c_str (), prop.value.c_str ()); - printf_filtered (" struct tdesc_feature *feature;\n"); + gdb_printf (" struct tdesc_feature *feature;\n"); } void visit_pre (const tdesc_feature *e) override { - printf_filtered ("\n feature = tdesc_create_feature (result.get (), \"%s\");\n", - e->name.c_str ()); + gdb_printf ("\n feature = tdesc_create_feature (result.get (), \"%s\");\n", + e->name.c_str ()); } void visit_post (const tdesc_feature *e) override @@ -1416,8 +1416,8 @@ public: void visit_post (const target_desc *e) override { - printf_filtered ("\n tdesc_%s = result.release ();\n", m_function); - printf_filtered ("}\n"); + gdb_printf ("\n tdesc_%s = result.release ();\n", m_function); + gdb_printf ("}\n"); } void visit (const tdesc_type_builtin *type) override @@ -1429,25 +1429,25 @@ public: { if (!m_printed_element_type) { - printf_filtered (" tdesc_type *element_type;\n"); + gdb_printf (" tdesc_type *element_type;\n"); m_printed_element_type = true; } - printf_filtered + gdb_printf (" element_type = tdesc_named_type (feature, \"%s\");\n", type->element_type->name.c_str ()); - printf_filtered + gdb_printf (" tdesc_create_vector (feature, \"%s\", element_type, %d);\n", type->name.c_str (), type->count); - printf_filtered ("\n"); + gdb_printf ("\n"); } void visit (const tdesc_type_with_fields *type) override { if (!m_printed_type_with_fields) { - printf_filtered (" tdesc_type_with_fields *type_with_fields;\n"); + gdb_printf (" tdesc_type_with_fields *type_with_fields;\n"); m_printed_type_with_fields = true; } @@ -1457,16 +1457,16 @@ public: case TDESC_TYPE_FLAGS: if (type->kind == TDESC_TYPE_STRUCT) { - printf_filtered + gdb_printf (" type_with_fields = tdesc_create_struct (feature, \"%s\");\n", type->name.c_str ()); if (type->size != 0) - printf_filtered + gdb_printf (" tdesc_set_struct_size (type_with_fields, %d);\n", type->size); } else { - printf_filtered + gdb_printf (" type_with_fields = tdesc_create_flags (feature, \"%s\", %d);\n", type->name.c_str (), type->size); } @@ -1485,7 +1485,7 @@ public: if (f.type->kind == TDESC_TYPE_BOOL) { gdb_assert (f.start == f.end); - printf_filtered + gdb_printf (" tdesc_add_flag (type_with_fields, %d, \"%s\");\n", f.start, f.name.c_str ()); } @@ -1493,7 +1493,7 @@ public: || (type->size == 8 && f.type->kind == TDESC_TYPE_UINT64)) { - printf_filtered + gdb_printf (" tdesc_add_bitfield (type_with_fields, \"%s\", %d, %d);\n", f.name.c_str (), f.start, f.end); } @@ -1502,7 +1502,7 @@ public: printf_field_type_assignment ("tdesc_named_type (feature, \"%s\");\n", type_name); - printf_filtered + gdb_printf (" tdesc_add_typed_bitfield (type_with_fields, \"%s\"," " %d, %d, field_type);\n", f.name.c_str (), f.start, f.end); @@ -1514,31 +1514,31 @@ public: gdb_assert (type->kind == TDESC_TYPE_STRUCT); printf_field_type_assignment ("tdesc_named_type (feature, \"%s\");\n", type_name); - printf_filtered + gdb_printf (" tdesc_add_field (type_with_fields, \"%s\", field_type);\n", f.name.c_str ()); } } break; case TDESC_TYPE_UNION: - printf_filtered + gdb_printf (" type_with_fields = tdesc_create_union (feature, \"%s\");\n", type->name.c_str ()); for (const tdesc_type_field &f : type->fields) { printf_field_type_assignment ("tdesc_named_type (feature, \"%s\");\n", f.type->name.c_str ()); - printf_filtered + gdb_printf (" tdesc_add_field (type_with_fields, \"%s\", field_type);\n", f.name.c_str ()); } break; case TDESC_TYPE_ENUM: - printf_filtered + gdb_printf (" type_with_fields = tdesc_create_enum (feature, \"%s\", %d);\n", type->name.c_str (), type->size); for (const tdesc_type_field &f : type->fields) - printf_filtered + gdb_printf (" tdesc_add_enum_value (type_with_fields, %d, \"%s\");\n", f.start, f.name.c_str ()); break; @@ -1546,19 +1546,19 @@ public: error (_("C output is not supported type \"%s\"."), type->name.c_str ()); } - printf_filtered ("\n"); + gdb_printf ("\n"); } void visit (const tdesc_reg *reg) override { - printf_filtered (" tdesc_create_reg (feature, \"%s\", %ld, %d, ", - reg->name.c_str (), reg->target_regnum, - reg->save_restore); + gdb_printf (" tdesc_create_reg (feature, \"%s\", %ld, %d, ", + reg->name.c_str (), reg->target_regnum, + reg->save_restore); if (!reg->group.empty ()) - printf_filtered ("\"%s\", ", reg->group.c_str ()); + gdb_printf ("\"%s\", ", reg->group.c_str ()); else - printf_filtered ("NULL, "); - printf_filtered ("%d, \"%s\");\n", reg->bitsize, reg->type.c_str ()); + gdb_printf ("NULL, "); + gdb_printf ("%d, \"%s\");\n", reg->bitsize, reg->type.c_str ()); } protected: @@ -1573,11 +1573,11 @@ private: { if (!m_printed_field_type) { - printf_filtered (" tdesc_type *field_type;\n"); + gdb_printf (" tdesc_type *field_type;\n"); m_printed_field_type = true; } - printf_filtered (" field_type = "); + gdb_printf (" field_type = "); va_list args; va_start (args, fmt); @@ -1613,11 +1613,11 @@ public: void visit_pre (const target_desc *e) override { - printf_filtered (" Original: %s */\n\n", - lbasename (m_filename_after_features.c_str ())); + gdb_printf (" Original: %s */\n\n", + lbasename (m_filename_after_features.c_str ())); - printf_filtered ("#include \"gdbsupport/tdesc.h\"\n"); - printf_filtered ("\n"); + gdb_printf ("#include \"gdbsupport/tdesc.h\"\n"); + gdb_printf ("\n"); } void visit_post (const target_desc *e) override @@ -1633,22 +1633,22 @@ public: std::replace (name.begin (), name.end (), '/', '_'); std::replace (name.begin (), name.end (), '-', '_'); - printf_filtered ("static int\n"); - printf_filtered ("create_feature_%s ", name.c_str ()); - printf_filtered ("(struct target_desc *result, long regnum)\n"); + gdb_printf ("static int\n"); + gdb_printf ("create_feature_%s ", name.c_str ()); + gdb_printf ("(struct target_desc *result, long regnum)\n"); - printf_filtered ("{\n"); - printf_filtered (" struct tdesc_feature *feature;\n"); + gdb_printf ("{\n"); + gdb_printf (" struct tdesc_feature *feature;\n"); - printf_filtered + gdb_printf ("\n feature = tdesc_create_feature (result, \"%s\");\n", e->name.c_str ()); } void visit_post (const tdesc_feature *e) override { - printf_filtered (" return regnum;\n"); - printf_filtered ("}\n"); + gdb_printf (" return regnum;\n"); + gdb_printf ("}\n"); } void visit (const tdesc_reg *reg) override @@ -1681,27 +1681,27 @@ public: and also print the message so that it can be saved in the generated c file. */ - printf_filtered ("ERROR: \"regnum\" attribute %ld ", - reg->target_regnum); - printf_filtered ("is not the largest number (%d).\n", - m_next_regnum); + gdb_printf ("ERROR: \"regnum\" attribute %ld ", + reg->target_regnum); + gdb_printf ("is not the largest number (%d).\n", + m_next_regnum); error (_("\"regnum\" attribute %ld is not the largest number (%d)."), reg->target_regnum, m_next_regnum); } if (reg->target_regnum > m_next_regnum) { - printf_filtered (" regnum = %ld;\n", reg->target_regnum); + gdb_printf (" regnum = %ld;\n", reg->target_regnum); m_next_regnum = reg->target_regnum; } - printf_filtered (" tdesc_create_reg (feature, \"%s\", regnum++, %d, ", - reg->name.c_str (), reg->save_restore); + gdb_printf (" tdesc_create_reg (feature, \"%s\", regnum++, %d, ", + reg->name.c_str (), reg->save_restore); if (!reg->group.empty ()) - printf_filtered ("\"%s\", ", reg->group.c_str ()); + gdb_printf ("\"%s\", ", reg->group.c_str ()); else - printf_filtered ("NULL, "); - printf_filtered ("%d, \"%s\");\n", reg->bitsize, reg->type.c_str ()); + gdb_printf ("NULL, "); + gdb_printf ("%d, \"%s\");\n", reg->bitsize, reg->type.c_str ()); m_next_regnum++; } @@ -1900,8 +1900,8 @@ maintenance_check_tdesc_xml_convert (const target_desc *tdesc, const char *name) if (xml == nullptr || *xml != '@') { - printf_filtered (_("Could not convert description for %s to xml.\n"), - name); + gdb_printf (_("Could not convert description for %s to xml.\n"), + name); return false; } @@ -1909,14 +1909,14 @@ maintenance_check_tdesc_xml_convert (const target_desc *tdesc, const char *name) if (tdesc_trans == nullptr) { - printf_filtered (_("Could not convert description for %s from xml.\n"), - name); + gdb_printf (_("Could not convert description for %s from xml.\n"), + name); return false; } else if (*tdesc != *tdesc_trans) { - printf_filtered (_("Converted description for %s does not match.\n"), - name); + gdb_printf (_("Converted description for %s does not match.\n"), + name); return false; } return true; @@ -1945,15 +1945,15 @@ maintenance_check_xml_descriptions (const char *dir, int from_tty) if (tdesc == NULL || *tdesc != *e.tdesc) { - printf_filtered ( _("Descriptions for %s do not match.\n"), e.name); + gdb_printf ( _("Descriptions for %s do not match.\n"), e.name); failed++; } else if (!maintenance_check_tdesc_xml_convert (tdesc, e.name) || !maintenance_check_tdesc_xml_convert (e.tdesc.get (), e.name)) failed++; } - printf_filtered (_("Tested %lu XML files, %d failed\n"), - (long) selftests::xml_tdesc.size (), failed); + gdb_printf (_("Tested %lu XML files, %d failed\n"), + (long) selftests::xml_tdesc.size (), failed); } void _initialize_target_descriptions (); diff --git a/gdb/target.c b/gdb/target.c index 8216ee9..928f558 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -159,7 +159,7 @@ static void show_targetdebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Target debugging is %s.\n"), value); + gdb_printf (file, _("Target debugging is %s.\n"), value); } int @@ -847,14 +847,14 @@ open_target (const char *args, int from_tty, struct cmd_list_element *command) target_open_ftype *func = target_factories[ti]; if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "-> %s->open (...)\n", - ti->shortname); + gdb_printf (gdb_stdlog, "-> %s->open (...)\n", + ti->shortname); func (args, from_tty); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "<- %s->open (%s, %d)\n", - ti->shortname, args, from_tty); + gdb_printf (gdb_stdlog, "<- %s->open (%s, %d)\n", + ti->shortname, args, from_tty); } /* See target.h. */ @@ -1128,7 +1128,7 @@ noprocess (void) static void default_terminal_info (struct target_ops *self, const char *args, int from_tty) { - printf_filtered (_("No saved terminal information.\n")); + gdb_printf (_("No saved terminal information.\n")); } /* A default implementation for the to_get_ada_task_ptid target method. @@ -1240,9 +1240,9 @@ unpush_target_and_assert (struct target_ops *target) { if (!current_inferior ()->unpush_target (target)) { - fprintf_unfiltered (gdb_stderr, - "pop_all_targets couldn't find target %s\n", - target->shortname ()); + gdb_printf (gdb_stderr, + "pop_all_targets couldn't find target %s\n", + target->shortname ()); internal_error (__FILE__, __LINE__, _("failed internal consistency check")); } @@ -1749,17 +1749,17 @@ target_xfer_partial (struct target_ops *ops, { const unsigned char *myaddr = NULL; - fprintf_unfiltered (gdb_stdlog, - "%s:target_xfer_partial " - "(%d, %s, %s, %s, %s, %s) = %d, %s", - ops->shortname (), - (int) object, - (annex ? annex : "(null)"), - host_address_to_string (readbuf), - host_address_to_string (writebuf), - core_addr_to_string_nz (offset), - pulongest (len), retval, - pulongest (*xfered_len)); + gdb_printf (gdb_stdlog, + "%s:target_xfer_partial " + "(%d, %s, %s, %s, %s, %s) = %d, %s", + ops->shortname (), + (int) object, + (annex ? annex : "(null)"), + host_address_to_string (readbuf), + host_address_to_string (writebuf), + core_addr_to_string_nz (offset), + pulongest (len), retval, + pulongest (*xfered_len)); if (readbuf) myaddr = readbuf; @@ -1776,13 +1776,13 @@ target_xfer_partial (struct target_ops *ops, { if (targetdebug < 2 && i > 0) { - fprintf_unfiltered (gdb_stdlog, " ..."); + gdb_printf (gdb_stdlog, " ..."); break; } - fprintf_unfiltered (gdb_stdlog, "\n"); + gdb_printf (gdb_stdlog, "\n"); } - fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + gdb_printf (gdb_stdlog, " %02x", myaddr[i] & 0xff); } } @@ -1962,9 +1962,9 @@ static void show_trust_readonly (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Mode for reading from readonly sections is %s.\n"), - value); + gdb_printf (file, + _("Mode for reading from readonly sections is %s.\n"), + value); } /* Target vector read/write partial wrapper functions. */ @@ -2445,8 +2445,8 @@ info_target_command (const char *args, int from_tty) if (current_program_space->symfile_object_file != NULL) { objfile *objf = current_program_space->symfile_object_file; - printf_filtered (_("Symbols from \"%s\".\n"), - objfile_name (objf)); + gdb_printf (_("Symbols from \"%s\".\n"), + objfile_name (objf)); } for (target_ops *t = current_inferior ()->top_target (); @@ -2459,9 +2459,9 @@ info_target_command (const char *args, int from_tty) if ((int) (t->stratum ()) <= (int) dummy_stratum) continue; if (has_all_mem) - printf_filtered (_("\tWhile running this, " - "GDB does not access memory from...\n")); - printf_filtered ("%s:\n", t->longname ()); + gdb_printf (_("\tWhile running this, " + "GDB does not access memory from...\n")); + gdb_printf ("%s:\n", t->longname ()); t->files_info (); has_all_mem = t->has_all_memory (); } @@ -2872,10 +2872,10 @@ static void show_auto_connect_native_target (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether GDB may automatically connect to the " - "native target is %s.\n"), - value); + gdb_printf (file, + _("Whether GDB may automatically connect to the " + "native target is %s.\n"), + value); } /* A pointer to the target that can respond to "run" or "attach". @@ -2983,8 +2983,8 @@ target_info_proc (const char *args, enum info_proc_what what) if (t->info_proc (args, what)) { if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_info_proc (\"%s\", %d)\n", args, what); + gdb_printf (gdb_stdlog, + "target_info_proc (\"%s\", %d)\n", args, what); return 1; } @@ -3290,13 +3290,13 @@ target_fileio_open (struct inferior *inf, const char *filename, fd = acquire_fileio_fd (t, fd); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_open (%d,%s,0x%x,0%o,%d)" - " = %d (%d)\n", - inf == NULL ? 0 : inf->num, - filename, flags, mode, - warn_if_slow, fd, - fd != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_open (%d,%s,0x%x,0%o,%d)" + " = %d (%d)\n", + inf == NULL ? 0 : inf->num, + filename, flags, mode, + warn_if_slow, fd, + fd != -1 ? 0 : *target_errno); return fd; } @@ -3322,11 +3322,11 @@ target_fileio_pwrite (int fd, const gdb_byte *write_buf, int len, len, offset, target_errno); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_pwrite (%d,...,%d,%s) " - "= %d (%d)\n", - fd, len, pulongest (offset), - ret, ret != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_pwrite (%d,...,%d,%s) " + "= %d (%d)\n", + fd, len, pulongest (offset), + ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3348,11 +3348,11 @@ target_fileio_pread (int fd, gdb_byte *read_buf, int len, len, offset, target_errno); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_pread (%d,...,%d,%s) " - "= %d (%d)\n", - fd, len, pulongest (offset), - ret, ret != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_pread (%d,...,%d,%s) " + "= %d (%d)\n", + fd, len, pulongest (offset), + ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3372,9 +3372,9 @@ target_fileio_fstat (int fd, struct stat *sb, int *target_errno) ret = fh->target->fileio_fstat (fh->target_fd, sb, target_errno); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_fstat (%d) = %d (%d)\n", - fd, ret, ret != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_fstat (%d) = %d (%d)\n", + fd, ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3399,9 +3399,9 @@ target_fileio_close (int fd, int *target_errno) } if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_close (%d) = %d (%d)\n", - fd, ret, ret != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_close (%d) = %d (%d)\n", + fd, ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3419,11 +3419,11 @@ target_fileio_unlink (struct inferior *inf, const char *filename, continue; if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_unlink (%d,%s)" - " = %d (%d)\n", - inf == NULL ? 0 : inf->num, filename, - ret, ret != -1 ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_unlink (%d,%s)" + " = %d (%d)\n", + inf == NULL ? 0 : inf->num, filename, + ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3446,12 +3446,12 @@ target_fileio_readlink (struct inferior *inf, const char *filename, continue; if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_fileio_readlink (%d,%s)" - " = %s (%d)\n", - inf == NULL ? 0 : inf->num, - filename, ret ? ret->c_str () : "(nil)", - ret ? 0 : *target_errno); + gdb_printf (gdb_stdlog, + "target_fileio_readlink (%d,%s)" + " = %s (%d)\n", + inf == NULL ? 0 : inf->num, + filename, ret ? ret->c_str () : "(nil)", + ret ? 0 : *target_errno); return ret; } @@ -3646,11 +3646,11 @@ target_announce_detach (int from_tty) pid = inferior_ptid.pid (); exec_file = get_exec_file (0); if (exec_file == nullptr) - printf_filtered ("Detaching from pid %s\n", - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf ("Detaching from pid %s\n", + target_pid_to_str (ptid_t (pid)).c_str ()); else - printf_filtered (_("Detaching from program: %s, %s\n"), exec_file, - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf (_("Detaching from program: %s, %s\n"), exec_file, + target_pid_to_str (ptid_t (pid)).c_str ()); } /* See target.h */ @@ -3664,11 +3664,11 @@ target_announce_attach (int from_tty, int pid) const char *exec_file = get_exec_file (0); if (exec_file != nullptr) - printf_filtered ("Attaching to program: %s, %s\n", exec_file, - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf ("Attaching to program: %s, %s\n", exec_file, + target_pid_to_str (ptid_t (pid)).c_str ()); else - printf_filtered ("Attaching to %s\n", - target_pid_to_str (ptid_t (pid)).c_str ()); + gdb_printf ("Attaching to %s\n", + target_pid_to_str (ptid_t (pid)).c_str ()); } /* The inferior process has died. Long live the inferior! */ @@ -3793,7 +3793,7 @@ target_close (struct target_ops *targ) targ->close (); if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_close ()\n"); + gdb_printf (gdb_stdlog, "target_close ()\n"); } int @@ -4349,7 +4349,7 @@ flash_erase_command (const char *cmd, int from_tty) static void maintenance_print_target_stack (const char *cmd, int from_tty) { - printf_filtered (_("The current target stack is:\n")); + gdb_printf (_("The current target stack is:\n")); for (target_ops *t = current_inferior ()->top_target (); t != NULL; @@ -4357,7 +4357,7 @@ maintenance_print_target_stack (const char *cmd, int from_tty) { if (t->stratum () == debug_stratum) continue; - printf_filtered (" - %s (%s)\n", t->shortname (), t->longname ()); + gdb_printf (" - %s (%s)\n", t->shortname (), t->longname ()); } } @@ -4404,9 +4404,9 @@ static void show_maint_target_async (ui_file *file, int from_tty, cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Controlling the inferior in " - "asynchronous mode is %s.\n"), value); + gdb_printf (file, + _("Controlling the inferior in " + "asynchronous mode is %s.\n"), value); } /* Return true if the target operates in non-stop mode even with "set @@ -4478,14 +4478,14 @@ show_maint_target_non_stop (ui_file *file, int from_tty, cmd_list_element *c, const char *value) { if (target_non_stop_enabled == AUTO_BOOLEAN_AUTO) - fprintf_filtered (file, - _("Whether the target is always in non-stop mode " - "is %s (currently %s).\n"), value, - target_always_non_stop_p () ? "on" : "off"); + gdb_printf (file, + _("Whether the target is always in non-stop mode " + "is %s (currently %s).\n"), value, + target_always_non_stop_p () ? "on" : "off"); else - fprintf_filtered (file, - _("Whether the target is always in non-stop mode " - "is %s.\n"), value); + gdb_printf (file, + _("Whether the target is always in non-stop mode " + "is %s.\n"), value); } /* Temporary copies of permission settings. */ diff --git a/gdb/thread.c b/gdb/thread.c index 84c4cf4..378c5ee 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -59,7 +59,7 @@ static void show_debug_threads (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Thread debugging is \"%s\".\n"), value); + gdb_printf (file, _("Thread debugging is \"%s\".\n"), value); } /* Definition of struct thread_info exported to gdbthread.h. */ @@ -293,7 +293,7 @@ add_thread_with_info (process_stratum_target *targ, ptid_t ptid, result->priv.reset (priv); if (print_thread_events) - printf_filtered (_("[New %s]\n"), target_pid_to_str (ptid).c_str ()); + gdb_printf (_("[New %s]\n"), target_pid_to_str (ptid).c_str ()); annotate_new_thread (); return result; @@ -1484,8 +1484,8 @@ thread_try_catch_cmd (thread_info *thr, gdb::optional<int> ada_task, if (!flags.silent || cmd_result.length () > 0) { if (!flags.quiet) - printf_filtered ("%s", thr_header.c_str ()); - printf_filtered ("%s", cmd_result.c_str ()); + gdb_printf ("%s", thr_header.c_str ()); + gdb_printf ("%s", cmd_result.c_str ()); } } catch (const gdb_exception_error &ex) @@ -1493,9 +1493,9 @@ thread_try_catch_cmd (thread_info *thr, gdb::optional<int> ada_task, if (!flags.silent) { if (!flags.quiet) - printf_filtered ("%s", thr_header.c_str ()); + gdb_printf ("%s", thr_header.c_str ()); if (flags.cont) - printf_filtered ("%s\n", ex.what ()); + gdb_printf ("%s\n", ex.what ()); else throw; } @@ -1811,13 +1811,13 @@ thread_command (const char *tidstr, int from_tty) struct thread_info *tp = inferior_thread (); if (tp->state == THREAD_EXITED) - printf_filtered (_("[Current thread is %s (%s) (exited)]\n"), - print_thread_id (tp), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("[Current thread is %s (%s) (exited)]\n"), + print_thread_id (tp), + target_pid_to_str (inferior_ptid).c_str ()); else - printf_filtered (_("[Current thread is %s (%s)]\n"), - print_thread_id (tp), - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf (_("[Current thread is %s (%s)]\n"), + print_thread_id (tp), + target_pid_to_str (inferior_ptid).c_str ()); } else error (_("No stack.")); @@ -1886,37 +1886,37 @@ thread_find_command (const char *arg, int from_tty) if (tp->name () != nullptr && re_exec (tp->name ())) { - printf_filtered (_("Thread %s has name '%s'\n"), - print_thread_id (tp), tp->name ()); + gdb_printf (_("Thread %s has name '%s'\n"), + print_thread_id (tp), tp->name ()); match++; } tmp = target_thread_name (tp); if (tmp != NULL && re_exec (tmp)) { - printf_filtered (_("Thread %s has target name '%s'\n"), - print_thread_id (tp), tmp); + gdb_printf (_("Thread %s has target name '%s'\n"), + print_thread_id (tp), tmp); match++; } std::string name = target_pid_to_str (tp->ptid); if (!name.empty () && re_exec (name.c_str ())) { - printf_filtered (_("Thread %s has target id '%s'\n"), - print_thread_id (tp), name.c_str ()); + gdb_printf (_("Thread %s has target id '%s'\n"), + print_thread_id (tp), name.c_str ()); match++; } tmp = target_extra_thread_info (tp); if (tmp != NULL && re_exec (tmp)) { - printf_filtered (_("Thread %s has extra info '%s'\n"), - print_thread_id (tp), tmp); + gdb_printf (_("Thread %s has extra info '%s'\n"), + print_thread_id (tp), tmp); match++; } } if (!match) - printf_filtered (_("No threads match '%s'\n"), arg); + gdb_printf (_("No threads match '%s'\n"), arg); } /* Print notices when new threads are attached and detached. */ @@ -1925,9 +1925,9 @@ static void show_print_thread_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of thread events is %s.\n"), - value); + gdb_printf (file, + _("Printing of thread events is %s.\n"), + value); } /* See gdbthread.h. */ @@ -136,9 +136,9 @@ static void show_confirm (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Whether to confirm potentially " - "dangerous operations is %s.\n"), - value); + gdb_printf (file, _("Whether to confirm potentially " + "dangerous operations is %s.\n"), + value); } /* Current working directory. */ @@ -379,7 +379,7 @@ new_ui_command (const char *args, int from_tty) ui.release (); } - printf_filtered ("New UI allocated\n"); + gdb_printf ("New UI allocated\n"); } /* Handler for SIGHUP. */ @@ -493,7 +493,7 @@ check_frame_language_change (void) && flang != language_unknown && flang != current_language->la_language) { - printf_filtered ("%s\n", _(lang_frame_mismatch_warn)); + gdb_printf ("%s\n", _(lang_frame_mismatch_warn)); warned = 1; } } @@ -646,7 +646,7 @@ execute_command (const char *p, int from_tty) std::string prefixname = c->prefixname (); std::string prefixname_no_space = prefixname.substr (0, prefixname.length () - 1); - printf_filtered + gdb_printf ("\"%s\" must be followed by the name of a subcommand.\n", prefixname_no_space.c_str ()); help_list (*c->subcommands, prefixname.c_str (), all_commands, @@ -946,11 +946,11 @@ show_write_history_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (!write_history_p || !history_filename.empty ()) - fprintf_filtered (file, _("Saving of the history record on exit is %s.\n"), - value); + gdb_printf (file, _("Saving of the history record on exit is %s.\n"), + value); else - fprintf_filtered (file, _("Saving of the history is disabled due to " - "the value of 'history filename'.\n")); + gdb_printf (file, _("Saving of the history is disabled due to " + "the value of 'history filename'.\n")); } /* The variable associated with the "set/show history size" @@ -961,8 +961,8 @@ static void show_history_size (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The size of the command history is %s.\n"), - value); + gdb_printf (file, _("The size of the command history is %s.\n"), + value); } /* Variable associated with the "history remove-duplicates" option. @@ -973,10 +973,10 @@ static void show_history_remove_duplicates (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("The number of history entries to look back at for " - "duplicates is %s.\n"), - value); + gdb_printf (file, + _("The number of history entries to look back at for " + "duplicates is %s.\n"), + value); } /* Implement 'show history filename'. */ @@ -985,12 +985,12 @@ show_history_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (!history_filename.empty ()) - fprintf_filtered (file, _("The filename in which to record " - "the command history is \"%ps\".\n"), - styled_string (file_name_style.style (), value)); + gdb_printf (file, _("The filename in which to record " + "the command history is \"%ps\".\n"), + styled_string (file_name_style.style (), value)); else - fprintf_filtered (file, _("There is no filename currently set for " - "recording the command history in.\n")); + gdb_printf (file, _("There is no filename currently set for " + "recording the command history in.\n")); } /* This is like readline(), but it has some gdb-specific behavior. @@ -1419,20 +1419,20 @@ print_gdb_version (struct ui_file *stream, bool interactive) number, which starts after last space. */ std::string v_str = string_printf ("GNU gdb %s%s", PKGVERSION, version); - fprintf_filtered (stream, "%ps\n", - styled_string (version_style.style (), v_str.c_str ())); + gdb_printf (stream, "%ps\n", + styled_string (version_style.style (), v_str.c_str ())); /* Second line is a copyright notice. */ - fprintf_filtered (stream, - "Copyright (C) 2022 Free Software Foundation, Inc.\n"); + gdb_printf (stream, + "Copyright (C) 2022 Free Software Foundation, Inc.\n"); /* Following the copyright is a brief statement that the program is free software, that users are free to copy and change it on certain conditions, that it is covered by the GNU GPL, and that there is no warranty. */ - fprintf_filtered (stream, "\ + gdb_printf (stream, "\ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\ \nThis is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law."); @@ -1440,39 +1440,39 @@ There is NO WARRANTY, to the extent permitted by law."); if (!interactive) return; - fprintf_filtered (stream, ("\nType \"show copying\" and " - "\"show warranty\" for details.\n")); + gdb_printf (stream, ("\nType \"show copying\" and " + "\"show warranty\" for details.\n")); /* After the required info we print the configuration information. */ - fprintf_filtered (stream, "This GDB was configured as \""); + gdb_printf (stream, "This GDB was configured as \""); if (strcmp (host_name, target_name) != 0) { - fprintf_filtered (stream, "--host=%s --target=%s", - host_name, target_name); + gdb_printf (stream, "--host=%s --target=%s", + host_name, target_name); } else { - fprintf_filtered (stream, "%s", host_name); + gdb_printf (stream, "%s", host_name); } - fprintf_filtered (stream, "\".\n"); + gdb_printf (stream, "\".\n"); - fprintf_filtered (stream, _("Type \"show configuration\" " - "for configuration details.\n")); + gdb_printf (stream, _("Type \"show configuration\" " + "for configuration details.\n")); if (REPORT_BUGS_TO[0]) { - fprintf_filtered (stream, - _("For bug reporting instructions, please see:\n")); - fprintf_filtered (stream, "%s.\n", REPORT_BUGS_TO); + gdb_printf (stream, + _("For bug reporting instructions, please see:\n")); + gdb_printf (stream, "%s.\n", REPORT_BUGS_TO); } - fprintf_filtered (stream, - _("Find the GDB manual and other documentation \ + gdb_printf (stream, + _("Find the GDB manual and other documentation \ resources online at:\n <http://www.gnu.org/software/gdb/documentation/>.")); - fprintf_filtered (stream, "\n\n"); - fprintf_filtered (stream, _("For help, type \"help\".\n")); - fprintf_filtered (stream, - _("Type \"apropos word\" to search for commands \ + gdb_printf (stream, "\n\n"); + gdb_printf (stream, _("For help, type \"help\".\n")); + gdb_printf (stream, + _("Type \"apropos word\" to search for commands \ related to \"word\".")); } @@ -1480,178 +1480,178 @@ related to \"word\".")); void print_gdb_configuration (struct ui_file *stream) { - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ This GDB was configured as follows:\n\ configure --host=%s --target=%s\n\ "), host_name, target_name); - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-auto-load-dir=%s\n\ --with-auto-load-safe-path=%s\n\ "), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); #if HAVE_LIBEXPAT - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-expat\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-expat\n\ ")); #endif if (GDB_DATADIR[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-gdb-datadir=%s%s\n\ "), GDB_DATADIR, GDB_DATADIR_RELOCATABLE ? " (relocatable)" : ""); #ifdef ICONV_BIN - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-iconv-bin=%s%s\n\ "), ICONV_BIN, ICONV_BIN_RELOCATABLE ? " (relocatable)" : ""); #endif if (JIT_READER_DIR[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-jit-reader-dir=%s%s\n\ "), JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE ? " (relocatable)" : ""); #if HAVE_LIBUNWIND_IA64_H - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-libunwind-ia64\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-libunwind-ia64\n\ ")); #endif #if HAVE_LIBLZMA - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-lzma\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-lzma\n\ ")); #endif #if HAVE_LIBBABELTRACE - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-babeltrace\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-babeltrace\n\ ")); #endif #if HAVE_LIBIPT - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-intel-pt\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-intel-pt\n\ ")); #endif #if HAVE_LIBMPFR - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-mpfr\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-mpfr\n\ ")); #endif #if HAVE_LIBXXHASH - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-xxhash\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-xxhash\n\ ")); #endif #ifdef WITH_PYTHON_PATH - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-python=%s%s\n\ "), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : ""); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-python\n\ ")); #endif #ifdef WITH_PYTHON_LIBDIR - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-python-libdir=%s%s\n\ "), WITH_PYTHON_LIBDIR, PYTHON_LIBDIR_RELOCATABLE ? " (relocatable)" : ""); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-python-libdir\n\ ")); #endif #if HAVE_LIBDEBUGINFOD - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-debuginfod\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-debuginfod\n\ ")); #endif #if HAVE_GUILE - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-guile\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --without-guile\n\ ")); #endif #if HAVE_SOURCE_HIGHLIGHT - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --enable-source-highlight\n\ ")); #else - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --disable-source-highlight\n\ ")); #endif #ifdef RELOC_SRCDIR - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-relocated-sources=%s\n\ "), RELOC_SRCDIR); #endif if (DEBUGDIR[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-separate-debug-dir=%s%s\n\ "), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : ""); if (TARGET_SYSTEM_ROOT[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-sysroot=%s%s\n\ "), TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE ? " (relocatable)" : ""); if (SYSTEM_GDBINIT[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-system-gdbinit=%s%s\n\ "), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : ""); if (SYSTEM_GDBINIT_DIR[0]) - fprintf_filtered (stream, _("\ + gdb_printf (stream, _("\ --with-system-gdbinit-dir=%s%s\n\ "), SYSTEM_GDBINIT_DIR, SYSTEM_GDBINIT_DIR_RELOCATABLE ? " (relocatable)" : ""); /* We assume "relocatable" will be printed at least once, thus we always print this text. It's a reasonably safe assumption for now. */ - fprintf_filtered (stream, _("\n\ + gdb_printf (stream, _("\n\ (\"Relocatable\" means the directory can be moved with the GDB installation\n\ tree, and GDB will still find it.)\n\ ")); @@ -1714,13 +1714,13 @@ print_inferior_quit_action (inferior *inf, ui_file *out) return; if (inf->attach_flag) - fprintf_filtered (out, - _("\tInferior %d [%s] will be detached.\n"), inf->num, - target_pid_to_str (ptid_t (inf->pid)).c_str ()); + gdb_printf (out, + _("\tInferior %d [%s] will be detached.\n"), inf->num, + target_pid_to_str (ptid_t (inf->pid)).c_str ()); else - fprintf_filtered (out, - _("\tInferior %d [%s] will be killed.\n"), inf->num, - target_pid_to_str (ptid_t (inf->pid)).c_str ()); + gdb_printf (out, + _("\tInferior %d [%s] will be killed.\n"), inf->num, + target_pid_to_str (ptid_t (inf->pid)).c_str ()); } /* If necessary, make the user confirm that we should quit. Return @@ -1871,11 +1871,11 @@ show_interactive_mode (struct ui_file *file, int from_tty, const char *value) { if (interactive_mode == AUTO_BOOLEAN_AUTO) - fprintf_filtered (file, "Debugger's interactive mode " - "is %s (currently %s).\n", - value, input_interactive_p (current_ui) ? "on" : "off"); + gdb_printf (file, "Debugger's interactive mode " + "is %s (currently %s).\n", + value, input_interactive_p (current_ui) ? "on" : "off"); else - fprintf_filtered (file, "Debugger's interactive mode is %s.\n", value); + gdb_printf (file, "Debugger's interactive mode is %s.\n", value); } /* Returns whether GDB is running on an interactive terminal. */ @@ -1947,8 +1947,8 @@ show_commands (const char *args, int from_tty) offset < num + Hist_print && offset < history_length; offset++) { - printf_filtered ("%5d %s\n", history_base + offset, - (history_get (history_base + offset))->line); + gdb_printf ("%5d %s\n", history_base + offset, + (history_get (history_base + offset))->line); } /* The next command we want to display is the next one that we haven't @@ -2073,7 +2073,7 @@ static void show_prompt (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Gdb's prompt is \"%s\".\n"), value); + gdb_printf (file, _("Gdb's prompt is \"%s\".\n"), value); } /* "set editing" command. */ @@ -2091,25 +2091,25 @@ static void show_editing (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Editing of command lines as " - "they are typed is %s.\n"), - current_ui->command_editing ? _("on") : _("off")); + gdb_printf (file, _("Editing of command lines as " + "they are typed is %s.\n"), + current_ui->command_editing ? _("on") : _("off")); } static void show_annotation_level (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Annotation_level is %s.\n"), value); + gdb_printf (file, _("Annotation_level is %s.\n"), value); } static void show_exec_done_display_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Notification of completion for " - "asynchronous execution commands is %s.\n"), - value); + gdb_printf (file, _("Notification of completion for " + "asynchronous execution commands is %s.\n"), + value); } /* New values of the "data-directory" parameter are staged here. @@ -2140,9 +2140,9 @@ static void show_gdb_datadir (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("GDB's data directory is \"%ps\".\n"), - styled_string (file_name_style.style (), - gdb_datadir.c_str ())); + gdb_printf (file, _("GDB's data directory is \"%ps\".\n"), + styled_string (file_name_style.style (), + gdb_datadir.c_str ())); } /* Implement 'set history filename'. */ @@ -2182,8 +2182,8 @@ static void show_startup_quiet (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Whether to start up quietly is %s.\n"), - value); + gdb_printf (file, _("Whether to start up quietly is %s.\n"), + value); } static void diff --git a/gdb/tracectf.c b/gdb/tracectf.c index f0cc5ce..155c8b7 100644 --- a/gdb/tracectf.c +++ b/gdb/tracectf.c @@ -1200,7 +1200,7 @@ ctf_target::close () void ctf_target::files_info () { - printf_filtered ("\t`%s'\n", trace_dirname); + gdb_printf ("\t`%s'\n", trace_dirname); } /* This is the implementation of target_ops method to_fetch_registers. diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index dae90bc..1072363 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -634,7 +634,7 @@ tfile_target::close () void tfile_target::files_info () { - printf_filtered ("\t`%s'\n", trace_filename); + gdb_printf ("\t`%s'\n", trace_filename); } void diff --git a/gdb/tracefile.c b/gdb/tracefile.c index f7d9331..44d8810 100644 --- a/gdb/tracefile.c +++ b/gdb/tracefile.c @@ -351,8 +351,8 @@ tsave_command (const char *args, int from_tty) trace_save_tfile (filename, target_does_save); if (from_tty) - printf_filtered (_("Trace data saved to %s '%s'.\n"), - generate_ctf ? "directory" : "file", filename); + gdb_printf (_("Trace data saved to %s '%s'.\n"), + generate_ctf ? "directory" : "file", filename); } /* Save the trace data to file FILENAME of tfile format. */ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index c45a961..a347745 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -367,9 +367,9 @@ trace_variable_command (const char *args, int from_tty) tsv->initial_value = initval; gdb::observers::tsv_modified.notify (tsv); } - printf_filtered (_("Trace state variable $%s " - "now has initial value %s.\n"), - tsv->name.c_str (), plongest (tsv->initial_value)); + gdb_printf (_("Trace state variable $%s " + "now has initial value %s.\n"), + tsv->name.c_str (), plongest (tsv->initial_value)); return; } @@ -379,9 +379,9 @@ trace_variable_command (const char *args, int from_tty) gdb::observers::tsv_created.notify (tsv); - printf_filtered (_("Trace state variable $%s " - "created, with initial value %s.\n"), - tsv->name.c_str (), plongest (tsv->initial_value)); + gdb_printf (_("Trace state variable $%s " + "created, with initial value %s.\n"), + tsv->name.c_str (), plongest (tsv->initial_value)); } static void @@ -482,10 +482,10 @@ save_trace_state_variables (struct ui_file *fp) { for (const trace_state_variable &tsv : tvariables) { - fprintf_unfiltered (fp, "tvariable $%s", tsv.name.c_str ()); + gdb_printf (fp, "tvariable $%s", tsv.name.c_str ()); if (tsv.initial_value) - fprintf_unfiltered (fp, " = %s", plongest (tsv.initial_value)); - fprintf_unfiltered (fp, "\n"); + gdb_printf (fp, " = %s", plongest (tsv.initial_value)); + gdb_printf (fp, "\n"); } } @@ -827,7 +827,7 @@ void collection_list::add_remote_register (unsigned int regno) { if (info_verbose) - printf_filtered ("collect register %d\n", regno); + gdb_printf ("collect register %d\n", regno); m_regs_mask.at (regno / 8) |= 1 << (regno % 8); } @@ -902,7 +902,7 @@ collection_list::add_memrange (struct gdbarch *gdbarch, unsigned long len, CORE_ADDR scope) { if (info_verbose) - printf_filtered ("(%d,%s,%ld)\n", type, paddress (gdbarch, base), len); + gdb_printf ("(%d,%s,%ld)\n", type, paddress (gdbarch, base), len); /* type: memrange_absolute == memory, other n == basereg */ /* base: addr if memory, offset if reg relative. */ @@ -931,20 +931,20 @@ collection_list::collect_symbol (struct symbol *sym, switch (sym->aclass ()) { default: - printf_filtered ("%s: don't know symbol class %d\n", - sym->print_name (), sym->aclass ()); + gdb_printf ("%s: don't know symbol class %d\n", + sym->print_name (), sym->aclass ()); break; case LOC_CONST: - printf_filtered ("constant %s (value %s) will not be collected.\n", - sym->print_name (), plongest (SYMBOL_VALUE (sym))); + gdb_printf ("constant %s (value %s) will not be collected.\n", + sym->print_name (), plongest (SYMBOL_VALUE (sym))); break; case LOC_STATIC: offset = SYMBOL_VALUE_ADDRESS (sym); if (info_verbose) { - printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n", - sym->print_name (), len, - paddress (gdbarch, offset)); + gdb_printf ("LOC_STATIC %s: collect %ld bytes at %s.\n", + sym->print_name (), len, + paddress (gdbarch, offset)); } /* A struct may be a C++ class with static fields, go to general expression handling. */ @@ -956,7 +956,7 @@ collection_list::collect_symbol (struct symbol *sym, case LOC_REGISTER: reg = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch); if (info_verbose) - printf_filtered ("LOC_REG[parm] %s: ", sym->print_name ()); + gdb_printf ("LOC_REG[parm] %s: ", sym->print_name ()); add_local_register (gdbarch, reg, scope); /* Check for doubles stored in two registers. */ /* FIXME: how about larger types stored in 3 or more regs? */ @@ -965,17 +965,17 @@ collection_list::collect_symbol (struct symbol *sym, add_local_register (gdbarch, reg + 1, scope); break; case LOC_REF_ARG: - printf_filtered ("Sorry, don't know how to do LOC_REF_ARG yet.\n"); - printf_filtered (" (will not collect %s)\n", sym->print_name ()); + gdb_printf ("Sorry, don't know how to do LOC_REF_ARG yet.\n"); + gdb_printf (" (will not collect %s)\n", sym->print_name ()); break; case LOC_ARG: reg = frame_regno; offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { - printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s" - " from frame ptr reg %d\n", sym->print_name (), len, - paddress (gdbarch, offset), reg); + gdb_printf ("LOC_LOCAL %s: Collect %ld bytes at offset %s" + " from frame ptr reg %d\n", sym->print_name (), len, + paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len, scope); break; @@ -984,9 +984,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = 0; if (info_verbose) { - printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s" - " from reg %d\n", sym->print_name (), len, - paddress (gdbarch, offset), reg); + gdb_printf ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s" + " from reg %d\n", sym->print_name (), len, + paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len, scope); break; @@ -995,9 +995,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { - printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s" - " from frame ptr reg %d\n", sym->print_name (), len, - paddress (gdbarch, offset), reg); + gdb_printf ("LOC_LOCAL %s: Collect %ld bytes at offset %s" + " from frame ptr reg %d\n", sym->print_name (), len, + paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len, scope); break; @@ -1007,8 +1007,8 @@ collection_list::collect_symbol (struct symbol *sym, break; case LOC_OPTIMIZED_OUT: - printf_filtered ("%s has been optimized out of existence.\n", - sym->print_name ()); + gdb_printf ("%s has been optimized out of existence.\n", + sym->print_name ()); break; case LOC_COMPUTED: @@ -1027,8 +1027,8 @@ collection_list::collect_symbol (struct symbol *sym, have a location expression. */ if (!aexpr) { - printf_filtered ("%s has been optimized out of existence.\n", - sym->print_name ()); + gdb_printf ("%s has been optimized out of existence.\n", + sym->print_name ()); return; } @@ -1100,7 +1100,7 @@ void collection_list::add_static_trace_data () { if (info_verbose) - printf_filtered ("collect static trace data\n"); + gdb_printf ("collect static trace data\n"); m_strace_data = true; } @@ -1138,7 +1138,7 @@ collection_list::stringify () if (m_strace_data) { if (info_verbose) - printf_filtered ("\nCollecting static trace data\n"); + gdb_printf ("\nCollecting static trace data\n"); end = temp_buf.data (); *end++ = 'L'; str_list.emplace_back (temp_buf.data (), end - temp_buf.data ()); @@ -1150,7 +1150,7 @@ collection_list::stringify () if (m_regs_mask[i] != 0) /* Prepare to send regs_mask to the stub. */ { if (info_verbose) - printf_filtered ("\nCollecting registers (mask): 0x"); + gdb_printf ("\nCollecting registers (mask): 0x"); /* One char for 'R', one for the null terminator and two per mask byte. */ @@ -1164,7 +1164,7 @@ collection_list::stringify () { QUIT; /* Allow user to bail out with ^C. */ if (info_verbose) - printf_filtered ("%02X", m_regs_mask[i]); + gdb_printf ("%02X", m_regs_mask[i]); end = pack_hex_byte (end, m_regs_mask[i]); } @@ -1173,21 +1173,21 @@ collection_list::stringify () str_list.emplace_back (temp_buf.data ()); } if (info_verbose) - printf_filtered ("\n"); + gdb_printf ("\n"); if (!m_memranges.empty () && info_verbose) - printf_filtered ("Collecting memranges: \n"); + gdb_printf ("Collecting memranges: \n"); for (i = 0, count = 0, end = temp_buf.data (); i < m_memranges.size (); i++) { QUIT; /* Allow user to bail out with ^C. */ if (info_verbose) { - printf_filtered ("(%d, %s, %ld)\n", - m_memranges[i].type, - paddress (target_gdbarch (), - m_memranges[i].start), - (long) (m_memranges[i].end - - m_memranges[i].start)); + gdb_printf ("(%d, %s, %ld)\n", + m_memranges[i].type, + paddress (target_gdbarch (), + m_memranges[i].start), + (long) (m_memranges[i].end + - m_memranges[i].start)); } if (count + 27 > MAX_AGENT_EXPR_LEN) { @@ -1373,7 +1373,7 @@ encode_actions_1 (struct command_line *action, _("Register $%s not available"), name); if (info_verbose) - printf_filtered ("OP_REGISTER: "); + gdb_printf ("OP_REGISTER: "); collect->add_local_register (target_gdbarch (), i, tloc->address); break; @@ -1760,61 +1760,61 @@ tstatus_command (const char *args, int from_tty) if (status == -1) { if (ts->filename != NULL) - printf_filtered (_("Using a trace file.\n")); + gdb_printf (_("Using a trace file.\n")); else { - printf_filtered (_("Trace can not be run on this target.\n")); + gdb_printf (_("Trace can not be run on this target.\n")); return; } } if (!ts->running_known) { - printf_filtered (_("Run/stop status is unknown.\n")); + gdb_printf (_("Run/stop status is unknown.\n")); } else if (ts->running) { - printf_filtered (_("Trace is running on the target.\n")); + gdb_printf (_("Trace is running on the target.\n")); } else { switch (ts->stop_reason) { case trace_never_run: - printf_filtered (_("No trace has been run on the target.\n")); + gdb_printf (_("No trace has been run on the target.\n")); break; case trace_stop_command: if (ts->stop_desc) - printf_filtered (_("Trace stopped by a tstop command (%s).\n"), - ts->stop_desc); + gdb_printf (_("Trace stopped by a tstop command (%s).\n"), + ts->stop_desc); else - printf_filtered (_("Trace stopped by a tstop command.\n")); + gdb_printf (_("Trace stopped by a tstop command.\n")); break; case trace_buffer_full: - printf_filtered (_("Trace stopped because the buffer was full.\n")); + gdb_printf (_("Trace stopped because the buffer was full.\n")); break; case trace_disconnected: - printf_filtered (_("Trace stopped because of disconnection.\n")); + gdb_printf (_("Trace stopped because of disconnection.\n")); break; case tracepoint_passcount: - printf_filtered (_("Trace stopped by tracepoint %d.\n"), - ts->stopping_tracepoint); + gdb_printf (_("Trace stopped by tracepoint %d.\n"), + ts->stopping_tracepoint); break; case tracepoint_error: if (ts->stopping_tracepoint) - printf_filtered (_("Trace stopped by an " - "error (%s, tracepoint %d).\n"), - ts->stop_desc, ts->stopping_tracepoint); + gdb_printf (_("Trace stopped by an " + "error (%s, tracepoint %d).\n"), + ts->stop_desc, ts->stopping_tracepoint); else - printf_filtered (_("Trace stopped by an error (%s).\n"), - ts->stop_desc); + gdb_printf (_("Trace stopped by an error (%s).\n"), + ts->stop_desc); break; case trace_stop_reason_unknown: - printf_filtered (_("Trace stopped for an unknown reason.\n")); + gdb_printf (_("Trace stopped for an unknown reason.\n")); break; default: - printf_filtered (_("Trace stopped for some other reason (%d).\n"), - ts->stop_reason); + gdb_printf (_("Trace stopped for some other reason (%d).\n"), + ts->stop_reason); break; } } @@ -1822,54 +1822,54 @@ tstatus_command (const char *args, int from_tty) if (ts->traceframes_created >= 0 && ts->traceframe_count != ts->traceframes_created) { - printf_filtered (_("Buffer contains %d trace " - "frames (of %d created total).\n"), - ts->traceframe_count, ts->traceframes_created); + gdb_printf (_("Buffer contains %d trace " + "frames (of %d created total).\n"), + ts->traceframe_count, ts->traceframes_created); } else if (ts->traceframe_count >= 0) { - printf_filtered (_("Collected %d trace frames.\n"), - ts->traceframe_count); + gdb_printf (_("Collected %d trace frames.\n"), + ts->traceframe_count); } if (ts->buffer_free >= 0) { if (ts->buffer_size >= 0) { - printf_filtered (_("Trace buffer has %d bytes of %d bytes free"), - ts->buffer_free, ts->buffer_size); + gdb_printf (_("Trace buffer has %d bytes of %d bytes free"), + ts->buffer_free, ts->buffer_size); if (ts->buffer_size > 0) - printf_filtered (_(" (%d%% full)"), - ((int) ((((long long) (ts->buffer_size - - ts->buffer_free)) * 100) - / ts->buffer_size))); - printf_filtered (_(".\n")); + gdb_printf (_(" (%d%% full)"), + ((int) ((((long long) (ts->buffer_size + - ts->buffer_free)) * 100) + / ts->buffer_size))); + gdb_printf (_(".\n")); } else - printf_filtered (_("Trace buffer has %d bytes free.\n"), - ts->buffer_free); + gdb_printf (_("Trace buffer has %d bytes free.\n"), + ts->buffer_free); } if (ts->disconnected_tracing) - printf_filtered (_("Trace will continue if GDB disconnects.\n")); + gdb_printf (_("Trace will continue if GDB disconnects.\n")); else - printf_filtered (_("Trace will stop if GDB disconnects.\n")); + gdb_printf (_("Trace will stop if GDB disconnects.\n")); if (ts->circular_buffer) - printf_filtered (_("Trace buffer is circular.\n")); + gdb_printf (_("Trace buffer is circular.\n")); if (ts->user_name && strlen (ts->user_name) > 0) - printf_filtered (_("Trace user is %s.\n"), ts->user_name); + gdb_printf (_("Trace user is %s.\n"), ts->user_name); if (ts->notes && strlen (ts->notes) > 0) - printf_filtered (_("Trace notes: %s.\n"), ts->notes); + gdb_printf (_("Trace notes: %s.\n"), ts->notes); /* Now report on what we're doing with tfind. */ if (traceframe_number >= 0) - printf_filtered (_("Looking at trace frame %d, tracepoint %d.\n"), - traceframe_number, tracepoint_number); + gdb_printf (_("Looking at trace frame %d, tracepoint %d.\n"), + traceframe_number, tracepoint_number); else - printf_filtered (_("Not looking at any trace frame.\n")); + gdb_printf (_("Not looking at any trace frame.\n")); /* Report start/stop times if supplied. */ if (ts->start_time) @@ -1879,21 +1879,21 @@ tstatus_command (const char *args, int from_tty) LONGEST run_time = ts->stop_time - ts->start_time; /* Reporting a run time is more readable than two long numbers. */ - printf_filtered (_("Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"), - (long int) (ts->start_time / 1000000), - (long int) (ts->start_time % 1000000), - (long int) (run_time / 1000000), - (long int) (run_time % 1000000)); + gdb_printf (_("Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"), + (long int) (ts->start_time / 1000000), + (long int) (ts->start_time % 1000000), + (long int) (run_time / 1000000), + (long int) (run_time % 1000000)); } else - printf_filtered (_("Trace started at %ld.%06ld secs.\n"), - (long int) (ts->start_time / 1000000), - (long int) (ts->start_time % 1000000)); + gdb_printf (_("Trace started at %ld.%06ld secs.\n"), + (long int) (ts->start_time / 1000000), + (long int) (ts->start_time % 1000000)); } else if (ts->stop_time) - printf_filtered (_("Trace stopped at %ld.%06ld secs.\n"), - (long int) (ts->stop_time / 1000000), - (long int) (ts->stop_time % 1000000)); + gdb_printf (_("Trace stopped at %ld.%06ld secs.\n"), + (long int) (ts->stop_time / 1000000), + (long int) (ts->stop_time % 1000000)); /* Now report any per-tracepoint status available. */ for (breakpoint *t : all_tracepoints ()) @@ -2129,7 +2129,7 @@ tfind_1 (enum trace_find_type type, int num, else { if (info_verbose) - printf_filtered ("End of trace buffer.\n"); + gdb_printf ("End of trace buffer.\n"); #if 0 /* dubious now? */ /* The following will not recurse, since it's special-cased. */ @@ -2167,8 +2167,8 @@ tfind_1 (enum trace_find_type type, int num, } else { - printf_filtered (_("Found trace frame %d, tracepoint %d\n"), - traceframe_number, tracepoint_number); + gdb_printf (_("Found trace frame %d, tracepoint %d\n"), + traceframe_number, tracepoint_number); } } else @@ -2176,9 +2176,9 @@ tfind_1 (enum trace_find_type type, int num, if (uiout->is_mi_like_p ()) uiout->field_string ("found", "0"); else if (type == tfind_number && num == -1) - printf_filtered (_("No longer looking at any trace frame\n")); + gdb_printf (_("No longer looking at any trace frame\n")); else /* This case may never occur, check. */ - printf_filtered (_("No trace frame found\n")); + gdb_printf (_("No trace frame found\n")); } /* If we're in nonstop mode and getting out of looking at trace @@ -2363,20 +2363,20 @@ tfind_line_command (const char *args, int from_tty) { if (start_pc == end_pc) { - printf_filtered ("Line %d of \"%s\"", - sal.line, - symtab_to_filename_for_display (sal.symtab)); + gdb_printf ("Line %d of \"%s\"", + sal.line, + symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); - printf_filtered (" is at address "); + gdb_printf (" is at address "); print_address (get_current_arch (), start_pc, gdb_stdout); gdb_stdout->wrap_here (2); - printf_filtered (" but contains no code.\n"); + gdb_printf (" but contains no code.\n"); sal = find_pc_line (start_pc, 0); if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc) && start_pc != end_pc) - printf_filtered ("Attempting to find line %d instead.\n", - sal.line); + gdb_printf ("Attempting to find line %d instead.\n", + sal.line); else error (_("Cannot find a good line.")); } @@ -2408,7 +2408,7 @@ tfind_range_command (const char *args, int from_tty) if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ - printf_filtered ("Usage: tfind range STARTADDR, ENDADDR\n"); + gdb_printf ("Usage: tfind range STARTADDR, ENDADDR\n"); return; } @@ -2442,7 +2442,7 @@ tfind_outside_command (const char *args, int from_tty) if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ - printf_filtered ("Usage: tfind outside STARTADDR, ENDADDR\n"); + gdb_printf ("Usage: tfind outside STARTADDR, ENDADDR\n"); return; } @@ -2504,7 +2504,7 @@ info_scope_command (const char *args_in, int from_tty) { QUIT; /* Allow user to bail out with ^C. */ if (count == 0) - printf_filtered ("Scope for %s:\n", save_args); + gdb_printf ("Scope for %s:\n", save_args); count++; symname = sym->print_name (); @@ -2513,7 +2513,7 @@ info_scope_command (const char *args_in, int from_tty) gdbarch = symbol_arch (sym); - printf_filtered ("Symbol %s is ", symname); + gdb_printf ("Symbol %s is ", symname); if (SYMBOL_COMPUTED_OPS (sym) != NULL) SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, @@ -2525,26 +2525,26 @@ info_scope_command (const char *args_in, int from_tty) { default: case LOC_UNDEF: /* Messed up symbol? */ - printf_filtered ("a bogus symbol, class %d.\n", - sym->aclass ()); + gdb_printf ("a bogus symbol, class %d.\n", + sym->aclass ()); count--; /* Don't count this one. */ continue; case LOC_CONST: - printf_filtered ("a constant with value %s (%s)", - plongest (SYMBOL_VALUE (sym)), - hex_string (SYMBOL_VALUE (sym))); + gdb_printf ("a constant with value %s (%s)", + plongest (SYMBOL_VALUE (sym)), + hex_string (SYMBOL_VALUE (sym))); break; case LOC_CONST_BYTES: - printf_filtered ("constant bytes: "); + gdb_printf ("constant bytes: "); if (sym->type ()) for (j = 0; j < TYPE_LENGTH (sym->type ()); j++) - printf_filtered (" %02x", - (unsigned) SYMBOL_VALUE_BYTES (sym)[j]); + gdb_printf (" %02x", + (unsigned) SYMBOL_VALUE_BYTES (sym)[j]); break; case LOC_STATIC: - printf_filtered ("in static storage at address "); - printf_filtered ("%s", paddress (gdbarch, - SYMBOL_VALUE_ADDRESS (sym))); + gdb_printf ("in static storage at address "); + gdb_printf ("%s", paddress (gdbarch, + SYMBOL_VALUE_ADDRESS (sym))); break; case LOC_REGISTER: /* GDBARCH is the architecture associated with the objfile @@ -2558,59 +2558,59 @@ info_scope_command (const char *args_in, int from_tty) gdbarch); if (sym->is_argument ()) - printf_filtered ("an argument in register $%s", - gdbarch_register_name (gdbarch, regno)); + gdb_printf ("an argument in register $%s", + gdbarch_register_name (gdbarch, regno)); else - printf_filtered ("a local variable in register $%s", - gdbarch_register_name (gdbarch, regno)); + gdb_printf ("a local variable in register $%s", + gdbarch_register_name (gdbarch, regno)); break; case LOC_ARG: - printf_filtered ("an argument at stack/frame offset %s", - plongest (SYMBOL_VALUE (sym))); + gdb_printf ("an argument at stack/frame offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_LOCAL: - printf_filtered ("a local variable at frame offset %s", - plongest (SYMBOL_VALUE (sym))); + gdb_printf ("a local variable at frame offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_REF_ARG: - printf_filtered ("a reference argument at offset %s", - plongest (SYMBOL_VALUE (sym))); + gdb_printf ("a reference argument at offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_REGPARM_ADDR: /* Note comment at LOC_REGISTER. */ regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch); - printf_filtered ("the address of an argument, in register $%s", - gdbarch_register_name (gdbarch, regno)); + gdb_printf ("the address of an argument, in register $%s", + gdbarch_register_name (gdbarch, regno)); break; case LOC_TYPEDEF: - printf_filtered ("a typedef.\n"); + gdb_printf ("a typedef.\n"); continue; case LOC_LABEL: - printf_filtered ("a label at address "); - printf_filtered ("%s", paddress (gdbarch, - SYMBOL_VALUE_ADDRESS (sym))); + gdb_printf ("a label at address "); + gdb_printf ("%s", paddress (gdbarch, + SYMBOL_VALUE_ADDRESS (sym))); break; case LOC_BLOCK: - printf_filtered ("a function at address "); - printf_filtered ("%s", - paddress (gdbarch, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)))); + gdb_printf ("a function at address "); + gdb_printf ("%s", + paddress (gdbarch, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)))); break; case LOC_UNRESOLVED: msym = lookup_minimal_symbol (sym->linkage_name (), NULL, NULL); if (msym.minsym == NULL) - printf_filtered ("Unresolved Static"); + gdb_printf ("Unresolved Static"); else { - printf_filtered ("static storage at address "); - printf_filtered ("%s", - paddress (gdbarch, - BMSYMBOL_VALUE_ADDRESS (msym))); + gdb_printf ("static storage at address "); + gdb_printf ("%s", + paddress (gdbarch, + BMSYMBOL_VALUE_ADDRESS (msym))); } break; case LOC_OPTIMIZED_OUT: - printf_filtered ("optimized out.\n"); + gdb_printf ("optimized out.\n"); continue; case LOC_COMPUTED: gdb_assert_not_reached ("LOC_COMPUTED variable missing a method"); @@ -2620,7 +2620,7 @@ info_scope_command (const char *args_in, int from_tty) { struct type *t = check_typedef (sym->type ()); - printf_filtered (", length %s.\n", pulongest (TYPE_LENGTH (t))); + gdb_printf (", length %s.\n", pulongest (TYPE_LENGTH (t))); } } if (BLOCK_FUNCTION (block)) @@ -2629,8 +2629,8 @@ info_scope_command (const char *args_in, int from_tty) block = BLOCK_SUPERBLOCK (block); } if (count <= 0) - printf_filtered ("Scope for %s contains no locals or arguments.\n", - save_args); + gdb_printf ("Scope for %s contains no locals or arguments.\n", + save_args); } /* Helper for trace_dump_command. Dump the action list starting at @@ -2713,9 +2713,9 @@ trace_dump_actions (struct command_line *action, exp = contents.c_str (); } - printf_filtered ("%s = ", exp); + gdb_printf ("%s = ", exp); output_command (exp, from_tty); - printf_filtered ("\n"); + gdb_printf ("\n"); } action_exp = next_comma; } @@ -2803,8 +2803,8 @@ tdump_command (const char *args, int from_tty) /* This throws an error is not inspecting a trace frame. */ loc = get_traceframe_location (&stepping_frame); - printf_filtered ("Data collected at tracepoint %d, trace frame %d:\n", - tracepoint_number, traceframe_number); + gdb_printf ("Data collected at tracepoint %d, trace frame %d:\n", + tracepoint_number, traceframe_number); /* This command only makes sense for the current frame, not the selected frame. */ @@ -3107,10 +3107,10 @@ merge_uploaded_tracepoints (struct uploaded_tp **uploaded_tps) /* Mark this location as already inserted. */ loc->inserted = 1; t = (struct tracepoint *) loc->owner; - printf_filtered (_("Assuming tracepoint %d is same " - "as target's tracepoint %d at %s.\n"), - loc->owner->number, utp->number, - paddress (loc->gdbarch, utp->addr)); + gdb_printf (_("Assuming tracepoint %d is same " + "as target's tracepoint %d at %s.\n"), + loc->owner->number, utp->number, + paddress (loc->gdbarch, utp->addr)); /* The tracepoint LOC->owner was modified (the location LOC was marked as inserted in the target). Save it in @@ -3130,15 +3130,15 @@ merge_uploaded_tracepoints (struct uploaded_tp **uploaded_tps) { t = create_tracepoint_from_upload (utp); if (t) - printf_filtered (_("Created tracepoint %d for " - "target's tracepoint %d at %s.\n"), - t->number, utp->number, - paddress (get_current_arch (), utp->addr)); + gdb_printf (_("Created tracepoint %d for " + "target's tracepoint %d at %s.\n"), + t->number, utp->number, + paddress (get_current_arch (), utp->addr)); else - printf_filtered (_("Failed to create tracepoint for target's " - "tracepoint %d at %s, skipping it.\n"), - utp->number, - paddress (get_current_arch (), utp->addr)); + gdb_printf (_("Failed to create tracepoint for target's " + "tracepoint %d at %s, skipping it.\n"), + utp->number, + paddress (get_current_arch (), utp->addr)); } /* Whether found or created, record the number used by the target, to help with mapping target tracepoints back to their @@ -3221,17 +3221,17 @@ merge_uploaded_trace_state_variables (struct uploaded_tsv **uploaded_tsvs) if (tsv) { if (info_verbose) - printf_filtered (_("Assuming trace state variable $%s " - "is same as target's variable %d.\n"), - tsv->name.c_str (), utsv->number); + gdb_printf (_("Assuming trace state variable $%s " + "is same as target's variable %d.\n"), + tsv->name.c_str (), utsv->number); } else { tsv = create_tsv_from_upload (utsv); if (info_verbose) - printf_filtered (_("Created trace state variable " - "$%s for target's variable %d.\n"), - tsv->name.c_str (), utsv->number); + gdb_printf (_("Created trace state variable " + "$%s for target's variable %d.\n"), + tsv->name.c_str (), utsv->number); } /* Give precedence to numberings that come from the target. */ if (tsv) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index eb98e0f..6195ca1 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -818,7 +818,7 @@ tui_layout_split::specification (ui_file *output, int depth) gdb_puts (" ", output); first = false; item.layout->specification (output, depth + 1); - fprintf_unfiltered (output, " %d", item.weight); + gdb_printf (output, " %d", item.weight); } if (depth > 0) diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index d53ce54..1909853 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -606,20 +606,20 @@ tui_reg_command (const char *args, int from_tty) struct reggroup *group; int first; - printf_filtered (_("\"tui reg\" must be followed by the name of " - "either a register group,\nor one of 'next' " - "or 'prev'. Known register groups are:\n")); + gdb_printf (_("\"tui reg\" must be followed by the name of " + "either a register group,\nor one of 'next' " + "or 'prev'. Known register groups are:\n")); for (first = 1, group = reggroup_next (gdbarch, NULL); group != NULL; first = 0, group = reggroup_next (gdbarch, group)) { if (!first) - printf_filtered (", "); - printf_filtered ("%s", reggroup_name (group)); + gdb_printf (", "); + gdb_printf ("%s", reggroup_name (group)); } - printf_filtered ("\n"); + gdb_printf ("\n"); } } diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index fd6ca59a..b95d72d 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -190,9 +190,9 @@ show_tui_active_border_mode (struct ui_file *file, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The attribute mode to use for the active TUI window border is \"%s\".\n"), - value); + value); } static const char *tui_border_mode = "normal"; @@ -202,9 +202,9 @@ show_tui_border_mode (struct ui_file *file, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ The attribute mode to use for the TUI window borders is \"%s\".\n"), - value); + value); } static const char *tui_border_kind = "acs"; @@ -214,8 +214,8 @@ show_tui_border_kind (struct ui_file *file, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The kind of border for TUI windows is \"%s\".\n"), - value); + gdb_printf (file, _("The kind of border for TUI windows is \"%s\".\n"), + value); } @@ -332,7 +332,7 @@ static void show_tui_resize_message (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("TUI resize messaging is %s.\n"), value); + gdb_printf (file, _("TUI resize messaging is %s.\n"), value); } @@ -698,8 +698,8 @@ tui_set_focus_command (const char *arg, int from_tty) error (_("Window \"%s\" is not visible"), arg); tui_set_win_focus_to (win_info); - printf_filtered (_("Focus set to %s window.\n"), - tui_win_with_focus ()->name ()); + gdb_printf (_("Focus set to %s window.\n"), + tui_win_with_focus ()->name ()); } static void @@ -707,7 +707,7 @@ tui_all_windows_info (const char *arg, int from_tty) { if (!tui_active) { - printf_filtered (_("The TUI is not active.\n")); + gdb_printf (_("The TUI is not active.\n")); return; } @@ -792,7 +792,7 @@ static void tui_show_tab_width (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("TUI tab width is %s spaces.\n"), value); + gdb_printf (file, _("TUI tab width is %s spaces.\n"), value); } @@ -816,7 +816,7 @@ static void tui_show_compact_source (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("TUI source window compactness is %s.\n"), value); + gdb_printf (file, _("TUI source window compactness is %s.\n"), value); } /* Set the tab width of the specified window. */ diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 8110677..7acddd8 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -136,10 +136,10 @@ print_offset_data::update (struct type *type, unsigned int field_idx, { /* Since union fields don't have the concept of offsets, we just print their sizes. */ - fprintf_filtered (stream, "/* %6s */", - (print_in_hex ? - hex_string_custom (TYPE_LENGTH (ftype), 4) : - pulongest (TYPE_LENGTH (ftype)))); + gdb_printf (stream, "/* %6s */", + (print_in_hex ? + hex_string_custom (TYPE_LENGTH (ftype), 4) : + pulongest (TYPE_LENGTH (ftype)))); return; } @@ -157,23 +157,23 @@ print_offset_data::update (struct type *type, unsigned int field_idx, unsigned real_bitpos = bitpos + offset_bitpos; - fprintf_filtered (stream, - (print_in_hex ? "/* 0x%04x: 0x%x" : "/* %6u:%2u "), - real_bitpos / TARGET_CHAR_BIT, - real_bitpos % TARGET_CHAR_BIT); + gdb_printf (stream, + (print_in_hex ? "/* 0x%04x: 0x%x" : "/* %6u:%2u "), + real_bitpos / TARGET_CHAR_BIT, + real_bitpos % TARGET_CHAR_BIT); } else { /* The position of the field, relative to the beginning of the struct. */ - fprintf_filtered (stream, (print_in_hex ? "/* 0x%04x" : "/* %6u"), - (bitpos + offset_bitpos) / TARGET_CHAR_BIT); + gdb_printf (stream, (print_in_hex ? "/* 0x%04x" : "/* %6u"), + (bitpos + offset_bitpos) / TARGET_CHAR_BIT); - fprintf_filtered (stream, " "); + gdb_printf (stream, " "); } - fprintf_filtered (stream, (print_in_hex ? " | 0x%04x */" : " | %6u */"), - fieldsize_byte); + gdb_printf (stream, (print_in_hex ? " | 0x%04x */" : " | %6u */"), + fieldsize_byte); end_bitpos = bitpos + fieldsize_bit; } @@ -189,8 +189,8 @@ print_offset_data::finish (struct type *type, int level, gdb_puts ("\n", stream); print_spaces_filtered (level + 4 + print_offset_data::indentation, stream); - fprintf_filtered (stream, "/* total size (bytes): %4s */\n", - pulongest (TYPE_LENGTH (type))); + gdb_printf (stream, "/* total size (bytes): %4s */\n", + pulongest (TYPE_LENGTH (type))); } @@ -554,9 +554,9 @@ whatis_exp (const char *exp, int show) if (flags.print_offsets && (type->code () == TYPE_CODE_STRUCT || type->code () == TYPE_CODE_UNION)) - printf_filtered ("/* offset | size */ "); + gdb_printf ("/* offset | size */ "); - printf_filtered ("type = "); + gdb_printf ("type = "); std::unique_ptr<typedef_hash_table> table_holder; std::unique_ptr<ext_lang_type_printers> printer_holder; @@ -571,15 +571,15 @@ whatis_exp (const char *exp, int show) if (real_type) { - printf_filtered ("/* real type = "); + gdb_printf ("/* real type = "); type_print (real_type, "", gdb_stdout, -1); if (! full) - printf_filtered (" (incomplete object)"); - printf_filtered (" */\n"); + gdb_printf (" (incomplete object)"); + gdb_printf (" */\n"); } current_language->print_type (type, "", gdb_stdout, show, 0, &flags); - printf_filtered ("\n"); + gdb_printf ("\n"); } static void @@ -650,7 +650,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_BOOL: - fprintf_filtered (stream, val ? "TRUE" : "FALSE"); + gdb_printf (stream, val ? "TRUE" : "FALSE"); break; case TYPE_CODE_RANGE: @@ -693,8 +693,8 @@ print_type_fixed_point (struct type *type, struct ui_file *stream) { std::string small_img = type->fixed_point_scaling_factor ().str (); - fprintf_filtered (stream, "%s-byte fixed point (small = %s)", - pulongest (TYPE_LENGTH (type)), small_img.c_str ()); + gdb_printf (stream, "%s-byte fixed point (small = %s)", + pulongest (TYPE_LENGTH (type)), small_img.c_str ()); } /* Dump details of a type specified either directly or indirectly. @@ -733,8 +733,8 @@ static void show_print_type_methods (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of methods defined in a class in %s\n"), - value); + gdb_printf (file, _("Printing of methods defined in a class in %s\n"), + value); } static bool print_typedefs = true; @@ -750,8 +750,8 @@ static void show_print_type_typedefs (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of typedefs defined in a class in %s\n"), - value); + gdb_printf (file, _("Printing of typedefs defined in a class in %s\n"), + value); } /* Limit on the number of nested type definitions to print or -1 to print @@ -778,14 +778,14 @@ show_print_type_nested_types (struct ui_file *file, int from_tty, { if (*value == '0') { - fprintf_filtered (file, - _("Will not print nested types defined in a class\n")); + gdb_printf (file, + _("Will not print nested types defined in a class\n")); } else { - fprintf_filtered (file, - _("Will print %s nested types defined in a class\n"), - value); + gdb_printf (file, + _("Will print %s nested types defined in a class\n"), + value); } } @@ -813,9 +813,9 @@ show_print_offsets_and_sizes_in_hex (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Display of struct members offsets and sizes in hexadecimal is %s\n"), - value); + value); } void _initialize_typeprint (); diff --git a/gdb/ui-file.h b/gdb/ui-file.h index 7ced54e..f8e1fe8 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -126,7 +126,7 @@ public: /* Print STR, bypassing any paging that might be done by this ui_file. Note that nearly no code should call this -- it's - intended for use by printf_filtered, but nothing else. */ + intended for use by gdb_printf, but nothing else. */ virtual void puts_unfiltered (const char *str) { this->puts (str); diff --git a/gdb/unittests/command-def-selftests.c b/gdb/unittests/command-def-selftests.c index 1eaa571..da158d9 100644 --- a/gdb/unittests/command-def-selftests.c +++ b/gdb/unittests/command-def-selftests.c @@ -37,8 +37,8 @@ static unsigned int nr_failed_invariants; static void broken_doc_invariant (const char *prefix, const char *name, const char *msg) { - printf_filtered ("help doc broken invariant: command '%s%s' help doc %s\n", - prefix, name, msg); + gdb_printf ("help doc broken invariant: command '%s%s' help doc %s\n", + prefix, name, msg); nr_failed_invariants++; } @@ -129,12 +129,12 @@ traverse_command_structure (struct cmd_list_element **list, auto dupl = lists.find (list); if (dupl != lists.end ()) { - printf_filtered ("list %p duplicated," - " reachable via prefix '%s' and '%s'." - " Duplicated list first command is '%s'\n", - list, - prefix, dupl->second, - (*list)->name); + gdb_printf ("list %p duplicated," + " reachable via prefix '%s' and '%s'." + " Duplicated list first command is '%s'\n", + list, + prefix, dupl->second, + (*list)->name); nr_duplicates++; return; } @@ -163,15 +163,15 @@ traverse_command_structure (struct cmd_list_element **list, || (prefixcmd == nullptr && *list != cmdlist)) { if (c->prefix == nullptr) - printf_filtered ("list %p reachable via prefix '%s'." - " command '%s' has null prefixcmd\n", - list, - prefix, c->name); + gdb_printf ("list %p reachable via prefix '%s'." + " command '%s' has null prefixcmd\n", + list, + prefix, c->name); else - printf_filtered ("list %p reachable via prefix '%s'." - " command '%s' has a different prefixcmd\n", - list, - prefix, c->name); + gdb_printf ("list %p reachable via prefix '%s'." + " command '%s' has a different prefixcmd\n", + list, + prefix, c->name); nr_invalid_prefixcmd++; } } diff --git a/gdb/user-regs.c b/gdb/user-regs.c index e9a47be..8f1c6e6 100644 --- a/gdb/user-regs.c +++ b/gdb/user-regs.c @@ -223,9 +223,9 @@ maintenance_print_user_registers (const char *args, int from_tty) regs = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data); regnum = gdbarch_num_cooked_regs (gdbarch); - printf_filtered (" %-11s %3s\n", "Name", "Nr"); + gdb_printf (" %-11s %3s\n", "Name", "Nr"); for (reg = regs->first; reg != NULL; reg = reg->next, ++regnum) - printf_filtered (" %-11s %3d\n", reg->name, regnum); + gdb_printf (" %-11s %3d\n", reg->name, regnum); } void _initialize_user_regs (); diff --git a/gdb/utils.c b/gdb/utils.c index 21fb7d6..9175b00 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -107,9 +107,9 @@ static void show_sevenbit_strings (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of 8-bit characters " - "in strings as \\nnn is %s.\n"), - value); + gdb_printf (file, _("Printing of 8-bit characters " + "in strings as \\nnn is %s.\n"), + value); } /* String to be printed before warning messages, if any. */ @@ -121,7 +121,7 @@ static void show_pagination_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("State of pagination is %s.\n"), value); + gdb_printf (file, _("State of pagination is %s.\n"), value); } @@ -152,7 +152,7 @@ vwarning (const char *string, va_list args) if (warning_pre_print) gdb_puts (warning_pre_print, gdb_stderr); gdb_vprintf (gdb_stderr, string, args); - fprintf_unfiltered (gdb_stderr, "\n"); + gdb_printf (gdb_stderr, "\n"); } } @@ -240,10 +240,10 @@ can_dump_core (enum resource_limit_kind limit_kind) void warn_cant_dump_core (const char *reason) { - fprintf_unfiltered (gdb_stderr, - _("%s\nUnable to dump core, use `ulimit -c" - " unlimited' before executing GDB next time.\n"), - reason); + gdb_printf (gdb_stderr, + _("%s\nUnable to dump core, use `ulimit -c" + " unlimited' before executing GDB next time.\n"), + reason); } /* Check whether GDB will be able to dump core using the dump_core @@ -381,7 +381,7 @@ internal_vproblem (struct internal_problem *problem, || !confirm || !filtered_printing_initialized () || problem->should_print_backtrace) - fprintf_unfiltered (gdb_stderr, "%s\n", reason.c_str ()); + gdb_printf (gdb_stderr, "%s\n", reason.c_str ()); if (problem->should_print_backtrace) gdb_internal_backtrace (); @@ -406,8 +406,8 @@ internal_vproblem (struct internal_problem *problem, gdb_puts (_("\nThis is a bug, please report it."), gdb_stderr); if (REPORT_BUGS_TO[0]) - fprintf_unfiltered (gdb_stderr, _(" For instructions, see:\n%s."), - REPORT_BUGS_TO); + gdb_printf (gdb_stderr, _(" For instructions, see:\n%s."), + REPORT_BUGS_TO); gdb_puts ("\n\n", gdb_stderr); if (problem->should_dump_core == internal_problem_ask) @@ -653,7 +653,7 @@ print_sys_errmsg (const char *string, int errcode) /* We want anything which was printed on stdout to come out first, before this message. */ gdb_flush (gdb_stdout); - fprintf_unfiltered (gdb_stderr, "%s: %s.\n", string, err); + gdb_printf (gdb_stderr, "%s: %s.\n", string, err); } /* Control C eventually causes this to be called, at a convenient time. */ @@ -877,9 +877,9 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args) gdb_stdout->wrap_here (0); gdb_vprintf (gdb_stdout, ctlstr, args); - printf_filtered (_("(%s or %s) [answered %c; " - "input not from terminal]\n"), - y_string, n_string, def_answer); + gdb_printf (_("(%s or %s) [answered %c; " + "input not from terminal]\n"), + y_string, n_string, def_answer); return def_value; } @@ -914,7 +914,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args) if (response == NULL) /* C-d */ { - printf_filtered ("EOF [assumed %c]\n", def_answer); + gdb_printf ("EOF [assumed %c]\n", def_answer); retval = def_value; break; } @@ -941,15 +941,15 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args) break; } /* Invalid entries are not defaulted and require another selection. */ - printf_filtered (_("Please answer %s or %s.\n"), - y_string, n_string); + gdb_printf (_("Please answer %s or %s.\n"), + y_string, n_string); } /* Add time spend in this routine to prompt_for_continue_wait_time. */ prompt_for_continue_wait_time += steady_clock::now () - prompt_started; if (annotation_level > 1) - printf_filtered (("\n\032\032post-query\n")); + gdb_printf (("\n\032\032post-query\n")); return retval; } @@ -1130,9 +1130,9 @@ static void show_lines_per_page (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Number of lines gdb thinks are in a page is %s.\n"), - value); + gdb_printf (file, + _("Number of lines gdb thinks are in a page is %s.\n"), + value); } /* Number of chars per line or UINT_MAX if line folding is disabled. */ @@ -1141,10 +1141,10 @@ static void show_chars_per_line (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Number of characters gdb thinks " - "are in a line is %s.\n"), - value); + gdb_printf (file, + _("Number of characters gdb thinks " + "are in a line is %s.\n"), + value); } /* Current count of lines printed on this page, chars on this line. */ @@ -1814,17 +1814,7 @@ gdb_vprintf (const char *format, va_list args) } void -fprintf_filtered (struct ui_file *stream, const char *format, ...) -{ - va_list args; - - va_start (args, format); - gdb_vprintf (stream, format, args); - va_end (args); -} - -void -fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +gdb_printf (struct ui_file *stream, const char *format, ...) { va_list args; @@ -1860,7 +1850,7 @@ vfprintf_styled (struct ui_file *stream, const ui_file_style &style, } void -printf_filtered (const char *format, ...) +gdb_printf (const char *format, ...) { va_list args; @@ -3106,8 +3096,8 @@ static void show_debug_timestamp (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Timestamping debugging messages is %s.\n"), - value); + gdb_printf (file, _("Timestamping debugging messages is %s.\n"), + value); } diff --git a/gdb/utils.h b/gdb/utils.h index 26c35bc..79f53c4 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -248,13 +248,10 @@ extern void gdb_vprintf (const char *, va_list) ATTRIBUTE_PRINTF (1, 0); extern void gdb_vprintf (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0); -extern void fprintf_filtered (struct ui_file *, const char *, ...) +extern void gdb_printf (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3); -extern void printf_filtered (const char *, ...) ATTRIBUTE_PRINTF (1, 2); - -extern void fprintf_unfiltered (struct ui_file *, const char *, ...) - ATTRIBUTE_PRINTF (2, 3); +extern void gdb_printf (const char *, ...) ATTRIBUTE_PRINTF (1, 2); extern void printf_unfiltered (const char *, ...) ATTRIBUTE_PRINTF (1, 2); @@ -265,7 +262,7 @@ extern const char *n_spaces (int); /* Return nonzero if filtered printing is initialized. */ extern int filtered_printing_initialized (void); -/* Like fprintf_filtered, but styles the output according to STYLE, +/* Like gdb_printf, but styles the output according to STYLE, when appropriate. */ extern void fprintf_styled (struct ui_file *stream, diff --git a/gdb/valops.c b/gdb/valops.c index 3a59512..75d52b4 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -103,9 +103,9 @@ show_overload_resolution (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Overload resolution in evaluating " - "C++ functions is %s.\n"), - value); + gdb_printf (file, _("Overload resolution in evaluating " + "C++ functions is %s.\n"), + value); } /* Find the address of function name NAME in the inferior. If OBJF_P @@ -3207,28 +3207,28 @@ find_oload_champ (gdb::array_view<value *> args, if (overload_debug) { if (methods != NULL) - fprintf_filtered (gdb_stderr, - "Overloaded method instance %s, # of parms %d\n", - methods[ix].physname, (int) parm_types.size ()); + gdb_printf (gdb_stderr, + "Overloaded method instance %s, # of parms %d\n", + methods[ix].physname, (int) parm_types.size ()); else if (xmethods != NULL) - fprintf_filtered (gdb_stderr, - "Xmethod worker, # of parms %d\n", - (int) parm_types.size ()); + gdb_printf (gdb_stderr, + "Xmethod worker, # of parms %d\n", + (int) parm_types.size ()); else - fprintf_filtered (gdb_stderr, - "Overloaded function instance " - "%s # of parms %d\n", - functions[ix]->demangled_name (), - (int) parm_types.size ()); + gdb_printf (gdb_stderr, + "Overloaded function instance " + "%s # of parms %d\n", + functions[ix]->demangled_name (), + (int) parm_types.size ()); - fprintf_filtered (gdb_stderr, - "...Badness of length : {%d, %d}\n", - bv[0].rank, bv[0].subrank); + gdb_printf (gdb_stderr, + "...Badness of length : {%d, %d}\n", + bv[0].rank, bv[0].subrank); for (jj = 1; jj < bv.size (); jj++) - fprintf_filtered (gdb_stderr, - "...Badness of arg %d : {%d, %d}\n", - jj, bv[jj].rank, bv[jj].subrank); + gdb_printf (gdb_stderr, + "...Badness of arg %d : {%d, %d}\n", + jj, bv[jj].rank, bv[jj].subrank); } if (oload_champ_bv->empty ()) @@ -3256,9 +3256,9 @@ find_oload_champ (gdb::array_view<value *> args, break; } if (overload_debug) - fprintf_filtered (gdb_stderr, "Overload resolution " - "champion is %d, ambiguous? %d\n", - oload_champ, oload_ambiguous); + gdb_printf (gdb_stderr, "Overload resolution " + "champion is %d, ambiguous? %d\n", + oload_champ, oload_ambiguous); } return oload_champ; diff --git a/gdb/valprint.c b/gdb/valprint.c index 3a07c98..7cdf610 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -156,10 +156,10 @@ static void show_print_max (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Limit on string chars or array " - "elements to print is %s.\n"), - value); + gdb_printf (file, + _("Limit on string chars or array " + "elements to print is %s.\n"), + value); } @@ -170,9 +170,9 @@ static void show_input_radix (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Default input radix for entering numbers is %s.\n"), - value); + gdb_printf (file, + _("Default input radix for entering numbers is %s.\n"), + value); } unsigned output_radix = 10; @@ -180,9 +180,9 @@ static void show_output_radix (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Default output radix for printing of values is %s.\n"), - value); + gdb_printf (file, + _("Default output radix for printing of values is %s.\n"), + value); } /* By default we print arrays without printing the index of each element in @@ -192,7 +192,7 @@ static void show_print_array_indexes (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of array indexes is %s.\n"), value); + gdb_printf (file, _("Printing of array indexes is %s.\n"), value); } /* Print repeat counts if there are more than this many repetitions of an @@ -203,8 +203,8 @@ static void show_repeat_count_threshold (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Threshold for repeated print elements is %s.\n"), - value); + gdb_printf (file, _("Threshold for repeated print elements is %s.\n"), + value); } /* If nonzero, prints memory tag violations for pointers. */ @@ -213,9 +213,9 @@ static void show_memory_tag_violations (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of memory tag violations is %s.\n"), - value); + gdb_printf (file, + _("Printing of memory tag violations is %s.\n"), + value); } /* If nonzero, stops printing of char arrays at first null. */ @@ -224,10 +224,10 @@ static void show_stop_print_at_null (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of char arrays to stop " - "at first null char is %s.\n"), - value); + gdb_printf (file, + _("Printing of char arrays to stop " + "at first null char is %s.\n"), + value); } /* Controls pretty printing of structures. */ @@ -236,7 +236,7 @@ static void show_prettyformat_structs (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Pretty formatting of structures is %s.\n"), value); + gdb_printf (file, _("Pretty formatting of structures is %s.\n"), value); } /* Controls pretty printing of arrays. */ @@ -245,7 +245,7 @@ static void show_prettyformat_arrays (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Pretty formatting of arrays is %s.\n"), value); + gdb_printf (file, _("Pretty formatting of arrays is %s.\n"), value); } /* If nonzero, causes unions inside structures or other unions to be @@ -255,9 +255,9 @@ static void show_unionprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of unions interior to structures is %s.\n"), - value); + gdb_printf (file, + _("Printing of unions interior to structures is %s.\n"), + value); } /* If nonzero, causes machine addresses to be printed in certain contexts. */ @@ -266,16 +266,16 @@ static void show_addressprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Printing of addresses is %s.\n"), value); + gdb_printf (file, _("Printing of addresses is %s.\n"), value); } static void show_symbol_print (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of symbols when printing pointers is %s.\n"), - value); + gdb_printf (file, + _("Printing of symbols when printing pointers is %s.\n"), + value); } @@ -505,7 +505,7 @@ print_ref_address (struct type *type, const gdb_byte *address_buffer, CORE_ADDR address = extract_typed_address (address_buffer + embedded_offset, type); - fprintf_filtered (stream, "@"); + gdb_printf (stream, "@"); gdb_puts (paddress (gdbarch, address), stream); } /* Else: we have a non-addressable value, such as a DW_AT_const_value. */ @@ -716,9 +716,9 @@ generic_val_print_func (struct type *type, /* FIXME, we should consider, at least for ANSI C language, eliminating the distinction made between FUNCs and POINTERs to FUNCs. */ - fprintf_filtered (stream, "{"); + gdb_printf (stream, "{"); type_print (type, "", stream, -1); - fprintf_filtered (stream, "} "); + gdb_printf (stream, "} "); /* Try to print what function it points to, and its address. */ print_address_demangle (options, gdbarch, address, stream, demangle); } @@ -787,9 +787,9 @@ generic_value_print_char (struct value *value, struct ui_file *stream, LONGEST val = unpack_long (type, valaddr); if (type->is_unsigned ()) - fprintf_filtered (stream, "%u", (unsigned int) val); + gdb_printf (stream, "%u", (unsigned int) val); else - fprintf_filtered (stream, "%d", (int) val); + gdb_printf (stream, "%d", (int) val); gdb_puts (" ", stream); current_language->printchar (val, unresolved_type, stream); } @@ -830,7 +830,7 @@ generic_val_print_fixed_point (struct value *val, struct ui_file *stream, const char *fmt = TYPE_LENGTH (type) < 4 ? "%.11Fg" : "%.17Fg"; std::string str = gmp_string_printf (fmt, f.val); - fprintf_filtered (stream, "%s", str.c_str ()); + gdb_printf (stream, "%s", str.c_str ()); } } @@ -842,15 +842,15 @@ generic_value_print_complex (struct value *val, struct ui_file *stream, const struct generic_val_print_decorations *decorations) { - fprintf_filtered (stream, "%s", decorations->complex_prefix); + gdb_printf (stream, "%s", decorations->complex_prefix); struct value *real_part = value_real_part (val); value_print_scalar_formatted (real_part, options, 0, stream); - fprintf_filtered (stream, "%s", decorations->complex_infix); + gdb_printf (stream, "%s", decorations->complex_infix); struct value *imag_part = value_imaginary_part (val); value_print_scalar_formatted (imag_part, options, 0, stream); - fprintf_filtered (stream, "%s", decorations->complex_suffix); + gdb_printf (stream, "%s", decorations->complex_suffix); } /* generic_value_print helper for TYPE_CODE_MEMBERPTR. */ @@ -969,7 +969,7 @@ generic_value_print (struct value *val, struct ui_file *stream, int recurse, break; case TYPE_CODE_ERROR: - fprintf_filtered (stream, "%s", TYPE_ERROR_NAME (type)); + gdb_printf (stream, "%s", TYPE_ERROR_NAME (type)); break; case TYPE_CODE_UNDEF: @@ -1051,7 +1051,7 @@ common_val_print (struct value *value, struct ui_file *stream, int recurse, otherwise, print an ellipsis. */ if (options->summary && !val_print_scalar_type_p (type)) { - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); return; } @@ -1106,7 +1106,7 @@ value_check_printable (struct value *val, struct ui_file *stream, if (value_entirely_optimized_out (val)) { if (options->summary && !val_print_scalar_type_p (value_type (val))) - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); else val_print_optimized_out (val, stream); return 0; @@ -1115,7 +1115,7 @@ value_check_printable (struct value *val, struct ui_file *stream, if (value_entirely_unavailable (val)) { if (options->summary && !val_print_scalar_type_p (value_type (val))) - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); else val_print_unavailable (stream); return 0; @@ -1208,7 +1208,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value, && TYPE_FIELD_BITSIZE (type, field) == 1) { if (val & ((ULONGEST)1 << type->field (field).loc_bitpos ())) - fprintf_filtered + gdb_printf (stream, " %ps", styled_string (variable_name_style.style (), type->field (field).name ())); @@ -1220,9 +1220,9 @@ val_print_type_code_flags (struct type *type, struct value *original_value, if (field_len < sizeof (ULONGEST) * TARGET_CHAR_BIT) field_val &= ((ULONGEST) 1 << field_len) - 1; - fprintf_filtered (stream, " %ps=", - styled_string (variable_name_style.style (), - type->field (field).name ())); + gdb_printf (stream, " %ps=", + styled_string (variable_name_style.style (), + type->field (field).name ())); if (field_type->code () == TYPE_CODE_ENUM) generic_val_print_enum_1 (field_type, field_val, stream); else @@ -1429,7 +1429,7 @@ static void emit_octal_digit (struct ui_file *stream, bool *seen_a_one, int digit) { if (*seen_a_one || digit != 0) - fprintf_filtered (stream, "%o", digit); + gdb_printf (stream, "%o", digit); if (digit != 0) *seen_a_one = true; } @@ -1768,7 +1768,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, for (; i >= 0; i--) { - fprintf_filtered (stream, "%1d", digits[i]); + gdb_printf (stream, "%1d", digits[i]); } } @@ -1802,9 +1802,9 @@ print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, /* When not zero-padding, use a different format for the very first byte printed. */ if (!zero_pad && p == first) - fprintf_filtered (stream, "%x", *p); + gdb_printf (stream, "%x", *p); else - fprintf_filtered (stream, "%02x", *p); + gdb_printf (stream, "%02x", *p); } } else @@ -1827,9 +1827,9 @@ print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, /* When not zero-padding, use a different format for the very first byte printed. */ if (!zero_pad && p == first) - fprintf_filtered (stream, "%x", *p); + gdb_printf (stream, "%x", *p); else - fprintf_filtered (stream, "%02x", *p); + gdb_printf (stream, "%02x", *p); } } } @@ -1928,15 +1928,15 @@ value_print_array_elements (struct value *val, struct ui_file *stream, { if (options->prettyformat_arrays) { - fprintf_filtered (stream, ",\n"); + gdb_printf (stream, ",\n"); print_spaces_filtered (2 + 2 * recurse, stream); } else - fprintf_filtered (stream, ", "); + gdb_printf (stream, ", "); } else if (options->prettyformat_arrays) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); } stream->wrap_here (2 + 2 * recurse); @@ -1966,8 +1966,8 @@ value_print_array_elements (struct value *val, struct ui_file *stream, if (reps > options->repeat_count_threshold) { annotate_elt_rep (reps); - fprintf_filtered (stream, " %p[<repeats %u times>%p]", - metadata_style.style ().ptr (), reps, nullptr); + gdb_printf (stream, " %p[<repeats %u times>%p]", + metadata_style.style ().ptr (), reps, nullptr); annotate_elt_rep_end (); i = rep1 - 1; @@ -1981,10 +1981,10 @@ value_print_array_elements (struct value *val, struct ui_file *stream, } annotate_array_section_end (); if (i < len) - fprintf_filtered (stream, "..."); + gdb_printf (stream, "..."); if (options->prettyformat_arrays) { - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); print_spaces_filtered (2 * recurse, stream); } } @@ -2782,9 +2782,9 @@ val_print_string (struct type *elttype, const char *encoding, { std::string str = memory_error_message (TARGET_XFER_E_IO, gdbarch, addr); - fprintf_filtered (stream, _("<error: %ps>"), - styled_string (metadata_style.style (), - str.c_str ())); + gdb_printf (stream, _("<error: %ps>"), + styled_string (metadata_style.style (), + str.c_str ())); } return (bytes_read / width); @@ -2796,7 +2796,7 @@ static void show_print_max_depth (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Maximum print depth is %s.\n"), value); + gdb_printf (file, _("Maximum print depth is %s.\n"), value); } @@ -2835,9 +2835,9 @@ set_input_radix_1 (int from_tty, unsigned radix) input_radix_1 = input_radix = radix; if (from_tty) { - printf_filtered (_("Input radix now set to " - "decimal %u, hex %x, octal %o.\n"), - radix, radix, radix); + gdb_printf (_("Input radix now set to " + "decimal %u, hex %x, octal %o.\n"), + radix, radix, radix); } } @@ -2878,9 +2878,9 @@ set_output_radix_1 (int from_tty, unsigned radix) output_radix_1 = output_radix = radix; if (from_tty) { - printf_filtered (_("Output radix now set to " - "decimal %u, hex %x, octal %o.\n"), - radix, radix, radix); + gdb_printf (_("Output radix now set to " + "decimal %u, hex %x, octal %o.\n"), + radix, radix, radix); } } @@ -2902,9 +2902,9 @@ set_radix (const char *arg, int from_tty) set_input_radix_1 (0, radix); if (from_tty) { - printf_filtered (_("Input and output radices now set to " - "decimal %u, hex %x, octal %o.\n"), - radix, radix, radix); + gdb_printf (_("Input and output radices now set to " + "decimal %u, hex %x, octal %o.\n"), + radix, radix, radix); } } @@ -2917,18 +2917,18 @@ show_radix (const char *arg, int from_tty) { if (input_radix == output_radix) { - printf_filtered (_("Input and output radices set to " - "decimal %u, hex %x, octal %o.\n"), - input_radix, input_radix, input_radix); + gdb_printf (_("Input and output radices set to " + "decimal %u, hex %x, octal %o.\n"), + input_radix, input_radix, input_radix); } else { - printf_filtered (_("Input radix set to decimal " - "%u, hex %x, octal %o.\n"), - input_radix, input_radix, input_radix); - printf_filtered (_("Output radix set to decimal " - "%u, hex %x, octal %o.\n"), - output_radix, output_radix, output_radix); + gdb_printf (_("Input radix set to decimal " + "%u, hex %x, octal %o.\n"), + input_radix, input_radix, input_radix); + gdb_printf (_("Output radix set to decimal " + "%u, hex %x, octal %o.\n"), + output_radix, output_radix, output_radix); } } } @@ -2939,9 +2939,9 @@ static void show_vtblprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Printing of C++ virtual function tables is %s.\n"), - value); + value); } /* Controls looking up an object's derived type using what we find in @@ -2951,9 +2951,9 @@ show_objectprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("\ + gdb_printf (file, _("\ Printing of object's derived type based on vtable info is %s.\n"), - value); + value); } static void @@ -2961,9 +2961,9 @@ show_static_field_print (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Printing of C++ static members is %s.\n"), - value); + gdb_printf (file, + _("Printing of C++ static members is %s.\n"), + value); } diff --git a/gdb/value.c b/gdb/value.c index a57a832..482abce 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -989,10 +989,10 @@ show_max_value_size (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (max_value_size == -1) - fprintf_filtered (file, _("Maximum value size is unlimited.\n")); + gdb_printf (file, _("Maximum value size is unlimited.\n")); else - fprintf_filtered (file, _("Maximum value size is %d bytes.\n"), - max_value_size); + gdb_printf (file, _("Maximum value size is %d bytes.\n"), + max_value_size); } /* Called before we attempt to allocate or reallocate a buffer for the @@ -1950,10 +1950,10 @@ show_values (const char *num_exp, int from_tty) struct value_print_options opts; val = access_value_history (i); - printf_filtered (("$%d = "), i); + gdb_printf (("$%d = "), i); get_user_print_options (&opts); value_print (val, gdb_stdout, &opts); - printf_filtered (("\n")); + gdb_printf (("\n")); } /* The next "show values +" should start after what we just printed. */ @@ -2634,7 +2634,7 @@ show_convenience (const char *ignore, int from_tty) { varseen = 1; } - printf_filtered (("$%s = "), var->name); + gdb_printf (("$%s = "), var->name); try { @@ -2649,7 +2649,7 @@ show_convenience (const char *ignore, int from_tty) _("<error: %s>"), ex.what ()); } - printf_filtered (("\n")); + gdb_printf (("\n")); } if (!varseen) { @@ -2657,11 +2657,11 @@ show_convenience (const char *ignore, int from_tty) The user can't create them except via Python, and if Python support is installed this message will never be printed ($_streq will exist). */ - printf_filtered (_("No debugger convenience variables now defined.\n" - "Convenience variables have " - "names starting with \"$\";\n" - "use \"set\" as in \"set " - "$foo = 5\" to define them.\n")); + gdb_printf (_("No debugger convenience variables now defined.\n" + "Convenience variables have " + "names starting with \"$\";\n" + "use \"set\" as in \"set " + "$foo = 5\" to define them.\n")); } } @@ -4000,15 +4000,15 @@ value_fetch_lazy_register (struct value *val) gdbarch = get_frame_arch (frame); string_file debug_file; - fprintf_unfiltered (&debug_file, - "(frame=%d, regnum=%d(%s), ...) ", - frame_relative_level (frame), regnum, - user_reg_map_regnum_to_name (gdbarch, regnum)); + gdb_printf (&debug_file, + "(frame=%d, regnum=%d(%s), ...) ", + frame_relative_level (frame), regnum, + user_reg_map_regnum_to_name (gdbarch, regnum)); - fprintf_unfiltered (&debug_file, "->"); + gdb_printf (&debug_file, "->"); if (value_optimized_out (new_val)) { - fprintf_unfiltered (&debug_file, " "); + gdb_printf (&debug_file, " "); val_print_optimized_out (new_val, &debug_file); } else @@ -4017,20 +4017,20 @@ value_fetch_lazy_register (struct value *val) gdb::array_view<const gdb_byte> buf = value_contents (new_val); if (VALUE_LVAL (new_val) == lval_register) - fprintf_unfiltered (&debug_file, " register=%d", - VALUE_REGNUM (new_val)); + gdb_printf (&debug_file, " register=%d", + VALUE_REGNUM (new_val)); else if (VALUE_LVAL (new_val) == lval_memory) - fprintf_unfiltered (&debug_file, " address=%s", - paddress (gdbarch, - value_address (new_val))); + gdb_printf (&debug_file, " address=%s", + paddress (gdbarch, + value_address (new_val))); else - fprintf_unfiltered (&debug_file, " computed"); + gdb_printf (&debug_file, " computed"); - fprintf_unfiltered (&debug_file, " bytes="); - fprintf_unfiltered (&debug_file, "["); + gdb_printf (&debug_file, " bytes="); + gdb_printf (&debug_file, "["); for (i = 0; i < register_size (gdbarch, regnum); i++) - fprintf_unfiltered (&debug_file, "%02x", buf[i]); - fprintf_unfiltered (&debug_file, "]"); + gdb_printf (&debug_file, "%02x", buf[i]); + gdb_printf (&debug_file, "]"); } frame_debug_printf ("%s", debug_file.c_str ()); diff --git a/gdb/varobj.c b/gdb/varobj.c index 5617131..6693dac 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -47,7 +47,7 @@ static void show_varobjdebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Varobj debugging is %s.\n"), value); + gdb_printf (file, _("Varobj debugging is %s.\n"), value); } /* String representations of gdb's format codes. */ @@ -316,8 +316,8 @@ varobj_create (const char *objname, || opcode == OP_TYPEOF || opcode == OP_DECLTYPE) { - fprintf_unfiltered (gdb_stderr, "Attempt to use a type name" - " as an expression.\n"); + gdb_printf (gdb_stderr, "Attempt to use a type name" + " as an expression.\n"); return NULL; } @@ -1755,7 +1755,7 @@ uninstall_variable (struct varobj *var) htab_remove_elt_with_hash (varobj_table, var->obj_name.c_str (), hash); if (varobjdebug) - fprintf_unfiltered (gdb_stdlog, "Deleting %s\n", var->obj_name.c_str ()); + gdb_printf (gdb_stdlog, "Deleting %s\n", var->obj_name.c_str ()); /* If root, remove varobj from root list. */ if (is_root_p (var)) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 78b2790..ce8e270 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -310,8 +310,8 @@ static void check (BOOL ok, const char *file, int line) { if (!ok) - printf_filtered ("error return %s:%d was %u\n", file, line, - (unsigned) GetLastError ()); + gdb_printf ("error return %s:%d was %u\n", file, line, + (unsigned) GetLastError ()); } /* See nat/windows-nat.h. */ @@ -429,11 +429,11 @@ windows_delete_thread (ptid_t ptid, DWORD exit_code, bool main_thread_p) here as well. */ if (info_verbose) - printf_filtered ("[Deleting %s]\n", target_pid_to_str (ptid).c_str ()); + gdb_printf ("[Deleting %s]\n", target_pid_to_str (ptid).c_str ()); else if (print_thread_events && !main_thread_p) - printf_filtered (_("[%s exited with code %u]\n"), - target_pid_to_str (ptid).c_str (), - (unsigned) exit_code); + gdb_printf (_("[%s exited with code %u]\n"), + target_pid_to_str (ptid).c_str (), + (unsigned) exit_code); delete_thread (find_thread_ptid (&the_windows_nat_target, ptid)); @@ -941,7 +941,7 @@ display_selector (HANDLE thread, DWORD sel) if (ret) { int base, limit; - printf_filtered ("0x%03x: ", (unsigned) sel); + gdb_printf ("0x%03x: ", (unsigned) sel); if (!info.HighWord.Bits.Pres) { gdb_puts ("Segment not present\n"); @@ -953,7 +953,7 @@ display_selector (HANDLE thread, DWORD sel) limit = (info.HighWord.Bits.LimitHi << 16) + info.LimitLow; if (info.HighWord.Bits.Granularity) limit = (limit << 12) | 0xfff; - printf_filtered ("base=0x%08x limit=0x%08x", base, limit); + gdb_printf ("base=0x%08x limit=0x%08x", base, limit); if (info.HighWord.Bits.Default_Big) gdb_puts(" 32-bit "); else @@ -985,16 +985,16 @@ display_selector (HANDLE thread, DWORD sel) gdb_puts ("Code (Exec/Read, Conf"); break; default: - printf_filtered ("Unknown type 0x%lx", - (unsigned long) info.HighWord.Bits.Type); + gdb_printf ("Unknown type 0x%lx", + (unsigned long) info.HighWord.Bits.Type); } if ((info.HighWord.Bits.Type & 0x1) == 0) gdb_puts(", N.Acc"); gdb_puts (")\n"); if ((info.HighWord.Bits.Type & 0x10) == 0) gdb_puts("System selector "); - printf_filtered ("Priviledge level = %ld. ", - (unsigned long) info.HighWord.Bits.Dpl); + gdb_printf ("Priviledge level = %ld. ", + (unsigned long) info.HighWord.Bits.Dpl); if (info.HighWord.Bits.Granularity) gdb_puts ("Page granular.\n"); else @@ -1005,9 +1005,9 @@ display_selector (HANDLE thread, DWORD sel) { DWORD err = GetLastError (); if (err == ERROR_NOT_SUPPORTED) - printf_filtered ("Function not supported\n"); + gdb_printf ("Function not supported\n"); else - printf_filtered ("Invalid selector 0x%x.\n", (unsigned) sel); + gdb_printf ("Invalid selector 0x%x.\n", (unsigned) sel); return 0; } } @@ -1075,7 +1075,7 @@ display_selectors (const char * args, int from_tty) { int sel; sel = parse_and_eval_long (args); - printf_filtered ("Selector \"%s\"\n",args); + gdb_printf ("Selector \"%s\"\n",args); display_selector (current_windows_thread->h, sel); } } @@ -1631,11 +1631,11 @@ windows_nat_target::get_windows_debug_event (int pid, default: if (saw_create != 1) break; - printf_filtered ("gdb: kernel event for pid=%u tid=0x%x\n", - (unsigned) current_event.dwProcessId, - (unsigned) current_event.dwThreadId); - printf_filtered (" unknown event code %u\n", - (unsigned) current_event.dwDebugEventCode); + gdb_printf ("gdb: kernel event for pid=%u tid=0x%x\n", + (unsigned) current_event.dwProcessId, + (unsigned) current_event.dwThreadId); + gdb_printf (" unknown event code %u\n", + (unsigned) current_event.dwDebugEventCode); break; } @@ -2071,9 +2071,9 @@ windows_nat_target::files_info () { struct inferior *inf = current_inferior (); - printf_filtered ("\tUsing the running image of %s %s.\n", - inf->attach_flag ? "attached" : "child", - target_pid_to_str (inferior_ptid).c_str ()); + gdb_printf ("\tUsing the running image of %s %s.\n", + inf->attach_flag ? "attached" : "child", + target_pid_to_str (inferior_ptid).c_str ()); } /* Modify CreateProcess parameters for use of a new separate console. diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 91fecd6..9049f1e 100644 --- a/gdb/windows-tdep.c +++ b/gdb/windows-tdep.c @@ -481,24 +481,24 @@ display_one_tib (ptid_t ptid) if (target_get_tib_address (ptid, &thread_local_base) == 0) { - printf_filtered (_("Unable to get thread local base for %s\n"), - target_pid_to_str (ptid).c_str ()); + gdb_printf (_("Unable to get thread local base for %s\n"), + target_pid_to_str (ptid).c_str ()); return -1; } if (target_read (current_inferior ()->top_target (), TARGET_OBJECT_MEMORY, NULL, tib, thread_local_base, tib_size) != tib_size) { - printf_filtered (_("Unable to read thread information " - "block for %s at address %s\n"), - target_pid_to_str (ptid).c_str (), - paddress (target_gdbarch (), thread_local_base)); + gdb_printf (_("Unable to read thread information " + "block for %s at address %s\n"), + target_pid_to_str (ptid).c_str (), + paddress (target_gdbarch (), thread_local_base)); return -1; } - printf_filtered (_("Thread Information Block %s at %s\n"), - target_pid_to_str (ptid).c_str (), - paddress (target_gdbarch (), thread_local_base)); + gdb_printf (_("Thread Information Block %s at %s\n"), + target_pid_to_str (ptid).c_str (), + paddress (target_gdbarch (), thread_local_base)); index = (gdb_byte *) tib; @@ -508,10 +508,10 @@ display_one_tib (ptid_t ptid) { val = extract_unsigned_integer (index, size, byte_order); if (i < max_name) - printf_filtered (_("%s is 0x%s\n"), TIB_NAME[i], phex (val, size)); + gdb_printf (_("%s is 0x%s\n"), TIB_NAME[i], phex (val, size)); else if (val != 0) - printf_filtered (_("TIB[0x%s] is 0x%s\n"), phex (i * size, 2), - phex (val, size)); + gdb_printf (_("TIB[0x%s] is 0x%s\n"), phex (i * size, 2), + phex (val, size)); index += size; } return 1; @@ -601,8 +601,8 @@ static void show_maint_show_all_tib (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Show all non-zero elements of " - "Thread Information Block is %s.\n"), value); + gdb_printf (file, _("Show all non-zero elements of " + "Thread Information Block is %s.\n"), value); } diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 8b51495..9659fd0 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -183,11 +183,11 @@ gdb_xml_parser::vdebug (const char *format, va_list ap) std::string message = string_vprintf (format, ap); if (line) - fprintf_unfiltered (gdb_stderr, "%s (line %d): %s\n", - m_name, line, message.c_str ()); + gdb_printf (gdb_stderr, "%s (line %d): %s\n", + m_name, line, message.c_str ()); else - fprintf_unfiltered (gdb_stderr, "%s: %s\n", - m_name, message.c_str ()); + gdb_printf (gdb_stderr, "%s: %s\n", + m_name, message.c_str ()); } void @@ -959,7 +959,7 @@ static void show_debug_xml (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("XML debugging is %s.\n"), value); + gdb_printf (file, _("XML debugging is %s.\n"), value); } gdb::optional<gdb::char_vector> diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index f00357f..203d2e8 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -49,19 +49,19 @@ static unsigned int xtensa_debug_level = 0; #define DEBUGWARN(args...) \ if (xtensa_debug_level > 0) \ - fprintf_unfiltered (gdb_stdlog, "(warn ) " args) + gdb_printf (gdb_stdlog, "(warn ) " args) #define DEBUGINFO(args...) \ if (xtensa_debug_level > 1) \ - fprintf_unfiltered (gdb_stdlog, "(info ) " args) + gdb_printf (gdb_stdlog, "(info ) " args) #define DEBUGTRACE(args...) \ if (xtensa_debug_level > 2) \ - fprintf_unfiltered (gdb_stdlog, "(trace) " args) + gdb_printf (gdb_stdlog, "(trace) " args) #define DEBUGVERB(args...) \ if (xtensa_debug_level > 3) \ - fprintf_unfiltered (gdb_stdlog, "(verb ) " args) + gdb_printf (gdb_stdlog, "(verb ) " args) /* According to the ABI, the SP must be aligned to 16-byte boundaries. */ @@ -1732,23 +1732,23 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); - fprintf_unfiltered (gdb_stdlog, "%2d: %s %3s ", i, - host_address_to_string (arg), - pulongest (TYPE_LENGTH (arg_type))); + gdb_printf (gdb_stdlog, "%2d: %s %3s ", i, + host_address_to_string (arg), + pulongest (TYPE_LENGTH (arg_type))); switch (arg_type->code ()) { case TYPE_CODE_INT: - fprintf_unfiltered (gdb_stdlog, "int"); + gdb_printf (gdb_stdlog, "int"); break; case TYPE_CODE_STRUCT: - fprintf_unfiltered (gdb_stdlog, "struct"); + gdb_printf (gdb_stdlog, "struct"); break; default: - fprintf_unfiltered (gdb_stdlog, "%3d", arg_type->code ()); + gdb_printf (gdb_stdlog, "%3d", arg_type->code ()); break; } - fprintf_unfiltered (gdb_stdlog, " %s\n", - host_address_to_string (value_contents (arg).data ())); + gdb_printf (gdb_stdlog, " %s\n", + host_address_to_string (value_contents (arg).data ())); } } |