Skip to content

🍒/austria/e2a6c08bbc38+7f01f78593d6 #3719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lldb/docs/man/lldb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ COMMANDS

.. option:: --source-quietly

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

.. option:: --source <file>

Expand Down
7 changes: 7 additions & 0 deletions lldb/test/Shell/Driver/TestQuiet.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
RUN: %lldb -b -Q -o "expr 40 + 2" | FileCheck %s
RUN: %lldb -b -Q -O "expr 40 + 2" | FileCheck %s

CHECK-NOT: expr
CHECK-NOT: lldb
CHECK-NOT: source
CHECK: 42
6 changes: 4 additions & 2 deletions lldb/test/Shell/Settings/Inputs/EchoCommandsQuiet.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# CHECK: (lldb) command source -s 1 {{.*\n}}
# CHECK-NEXT: (lldb) command source -s 1 {{.*\n}}
CHECK: start
CHECK-NOT: source
CHECK-NOT: lldb
CHECK-NEXT: done
2 changes: 1 addition & 1 deletion lldb/test/Shell/Settings/TestEchoCommands.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands true' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsAll.out
# RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNoComments.out
# RUN: %lldb -x -b -o 'settings set interpreter.echo-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNone.out
# RUN: %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsQuiet.out
# RUN: ( echo start ; %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in ; echo done ) | FileCheck %S/Inputs/EchoCommandsQuiet.out
1 change: 1 addition & 0 deletions lldb/tools/driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ int Driver::MainLoop() {
options.SetSpawnThread(false);
options.SetStopOnError(true);
options.SetStopOnCrash(m_option_data.m_batch);
options.SetEchoCommands(!m_option_data.m_source_quietly);

SBCommandInterpreterRunResult results =
m_debugger.RunCommandInterpreter(options);
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def: Flag<["-"], "b">,
Group<grp_command>;

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