This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/7] PR gdb/15224 should "set history save on" by default
- From: Pedro Alves <palves at redhat dot com>
- To: mbilal <mbilal at codesourcery dot com>
- Cc: hafiz_abid at mentor dot com, gdb-patches at sourceware dot org, jan dot kratochvil at redhat dot com
- Date: Thu, 09 May 2013 13:05:23 +0100
- Subject: Re: [PATCH 4/7] PR gdb/15224 should "set history save on" by default
- References: <51877A32 dot 1030503 at codesourcery dot com> <51877A99 dot 4060503 at codesourcery dot com> <51877B42 dot 7 at codesourcery dot com> <51877BC6 dot 6080007 at codesourcery dot com> <518A0B95 dot 7090905 at codesourcery dot com> <518B8492 dot 90606 at codesourcery dot com>
On 05/09/2013 12:12 PM, mbilal wrote:
> On Wednesday, May 08, 2013 10:14 PM pedro Alves wrote:
>
>>> - set INTERNAL_GDBFLAGS "-nw -nx -data-directory $BUILD_DATA_DIRECTORY"
>>> + set INTERNAL_GDBFLAGS "-nw -nx -ex set\\ history\\ save\\ off -data-directory $BUILD_DATA_DIRECTORY"
>
>>spurious space? ------^^
>
> Fixed.
BTW, I think:
set INTERNAL_GDBFLAGS "-nw -nx -ex \"set history save off\" -data-directory $BUILD_DATA_DIRECTORY"
would be easier to read (and write).
>>> +#We are always disable history saving on testsuite
>>> #test set history save
>>> -gdb_test_no_output "set history save" "set history save"
>>> +#gdb_test_no_output "set history save" "set history save"
>>> #test set history size
>
>>I don't understand this. Why disable the test?
>
> We are disabling the history saving on all testsuit, if we run the above
> testsuit then history saving becomes enable that will also writes the history
> command on .gdb_history file. That's why I disabled this test case.
So that's a preexisting bug, that triggers even if GDB's
default isn't changed, right? Let's fix it first, before the default is
changed, in its own patch. Please send it as a new thread (i.e., not in
reply to this thread, in a message that includes a self-contained
description of the rationale for the change, and a concise Subject:.
I suggest perusing these guidelines that although written for the
Linux kernel, can be transcribed to lots of other projects as well:
<http://www.linux-mips.org/wiki/Submitting_Patches>
Instead of disabling the test completely, I suggest re-disabling
history saving immediately afterwards:
gdb_test_no_output "set history save" "set history save"
+gdb_test_no_output "set history save off" "set history save off"
--
Pedro Alves