aboutsummaryrefslogtreecommitdiff
path: root/gdb/avr-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:46:15 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commit6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch)
tree641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/avr-tdep.c
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadgdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip
gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz
gdb-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/avr-tdep.c')
-rw-r--r--gdb/avr-tdep.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 7f79ef9..310c8cf 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -668,8 +668,8 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
if (num_pushes > AVR_MAX_PUSHES)
{
- fprintf_unfiltered (gdb_stderr, _("Num pushes too large: %d\n"),
- num_pushes);
+ gdb_printf (gdb_stderr, _("Num pushes too large: %d\n"),
+ num_pushes);
num_pushes = 0;
}
@@ -1574,9 +1574,9 @@ avr_io_reg_read_command (const char *args, int from_tty)
if (!buf)
{
- fprintf_unfiltered (gdb_stderr,
- _("ERR: info io_registers NOT supported "
- "by current target\n"));
+ gdb_printf (gdb_stderr,
+ _("ERR: info io_registers NOT supported "
+ "by current target\n"));
return;
}
@@ -1584,12 +1584,12 @@ avr_io_reg_read_command (const char *args, int from_tty)
if (sscanf (bufstr, "%x", &nreg) != 1)
{
- fprintf_unfiltered (gdb_stderr,
- _("Error fetching number of io registers\n"));
+ gdb_printf (gdb_stderr,
+ _("Error fetching number of io registers\n"));
return;
}
- printf_filtered (_("Target has %u io registers:\n\n"), nreg);
+ gdb_printf (_("Target has %u io registers:\n\n"), nreg);
/* only fetch up to 8 registers at a time to keep the buffer small */
int step = 8;
@@ -1607,9 +1607,9 @@ avr_io_reg_read_command (const char *args, int from_tty)
if (!buf)
{
- fprintf_unfiltered (gdb_stderr,
- _("ERR: error reading avr.io_reg:%x,%x\n"),
- i, j);
+ gdb_printf (gdb_stderr,
+ _("ERR: error reading avr.io_reg:%x,%x\n"),
+ i, j);
return;
}
@@ -1618,7 +1618,7 @@ avr_io_reg_read_command (const char *args, int from_tty)
{
if (sscanf (p, "%[^,],%x;", query, &val) == 2)
{
- printf_filtered ("[%02x] %-15s : %02x\n", k, query, val);
+ gdb_printf ("[%02x] %-15s : %02x\n", k, query, val);
while ((*p != ';') && (*p != '\0'))
p++;
p++; /* skip over ';' */