llvm-project/lldb/lit
Adrian Prantl 040f94cc7e Update the lldb driver to support the -O and -S options when passing --repl
At the moment when --repl is passed to lldb it silently ignores any
commands passed via the options below:

--one-line-before-file <command>
                     Tells the debugger to execute this one-line lldb command before any file provided on the command line has been loaded.
--one-line <command>
                     Tells the debugger to execute this one-line lldb command after any file provided on the command line has been loaded.
--source-before-file <file>
                     Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded.
--source <file>
                     Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded.
-O <value>           Alias for --one-line-before-file
-o <value>           Alias for --one-line
-S <value>           Alias for --source-before-file
-s <value>           Alias for --source

The -O and -S options are quite useful when writing tests for the REPL
though, e.g. to change settings prior to entering REPL mode. This
patch updates the driver to still respect the commands supplied via -O
and -S when passing --repl instead of silently ignoring them. As -s
and -o don't really make sense in REPL mode, commands supplied via
those options are still ignored, but the driver now emits a warning to
make that clear to the user.

Patch by Nathan Hawes!

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

llvm-svn: 356911
2019-03-25 15:38:18 +00:00
..
Breakpoint build.py: Implement "gcc" builder 2018-12-12 08:54:14 +00:00
BuildScript [lldb] [lit] Attempt to fix regex in toolchain-clang.test 2019-03-06 14:49:48 +00:00
Commands Quiet command regex instructions during batch execution 2019-03-10 23:15:48 +00:00
Driver Update the lldb driver to support the -O and -S options when passing --repl 2019-03-25 15:38:18 +00:00
ExecControl/StopHook This test is failing on and off on the bots. 2019-03-12 23:15:48 +00:00
Expr [lit] Make sure tests are actually skipped on darwin and windows. 2019-01-17 21:57:33 +00:00
Heap Fix lldb's macosx/heap.py cstr command. 2018-12-17 18:21:51 +00:00
Minidump Minidump: Use minidump constants defined in llvm 2019-03-25 14:09:27 +00:00
Modules [lldb] [ObjectFile/ELF] Fix recognizing NetBSD images 2019-02-20 14:31:06 +00:00
Python Avoid using -S in combination with "script"; it's unreliable. 2019-03-07 00:46:56 +00:00
Quit [lldb] Update shebang python2 -> python 2019-01-26 01:05:02 +00:00
Reproducer [Reproducers] Properly handle QEnvironment packets 2019-03-21 04:08:31 +00:00
Settings Refactor the lit configuration files 2018-11-02 17:49:01 +00:00
Suite [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD 2019-03-06 14:03:18 +00:00
SymbolFile Reinitialize UnwindTable when the SymbolFile changes 2019-03-18 10:45:02 +00:00
Unit [CMake] In standalone builds, LLVM_BINARY_DIR should point to LLVM's binary directory 2019-01-09 16:25:37 +00:00
helper Sanity check --max-gdbserver-port 2019-03-06 21:52:19 +00:00
tools [lldb-instr] Support LLDB_RECORD_DUMMY 2019-03-08 18:33:40 +00:00
CMakeLists.txt [CMake] Quick-Fix targets don't exist when building against LLVM install-tree with LLDB_INCLUDE_TESTS=ON 2019-01-28 16:15:27 +00:00
lit-lldb-init Add EchoCommentCommands to CommandInterpreterRunOptions in addition to the existing EchoCommands and expose both as interpreter settings. 2018-10-05 16:49:47 +00:00
lit.cfg.py Fix clang test suite on Windows by reverting part of r347216 2018-11-19 19:36:28 +00:00
lit.site.cfg.py.in [lldb] [test] Skip lldb-mi test if LLDB_DISABLE_PYTHON is used 2019-02-11 14:09:43 +00:00