[Lldb-commits] [PATCH] D59681: Update the lldb driver to support the -O and -S options when passing --repl

Nathan Hawes via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 21 17:30:43 PDT 2019


nathawes created this revision.
nathawes added reviewers: aprantl, jingham.
Herald added a subscriber: abidh.
Herald added a project: LLDB.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D59681

Files:
  lldb/lit/Driver/TestRepl.test
  lldb/tools/driver/Driver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59681.191796.patch
Type: text/x-patch
Size: 13274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190322/b47a16ef/attachment-0001.bin>


More information about the lldb-commits mailing list