Skip to content

Commit 5521d75

Browse files
authored
Merge pull request #3719 from apple/🍒/austria/e2a6c08bbc38+7f01f78593d6
🍒/austria/e2a6c08bbc38+7f01f78593d6
2 parents f58c704 + c09e984 commit 5521d75

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

lldb/docs/man/lldb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ COMMANDS
112112

113113
.. option:: --source-quietly
114114

115-
Tells the debugger to execute this one-line lldb command before any file has been loaded.
115+
Tells the debugger not to echo commands while sourcing files or one-line commands provided on the command line.
116116

117117
.. option:: --source <file>
118118

lldb/test/Shell/Driver/TestQuiet.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
RUN: %lldb -b -Q -o "expr 40 + 2" | FileCheck %s
2+
RUN: %lldb -b -Q -O "expr 40 + 2" | FileCheck %s
3+
4+
CHECK-NOT: expr
5+
CHECK-NOT: lldb
6+
CHECK-NOT: source
7+
CHECK: 42
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# CHECK: (lldb) command source -s 1 {{.*\n}}
2-
# CHECK-NEXT: (lldb) command source -s 1 {{.*\n}}
1+
CHECK: start
2+
CHECK-NOT: source
3+
CHECK-NOT: lldb
4+
CHECK-NEXT: done
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands true' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsAll.out
22
# RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNoComments.out
33
# RUN: %lldb -x -b -o 'settings set interpreter.echo-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNone.out
4-
# RUN: %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsQuiet.out
4+
# RUN: ( echo start ; %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in ; echo done ) | FileCheck %S/Inputs/EchoCommandsQuiet.out

lldb/tools/driver/Driver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ int Driver::MainLoop() {
620620
options.SetSpawnThread(false);
621621
options.SetStopOnError(true);
622622
options.SetStopOnCrash(m_option_data.m_batch);
623+
options.SetEchoCommands(!m_option_data.m_source_quietly);
623624

624625
SBCommandInterpreterRunResult results =
625626
m_debugger.RunCommandInterpreter(options);

lldb/tools/driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def: Flag<["-"], "b">,
110110
Group<grp_command>;
111111

112112
def source_quietly: F<"source-quietly">,
113-
HelpText<"Tells the debugger to execute this one-line lldb command before any file has been loaded.">,
113+
HelpText<"Tells the debugger not to echo commands while sourcing files or one-line commands provided on the command line.">,
114114
Group<grp_command>;
115115
def: Flag<["-"], "Q">,
116116
Alias<source_quietly>,

0 commit comments

Comments
 (0)