aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
diff options
context:
space:
mode:
authorThomas Lord <lord@cygnus>1993-11-01 22:25:23 +0000
committerThomas Lord <lord@cygnus>1993-11-01 22:25:23 +0000
commit199b2450f62ad6ffbe56ec34fc447716b811579d (patch)
tree07400f3981865f129b912a51b85e69b7b8d1ee22 /gdb/ser-unix.c
parentb3c0fc577b17083c8bdc3ed5cffc4ca50aefaa5e (diff)
downloadfsf-binutils-gdb-199b2450f62ad6ffbe56ec34fc447716b811579d.zip
fsf-binutils-gdb-199b2450f62ad6ffbe56ec34fc447716b811579d.tar.gz
fsf-binutils-gdb-199b2450f62ad6ffbe56ec34fc447716b811579d.tar.bz2
Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r--gdb/ser-unix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index b306e8a..c777895 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -354,7 +354,7 @@ hardwire_raw(scb)
struct hardwire_ttystate state;
if (get_tty_state(scb, &state))
- fprintf(stderr, "get_tty_state failed: %s\n", safe_strerror(errno));
+ fprintf_unfiltered(gdb_stderr, "get_tty_state failed: %s\n", safe_strerror(errno));
#ifdef HAVE_TERMIOS
state.termios.c_iflag = 0;
@@ -384,7 +384,7 @@ hardwire_raw(scb)
scb->current_timeout = 0;
if (set_tty_state (scb, &state))
- fprintf(stderr, "set_tty_state failed: %s\n", safe_strerror(errno));
+ fprintf_unfiltered(gdb_stderr, "set_tty_state failed: %s\n", safe_strerror(errno));
}
/* Wait for input on scb, with timeout seconds. Returns 0 on success,
@@ -440,7 +440,7 @@ wait_for(scb, timeout)
struct hardwire_ttystate state;
if (get_tty_state(scb, &state))
- fprintf(stderr, "get_tty_state failed: %s\n", safe_strerror(errno));
+ fprintf_unfiltered(gdb_stderr, "get_tty_state failed: %s\n", safe_strerror(errno));
#ifdef HAVE_TERMIOS
state.termios.c_cc[VTIME] = timeout * 10;
@@ -453,7 +453,7 @@ wait_for(scb, timeout)
scb->current_timeout = timeout;
if (set_tty_state (scb, &state))
- fprintf(stderr, "set_tty_state failed: %s\n", safe_strerror(errno));
+ fprintf_unfiltered(gdb_stderr, "set_tty_state failed: %s\n", safe_strerror(errno));
return 0;
}