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;
}
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 {
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
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;
}
{
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)
{
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);
}
}
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);
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)),
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"));
}
}
}
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
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);
}
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:
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));
}
\f
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. */
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)
{
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. */
{
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");
}
}
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 ());
}
}
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);
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;
}
}
bound_len = pend - bound;
*n += bound_len + 2;
}
- fprintf_filtered (stream, "%.*s", bound_len, bound);
+ gdb_printf (stream, "%.*s", bound_len, bound);
}
}
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
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);
int i;
LONGEST lastval;
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
stream->wrap_here (1);
lastval = 0;
{
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
type = ada_coerce_to_simple_array_type (type);
bitsize = 0;
- fprintf_filtered (stream, "array (");
+ gdb_printf (stream, "array (");
if (type == NULL)
{
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)
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)
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);
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
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;
}
|| 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;
}
{
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,
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
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, ";");
}
}
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);
}
}
- fprintf_filtered (stream, " =>");
+ gdb_printf (stream, " =>");
}
/* Print a single variant part, PART, on STREAM. TYPE is the
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)
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,
}
}
- fprintf_filtered (stream, "\n%*send case;", level + 4, "");
+ gdb_printf (stream, "\n%*send case;", level + 4, "");
return last_field;
}
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;
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");
}
}
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, "");
}
}
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')
{
if (len > 0)
{
- fprintf_filtered (stream, " (");
+ gdb_printf (stream, " (");
for (i = 0; i < len; i += 1)
{
if (i > 0)
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);
}
}
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;
}
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:
"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;
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:
{
pulongest (TYPE_LENGTH (type)));
else
{
- fprintf_filtered (stream, "range ");
+ gdb_printf (stream, "range ");
print_range_type (type, stream, 1 /* bounds_prefered_p */);
}
}
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;
break;
case TYPE_CODE_ENUM:
if (show < 0)
- fprintf_filtered (stream, "(...)");
+ gdb_printf (stream, "(...)");
else
print_enum_type (type, stream);
break;
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;
}
ada_print_scalar (index_type, low_bound, stream);
- fprintf_filtered (stream, " => ");
+ gdb_printf (stream, " => ");
return 1;
}
{
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);
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 ();
}
{
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,
annotate_array_section_end ();
if (i < len)
{
- fprintf_filtered (stream, "...");
+ gdb_printf (stream, "...");
}
value_free_to_mark (mark);
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);
}
}
{
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
break;
case TYPE_CODE_BOOL:
- fprintf_filtered (stream, val ? "true" : "false");
+ gdb_printf (stream, val ? "true" : "false");
break;
case TYPE_CODE_RANGE:
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;
}
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
}
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 ();
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 ());
}
}
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
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);
}
{
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
return;
}
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
print_optional_low_bound (stream, type, options);
if (value_entirely_optimized_out (val))
}
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
if (val == nullptr)
{
gdb_assert (type->code () == TYPE_CODE_TYPEDEF);
- fprintf_filtered (stream, "0x0");
+ gdb_printf (stream, "0x0");
return;
}
}
|| 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))
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;
}
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;
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
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;
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;
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;
}
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)
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)
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;
}
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;
}
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. */
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;
}
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;
}
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"),
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
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. */
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
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\
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
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
/* 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. */
{
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
/* 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;
{
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
{
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;
}
{
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;
}
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);
}
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);
}
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;
}
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;
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 *
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;
}
}
/* 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;
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. */
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;
}
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;
}
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;
/* 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). */
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;
}
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);
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
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
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);
}
\f
/* Return the ARM register name corresponding to register I. */
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
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;
}
}
else
{
- fprintf_unfiltered (gdb_stderr, _("no syscall record support\n"));
+ gdb_printf (gdb_stderr, _("no syscall record support\n"));
return -1;
}
}
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:
}
else
{
- fprintf_unfiltered (gdb_stderr, _("no syscall record support\n"));
+ gdb_printf (gdb_stderr, _("no syscall record support\n"));
return -1;
}
}
{
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;
}
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;
{
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;
}
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
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. */
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
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
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
}
}
- 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\
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.
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:
{
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;
}
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;
}
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;
}
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;
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;
}
{
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 ';' */
{
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. */
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);
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;
}
}
{
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)
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
/* 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 ();
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);
}
\f
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;
}
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;
}
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
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);
}
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
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);
}
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;
}
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
{
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);
}
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)
{
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
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)
{
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);
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);
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.
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
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
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. */
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
{
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;
}
{
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++;
}
if (from_tty)
- printf_filtered (_("Breakpoint %d now unconditional.\n"), b->number);
+ gdb_printf (_("Breakpoint %d now unconditional.\n"), b->number);
}
else
{
}
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);
}
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;
}
}
}
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? */
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
{
*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
{
= 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;
{
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;
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;
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 (),
{
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
{
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;
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;
}
}
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 "
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"));
}
}
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);
}
}
if (badInput)
- printf_filtered (_("Usage: stop at LINE\n"));
+ gdb_printf (_("Usage: stop at LINE\n"));
else
break_command_1 (arg, 0, from_tty);
}
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);
}
{
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);
}
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);
}
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)
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;
}
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
{
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)
int n = 0;
for (; loc; loc = loc->next)
++n;
- printf_filtered (" (%d locations)", n);
+ gdb_printf (" (%d locations)", n);
}
}
}
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;
}
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);
}
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;
}
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__,
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
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);
}
/* 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;
}
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;
}
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;
longest_to_int (value_as_long (parse_and_eval (p))),
from_tty);
if (from_tty)
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
\f
break;
}
if (!match)
- printf_filtered (_("No breakpoint number %d.\n"), i);
+ gdb_printf (_("No breakpoint number %d.\n"), i);
}
}
}
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.
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;
}
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;
}
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
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. */
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. */
do \
{ \
if (record_debug != 0) \
- fprintf_unfiltered (gdb_stdlog, \
- "[btrace] " msg "\n", ##args); \
+ gdb_printf (gdb_stdlog, \
+ "[btrace] " msg "\n", ##args); \
} \
while (0)
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;
}
}
{
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;
{
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;
btrace_maint_update_packets (btinfo, &begin, &end, &from, &to);
if (begin == end)
{
- printf_filtered (_("No trace.\n"));
+ gdb_printf (_("No trace.\n"));
return;
}
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)
{
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)
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) */
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);
}
{
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);
}
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 {};
}
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 {};
}
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;
}
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));
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.
{
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)
{
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. */
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");
}
}
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;
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);
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:
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;
stream, show, 0, 0, language, flags,
podata);
if (passed_a_ptr)
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
break;
case TYPE_CODE_ARRAY:
stream, show, 0, need_post_space,
language, flags, podata);
if (passed_a_ptr)
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
break;
case TYPE_CODE_TYPEDEF:
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;
}
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, " ");
}
int i;
int printed_any = 0;
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
for (i = 0; i < type->num_fields (); i++)
{
if (printed_any)
{
- fprintf_filtered (stream, ", ");
+ gdb_printf (stream, ", ");
stream->wrap_here (4);
}
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
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);
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;
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,
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);
{
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)
{
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
{
last_access = s_public;
print_spaces_filtered_with_print_options (level + 2, stream, flags);
- fprintf_filtered (stream, "public:\n");
+ gdb_printf (stream, "public:\n");
}
}
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
/* 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)
{
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
print_spaces_filtered (level + 4, stream);
if (is_static)
- fprintf_filtered (stream, "static ");
+ gdb_printf (stream, "static ");
int newshow = show - 1;
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
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++)
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
gdb_puts (demangled_no_class, stream);
}
- fprintf_filtered (stream, ";\n");
+ gdb_printf (stream, ";\n");
}
}
--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)
{
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");
}
}
{
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++)
{
}
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
TYPE_TYPEDEF_FIELD_NAME (type, i),
stream, show - 1, level + 4,
language, &semi_local_flags, podata);
- fprintf_filtered (stream, ";\n");
+ gdb_printf (stream, ";\n");
}
}
print_spaces_filtered (2, stream);
}
- fprintf_filtered (stream, "%*s}", level, "");
+ gdb_printf (stream, "%*s}", level, "");
}
}
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);
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}"
/* 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)
{
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;
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++)
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:
current_language);
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
}
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
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. */
}
/* Pointer to class, check real type of object. */
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
if (value_entirely_available (val))
{
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))
{
&& (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);
}
}
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";
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";
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[] =
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 ());
}
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;
}
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;
}
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;
}
if (!stream->isatty ())
{
- fprintf_unfiltered (stream, "\n");
+ gdb_printf (stream, "\n");
gdb_flush (stream);
}
else if (meter.printing == PROGRESS)
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);
}
show_version (const char *args, int from_tty)
{
print_gdb_version (gdb_stdout, true);
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
static void
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
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.
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 ();
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. */
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);
}
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
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
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);
{
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"));
}
}
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
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'. */
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'. */
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. */
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 ())
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);
}
/*
}
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);
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);
}
}
{
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);
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
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)
|| (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;
}
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");
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),
}
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)
{
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;
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. */
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"));
}
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"));
}
{
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;
}
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;
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 ();
}
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 ();
return;
for (i=0; i < command_nest_depth; i++)
- printf_filtered ("+");
+ gdb_printf ("+");
va_list args;
{
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);
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;
}
}
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. */
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
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'. */
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 ();
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;
}
}
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;
}
}
= 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);
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.
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);
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;
}
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. */
++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.
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. */
/* 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)
{
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. */
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:
{
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;
}
}
/* 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);
}
{
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:
{
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. */
&& 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);
}
}
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;
}
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);
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);
}
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;
}
&& 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);
}
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;
}
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);
}
}
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. */
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);
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);
}
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;
{
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. */
{
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");
}
}
}
{
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. */
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");
}
}
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
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);
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);
}
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);
}
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 ();
}
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
{
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
{
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);
{
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
++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,
"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));
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;
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:
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:
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:
/* 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;
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;
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;
}
}
- 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. */
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;
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;
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
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;
}
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\" "
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);
}
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);
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);
}
\f
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'. */
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).
= 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);
{
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 ();
}
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. */
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 ();
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
NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ {
if ($0 ~ /\f/)
{
- 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;
/^[ ]*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;
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 ();
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
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. */
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 ();
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. */
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;
}
{
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");
}
}
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);
}
}
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)
{
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};
}
{
if (symbol_lookup_debug)
{
- fprintf_unfiltered
+ gdb_printf
(gdb_stdlog,
"cp_lookup_symbol_imports_or_template (...) = %s\n",
host_address_to_string (sym));
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;
}
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. */
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;
}
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
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;
}
{
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 ())
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;
}
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 {};
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 ();
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 ());
memcpy (prefix, arg, len);
prefix[len] = '\0';
- printf_filtered ("%s\n", prefix);
+ gdb_printf ("%s\n", prefix);
}
/* Implement "info vtbl". */
}
}
- fprintf_filtered (stream, "{");
+ gdb_printf (stream, "{");
len = type->num_fields ();
n_baseclasses = TYPE_N_BASECLASSES (type);
{
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);
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
else
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
/* Now do the printing. */
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 * recurse, stream);
}
gdb_puts ("<", stream);
if (val == -1)
{
- fprintf_filtered (stream, "NULL");
+ gdb_printf (stream, "NULL");
return;
}
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
(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");
}
}
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);
}
}
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. */
{
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++;
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. */
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;
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;
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). */
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;
}
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;
}
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)
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))
{
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;
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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);
}
}
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
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;
}
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;
}
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;
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;
}
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))
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))
{
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);
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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);
}
}
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
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;
}
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;
}
/* 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;
}
{
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);
}
}
}
{
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);
}
/* Finish up the debug error message. */
if (info_verbose)
- printf_filtered (_("done.\n"));
+ gdb_printf (_("done.\n"));
}
}
if (info_verbose)
{
- printf_filtered (_("Scanning archive member %s..."), name);
+ gdb_printf (_("Scanning archive member %s..."), name);
gdb_flush (gdb_stdout);
}
} 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
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;
&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);
}
}
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 ());
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;
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,
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,
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,
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];
{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;
}
{
if (port == t->gdb_port)
{
- printf_filtered (_(" inferior-thread for 0x%x"),
- priv->task);
+ gdb_printf (_(" inferior-thread for 0x%x"),
+ priv->task);
break;
}
}
}
}
}
- printf_filtered (_("\n"));
+ gdb_printf (_("\n"));
}
vm_deallocate (task_self (), (vm_address_t) names,
(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
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]);
}
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,
(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));
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;
{
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"));
}
}
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 ());
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);
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);
}
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)
{
(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
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"),
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"));
}
}
res = posix_spawnattr_init (&attr);
if (res != 0)
{
- fprintf_unfiltered
+ gdb_printf
(gdb_stderr, "Cannot initialize attribute for posix_spawn\n");
return;
}
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;
}
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. */
(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
}
}
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.
if (dcache == NULL)
{
- printf_filtered (_("No data cache available.\n"));
+ gdb_printf (_("No data cache available.\n"));
return;
}
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. */
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;
}
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;
{
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
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;
}
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;
}
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;
}
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);
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);
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);
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". */
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". */
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. */
{
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;
}
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;
}
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;
}
}
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);
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"));
{
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++)
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;
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");
}
}
}
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
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
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 ();
/* 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"));
}
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. */
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 ();
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);
}
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);
}
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. */
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 ()));
}
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);
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);
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);
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)
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)
{
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))
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
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;
}
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;
}
&& 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;
}
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)
{
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:
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:
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:
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;
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;
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;
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;
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;
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;
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;
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
if (first_piece)
first_piece = 0;
else
- fprintf_filtered (stream, _(", and "));
+ gdb_printf (stream, _(", and "));
if (!dwarf_always_disassemble)
{
}
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,
int empty = data == here;
if (disassemble)
- fprintf_filtered (stream, " ");
+ gdb_printf (stream, " ");
if (data[0] == DW_OP_piece)
{
uint64_t bytes;
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)
{
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
{
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)
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:
/* (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;
}
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);
}
\f
/* local function prototypes */
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.
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
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
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);
}
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. */
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);
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);
}
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);
}
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)
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);
{
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 ();
{
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:
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:
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");
}
}
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");
}
}
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 ();
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.
&& 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;
}
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.
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. */
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
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 ();
file->write (start, end - start);
}
}
- fprintf_filtered (file, "\n");
+ gdb_printf (file, "\n");
/* Now append the annotation. */
switch (e.reason)
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. */
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);
}
if (!filename)
{
if (from_tty)
- printf_filtered (_("No executable file now.\n"));
+ gdb_printf (_("No executable file now.\n"));
set_gdbarch_from_file (NULL);
}
/* 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
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
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");
}
}
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);
}
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);
}
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:
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)
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
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 */
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. */
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 */
{
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. */
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:
arrayprint_recurse_level++;
if (arrayprint_recurse_level == 1)
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
if (type_not_associated (type))
print_rank_only = true;
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);
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;
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:
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);
}
print_type (type->field (i).type (), "", stream, -1, 0, 0);
}
- fprintf_filtered (stream, ")");
+ gdb_printf (stream, ")");
}
break;
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;
}
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:
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;
{
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. */
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:
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");
}
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);
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
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
++printed_field;
}
}
- fprintf_filtered (stream, " )");
+ gdb_printf (stream, " )");
break;
case TYPE_CODE_BOOL:
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
{
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;
}
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"));
}
}
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.
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));
{
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"));
}
}
}
if (cwd != NULL)
- printf_filtered ("cwd = '%s'\n", cwd);
+ gdb_printf ("cwd = '%s'\n", cwd);
else
warning (_("unable to fetch current working directory"));
}
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"));
}
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:
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");
}
}
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, ...) \
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);
}
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. */
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. */
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. */
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)
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;
}
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. */
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");
}
}
{
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));
}
}
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. */
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
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);
}
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)
{
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"));
}
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"));
}
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"));
}
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 ();
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)
break;
print_address (gdbarch, found_addr, gdb_stdout);
- printf_filtered ("\n");
+ gdb_printf ("\n");
++found_count;
last_found_addr = found_addr;
}
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 ();
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.
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 ();
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". */
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". */
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". */
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. */
{
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, "]");
}
}
}
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 ());
unlink_file.keep ();
}
- printf_filtered ("Saved corefile %s\n", corefilename.get ());
+ gdb_printf ("Saved corefile %s\n", corefilename.get ());
}
static enum bfd_architecture
{
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;
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);
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. */
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
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"
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);
}
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. */
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
#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)
{
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;
}
{
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;
}
{
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;
}
{
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;
}
{
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
{
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;
}
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;
}
{
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;
}
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;
}
{
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;
}
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;
}
{
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;
}
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;
}
{
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;
}
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;
}
/* 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;
}
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);
}
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;
}
/* 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;
}
/* 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;
}
/* 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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
/* 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;
}
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;
}
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);
}
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);
}
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);
}
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;
}
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;
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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;
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
/* 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;
}
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;
}
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;
}
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);
}
/* 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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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;
}
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);
}
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);
}
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);
}
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 ();
}
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 ();
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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;
}
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;
}
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);
}
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);
}
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);
}
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
)
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
)
)
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="")
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)
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)
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. */
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. */
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);
}
\f
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. */
gdb_puts (" ");
}
if (B_TST (bits, bitno))
- printf_filtered (("1"));
+ gdb_printf (("1"));
else
- printf_filtered (("0"));
+ gdb_printf (("0"));
}
}
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);
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),
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));
}
}
}
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)));
{
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)));
}
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)));
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
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);
}
}
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;
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");
{
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;
}
}
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");
}
gdb_puts ("\n");
- printf_filtered ("%*sflags", spaces, "");
+ gdb_printf ("%*sflags", spaces, "");
if (type->is_unsigned ())
{
gdb_puts (" TYPE_UNSIGNED");
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);
}
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)");
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;
{
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;
}
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
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);
}
\f
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
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
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);
}
\f
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
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");
}
\f
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
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"));
}
\f
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
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
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
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
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));
#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. */
/* Check for NULL. */
if (ptr_value == 0 && vbit == 0)
{
- fprintf_filtered (stream, "NULL");
+ gdb_printf (stream, "NULL");
return;
}
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
/* 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
if (adjustment)
{
- fprintf_filtered (stream, ", this adjustment ");
+ gdb_printf (stream, ", this adjustment ");
print_longest (stream, 'd', 1, adjustment);
}
}
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)
{
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),
if (!got_error)
print_function_pointer_address (opts, gdbarch, addr, gdb_stdout);
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
}
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;
}
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;
}
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;
}
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
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)
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);
}
}
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");
}
}
#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. */
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))
}
}
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 ();
{
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:
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
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);
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 " : "");
}
}
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:
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:
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
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 =
{
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
{
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
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);
}
}
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 ());
}
\f
/* (execute string [#:from-tty boolean] [#:to-string boolean])
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"
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. */
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;
}
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;
}
/* 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
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
/* 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
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
/* 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)
{
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))
/* 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
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;
}
&& 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;
}
{
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];
}
}
if (hppa_debug)
- fprintf_unfiltered (gdb_stdlog, "NULL (not found) }\n");
+ gdb_printf (gdb_stdlog, "NULL (not found) }\n");
return NULL;
}
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);
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);
}
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.
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 ())
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
{
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);
{
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
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
{
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] } ");
}
}
}
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);
}
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;
}
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;
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);
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);
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);
}
}
}
{
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 ();
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;
}
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)
/* 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;
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;
}
/* 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;
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;
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;
}
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;
}
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;
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;
}
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;
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;
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;
}
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;
}
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. */
{
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);
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
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);
int i;
int tag = -1;
- fprintf_filtered (file, "%sR%d: ", fpreg == top ? "=>" : " ", fpreg);
+ gdb_printf (file, "%sR%d: ", fpreg == top ? "=>" : " ", fpreg);
if (ftag_p)
{
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);
}
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>"));
}
\f
}
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);
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 *
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 *
}
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;
}
}
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;
}
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;
}
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
{
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,
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;
}
(*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 *
(*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 *
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);
}
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. */
break;
default:
- fprintf_unfiltered (gdb_stderr, _("Event type not recognized.\n"));
+ gdb_printf (gdb_stderr, _("Event type not recognized.\n"));
break;
}
}
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;
{
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
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
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
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
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
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
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 ());
}
/* 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");
}
}
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);
}
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
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);
&& 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;
}
}
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);
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);
}
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 ())
"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);
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;
}
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
{
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"));
}
}
\f
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
}
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
}
}
if (!printed_something)
- fprintf_filtered (file, "No vector information\n");
+ gdb_printf (file, "No vector information\n");
}
}
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
}
}
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
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);
}
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;
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
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
{
{
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] */
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. */
#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. */
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));
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 */
}
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;
}
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. */
{
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)
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
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);
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
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. */
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"
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
}
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
/* 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;
}
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. */
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);
}
\f
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"));
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
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
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);
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 ());
}
}
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. */
/* 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. */
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
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
&& exec_done_display_p
&& (inferior_ptid == null_ptid
|| inferior_thread ()->state != THREAD_RUNNING))
- printf_filtered (_("completed.\n"));
+ gdb_printf (_("completed.\n"));
}
/* See infrun.h. */
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"));
}
}
}
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;
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"));
}
}
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
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. */
sigs[signum] = 1;
}
else
- printf_filtered (_("Not confirmed, unchanged.\n"));
+ gdb_printf (_("Not confirmed, unchanged.\n"));
}
break;
case GDB_SIGNAL_0:
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;
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
{
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__,
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. */
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. */
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;
}
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;
}
/* 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;
}
{
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 ();
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 ())
{
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));
}
}
"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)
"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 "
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);
}
\f
/* 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"));
{
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. */
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
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 ())
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 ())
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);
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);
}
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');
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"));
}
}
{
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);
}
}
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);
}
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. */
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);
}
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);
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;
}
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,
}
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;
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. */
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);
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))
{
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
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,
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,
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,
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
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,
}
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;
}
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;
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
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++)
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;
}
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);
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);
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);
}
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);
}
{
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;
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);
}
}
}
{
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 == '(')
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
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);
});
}
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"));
}
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
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
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
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
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)
{
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)
{
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
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)
{
/* 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;
}
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;
}
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);
}
}
}
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;
}
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;
}
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)
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;
{
if (ch == '\\' || ch == quoter)
gdb_puts ("\\", stream);
- fprintf_filtered (stream, "%c", ch);
+ gdb_printf (stream, "%c", ch);
}
else
{
gdb_puts ("\\a", stream);
break;
default:
- fprintf_filtered (stream, "\\%.3o", (unsigned int) ch);
+ gdb_printf (stream, "\\%.3o", (unsigned int) ch);
break;
}
}
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. */
{
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, "]");
}
}
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
/ 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);
}
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);
}
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);
}
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)
}
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
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
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;
}
{
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)
{
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++)
{
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, "");
}
}
{
/* 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, ")");
}
}
type = check_typedef (type);
- fprintf_filtered (stream, "{");
+ gdb_printf (stream, "{");
len = type->num_fields ();
if (get_long_set_bounds (type, &low_bound, &high_bound))
{
if (! element_seen)
{
if (! empty_set)
- fprintf_filtered (stream, ", ");
+ gdb_printf (stream, ", ");
print_type_scalar (target, i, stream);
empty_set = 0;
element_seen = 1;
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;
{
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, "}");
}
}
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
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)
{
options);
else
{
- fprintf_filtered (stream, "{");
+ gdb_printf (stream, "{");
value_print_array_elements (val, stream, recurse, options, 0);
- fprintf_filtered (stream, "}");
+ gdb_printf (stream, "}");
}
}
}
}
else
{
- fprintf_filtered (stream, "{");
+ gdb_printf (stream, "{");
value_print_array_elements (val, stream, recurse,
options, 0);
- fprintf_filtered (stream, "}");
+ gdb_printf (stream, "}");
}
break;
}
case TYPE_CODE_UNION:
if (recurse && !options->unionprint)
{
- fprintf_filtered (stream, "{...}");
+ gdb_printf (stream, "{...}");
break;
}
/* Fall through. */
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);
}
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);
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;
/* 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, "<= ");
}
}
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++)
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");
}
}
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;
}
}
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)
{
}
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. */
}
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);
}
}
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);
}
{
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))
/* 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
{
print_gdb_version (gdb_stdout, false);
gdb_stdout->wrap_here (0);
- printf_filtered ("\n");
+ gdb_printf ("\n");
exit (0);
}
{
print_gdb_configuration (gdb_stdout);
gdb_stdout->wrap_here (0);
- printf_filtered ("\n");
+ gdb_printf ("\n");
exit (0);
}
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. */
}
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. */
}
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\
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"));
}
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);
}
};
(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);
}
\f
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));
}
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));
}
for (const auto &f : bfd_flag_info)
{
if (flags & f.value)
- printf_filtered (" %s", f.name);
+ gdb_printf (" %s", f.name);
}
}
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.
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
{
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);
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,
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);
}
}
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;
}
{
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"));
}
{
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"));
}
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;
}
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
#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
#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);
}
\f
/* 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)
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
}
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);
}
}
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.
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
}
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
}
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,
# Now print the arguments.
print(
- ' fprintf_unfiltered (gdb_stdlog, "<- %s->'
+ ' gdb_printf (gdb_stdlog, "<- %s->'
+ name
+ ' (", this->beneath ()->shortname ());',
file=f,
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
}
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;
}
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;
}
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
/* 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;
}
|| (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;
}
}
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)
{
tmp = hex_string_custom (m.hi, 16);
}
- printf_filtered ("%s ", tmp);
+ gdb_printf ("%s ", tmp);
/* Print a token for each attribute.
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;
#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");
}
}
\f
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
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
{
if (!mem_region_list)
{
- printf_filtered (_("No memory region number %d.\n"), num);
+ gdb_printf (_("No memory region number %d.\n"), num);
return;
}
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
}
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);
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);
}
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);
}
}
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);
}
}
{
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);
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);
}
}
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);
}
}
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);
}
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);
}
}
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);
}
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);
}
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);
}
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);
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);
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);
}
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);
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);
}
}
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
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);
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);
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);
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);
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);
{
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)
{
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
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);
/* 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;
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 */ );
}
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 ());
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
field_separator ();
if (fldname)
- fprintf_unfiltered (stream, "%s=\"", fldname);
+ gdb_printf (stream, "%s=\"", fldname);
else
gdb_puts ("\"", stream);
gdb_vprintf (stream, format, args);
m_suppress_field_separator = true;
if (name)
- fprintf_unfiltered (stream, "%s=", name);
+ gdb_printf (stream, "%s=", name);
switch (type)
{
{
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,
{
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;
}
{
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;
}
{
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;
/* 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 {};
}
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)
{
{
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
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
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);
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
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");
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\
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;
}
}
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;
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);
}
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. */
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 ();
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
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);
}
}
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)
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;
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);
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++;
}
}
}
if (mips_debug)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ gdb_printf (gdb_stdlog, "\n");
}
regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
/* 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;
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;
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);
}
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 ();
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++;
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++;
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));
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;
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);
* 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);
}
}
}
if (mips_debug)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ gdb_printf (gdb_stdlog, "\n");
}
regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
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),
{
/* 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),
{
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
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,
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),
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;
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;
}
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 ();
/* 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
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. */
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)
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;
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);
* 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++;
}
}
if (mips_debug)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ gdb_printf (gdb_stdlog, "\n");
}
regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
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)
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)
{
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 ()),
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);
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),
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;
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;
}
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 ();
{
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. */
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)
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;
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);
* 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++;
}
}
if (mips_debug)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ gdb_printf (gdb_stdlog, "\n");
}
regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
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)
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),
= ((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))
{
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
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 ());
}
}
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);
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);
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);
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;
}
/* 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++;
}
/* 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;
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;
}
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;
}
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. */
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;
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);
}
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))
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. */
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
/* 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
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. */
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");
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]);
}
}
}
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. */
}
/* 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 ();
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 ();
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;
}
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);
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.
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"));
}
{
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"));
}
{
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"));
}
}
};
- 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");
}
}
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);
}
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)
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");
}
}
{
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);
}
}
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);
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);
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. */
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
/* 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;
}
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),
}
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;
}
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;
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
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
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
}
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
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;
}
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;
{
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;
}
}
}
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;
{
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. */
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
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));
}
}
}
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;
begin_line();
}
else
- printf_filtered (_("No selectors matching \"%s\"\n"),
- regexp ? regexp : "*");
+ gdb_printf (_("No selectors matching \"%s\"\n"),
+ regexp ? regexp : "*");
}
/*
}
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 ())
begin_line();
}
else
- printf_filtered (_("No classes matching \"%s\"\n"), regexp ? regexp : "*");
+ gdb_printf (_("No classes matching \"%s\"\n"), regexp ? regexp : "*");
}
static char *
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
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 ();
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);
}
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;
}
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;
}
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)
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
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;
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);
}
\f
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 ();
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);
}
}
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;
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. */
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)
{
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
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:
if (len)
{
- fprintf_filtered (stream, "(");
+ gdb_printf (stream, "(");
}
for (i = 0; i < len; i++)
{
/* 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! */
}
if (len)
{
- fprintf_filtered (stream, ")");
+ gdb_printf (stream, ")");
}
}
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);
{
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);
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,
}
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;
gdb_puts (type->name (), stream);
gdb_puts (" = ", stream);
}
- fprintf_filtered (stream, "case <?> of ");
+ gdb_printf (stream, "case <?> of ");
struct_union:
stream->wrap_here (4);
{
/* 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
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))
if (section_type != s_private)
{
section_type = s_private;
- fprintf_filtered (stream, "%*sprivate\n",
- level + 2, "");
+ gdb_printf (stream, "%*sprivate\n",
+ level + 2, "");
}
}
else
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);
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. */
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))
if (section_type != s_private)
{
section_type = s_private;
- fprintf_filtered (stream, "%*sprivate\n",
- level + 2, "");
+ gdb_printf (stream, "%*sprivate\n",
+ level + 2, "");
}
}
else
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 !! */
"", 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;
}
/* 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. */
}
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;
}
current_language);
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
}
case TYPE_CODE_UNION:
if (recurse && !options->unionprint)
{
- fprintf_filtered (stream, "{...}");
+ gdb_printf (stream, "{...}");
break;
}
/* Fall through. */
}
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);
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;
struct type *type = check_typedef (value_type (val));
- fprintf_filtered (stream, "{");
+ gdb_printf (stream, "{");
len = type->num_fields ();
n_baseclasses = TYPE_N_BASECLASSES (type);
&& 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);
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
else
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
if (options->prettyformat)
{
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
print_spaces_filtered (2 * recurse, stream);
}
gdb_puts ("<", stream);
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);
}
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);
}
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);
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;
}
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
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.
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. */
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);
/* 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;
}
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;
}
}
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;
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;
if (tag_haddr <= next_address)
print_range_tag = true;
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
if (need_to_update_next_address)
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 ();
}
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)
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 ());
}
}
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
{
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;
}
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));
{
SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc,
gdb_stdout);
- printf_filtered (".\n");
+ gdb_printf (".\n");
return;
}
{
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;
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;
msym = lookup_bound_minimal_symbol (sym->linkage_name ());
if (msym.minsym == NULL)
- printf_filtered ("unresolved");
+ gdb_printf ("unresolved");
else
{
section = msym.obj_section ();
&& (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);
}
}
}
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");
}
\f
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 ());
}
= 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 ();
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 ();
}
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
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 ();
_("<error: %s>"), ex.what ());
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
annotate_display_end ();
d->enabled_p = false;
return;
}
- printf_filtered (_("No display number %d.\n"), num);
+ gdb_printf (_("No display number %d.\n"), num);
}
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;
}
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");
}
}
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
{
except.what ());
}
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
}
/* Subroutine of ui_printf to simplify it.
{
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, "(null)");
+ gdb_printf (stream, format, "(null)");
DIAGNOSTIC_POP
return;
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, (char *) str);
+ gdb_printf (stream, format, (char *) str);
DIAGNOSTIC_POP
}
{
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, "(null)");
+ gdb_printf (stream, format, "(null)");
DIAGNOSTIC_POP
return;
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, obstack_base (&output));
+ gdb_printf (stream, format, obstack_base (&output));
DIAGNOSTIC_POP
}
*fmt_p++ = '\0';
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, fmt, val);
+ gdb_printf (stream, fmt, val);
DIAGNOSTIC_POP
}
else
*fmt_p++ = '\0';
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, fmt, "(nil)");
+ gdb_printf (stream, fmt, "(nil)");
DIAGNOSTIC_POP
}
}
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;
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
/* 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:
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,
/* 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. */
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. */
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
{
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 ());
}
}
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 ());
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;
}
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;
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: */
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;
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);
#else
if (retry < 5)
{
- printf_filtered (_("Retry #%d:\n"), retry);
+ gdb_printf (_("Retry #%d:\n"), retry);
pi->status_valid = 0;
goto 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;
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..."));
}
{
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
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;
}
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. */
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);
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");
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);
}
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)
}
gdb_puts (", ", outfile);
gdb_puts (paddress (gdbarch, p->unrelocated_address ()), outfile);
- fprintf_filtered (outfile, "\n");
+ gdb_printf (outfile, "\n");
}
}
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
(gdbarch, objfile, psymtab->static_psymbols,
"Static", outfile);
}
- fprintf_filtered (outfile, "\n");
+ gdb_printf (outfile, "\n");
}
/* Count the number of partial symbols in OBJFILE. */
{
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))
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");
}
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");
}
}
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);
}
}
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);
}
&& 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);
}
}
{
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");
}
}
/* 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;
}
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);
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");
}
}
}
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. */
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. */
{
/* 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;
}
}
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. */
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
return;
}
- fprintf_filtered (file, "%s\n", show_doc_string.get ());
+ gdb_printf (file, "%s\n", show_doc_string.get ());
}
else
{
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);
}
}
\f
/* 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;
}
/* 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)
{
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. */
{
/* 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 ();
}
{
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)
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 ();
{
/* 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)
{
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
= (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
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"));
}
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)
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);
}
}
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);
}
}
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)
{
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. */
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);
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);
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. */
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:
{
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;
}
}
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. */
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. */
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)
{
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);
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;
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;
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));
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 (),
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 ())
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 ();
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);
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;
= 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)
{
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;
}
}
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 ();
&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;
}
}
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",
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;
}
(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;
}
== 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 */
{
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;
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;
}
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] == '\"')
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;
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
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);
}
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);
}
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);
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. */
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 */
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 */
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:
}
/* 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);
}
/* 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));
/* 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
{
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);
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);
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,
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,
#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. */
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". */
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;
}
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);
}
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 ();
}
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
{
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,
{
/* Just print "<cooked>" for pseudo register when
regcache_dump_raw. */
- fprintf_filtered (file, "<cooked>");
+ gdb_printf (file, "<cooked>");
}
}
}
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
{
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>");
}
}
}
{
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))
{
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);
}
}
};
void dump_reg (ui_file *file, int regnum) override
{
if (regnum < 0)
- fprintf_filtered (file, "Groups");
+ gdb_printf (file, "Groups");
else
{
const char *sep = "";
{
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 = ",";
}
}
{
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. */
/* Force-flush the register cache. */
registers_changed ();
if (from_tty)
- printf_filtered (_("Register cache flushed.\n"));
+ gdb_printf (_("Register cache flushed.\n"));
}
void
{
/* Name. */
if (regnum < 0)
- fprintf_filtered (file, " %-10s", "Name");
+ gdb_printf (file, " %-10s", "Name");
else
{
const char *p = gdbarch_register_name (m_gdbarch, regnum);
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]
{
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. */
{
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
name = "Group";
else
name = reggroup_name (group);
- fprintf_filtered (file, " %-10s", name);
+ gdb_printf (file, " %-10s", name);
}
/* Group type. */
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);
}
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
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 ());
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 ());
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
{
}
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);
}
}
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);
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);
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, ...)
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'
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);
}
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);
}
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. */
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
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 ();
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
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". */
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);
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
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);
}
}
}
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_wait\n");
+ gdb_printf (gdb_stdlog, "gdbsim_wait\n");
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
{
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)
{
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);
}
}
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 ();
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
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."),
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");
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. */
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. */
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
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
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;
}
}
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);
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
{
}
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;
}
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
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 (),
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);
}
}
/* 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;
}
buf[bc] = '\0';
- printf_filtered (_("Invalid run length encoding: %s\n"), buf);
+ gdb_printf (_("Invalid run length encoding: %s\n"), buf);
return -1;
}
default:
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
{
/* 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)
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++;
}
}
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
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 ());
{
int sample_thread = SAMPLE_THREAD;
- printf_filtered (_("Remote threadset test\n"));
+ gdb_printf (_("Remote threadset test\n"));
set_general_thread (sample_thread);
}
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);
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
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;
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
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
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);
}
{
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)
{
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
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
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
{
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);
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
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. */
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. */
{
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;
}
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
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. */
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. */
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;
{
/* 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;
}
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
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)
{
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
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)
{
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)
"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
{
{
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
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),
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)
{
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);
}
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;
}
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)
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:
}
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));
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));
}
}
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;
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)
= (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
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;
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;
}
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;
}
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. */
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);
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;
}
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;
}
}
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;
}
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;
}
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;
}
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;
}
}
}
- 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;
}
}
else
{
- fprintf_unfiltered (gdb_stderr, _("no syscall record support\n"));
+ gdb_printf (gdb_stderr, _("no syscall record support\n"));
return -1;
}
break;
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;
}
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. */
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;
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;
}
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
/* 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;
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);
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),
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;
&& 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);
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')
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. */
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. */
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. */
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)
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 *
}
}
- fprintf_unfiltered (gdb_stderr,
- "Attempt to remove nonexistent watchpoint.\n");
+ gdb_printf (gdb_stderr,
+ "Attempt to remove nonexistent watchpoint.\n");
return -1;
}
}
}
- fprintf_unfiltered (gdb_stderr,
- "Attempt to remove nonexistent breakpoint.\n");
+ gdb_printf (gdb_stderr,
+ "Attempt to remove nonexistent breakpoint.\n");
return -1;
}
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;
}
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;
}
}
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;
}
}
else
{
- fprintf_unfiltered (gdb_stderr, _("no syscall record support\n"));
+ gdb_printf (gdb_stderr, _("no syscall record support\n"));
return -1;
}
break;
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);
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)
/* 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)
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))
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)
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)
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 */
/* 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)
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]);
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;
}
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;
}
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;
}
}
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;
}
{
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;
}
}
/* 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)
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)
{
/* 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);
}
}
\f
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;
}
{
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
}
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;
}
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
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
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;
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
{
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;
}
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);
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)
{
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;
}
}
}
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);
}
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);
}
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. */
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. */
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
{
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
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);
}
}
}
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;
}
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n");
+ gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n");
return result;
}
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;
}
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n");
+ gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n");
return result;
}
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
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;
}
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);
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. */
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. */
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."));
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)
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. */
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));
}
}
{
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 (),
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;
}
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)
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';
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);
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;
}
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;
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;
}
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)
= 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."));
}
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)
}
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)
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;
}
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;
}
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;
}
&& (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
{
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;
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. */
{
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++;
/* 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;
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)
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 ())
{
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);
}
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. */
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
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'. */
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
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.
{
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)
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"));
}
\f
{
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))
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. */
/* 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));
}
}
\f
}
}
- printf_filtered (_("Expression not found\n"));
+ gdb_printf (_("Expression not found\n"));
}
static void
/* 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 ());
}
}
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;
}
}
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);
}
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
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
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);
if (caller_pc_p)
gdb_puts (paddress (gdbarch, caller_pc));
- printf_filtered ("\n");
+ gdb_printf ("\n");
if (calling_frame_info == NULL)
{
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)
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. */
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))
{
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);
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 (",");
}
}
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);
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++;
}
/* 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. */
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));
}
}
}
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;
}
if (block == 0)
{
if (!quiet)
- fprintf_filtered (stream, "No symbol table info available.\n");
+ gdb_printf (stream, "No symbol table info available.\n");
return;
}
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"));
}
}
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;
}
if (func == NULL)
{
if (!quiet)
- fprintf_filtered (stream, _("No symbol table info available.\n"));
+ gdb_printf (stream, _("No symbol table info available.\n"));
return;
}
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"));
}
}
{
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)
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;
}
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
}
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;
}
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)
}
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;
}
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)
{
}
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;
}
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);
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);
}
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. */
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);
}
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;
}
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);
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);
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 ();
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);
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)
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,
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,
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)
{
}
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;
}
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);
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)
}
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;
}
{
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));
}
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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;
}
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 ();
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);
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 ();
}
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)
{
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. */
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);
}
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;
}
&& 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;
}
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;
}
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;
}
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;
}
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)
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;
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)
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
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).
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."));
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
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 ();
}
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);
}
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
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
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. */
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;
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));
}
}
if (nmapped == 0)
- printf_filtered (_("No sections are mapped.\n"));
+ gdb_printf (_("No sections are mapped.\n"));
}
/* Function: map_overlay_command
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;
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
overlay_debugging = ovly_on;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered (_("Overlay debugging enabled."));
+ gdb_printf (_("Overlay debugging enabled."));
}
/* Function: overlay_off_command
overlay_debugging = ovly_off;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered (_("Overlay debugging disabled."));
+ gdb_printf (_("Overlay debugging disabled."));
}
static 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 ())
}
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);
}
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");
}
}
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;
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++;
}
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
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. */
}
}
}
- fprintf_filtered (outfile, "\n");
+ gdb_printf (outfile, "\n");
}
else
{
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
{
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)
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);
}
}
}
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;
}
}
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. */
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:
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
{
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
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");
}
}
{
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");
}
}
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
|| re_exec (symtab_to_filename_for_display (symtab)))
{
maintenance_print_one_line_table (symtab, NULL);
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
}
}
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;
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 {};
if (cache->global_symbols == NULL)
{
- printf_filtered (" <disabled>\n");
+ gdb_printf (" <disabled>\n");
return;
}
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)
{
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;
}
}
{
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);
}
if (cache->global_symbols == NULL)
{
- printf_filtered (" <disabled>\n");
+ gdb_printf (" <disabled>\n");
return;
}
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);
}
}
{
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);
}
{
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)
{
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};
}
}
if (symbol_lookup_debug > 1)
- fprintf_unfiltered (gdb_stdlog, " = NULL\n");
+ gdb_printf (gdb_stdlog, " = NULL\n");
return {};
}
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
{
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;
}
{
if (symbol_lookup_debug)
{
- fprintf_unfiltered (gdb_stdlog,
- "lookup_symbol_aux (...) = NULL\n");
+ gdb_printf (gdb_stdlog,
+ "lookup_symbol_aux (...) = NULL\n");
}
return {};
}
{
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;
}
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;
}
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);
{
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;
}
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;
{
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 {};
}
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);
{
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 {};
}
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);
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,
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};
}
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,
{
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;
}
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;
}
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 ();
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 ());
}
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
? 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
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]);
}
}
if (first)
{
if (!quiet)
- printf_filtered (_("\nNon-debugging symbols:\n"));
+ gdb_printf (_("\nNon-debugging symbols:\n"));
first = 0;
}
print_msymbol_info (p.msymbol);
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 ());
}
}
}
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:")
else
{
if (regexp == nullptr)
- printf_filtered
+ gdb_printf
((kind == VARIABLES_DOMAIN
? _("All variables with type matching regular "
"expression \"%s\" in all modules:")
"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 "
if (type_regexp == nullptr)
{
if (regexp == nullptr)
- printf_filtered
+ gdb_printf
((kind == VARIABLES_DOMAIN
? _("All variables in all modules matching regular "
"expression \"%s\":")
"expression \"%s\":")),
module_regexp);
else
- printf_filtered
+ gdb_printf
((kind == VARIABLES_DOMAIN
? _("All variables matching regular expression "
"\"%s\",\n\tin all modules matching regular "
else
{
if (regexp == nullptr)
- printf_filtered
+ gdb_printf
((kind == VARIABLES_DOMAIN
? _("All variables with type matching regular "
"expression \"%s\"\n\tin all modules matching "
"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 "
regexp, type_regexp, module_regexp);
}
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
/* Find all symbols of type KIND matching the given regular expressions
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 = "";
}
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. */
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. */
{
target_dcache_invalidate ();
if (from_tty)
- printf_filtered (_("The dcache was flushed.\n"));
+ gdb_printf (_("The dcache was flushed.\n"));
}
void _initialize_target_dcache ();
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);
}
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
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);
}
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);
}
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);
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);
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);
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);
}
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);
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);
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);
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);
}
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
}
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);
}
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);
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);
}
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);
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);
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);
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);
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);
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);
}
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);
}
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);
}
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
}
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
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);
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);
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);
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);
}
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);
}
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);
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
}
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);
}
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);
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);
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
}
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);
}
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);
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);
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);
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);
}
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);
}
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);
}
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);
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);
}
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);
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);
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);
}
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);
}
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);
}
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
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);
}
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);
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);
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);
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
*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 ()
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
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
{
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;
}
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);
}
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 ());
}
|| (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);
}
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);
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;
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:
{
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);
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
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
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++;
}
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;
}
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;
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 ();
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
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. */
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.
{
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"));
}
{
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;
{
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);
}
}
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. */
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 ();
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 ();
}
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".
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;
}
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;
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
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;
}
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 */
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! */
targ->close ();
if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_close ()\n");
+ gdb_printf (gdb_stdlog, "target_close ()\n");
}
int
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;
{
if (t->stratum () == debug_stratum)
continue;
- printf_filtered (" - %s (%s)\n", t->shortname (), t->longname ());
+ gdb_printf (" - %s (%s)\n", t->shortname (), t->longname ());
}
}
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
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. */
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. */
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;
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)
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;
}
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."));
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. */
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. */
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. */
ui.release ();
}
- printf_filtered ("New UI allocated\n");
+ gdb_printf ("New UI allocated\n");
}
/* Handler for SIGHUP. */
&& 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;
}
}
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,
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"
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.
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'. */
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.
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.");
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\"."));
}
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\
"));
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
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. */
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
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. */
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.
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'. */
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
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.
void
tfile_target::files_info ()
{
- printf_filtered ("\t`%s'\n", trace_filename);
+ gdb_printf ("\t`%s'\n", trace_filename);
}
void
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. */
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;
}
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
{
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");
}
}
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);
}
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. */
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. */
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? */
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;
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;
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;
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:
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;
}
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;
}
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 ());
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. */
{
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]);
}
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)
{
_("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;
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;
}
}
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)
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 ())
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. */
}
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
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
{
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."));
}
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;
}
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;
}
{
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 ();
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,
{
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
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");
{
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))
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
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;
}
/* 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. */
/* 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
{
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
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)
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)
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");
}
}
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";
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";
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);
}
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);
}
\f
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
{
if (!tui_active)
{
- printf_filtered (_("The TUI is not active.\n"));
+ gdb_printf (_("The TUI is not active.\n"));
return;
}
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);
}
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. */
{
/* 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;
}
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;
}
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)));
}
\f
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;
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
break;
case TYPE_CODE_BOOL:
- fprintf_filtered (stream, val ? "TRUE" : "FALSE");
+ gdb_printf (stream, val ? "TRUE" : "FALSE");
break;
case TYPE_CODE_RANGE:
{
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.
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;
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
{
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);
}
}
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 ();
/* 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);
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++;
}
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;
}
|| (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++;
}
}
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 ();
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. */
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);
}
\f
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");
}
}
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
|| !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 ();
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)
/* 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. */
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;
}
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;
}
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;
}
\f
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. */
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. */
}
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;
}
void
-printf_filtered (const char *format, ...)
+gdb_printf (const char *format, ...)
{
va_list args;
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);
}
\f
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);
/* 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,
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
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 ())
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;
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);
}
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;
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
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
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. */
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. */
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. */
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. */
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
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. */
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);
}
\f
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. */
/* 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);
}
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);
}
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 ());
}
}
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. */
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:
otherwise, print an ellipsis. */
if (options->summary && !val_print_scalar_type_p (type))
{
- fprintf_filtered (stream, "...");
+ gdb_printf (stream, "...");
return;
}
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;
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;
&& 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 ()));
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
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;
}
for (; i >= 0; i--)
{
- fprintf_filtered (stream, "%1d", digits[i]);
+ gdb_printf (stream, "%1d", digits[i]);
}
}
/* 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
/* 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);
}
}
}
{
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);
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;
}
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);
}
}
{
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);
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);
}
\f
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);
}
}
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);
}
}
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);
}
}
{
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);
}
}
}
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
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
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);
}
\f
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
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. */
{
varseen = 1;
}
- printf_filtered (("$%s = "), var->name);
+ gdb_printf (("$%s = "), var->name);
try
{
_("<error: %s>"), ex.what ());
}
- printf_filtered (("\n"));
+ gdb_printf (("\n"));
}
if (!varseen)
{
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"));
}
}
\f
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
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 ());
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. */
|| 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;
}
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))
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. */
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));
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");
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
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
{
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;
}
}
{
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);
}
}
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;
}
{
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.
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;
{
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;
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);
}
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
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>
#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. */
{
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 ()));
}
}