[lldb/interpreter] Add REPL-specific init file
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 19 Aug 2020 20:04:35 +0000 (22:04 +0200)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 19 Aug 2020 22:36:32 +0000 (00:36 +0200)
commit868b45b5b31d1203cab09ae0306f4c47e6070f68
tree1b88ba2908e420de8fe11a187da6b5250b41af9d
parent428bebaf10e177db5e42206ca8f871f0bcbef058
[lldb/interpreter] Add REPL-specific init file

This patch adds the infrastructure to have language specific REPL init
files. It's the foundation work to a following patch that will introduce
Swift REPL init file.

When lldb is launched with the `--repl` option, it will look for a REPL
init file in the home directory and source it. This overrides the
default `~/.lldbinit`, which content might make the REPL behave
unexpectedly. If the REPL init file doesn't exists, lldb will fall back
to the default init file.

rdar://65836048

Differential Revision: https://reviews.llvm.org/D86242

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/docs/man/lldb.rst
lldb/include/lldb/API/SBCommandInterpreter.h
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/API/SBDebugger.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/tools/driver/Driver.cpp