aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-vx.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/remote-vx.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/remote-vx.c')
-rw-r--r--gdb/remote-vx.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index c8c52c0..e49d0ed 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -557,20 +557,20 @@ vx_xfer_memory (memaddr, myaddr, len, write, target)
static void
vx_files_info ()
{
- printf ("\tAttached to host `%s'", vx_host);
- printf (", which has %sfloating point", target_has_fp? "": "no ");
- printf (".\n");
+ printf_unfiltered ("\tAttached to host `%s'", vx_host);
+ printf_unfiltered (", which has %sfloating point", target_has_fp? "": "no ");
+ printf_unfiltered (".\n");
}
static void
vx_run_files_info ()
{
- printf ("\tRunning %s VxWorks process %s",
+ printf_unfiltered ("\tRunning %s VxWorks process %s",
vx_running? "child": "attached",
local_hex_string((unsigned long) inferior_pid));
if (vx_running)
- printf (", function `%s'", vx_running);
- printf(".\n");
+ printf_unfiltered (", function `%s'", vx_running);
+ printf_unfiltered(".\n");
}
static void
@@ -974,9 +974,9 @@ add_symbol_stub (arg)
{
struct ldfile *pLoadFile = (struct ldfile *)arg;
- printf("\t%s: ", pLoadFile->name);
+ printf_unfiltered("\t%s: ", pLoadFile->name);
symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0, 0);
- printf ("ok\n");
+ printf_unfiltered ("ok\n");
return 1;
}
/* Target command for VxWorks target systems.
@@ -1004,8 +1004,8 @@ vx_open (args, from_tty)
target_preopen (from_tty);
unpush_target (&vx_ops);
- printf ("Attaching remote machine across net...\n");
- fflush (stdout);
+ printf_unfiltered ("Attaching remote machine across net...\n");
+ gdb_flush (gdb_stdout);
/* Allow the user to kill the connect attempt by typing ^C.
Wait until the call to target_has_fp () completes before
@@ -1039,7 +1039,7 @@ vx_open (args, from_tty)
"Error while reading symbols from boot file:\n", RETURN_MASK_ALL))
puts_filtered ("ok\n");
} else if (from_tty)
- printf ("VxWorks kernel symbols not loaded.\n");
+ printf_unfiltered ("VxWorks kernel symbols not loaded.\n");
}
else
error ("Can't retrieve boot file name from target machine.");
@@ -1103,7 +1103,7 @@ vx_attach (args, from_tty)
error ("Invalid process-id -- give a single number in decimal or 0xhex");
if (from_tty)
- printf ("Attaching pid %s.\n",
+ printf_unfiltered ("Attaching pid %s.\n",
local_hex_string((unsigned long) pid));
memset ((char *)&ptrace_in, '\0', sizeof (ptrace_in));
@@ -1149,7 +1149,7 @@ vx_detach (args, from_tty)
error ("Argument given to VxWorks \"detach\".");
if (from_tty)
- printf ("Detaching pid %s.\n",
+ printf_unfiltered ("Detaching pid %s.\n",
local_hex_string((unsigned long) inferior_pid));
if (args) /* FIXME, should be possible to leave suspended */
@@ -1181,7 +1181,7 @@ vx_kill ()
Ptrace_return ptrace_out;
int status;
- printf ("Killing pid %s.\n", local_hex_string((unsigned long) inferior_pid));
+ printf_unfiltered ("Killing pid %s.\n", local_hex_string((unsigned long) inferior_pid));
memset ((char *)&ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *)&ptrace_out, '\0', sizeof (ptrace_out));