Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we can unify the printf family of functions. This is done under the name "gdb_printf". Most of this patch was written by script.
This commit is contained in:
parent
a11ac3b3e8
commit
6cb06a8cda
249 changed files with 8449 additions and 8463 deletions
|
@ -365,11 +365,11 @@ ax_print (struct ui_file *f, struct agent_expr *x)
|
|||
{
|
||||
int i;
|
||||
|
||||
fprintf_filtered (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope));
|
||||
fprintf_filtered (f, _("Reg mask:"));
|
||||
gdb_printf (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope));
|
||||
gdb_printf (f, _("Reg mask:"));
|
||||
for (i = 0; i < x->reg_mask_len; ++i)
|
||||
fprintf_filtered (f, _(" %02x"), x->reg_mask[i]);
|
||||
fprintf_filtered (f, _("\n"));
|
||||
gdb_printf (f, _(" %02x"), x->reg_mask[i]);
|
||||
gdb_printf (f, _("\n"));
|
||||
|
||||
/* Check the size of the name array against the number of entries in
|
||||
the enum, to catch additions that people didn't sync. */
|
||||
|
@ -384,18 +384,18 @@ ax_print (struct ui_file *f, struct agent_expr *x)
|
|||
if (op >= (sizeof (aop_map) / sizeof (aop_map[0]))
|
||||
|| !aop_map[op].name)
|
||||
{
|
||||
fprintf_filtered (f, _("%3d <bad opcode %02x>\n"), i, op);
|
||||
gdb_printf (f, _("%3d <bad opcode %02x>\n"), i, op);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if (i + 1 + aop_map[op].op_size > x->len)
|
||||
{
|
||||
fprintf_filtered (f, _("%3d <incomplete opcode %s>\n"),
|
||||
i, aop_map[op].name);
|
||||
gdb_printf (f, _("%3d <incomplete opcode %s>\n"),
|
||||
i, aop_map[op].name);
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf_filtered (f, "%3d %s", i, aop_map[op].name);
|
||||
gdb_printf (f, "%3d %s", i, aop_map[op].name);
|
||||
if (aop_map[op].op_size > 0)
|
||||
{
|
||||
gdb_puts (" ", f);
|
||||
|
@ -412,11 +412,11 @@ ax_print (struct ui_file *f, struct agent_expr *x)
|
|||
nargs = x->buf[i++];
|
||||
slen = x->buf[i++];
|
||||
slen = slen * 256 + x->buf[i++];
|
||||
fprintf_filtered (f, _(" \"%s\", %d args"),
|
||||
&(x->buf[i]), nargs);
|
||||
gdb_printf (f, _(" \"%s\", %d args"),
|
||||
&(x->buf[i]), nargs);
|
||||
i += slen - 1;
|
||||
}
|
||||
fprintf_filtered (f, "\n");
|
||||
gdb_printf (f, "\n");
|
||||
i += 1 + aop_map[op].op_size;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue