summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp2
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp22
2 files changed, 14 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index bb7ca021eb5..7bfdec094d6 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -378,8 +378,6 @@ protected:
{
const char *filename = command.GetArgumentAtIndex(0);
- result.AppendMessageWithFormat ("Executing commands in '%s'.\n", filename);
-
FileSpec cmd_file (filename, true);
ExecutionContext *exe_ctx = NULL; // Just use the default context.
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 2e29e16c527..58c535540bd 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2582,7 +2582,7 @@ CommandInterpreter::HandleCommandsFromFile (FileSpec &cmd_file,
{
if (m_command_source_flags.empty())
{
- // Echo command by default
+ // Stop on continue by default
flags |= eHandleCommandFlagStopOnContinue;
}
else if (m_command_source_flags.back() & eHandleCommandFlagStopOnContinue)
@@ -2633,26 +2633,32 @@ CommandInterpreter::HandleCommandsFromFile (FileSpec &cmd_file,
{
if (m_command_source_flags.empty())
{
- // Echo command by default
- flags |= eHandleCommandFlagEchoCommand;
+ // Print output by default
+ flags |= eHandleCommandFlagPrintResult;
}
- else if (m_command_source_flags.back() & eHandleCommandFlagEchoCommand)
+ else if (m_command_source_flags.back() & eHandleCommandFlagPrintResult)
{
- flags |= eHandleCommandFlagEchoCommand;
+ flags |= eHandleCommandFlagPrintResult;
}
}
else if (print_result == eLazyBoolYes)
{
- flags |= eHandleCommandFlagEchoCommand;
+ flags |= eHandleCommandFlagPrintResult;
+ }
+
+ if (flags & eHandleCommandFlagPrintResult)
+ {
+ m_debugger.GetOutputFile()->Printf("Executing commands in '%s'.\n", cmd_file_path.c_str());
}
// Used for inheriting the right settings when "command source" might have
// nested "command source" commands
+ lldb::StreamFileSP empty_stream_sp;
m_command_source_flags.push_back(flags);
IOHandlerSP io_handler_sp (new IOHandlerEditline (debugger,
input_file_sp,
- debugger.GetOutputFile(),
- debugger.GetErrorFile(),
+ empty_stream_sp, // Pass in an empty stream so we inherit the top input reader output stream
+ empty_stream_sp, // Pass in an empty stream so we inherit the top input reader error stream
flags,
NULL, // Pass in NULL for "editline_name" so no history is saved, or written
m_debugger.GetPrompt(),
OpenPOWER on IntegriCloud