[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "global" lldbinit file

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 17 09:21:40 PST 2022


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

In D119831#3329959 <https://reviews.llvm.org/D119831#3329959>, @labath wrote:

> In D119831#3329894 <https://reviews.llvm.org/D119831#3329894>, @JDevlieghere wrote:
>
>> Specifying a directory instead of a file makes sense. Why omit the leading dot though? I can think of a few reasons (you can specify a subdir unlike home, it's probably not something the user modifies unlike the one in home and cwd), but still it seems needlessly confusing to me.
>
> I did it mainly because (I believe) that is common practice (so, *not* doing it could be confusing), and I believe the reason is precisely the one you mention -- as it's going to be in a global directory, you don't need it to be hidden (quite the opposite).
>
> If we take bash as an example, here are some of the files it accesses:
> `~/.terminfo` vs `/etc/terminfo` (a directory) -- done through the terminfo library, so which is used by lldb as well
> `~/.bashrc` vs `/etc/bash/bashrc`
> `~/.dir_colors` vs `/etc/DIR_COLORS` -- this isn't hardcoded in bash, but accessed from /etc/bash/bashrc
> `~/.inputrc` vs `/etc/inputrc`
> `~/.bash_profile` vs `/etc/profile`

Good point, I was thinking about it too narrowly, strictly from an LLDB perspective.

LGTM!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119831



More information about the lldb-commits mailing list