This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/PATCH] Disable styling when running in batch mode
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Tom Tromey <tom at tromey dot com>, Eli Zaretskii <eliz at gnu dot org>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Wed, 20 Feb 2019 11:46:35 +0000
- Subject: Re: [RFC/PATCH] Disable styling when running in batch mode
- References: <20190218110353.5160-1-alan.hayward@arm.com> <87ef83u1dc.fsf@tromey.com>
> On 19 Feb 2019, at 17:36, Tom Tromey <tom@tromey.com> wrote:
>
>>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:
>
> Alan> Patch simply disables style after reading the batch command flag, before
> Alan> reading in the init file or batch file.
>
> I had left this enabled intentionally, but after thinking about it, I
> think your rationale makes sense; and in any case the rare user who
> wants batch mode with styling can use -iex or the like to re-enable it.
>
> So, I think the patch is ok.
>
Thanks.
In addition to the patch, I’ve been wondering if we want a command line
argument to explicitly enable or disable style. I think the answer is no,
because it’s better for the user to add to the init file or batch script.
(But thought that it is worth mentioning).
> On 18 Feb 2019, at 16:00, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Alan Hayward <Alan.Hayward@arm.com>
>> CC: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>
>> Date: Mon, 18 Feb 2019 11:04:01 +0000
>>
>> Patch simply disables style after reading the batch command flag, before
>> reading in the init file or batch file.
>>
>> gdb/ChangeLog:
>>
>> 2019-02-18 Alan Hayward <alan.hayward@arm.com>
>>
>> * main.c (captured_main_1): Disable styling in batch mode.
>
> If this is accepted, it should be documented in the GDB manual and in
> NEWS.
>
> Thanks.
Agreed. I’ll post a patch for this later this week.
Alan.