llvm-project/lldb/lit/Driver
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
..
Inputs [testsuite] Convert TestSingleQuote to lit. 2019-02-12 22:57:57 +00:00
TestCommands.test
TestConvenienceVariables.test [lit] Make TestConvenienceVariables a cpp file 2018-12-19 17:10:21 +00:00
TestCore.test
TestFile.test
TestNoUseColor.test
TestRepl.test Update the lldb driver to support the -O and -S options when passing --repl 2019-03-25 15:38:18 +00:00
TestSingleQuote.test [testsuite] Add a comment explaining what this test does. 2019-02-12 23:02:53 +00:00