This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Save the history by default


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]