This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: RFC: GDB as a loader 1/3: silent batch mode
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 28 Oct 2005 16:47:45 -0400
- Subject: Re: RFC: GDB as a loader 1/3: silent batch mode
- References: <4354DBFF.7000601@st.com>
Please send patches, even RFC patches, to gdb-patches; I try to keep
code review off of gdb@. Redirecting there.
On Tue, Oct 18, 2005 at 12:26:55PM +0100, Andrew STUBBS wrote:
> All have been regression tested for both i686-pc-linux-gnu and sh-elf an
> have produced no new failures. I have not attempted to produce any new
> test cases. Probably there should be some, but where and how?
They would be nice... but for this one in particular, I think it's not
worth the trouble. It would require some TCL magic.
> Silent Batch Mode
>
> The attached patch implements a new option --batch-silent. This does
> much the same a --batch, except that it also disables gdb_stdout. This
> means that all GDB outputs, other than errors, are hidden.
>
> The advantage of this is that I no longer have to create dodgy scripts
> to filter out all the various GDB messages from my program output
> (Loading section ..., Process exited successfully, etc.).
>
> Obviously this is not particularly useful with targets such as the GDB
> simulator that give their output through the GDB print mechanisms.
> However, all targets which print via regular stdout (as our custom
> target interface here at ST does) work fine. Perhaps somebody could
> suggest a solution for those targets with which it does not work.
That sounds like just a new variant of the MI inferior-io-mixed-in
problem. Perhaps it could share a solution.
In the mean time, along with the documentation that Eli has already
approved, this patch is OK; please wrap the one really long line the
texinfo, though.
> 2005-10-18 Andrew Stubbs <andrew.stubbs@st.com>
>
> * event-top.c (gdb_setup_readline): Don't set gdb_stdout when
> --batch-silent option was given.
> * main.c (batch_silent): New variable.
> (captured_main): Add new option --batch-silent.
> (print_gdb_help): Likewise.
OK.
--
Daniel Jacobowitz
CodeSourcery, LLC