aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-nlmstub.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/i386-nlmstub.c
parentb3c0fc577b17083c8bdc3ed5cffc4ca50aefaa5e (diff)
downloadgdb-199b2450f62ad6ffbe56ec34fc447716b811579d.zip
gdb-199b2450f62ad6ffbe56ec34fc447716b811579d.tar.gz
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/i386-nlmstub.c')
-rw-r--r--gdb/i386-nlmstub.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/i386-nlmstub.c b/gdb/i386-nlmstub.c
index 174a00b..e6d7355 100644
--- a/gdb/i386-nlmstub.c
+++ b/gdb/i386-nlmstub.c
@@ -321,7 +321,7 @@ getpacket (buffer)
xmitcsum += hex(ch);
if ((remote_debug ) && (checksum != xmitcsum))
{
- fprintf(stderr,"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
+ fprintf_unfiltered(gdb_stderr,"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
checksum,xmitcsum,buffer);
}
@@ -413,8 +413,8 @@ debug_error (format, parm)
{
if (remote_debug)
{
- fprintf (stderr, format, parm);
- fprintf (stderr, "\n");
+ fprintf_unfiltered (gdb_stderr, format, parm);
+ fprintf_unfiltered (gdb_stderr, "\n");
}
}
@@ -834,11 +834,11 @@ main (argc, argv)
/* Create a screen for the debugger. */
console_screen = CreateScreen ("System Console", 0);
if (DisplayScreen (console_screen) != ESUCCESS)
- fprintf (stderr, "DisplayScreen failed\n");
+ fprintf_unfiltered (gdb_stderr, "DisplayScreen failed\n");
if (argc < 4)
{
- fprintf (stderr,
+ fprintf_unfiltered (gdb_stderr,
"Usage: load gdbserver board port program [arguments]\n");
exit (1);
}
@@ -853,16 +853,16 @@ main (argc, argv)
switch (err)
{
case AIO_PORT_NOT_AVAILABLE:
- fprintf (stderr, "Port not available\n");
+ fprintf_unfiltered (gdb_stderr, "Port not available\n");
break;
case AIO_BOARD_NUMBER_INVALID:
case AIO_PORT_NUMBER_INVALID:
- fprintf (stderr, "No such port\n");
+ fprintf_unfiltered (gdb_stderr, "No such port\n");
break;
default:
- fprintf (stderr, "Could not open port: %d\n", err);
+ fprintf_unfiltered (gdb_stderr, "Could not open port: %d\n", err);
break;
}
@@ -874,7 +874,7 @@ main (argc, argv)
AIO_HARDWARE_FLOW_CONTROL_OFF);
if (err != AIO_SUCCESS)
{
- fprintf (stderr, "Could not configure port: %d\n", err);
+ fprintf_unfiltered (gdb_stderr, "Could not configure port: %d\n", err);
AIOReleasePort (AIOhandle);
exit (1);
}
@@ -887,7 +887,7 @@ main (argc, argv)
DebuggerSignature));
if (s.DDSResourceTag == 0)
{
- fprintf (stderr, "AllocateResourceTag failed\n");
+ fprintf_unfiltered (gdb_stderr, "AllocateResourceTag failed\n");
AIOReleasePort (AIOhandle);
exit (1);
}
@@ -897,7 +897,7 @@ main (argc, argv)
err = RegisterDebuggerRTag (&s, AT_FIRST);
if (err != 0)
{
- fprintf (stderr, "RegisterDebuggerRTag failed\n");
+ fprintf_unfiltered (gdb_stderr, "RegisterDebuggerRTag failed\n");
AIOReleasePort (AIOhandle);
exit (1);
}
@@ -917,7 +917,7 @@ main (argc, argv)
"$?#xx") sitting there. */
if (! putDebugChar ('+'))
{
- fprintf (stderr, "putDebugChar failed\n");
+ fprintf_unfiltered (gdb_stderr, "putDebugChar failed\n");
UnRegisterDebugger (&s);
AIOReleasePort (AIOhandle);
exit (1);
@@ -936,7 +936,7 @@ main (argc, argv)
cmdlin, LO_DEBUG);
if (err != 0)
{
- fprintf (stderr, "LoadModule failed: %d\n", err);
+ fprintf_unfiltered (gdb_stderr, "LoadModule failed: %d\n", err);
UnRegisterDebugger (&s);
AIOReleasePort (AIOhandle);
exit (1);
@@ -952,7 +952,7 @@ main (argc, argv)
/* If we are woken up, print an optional error message, deregister
ourselves and exit. */
if (error_message != NULL)
- fprintf (stderr, "%s\n", error_message);
+ fprintf_unfiltered (gdb_stderr, "%s\n", error_message);
UnRegisterDebugger (&s);
AIOReleasePort (AIOhandle);
exit (0);