This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Start of `>' and `>>' commands
- To: tromey at redhat dot com
- Subject: Re: Start of `>' and `>>' commands
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 10 Oct 2001 17:29:14 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <87zo75egqa.fsf@creche.redhat.com>
> +/* If we've pushed output files, close them and pop them. */
> +static void
> +pop_output_files ()
> +{
> + if (saved_stdout != NULL)
> + {
> + /* Only delete one of the files -- they are all set to the same
> + value. */
> + ui_file_delete (gdb_stdout);
> + gdb_stdout = saved_stdout;
> + gdb_stderr = saved_stderr;
> + gdb_stdlog = saved_stdlog;
> + gdb_stdtarg = saved_stdtarg;
> + saved_stdout = NULL;
> + saved_stderr = NULL;
> + saved_stdlog = NULL;
> + saved_stdtarg = NULL;
> + }
> +}
For what it is worth, this sort of thing is certainly on the right track.
Andrew