[Lldb-commits] [PATCH] D52788: Add EchoCommentCommands to CommandInterpreterRunOptions in addition to the existing EchoCommands and expose both as interpreter settings.

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 2 10:14:28 PDT 2018


sgraenitz created this revision.
sgraenitz added reviewers: aprantl, jasonmolenda, JDevlieghere.
sgraenitz added a subscriber: LLDB.

Add settings to control command echoing:

  (lldb) settings set interpreter.echo-commands true
  (lldb) settings set interpreter.echo-comment-commands true

Both settings default to true, which keeps LLDB's existing behavior in non-interactive mode (echo all command inputs to the output).

So far the only way to change this behavior was the `--source-quietly` flag, which disables all output including evaluation results.
Now `echo-commands` allows to turn off echoing for commands, while evaluation results are still printed. No effect if `--source-quietly` was present.
`echo-comment-commands` allows to turn off echoing for commands in case they are pure comment lines. No effect if `echo-commands` is false.

Note that the behavior does not change immediately! The new settings take effect only with the next command source.

LLDB lit test are the main motivation for this feature. So far incoming `#CHECK` line have always been echoed to the output and so they could never fail. Now we can disable it in lit-lldb-init. 
Todos: Finish test for this feature. Add to lit-lldb-init. Check for failing lit tests.


https://reviews.llvm.org/D52788

Files:
  include/lldb/API/SBCommandInterpreter.h
  include/lldb/Interpreter/CommandInterpreter.h
  source/API/SBCommandInterpreter.cpp
  source/Commands/CommandObjectCommands.cpp
  source/Interpreter/CommandInterpreter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52788.167971.patch
Type: text/x-patch
Size: 13019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181002/0c8f296a/attachment-0001.bin>


More information about the lldb-commits mailing list