[Lldb-commits] [PATCH] fix for -Q option

dawn at burble.org dawn at burble.org
Mon Nov 17 19:47:48 PST 2014

This patch fixes the behavior of -Q to match the --help:
    "Tells the debugger suppress output from commands provided in the -s, -S,
      -O and -o commands."
Without this patch, the -Q option does the reverse of its intent, so that 
specifying a command file with option "-s" would *not* echo any commands
*unless* -Q was specified.

(Also fixes a stray embedded tab in related code.)

Note: m_silent_run is used in SetOptionValue of
                case 's':
                    error = m_silent_run.SetValueFromCString(option_arg);
I didn't know how to invoke that code to test if it works as intended;
does it need to be fixed as well?

Please check the use above, review and commit?

-------------- next part --------------
Index: source/Commands/CommandObjectCommands.cpp
--- source/Commands/CommandObjectCommands.cpp	(revision 222209)
+++ source/Commands/CommandObjectCommands.cpp	(working copy)
@@ -366,7 +366,7 @@
         // Instance variables to hold the values for command options.
         OptionValueBoolean m_stop_on_error;
-	    OptionValueBoolean m_silent_run;
+        OptionValueBoolean m_silent_run;
         OptionValueBoolean m_stop_on_continue;
@@ -390,8 +390,8 @@
                 CommandInterpreterRunOptions options;
                 options.SetStopOnError (m_options.m_stop_on_error.GetCurrentValue());
-                options.SetEchoCommands (m_options.m_silent_run.GetCurrentValue());
-                options.SetPrintResults (m_options.m_silent_run.GetCurrentValue());
+                options.SetEchoCommands (!m_options.m_silent_run.GetCurrentValue());
+                options.SetPrintResults (!m_options.m_silent_run.GetCurrentValue());
                 m_interpreter.HandleCommandsFromFile (cmd_file,

More information about the lldb-commits mailing list