@@ -1893,6 +1893,8 @@ bool CommandInterpreter::HandleCommand(const char *command_line,
18931893 LLDB_LOGF (log, " Processing command: %s" , command_line);
18941894 LLDB_SCOPED_TIMERF (" Processing command: %s." , command_line);
18951895
1896+ result.SetCommand (command_line);
1897+
18961898 if (INTERRUPT_REQUESTED (GetDebugger (), " Interrupted initiating command" )) {
18971899 result.AppendError (" ... Interrupted" );
18981900 return false ;
@@ -2616,7 +2618,7 @@ void CommandInterpreter::HandleCommands(
26162618 m_debugger.GetPrompt ().str ().c_str (), cmd);
26172619 }
26182620
2619- CommandReturnObject tmp_result (m_debugger.GetUseColor ());
2621+ CommandReturnObject tmp_result (cmd, m_debugger.GetUseColor ());
26202622 tmp_result.SetInteractive (result.GetInteractive ());
26212623 tmp_result.SetSuppressImmediateOutput (true );
26222624
@@ -2644,7 +2646,8 @@ void CommandInterpreter::HandleCommands(
26442646 (uint64_t )idx, cmd, error_msg);
26452647 m_debugger.SetAsyncExecution (old_async_execution);
26462648 return ;
2647- } else if (options.GetPrintResults ()) {
2649+ }
2650+ if (options.GetPrintResults ()) {
26482651 result.AppendMessageWithFormatv (" Command #{0} '{1}' failed with {2}" ,
26492652 (uint64_t )idx + 1 , cmd, error_msg);
26502653 }
@@ -3177,7 +3180,7 @@ void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler,
31773180 RestoreExecutionContext ();
31783181 });
31793182
3180- lldb_private::CommandReturnObject result (m_debugger.GetUseColor ());
3183+ lldb_private::CommandReturnObject result (line, m_debugger.GetUseColor ());
31813184 HandleCommand (line.c_str (), eLazyBoolCalculate, result);
31823185
31833186 // Now emit the command output text from the command we just executed
0 commit comments