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.
This commit is contained in:
parent
b3c0fc577b
commit
199b2450f6
121 changed files with 1751 additions and 1236 deletions
|
@ -378,8 +378,8 @@ mips_receive_header (hdr, pgarbage, ch, timeout)
|
|||
should be filtered? */
|
||||
if (! mips_initializing || sr_get_debug () > 0)
|
||||
{
|
||||
putchar (ch);
|
||||
fflush (stdout);
|
||||
putchar_unfiltered (ch);
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
++*pgarbage;
|
||||
|
@ -911,7 +911,7 @@ device is attached to the target board (e.g., /dev/ttya).");
|
|||
mips_initialize ();
|
||||
|
||||
if (from_tty)
|
||||
printf ("Remote MIPS debugging using %s\n", name);
|
||||
printf_unfiltered ("Remote MIPS debugging using %s\n", name);
|
||||
push_target (&mips_ops); /* Switch to using remote target now */
|
||||
|
||||
/* FIXME: Should we call start_remote here? */
|
||||
|
@ -948,7 +948,7 @@ mips_detach (args, from_tty)
|
|||
|
||||
pop_target ();
|
||||
if (from_tty)
|
||||
printf ("Ending remote MIPS debugging.\n");
|
||||
printf_unfiltered ("Ending remote MIPS debugging.\n");
|
||||
}
|
||||
|
||||
/* Tell the target board to resume. This does not wait for a reply
|
||||
|
@ -1212,7 +1212,7 @@ static void
|
|||
mips_files_info (ignore)
|
||||
struct target_ops *ignore;
|
||||
{
|
||||
printf ("Debugging a MIPS board over a serial line.\n");
|
||||
printf_unfiltered ("Debugging a MIPS board over a serial line.\n");
|
||||
}
|
||||
|
||||
/* Kill the process running on the board. This will actually only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue