summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'lldb')
-rw-r--r--lldb/include/lldb/Core/IOHandler.h2
-rw-r--r--lldb/include/lldb/Expression/REPL.h2
-rw-r--r--lldb/lit/Commands/command-regex-delete.test2
-rw-r--r--lldb/lit/Commands/command-regex-unalias.test2
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp10
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp8
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp4
-rw-r--r--lldb/source/Core/IOHandler.cpp2
-rw-r--r--lldb/source/Expression/REPL.cpp2
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp4
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h2
13 files changed, 24 insertions, 24 deletions
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index 2240c1e6800..da8ad1c7d38 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -200,7 +200,7 @@ public:
virtual ~IOHandlerDelegate() = default;
- virtual void IOHandlerActivated(IOHandler &io_handler) {}
+ virtual void IOHandlerActivated(IOHandler &io_handler, bool interactive) {}
virtual void IOHandlerDeactivated(IOHandler &io_handler) {}
diff --git a/lldb/include/lldb/Expression/REPL.h b/lldb/include/lldb/Expression/REPL.h
index 5c88d8a831b..1e5dbb3126f 100644
--- a/lldb/include/lldb/Expression/REPL.h
+++ b/lldb/include/lldb/Expression/REPL.h
@@ -85,7 +85,7 @@ public:
//------------------------------------------------------------------
// IOHandler::Delegate functions
//------------------------------------------------------------------
- void IOHandlerActivated(IOHandler &io_handler) override;
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override;
bool IOHandlerInterrupt(IOHandler &io_handler) override;
diff --git a/lldb/lit/Commands/command-regex-delete.test b/lldb/lit/Commands/command-regex-delete.test
index 04ac5d0b3ba..ddc6259a9c9 100644
--- a/lldb/lit/Commands/command-regex-delete.test
+++ b/lldb/lit/Commands/command-regex-delete.test
@@ -2,7 +2,7 @@
# RUN: %lldb -s %s 2>&1 | FileCheck %s
command regex 'Help__'
-# CHECK: Enter one of more sed substitution commands in the form
+# CHECK: Enter one or more sed substitution commands in the form
# We need to leave a new line after to end the regex.
s/^$/help/
diff --git a/lldb/lit/Commands/command-regex-unalias.test b/lldb/lit/Commands/command-regex-unalias.test
index 34113154cbd..94f1a14ae00 100644
--- a/lldb/lit/Commands/command-regex-unalias.test
+++ b/lldb/lit/Commands/command-regex-unalias.test
@@ -2,7 +2,7 @@
# RUN: %lldb -s %s 2>&1 | FileCheck %s
command regex 'Help__'
-# CHECK: Enter one of more sed substitution commands in the form
+# CHECK: Enter one or more sed substitution commands in the form
# We need to leave a new line after to end the regex.
s/^$/help/
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index d445cb94c40..9cd30c19837 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -222,9 +222,9 @@ are no syntax errors may indicate that a function was declared but never called.
Options *GetOptions() override { return &m_options; }
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(g_reader_instructions);
output_sp->Flush();
}
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 6c92493150b..662da8a02e9 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -975,10 +975,10 @@ a number follows 'f':"
~CommandObjectCommandsAddRegex() override = default;
protected:
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
- output_sp->PutCString("Enter one of more sed substitution commands in "
+ if (output_sp && interactive) {
+ output_sp->PutCString("Enter one or more sed substitution commands in "
"the form: 's/<regex>/<subst>/'.\nTerminate the "
"substitution list with an empty line.\n");
output_sp->Flush();
@@ -1634,9 +1634,9 @@ protected:
ScriptedCommandSynchronicity m_synchronicity;
};
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(g_python_command_instructions);
output_sp->Flush();
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 676c2cbb146..6051b6c7f3d 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4738,9 +4738,9 @@ public:
Options *GetOptions() override { return &m_options; }
protected:
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(
"Enter your stop hook command(s). Type 'DONE' to end.\n");
output_sp->Flush();
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 887d2b85ec4..4df172e1b49 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -160,7 +160,7 @@ public:
~CommandObjectTypeSummaryAdd() override = default;
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
static const char *g_summary_addreader_instructions =
"Enter your Python command(s). Type 'DONE' to end.\n"
"def function (valobj,internal_dict):\n"
@@ -169,7 +169,7 @@ public:
" internal_dict: an LLDB support object not to be used\"\"\"\n";
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(g_summary_addreader_instructions);
output_sp->Flush();
}
@@ -412,9 +412,9 @@ protected:
}
}
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(g_synth_addreader_instructions);
output_sp->Flush();
}
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index dfb888190b3..9b5fb4c1068 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -207,9 +207,9 @@ are no syntax errors may indicate that a function was declared but never called.
Options *GetOptions() override { return &m_options; }
- void IOHandlerActivated(IOHandler &io_handler) override {
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(
"Enter your debugger command(s). Type 'DONE' to end.\n");
output_sp->Flush();
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 4a6fb0c8a78..257db46e942 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -331,7 +331,7 @@ IOHandlerEditline::~IOHandlerEditline() {
void IOHandlerEditline::Activate() {
IOHandler::Activate();
- m_delegate.IOHandlerActivated(*this);
+ m_delegate.IOHandlerActivated(*this, GetIsInteractive());
}
void IOHandlerEditline::Deactivate() {
diff --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp
index b3f4307bee0..f4ed887729d 100644
--- a/lldb/source/Expression/REPL.cpp
+++ b/lldb/source/Expression/REPL.cpp
@@ -92,7 +92,7 @@ lldb::IOHandlerSP REPL::GetIOHandler() {
return m_io_handler_sp;
}
-void REPL::IOHandlerActivated(IOHandler &io_handler) {
+void REPL::IOHandlerActivated(IOHandler &io_handler, bool interactive) {
lldb::ProcessSP process_sp = m_target.GetProcessSP();
if (process_sp && process_sp->IsAlive())
return;
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 53e98c310f1..543b8897b3f 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -442,7 +442,7 @@ lldb_private::ConstString ScriptInterpreterPython::GetPluginName() {
uint32_t ScriptInterpreterPython::GetPluginVersion() { return 1; }
-void ScriptInterpreterPython::IOHandlerActivated(IOHandler &io_handler) {
+void ScriptInterpreterPython::IOHandlerActivated(IOHandler &io_handler, bool interactive) {
const char *instructions = nullptr;
switch (m_active_io_handler) {
@@ -463,7 +463,7 @@ def function (frame, bp_loc, internal_dict):
if (instructions) {
StreamFileSP output_sp(io_handler.GetOutputStreamFile());
- if (output_sp) {
+ if (output_sp && interactive) {
output_sp->PutCString(instructions);
output_sp->Flush();
}
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
index 54c38eddc73..ae4d39c45a5 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
@@ -459,7 +459,7 @@ public:
//----------------------------------------------------------------------
// IOHandlerDelegate
//----------------------------------------------------------------------
- void IOHandlerActivated(IOHandler &io_handler) override;
+ void IOHandlerActivated(IOHandler &io_handler, bool interactive) override;
void IOHandlerInputComplete(IOHandler &io_handler,
std::string &data) override;
OpenPOWER on IntegriCloud