[Lldb-commits] [PATCH] D62216: [EditLine] Rewrite GetHistoryFilePath

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 21 15:53:01 PDT 2019


JDevlieghere added a comment.

In D62216#1511092 <https://reviews.llvm.org/D62216#1511092>, @jingham wrote:

> Most other programs write their history files in ~.  So we are being a little odd in offering to put them in ~/.lldb, though I agree that is convenient.
>
> But if putting files in ~/.lldb ticked somebody off enough that they made a .lldb directory that was read only, your create_directory would fail - since it explicitly asks for x & w - and I don't think we should punish them with no history...
>  If ~ is not writeable, then for now we should return an empty path and not do history.


This sounds contrived at best. Who would even expect that there would be a fallback for that? If somebody really did create a read-only `.lldb` directory, it sounds to me like they don't want history at all.

> Note, however, for history files a better solution would be to allow a way to specify the history location.  Right now, if you run multiple lldb sessions at the same time they fight over the history file, which isn't great.  If folks could set the history file they could assign different history files to different sessions.  That would also be a way to work around a read-only or non-existent ~.  But that is out of scope for this patch...

Yup, that sounds like a good future direction.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62216/new/

https://reviews.llvm.org/D62216





More information about the lldb-commits mailing list