[patch] Save the history by default

Eli Zaretskii eliz@gnu.org
Wed Sep 9 16:42:00 GMT 2009


> Date: Tue, 8 Sep 2009 22:36:45 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb@sourceware.org, gdb-patches@sourceware.org
> 
> > How about trying both, like we do with .gdbinit?
> 
> .gdbinit is being only read, multiple such files can be read.
> 
> History file should be (also) written to.  History file should never be
> readonly.

I didn't mean to use more than a single history file.  What I meant
was to look for that file in both places, and use the first one you
find.

> Formerly I had the patch below (this mail is not a submit for approval).
> Modulo some stat() vs. access() it may be what you suggest?

Looks like it, yes.

> Still I find such behavior too complicated to be convenient and
> therefore useful for this case.  One will get rather surprised why
> randomly this or that time (s)he has or does not have the history
> available.

How could that happen?  If the file will be found with your suggested
code, it will certainly be found with what I suggest.  Or am I missing
something?



More information about the Gdb mailing list