diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:46:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch) | |
tree | 641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/ax-general.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2 |
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.
Diffstat (limited to 'gdb/ax-general.c')
-rw-r--r-- | gdb/ax-general.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/ax-general.c b/gdb/ax-general.c index f829b32..c025aa2 100644 --- a/gdb/ax-general.c +++ b/gdb/ax-general.c @@ -365,11 +365,11 @@ ax_print (struct ui_file *f, struct agent_expr *x) { int i; - fprintf_filtered (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope)); - fprintf_filtered (f, _("Reg mask:")); + gdb_printf (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope)); + gdb_printf (f, _("Reg mask:")); for (i = 0; i < x->reg_mask_len; ++i) - fprintf_filtered (f, _(" %02x"), x->reg_mask[i]); - fprintf_filtered (f, _("\n")); + gdb_printf (f, _(" %02x"), x->reg_mask[i]); + gdb_printf (f, _("\n")); /* Check the size of the name array against the number of entries in the enum, to catch additions that people didn't sync. */ @@ -384,18 +384,18 @@ ax_print (struct ui_file *f, struct agent_expr *x) if (op >= (sizeof (aop_map) / sizeof (aop_map[0])) || !aop_map[op].name) { - fprintf_filtered (f, _("%3d <bad opcode %02x>\n"), i, op); + gdb_printf (f, _("%3d <bad opcode %02x>\n"), i, op); i++; continue; } if (i + 1 + aop_map[op].op_size > x->len) { - fprintf_filtered (f, _("%3d <incomplete opcode %s>\n"), - i, aop_map[op].name); + gdb_printf (f, _("%3d <incomplete opcode %s>\n"), + i, aop_map[op].name); break; } - fprintf_filtered (f, "%3d %s", i, aop_map[op].name); + gdb_printf (f, "%3d %s", i, aop_map[op].name); if (aop_map[op].op_size > 0) { gdb_puts (" ", f); @@ -412,11 +412,11 @@ ax_print (struct ui_file *f, struct agent_expr *x) nargs = x->buf[i++]; slen = x->buf[i++]; slen = slen * 256 + x->buf[i++]; - fprintf_filtered (f, _(" \"%s\", %d args"), - &(x->buf[i]), nargs); + gdb_printf (f, _(" \"%s\", %d args"), + &(x->buf[i]), nargs); i += slen - 1; } - fprintf_filtered (f, "\n"); + gdb_printf (f, "\n"); i += 1 + aop_map[op].op_size; } } |