[Lldb-commits] [PATCH] D86242: [lldb/interpreter] Add REPL-specific init file
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 19 15:28:47 PDT 2020
JDevlieghere accepted this revision.
JDevlieghere added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/docs/man/lldb.rst:314
+If launched with a `REPL`_ option, it will first look for a REPL configuration
+file, specific to the REPL language. If this file doesn't exist, or `lldb`
+wasn't launch with `REPL`_, meaning there is neither a REPL init file nor an
----------------
:program:`lldb`
================
Comment at: lldb/docs/man/lldb.rst:323
+
To always load the .lldbinit file in the current working directory, add the
----------------
Spurious newline
================
Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:2183
/// whose name is "~/.lldbinit" followed by a "-" and the name of the program.
-/// If this file doesn't exist, we fall back to just the "~/.lldbinit" file.
-void CommandInterpreter::SourceInitFileHome(CommandReturnObject &result) {
+/// If this file doesn't exist, we fall back to the REPL init file or the
+/// default home init file in "~/.lldbinit".
----------------
mib wrote:
> JDevlieghere wrote:
> > This is wrong, you check the REPL file first, fi that works you use that, otherwise you fall back to the app specific one, and finally to the global one.
> Yes, but the application init file overrides the REPL init file that also override the global one, that's why I put it this way in the comment.
Cool, now the docs and the comment are in sync. That code is really confusing though but I think I was the last to touch it so that's my bad :-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86242/new/
https://reviews.llvm.org/D86242
More information about the lldb-commits
mailing list