summaryrefslogtreecommitdiff
path: root/source/Commands/CommandObjectBreakpointCommand.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
commit5f29bb8a675e8f96452b632e7129113f7dec850e (patch)
tree3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Commands/CommandObjectBreakpointCommand.cpp
parent88c643b6fec27eec436c8d138fee6346e92337d6 (diff)
Notes
Diffstat (limited to 'source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r--source/Commands/CommandObjectBreakpointCommand.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index 991b174980e19..3f9d83cd86a8d 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -1,9 +1,8 @@
//===-- CommandObjectBreakpointCommand.cpp ----------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,9 +26,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandAdd
-//-------------------------------------------------------------------------
// FIXME: "script-type" needs to have its contents determined dynamically, so
// somebody can add a new scripting
@@ -223,9 +220,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();
}
@@ -425,7 +422,7 @@ protected:
// to set or collect command callback. Otherwise, call the methods
// associated with this object.
if (m_options.m_use_script_language) {
- ScriptInterpreter *script_interp = m_interpreter.GetScriptInterpreter();
+ ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter();
// Special handling for one-liner specified inline.
if (m_options.m_use_one_liner) {
script_interp->SetBreakpointCommandCallback(
@@ -470,9 +467,7 @@ private:
const char *CommandObjectBreakpointCommandAdd::g_reader_instructions =
"Enter your debugger command(s). Type 'DONE' to end.\n";
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandDelete
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_breakpoint_delete_options[] = {
// clang-format off
@@ -607,9 +602,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandList
-//-------------------------------------------------------------------------
class CommandObjectBreakpointCommandList : public CommandObjectParsed {
public:
@@ -637,7 +630,7 @@ public:
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("There is not a current executable; there are no "
@@ -727,9 +720,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommand
-//-------------------------------------------------------------------------
CommandObjectBreakpointCommand::CommandObjectBreakpointCommand(
CommandInterpreter &interpreter)