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/ser-go32.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | fsf-binutils-gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip fsf-binutils-gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz fsf-binutils-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/ser-go32.c')
-rw-r--r-- | gdb/ser-go32.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c index 0b2fa93..2ccad41 100644 --- a/gdb/ser-go32.c +++ b/gdb/ser-go32.c @@ -584,11 +584,11 @@ dos_close (struct serial *scb) /* Check for overflow errors. */ if (port->oflo) { - fprintf_unfiltered (gdb_stderr, - "Serial input overruns occurred.\n"); - fprintf_unfiltered (gdb_stderr, "This system %s handle %d baud.\n", - port->fifo ? "cannot" : "needs a 16550 to", - port->baudrate); + gdb_printf (gdb_stderr, + "Serial input overruns occurred.\n"); + gdb_printf (gdb_stderr, "This system %s handle %d baud.\n", + port->fifo ? "cannot" : "needs a 16550 to", + port->baudrate); } } @@ -745,7 +745,7 @@ dos_setbaudrate (struct serial *scb, int rate) x = dos_baudconv (rate); if (x <= 0) { - fprintf_unfiltered (gdb_stderr, "%d: impossible baudrate\n", rate); + gdb_printf (gdb_stderr, "%d: impossible baudrate\n", rate); errno = EINVAL; return -1; } @@ -898,20 +898,20 @@ info_serial_command (const char *arg, int from_tty) { if (port->baudrate == 0) continue; - printf_filtered ("Port:\tCOM%ld (%sactive)\n", (long)(port - ports) + 1, - port->intrupt ? "" : "not "); - printf_filtered ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq); - printf_filtered ("16550:\t%s\n", port->fifo ? "yes" : "no"); - printf_filtered ("Speed:\t%d baud\n", port->baudrate); - printf_filtered ("Errs:\tframing %d parity %d overflow %d\n\n", - port->ferr, port->perr, port->oflo); + gdb_printf ("Port:\tCOM%ld (%sactive)\n", (long)(port - ports) + 1, + port->intrupt ? "" : "not "); + gdb_printf ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq); + gdb_printf ("16550:\t%s\n", port->fifo ? "yes" : "no"); + gdb_printf ("Speed:\t%d baud\n", port->baudrate); + gdb_printf ("Errs:\tframing %d parity %d overflow %d\n\n", + port->ferr, port->perr, port->oflo); } #ifdef DOS_STATS - printf_filtered ("\nTotal interrupts: %d\n", intrcnt); + gdb_printf ("\nTotal interrupts: %d\n", intrcnt); for (i = 0; i < NCNT; i++) if (cnts[i]) - printf_filtered ("%s:\t%lu\n", cntnames[i], (unsigned long) cnts[i]); + gdb_printf ("%s:\t%lu\n", cntnames[i], (unsigned long) cnts[i]); #endif } |