From 199b2450f62ad6ffbe56ec34fc447716b811579d Mon Sep 17 00:00:00 2001 From: Thomas Lord Date: Mon, 1 Nov 1993 22:25:23 +0000 Subject: 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. --- gdb/remote-nindy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/remote-nindy.c') diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c index 4050ff4..b9b120c 100644 --- a/gdb/remote-nindy.c +++ b/gdb/remote-nindy.c @@ -128,7 +128,7 @@ extern char *mktemp(); extern void generic_mourn_inferior (); extern struct target_ops nindy_ops; -extern FILE *instream; +extern GDB_FILE *instream; extern struct ext_format ext_format_i960; /* i960-tdep.c */ extern char ninStopWhy (); @@ -227,7 +227,7 @@ nindy_detach (name, from_tty) static void nindy_files_info () { - printf("\tAttached to %s at %d bps%s%s.\n", savename, + printf_unfiltered("\tAttached to %s at %d bps%s%s.\n", savename, sr_get_baud_rate(), nindy_old_protocol? " in old protocol": "", nindy_initial_brk? " with initial break": ""); @@ -292,7 +292,7 @@ You may need to reset the 80960 and/or reload your program.\n"); } /* Wait until the remote machine stops. While waiting, operate in passthrough - * mode; i.e., pass everything NINDY sends to stdout, and everything from + * mode; i.e., pass everything NINDY sends to gdb_stdout, and everything from * stdin to NINDY. * * Return to caller, storing status in 'status' just as `wait' would. @@ -698,8 +698,8 @@ nindy_before_main_loop () while (current_target != &nindy_ops) { /* remote tty not specified yet */ if ( instream == stdin ){ - printf("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit: "); - fflush( stdout ); + printf_unfiltered("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit: "); + gdb_flush( gdb_stdout ); } fgets( ttyname, sizeof(ttyname)-1, stdin ); -- cgit v1.1