aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.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/infcmd.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/infcmd.c')
-rw-r--r--gdb/infcmd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 28ecc1a..f4de3ab 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -252,7 +252,7 @@ Start it from the beginning? "))
puts_filtered(" ");
puts_filtered(inferior_args);
puts_filtered("\n");
- fflush (stdout);
+ gdb_flush (gdb_stdout);
}
target_create_inferior (exec_file, inferior_args,
@@ -382,7 +382,7 @@ step_1 (skip_subroutines, single_inst, count_string)
printf_filtered ("\
Single stepping until exit from function %s, \n\
which has no line number information.\n", name);
- fflush (stdout);
+ gdb_flush (gdb_stdout);
}
}
else
@@ -749,7 +749,7 @@ finish_command (arg, from_tty)
BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function))));
printf_filtered ("Value returned is $%d = ", record_latest_value (val));
- value_print (val, stdout, 0, Val_no_prettyprint);
+ value_print (val, gdb_stdout, 0, Val_no_prettyprint);
printf_filtered ("\n");
}
do_cleanups(old_chain);
@@ -1067,8 +1067,8 @@ do_registers_info (regnum, fpregs)
continue;
}
- fputs_filtered (reg_names[i], stdout);
- print_spaces_filtered (15 - strlen (reg_names[i]), stdout);
+ fputs_filtered (reg_names[i], gdb_stdout);
+ print_spaces_filtered (15 - strlen (reg_names[i]), gdb_stdout);
/* Get the data in raw format, then convert also to virtual format. */
if (read_relative_register_raw_bytes (i, raw_buffer))
@@ -1086,7 +1086,7 @@ do_registers_info (regnum, fpregs)
register int j;
val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0,
- stdout, 0, 1, 0, Val_pretty_default);
+ gdb_stdout, 0, 1, 0, Val_pretty_default);
printf_filtered ("\t(raw 0x");
for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
@@ -1109,10 +1109,10 @@ do_registers_info (regnum, fpregs)
else
{
val_print (REGISTER_VIRTUAL_TYPE (i), raw_buffer, 0,
- stdout, 'x', 1, 0, Val_pretty_default);
+ gdb_stdout, 'x', 1, 0, Val_pretty_default);
printf_filtered ("\t");
val_print (REGISTER_VIRTUAL_TYPE (i), raw_buffer, 0,
- stdout, 0, 1, 0, Val_pretty_default);
+ gdb_stdout, 0, 1, 0, Val_pretty_default);
}
/* The SPARC wants to print even-numbered float regs as doubles
@@ -1280,7 +1280,7 @@ unset_command (args, from_tty)
int from_tty;
{
printf_filtered ("\"unset\" must be followed by the name of an unset subcommand.\n");
- help_list (unsetlist, "unset ", -1, stdout);
+ help_list (unsetlist, "unset ", -1, gdb_stdout);
}
void