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-unix.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | gdb-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/ser-unix.c')
-rw-r--r-- | gdb/ser-unix.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 9de950a..37ac0b6 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -46,7 +46,7 @@ static void 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 @@ -142,21 +142,21 @@ hardwire_print_tty_state (struct serial *scb, 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 @@ -197,8 +197,8 @@ hardwire_raw (struct serial *scb) 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; @@ -222,8 +222,8 @@ hardwire_raw (struct serial *scb) 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 |