Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
3a22c3c
commit 040f94c
Showing
2 changed files
with
144 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RUN: echo ':quit' | %lldb -x --repl -O 'expr 42' -S %S/Inputs/Print2.in -o 'expr 999999' -s %s 2>&1 | FileCheck %s | ||
# CHECK: {{w}}arning: commands specified to run after file load (via -o or -s) are ignored in REPL mode | ||
# CHECK: (int) $0 = 42 | ||
# CHECK: (int) $1 = 2 | ||
# CHECK-NOT: 999999 | ||
|
||
expr 999999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters