This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix CLI/9591 (pagination and --batch)
> From: Tom Tromey <tromey@redhat.com>
> Cc: gdb-patches@sourceware.org
> Date: Fri, 05 Mar 2010 15:24:12 -0700
>
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -1028,7 +1028,9 @@ Run in batch mode. Exit with status @code{0} after processing all the
> command files specified with @samp{-x} (and all commands from
> initialization files, if not inhibited with @samp{-n}). Exit with
> nonzero status if an error occurs in executing the @value{GDBN} commands
> -in the command files.
> +in the command files. Batch mode also disables pagination;
> +@pxref{Screen Size} and acts as if @code{set confirm off} were in
> +effect (@pxref{Messages/Warnings}).
This is okay, but please also add notes to the two referenced nodes
telling how the batch mode changes their respective defaults.
Oh, and please use @kbd{set confirm off}, as that would be a command
typed at the keyboard.
> +/* True if --batch or --batch-silent was seen. */
> +int batch = 0;
Is it wise to have a global symbol with such a short and ``general''
name? Previously, it was static, so that was probably okay. Now it's
a true global, so it could potentially clash with some library. I'd
suggest to rename it to something less invasive.
Thanks.