[Lldb-commits] [PATCH] D61578: [Driver] Add command line option to allow loading local lldbinit file

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 7 10:44:51 PDT 2019


On Tue, May 7, 2019 at 10:33 AM Jim Ingham via Phabricator <
reviews at reviews.llvm.org> wrote:

> jingham added a comment.
>
> In D61578#1493452 <https://reviews.llvm.org/D61578#1493452>, @labath
> wrote:
>
> > In D61578#1492422 <https://reviews.llvm.org/D61578#1492422>,
> @JDevlieghere wrote:
> >
> > > In D61578#1492086 <https://reviews.llvm.org/D61578#1492086>,
> @clayborg wrote:
> > >
> > > > Just wanted to verify that we can put a:
> > > >
> > > >   settings set target.load-cwd-lldbinit true
> > > >
> > > >
> > > > in our ~/.lldbinit file and it will then load the local init file in
> the current working directory?
> > >
> > >
> > > Yep, that behavior remains unchanged.
> >
> >
> > Unfortunately, I guess that also means that if somebody does that (set
> this setting in the global config file), this test will fail for him. I
> think that means that one day we will have to add a flag to specifically
> disable reading of the global config file, or find some way to mock its
> contents.
>
>
> The dotest.py tests all disable reading the global .lldbinit file.  Do the
> lit tests not do that as well?  For tests that actually test reading the
> user's .lldbinit file we will need to do something fancy (can we change the
> HOME environment variable to some other place so that it gets read from
> there?)
>

Yes, the lit tests do this too. However, for this particular test I worked
around that, because it would prevent us from reading the local lldbinit
file. As a mitigation for the issue Pavel mentioned, I did exactly that, I
exported a different HOME env in the test. I'm not 100% that will work
everywhere, but it tricked my LLDB into using that as the home dir.



>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D61578/new/
>
> https://reviews.llvm.org/D61578
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190507/ff7b3530/attachment-0001.html>


More information about the lldb-commits mailing list