lawrence_danna updated this revision to Diff 384155.
lawrence_danna added a comment.

fix typo


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112988/new/

https://reviews.llvm.org/D112988

Files:
  lldb/docs/man/lldb.rst
  lldb/test/Shell/Driver/TestQuiet.test
  lldb/tools/driver/Driver.cpp
  lldb/tools/driver/Options.td


Index: lldb/tools/driver/Options.td
===================================================================
--- lldb/tools/driver/Options.td
+++ lldb/tools/driver/Options.td
@@ -114,7 +114,7 @@
   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>,
Index: lldb/tools/driver/Driver.cpp
===================================================================
--- lldb/tools/driver/Driver.cpp
+++ lldb/tools/driver/Driver.cpp
@@ -627,6 +627,7 @@
     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);
Index: lldb/test/Shell/Driver/TestQuiet.test
===================================================================
--- /dev/null
+++ lldb/test/Shell/Driver/TestQuiet.test
@@ -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
\ No newline at end of file
Index: lldb/docs/man/lldb.rst
===================================================================
--- lldb/docs/man/lldb.rst
+++ lldb/docs/man/lldb.rst
@@ -111,7 +111,7 @@
 
 .. 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>
 


Index: lldb/tools/driver/Options.td
===================================================================
--- lldb/tools/driver/Options.td
+++ lldb/tools/driver/Options.td
@@ -114,7 +114,7 @@
   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>,
Index: lldb/tools/driver/Driver.cpp
===================================================================
--- lldb/tools/driver/Driver.cpp
+++ lldb/tools/driver/Driver.cpp
@@ -627,6 +627,7 @@
     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);
Index: lldb/test/Shell/Driver/TestQuiet.test
===================================================================
--- /dev/null
+++ lldb/test/Shell/Driver/TestQuiet.test
@@ -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
\ No newline at end of file
Index: lldb/docs/man/lldb.rst
===================================================================
--- lldb/docs/man/lldb.rst
+++ lldb/docs/man/lldb.rst
@@ -111,7 +111,7 @@
 
 .. 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>
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to