This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fwd: [PATCH] Fix for PR gdb/15224 should "set history save on" by default
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: mbilal <mbilal at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Fri, 29 Mar 2013 15:15:14 +0100
- Subject: Re: Fwd: [PATCH] Fix for PR gdb/15224 should "set history save on" by default
- References: <51558CB4 dot 8010003 at codesourcery dot com> <51558EC5 dot 2030806 at codesourcery dot com>
On Fri, 29 Mar 2013 13:53:25 +0100, mbilal wrote:
> The following patch is a fix for PR gdb/15224, that is 'history save'
> command should be enabled by default
> so that user can always be able to see their commands history by default
I would also like it that way for many years but it is not that simple.
If you run GDB testsuite afterwards it will fill up (and discard due to its
maximum size) your personal history. Normally it does not happen because
testsuite runs gdb -nx so ~/.gdbinit is not read and therefore the history
saving is not enabled. Eclipse CDT also uses "gdb --interpreter mi2 --nx".
While that could be fixed in GDB testsuite the same problem will affect any
GDB frontend.
Could you propose a patch compatible at least with existing front ends (like
Eclipse CDT)? I was thinking to just bind the default WRITE_HISTORY_P to
whether ~/.gdbinit is being read or not.
Thanks,
Jan