summaryrefslogtreecommitdiff
path: root/tools/lldb-mi/MICmdCmdExec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lldb-mi/MICmdCmdExec.cpp')
-rw-r--r--tools/lldb-mi/MICmdCmdExec.cpp95
1 files changed, 5 insertions, 90 deletions
diff --git a/tools/lldb-mi/MICmdCmdExec.cpp b/tools/lldb-mi/MICmdCmdExec.cpp
index 1102b952407e3..ffdf171aef08a 100644
--- a/tools/lldb-mi/MICmdCmdExec.cpp
+++ b/tools/lldb-mi/MICmdCmdExec.cpp
@@ -1,9 +1,8 @@
//===-- MICmdCmdExec.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
//
//===----------------------------------------------------------------------===//
@@ -42,7 +41,6 @@
#include "MIDriver.h"
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecRun constructor.
// Type: Method.
// Args: None.
@@ -58,7 +56,6 @@ CMICmdCmdExecRun::CMICmdCmdExecRun() : m_constStrArgStart("start") {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecRun destructor.
// Type: Overrideable.
// Args: None.
@@ -68,7 +65,6 @@ CMICmdCmdExecRun::CMICmdCmdExecRun() : m_constStrArgStart("start") {
CMICmdCmdExecRun::~CMICmdCmdExecRun() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. It parses the command line
// options'
// arguments to extract values for each of those arguments.
@@ -86,7 +82,6 @@ bool CMICmdCmdExecRun::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -148,7 +143,6 @@ bool CMICmdCmdExecRun::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -182,7 +176,6 @@ bool CMICmdCmdExecRun::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -193,12 +186,8 @@ bool CMICmdCmdExecRun::Acknowledge() {
//--
CMICmdBase *CMICmdCmdExecRun::CreateSelf() { return new CMICmdCmdExecRun(); }
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecContinue constructor.
// Type: Method.
// Args: None.
@@ -214,7 +203,6 @@ CMICmdCmdExecContinue::CMICmdCmdExecContinue() {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecContinue destructor.
// Type: Overrideable.
// Args: None.
@@ -224,7 +212,6 @@ CMICmdCmdExecContinue::CMICmdCmdExecContinue() {
CMICmdCmdExecContinue::~CMICmdCmdExecContinue() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -254,7 +241,6 @@ bool CMICmdCmdExecContinue::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -271,7 +257,6 @@ bool CMICmdCmdExecContinue::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -284,12 +269,8 @@ CMICmdBase *CMICmdCmdExecContinue::CreateSelf() {
return new CMICmdCmdExecContinue();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecNext constructor.
// Type: Method.
// Args: None.
@@ -305,7 +286,6 @@ CMICmdCmdExecNext::CMICmdCmdExecNext() : m_constStrArgNumber("number") {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecNext destructor.
// Type: Overrideable.
// Args: None.
@@ -315,7 +295,6 @@ CMICmdCmdExecNext::CMICmdCmdExecNext() : m_constStrArgNumber("number") {
CMICmdCmdExecNext::~CMICmdCmdExecNext() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -331,7 +310,6 @@ bool CMICmdCmdExecNext::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -376,7 +354,6 @@ bool CMICmdCmdExecNext::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -393,7 +370,6 @@ bool CMICmdCmdExecNext::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -404,12 +380,8 @@ bool CMICmdCmdExecNext::Acknowledge() {
//--
CMICmdBase *CMICmdCmdExecNext::CreateSelf() { return new CMICmdCmdExecNext(); }
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecStep constructor.
// Type: Method.
// Args: None.
@@ -425,7 +397,6 @@ CMICmdCmdExecStep::CMICmdCmdExecStep() : m_constStrArgNumber("number") {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecStep destructor.
// Type: Overrideable.
// Args: None.
@@ -435,7 +406,6 @@ CMICmdCmdExecStep::CMICmdCmdExecStep() : m_constStrArgNumber("number") {
CMICmdCmdExecStep::~CMICmdCmdExecStep() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -451,7 +421,6 @@ bool CMICmdCmdExecStep::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -497,7 +466,6 @@ bool CMICmdCmdExecStep::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -514,7 +482,6 @@ bool CMICmdCmdExecStep::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -525,12 +492,8 @@ bool CMICmdCmdExecStep::Acknowledge() {
//--
CMICmdBase *CMICmdCmdExecStep::CreateSelf() { return new CMICmdCmdExecStep(); }
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecNextInstruction constructor.
// Type: Method.
// Args: None.
@@ -547,7 +510,6 @@ CMICmdCmdExecNextInstruction::CMICmdCmdExecNextInstruction()
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecNextInstruction destructor.
// Type: Overrideable.
// Args: None.
@@ -557,7 +519,6 @@ CMICmdCmdExecNextInstruction::CMICmdCmdExecNextInstruction()
CMICmdCmdExecNextInstruction::~CMICmdCmdExecNextInstruction() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -573,7 +534,6 @@ bool CMICmdCmdExecNextInstruction::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -619,7 +579,6 @@ bool CMICmdCmdExecNextInstruction::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -636,7 +595,6 @@ bool CMICmdCmdExecNextInstruction::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -649,12 +607,8 @@ CMICmdBase *CMICmdCmdExecNextInstruction::CreateSelf() {
return new CMICmdCmdExecNextInstruction();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecStepInstruction constructor.
// Type: Method.
// Args: None.
@@ -671,7 +625,6 @@ CMICmdCmdExecStepInstruction::CMICmdCmdExecStepInstruction()
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecStepInstruction destructor.
// Type: Overrideable.
// Args: None.
@@ -681,7 +634,6 @@ CMICmdCmdExecStepInstruction::CMICmdCmdExecStepInstruction()
CMICmdCmdExecStepInstruction::~CMICmdCmdExecStepInstruction() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -697,7 +649,6 @@ bool CMICmdCmdExecStepInstruction::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -743,7 +694,6 @@ bool CMICmdCmdExecStepInstruction::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -760,7 +710,6 @@ bool CMICmdCmdExecStepInstruction::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -773,12 +722,8 @@ CMICmdBase *CMICmdCmdExecStepInstruction::CreateSelf() {
return new CMICmdCmdExecStepInstruction();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecFinish constructor.
// Type: Method.
// Args: None.
@@ -794,7 +739,6 @@ CMICmdCmdExecFinish::CMICmdCmdExecFinish() {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecFinish destructor.
// Type: Overrideable.
// Args: None.
@@ -804,7 +748,6 @@ CMICmdCmdExecFinish::CMICmdCmdExecFinish() {
CMICmdCmdExecFinish::~CMICmdCmdExecFinish() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -817,7 +760,6 @@ CMICmdCmdExecFinish::~CMICmdCmdExecFinish() {}
bool CMICmdCmdExecFinish::ParseArgs() { return ParseValidateCmdOptions(); }
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -862,7 +804,6 @@ bool CMICmdCmdExecFinish::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -879,7 +820,6 @@ bool CMICmdCmdExecFinish::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -892,12 +832,8 @@ CMICmdBase *CMICmdCmdExecFinish::CreateSelf() {
return new CMICmdCmdExecFinish();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecInterrupt constructor.
// Type: Method.
// Args: None.
@@ -913,7 +849,6 @@ CMICmdCmdExecInterrupt::CMICmdCmdExecInterrupt() {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecInterrupt destructor.
// Type: Overrideable.
// Args: None.
@@ -923,7 +858,6 @@ CMICmdCmdExecInterrupt::CMICmdCmdExecInterrupt() {
CMICmdCmdExecInterrupt::~CMICmdCmdExecInterrupt() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -954,7 +888,6 @@ bool CMICmdCmdExecInterrupt::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -971,7 +904,6 @@ bool CMICmdCmdExecInterrupt::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -984,12 +916,8 @@ CMICmdBase *CMICmdCmdExecInterrupt::CreateSelf() {
return new CMICmdCmdExecInterrupt();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecArguments constructor.
// Type: Method.
// Args: None.
@@ -1006,7 +934,6 @@ CMICmdCmdExecArguments::CMICmdCmdExecArguments()
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecArguments destructor.
// Type: Overrideable.
// Args: None.
@@ -1016,7 +943,6 @@ CMICmdCmdExecArguments::CMICmdCmdExecArguments()
CMICmdCmdExecArguments::~CMICmdCmdExecArguments() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line
// options
// arguments to extract values for each of those arguments.
@@ -1034,7 +960,6 @@ bool CMICmdCmdExecArguments::ParseArgs() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -1058,13 +983,13 @@ bool CMICmdCmdExecArguments::Execute() {
}
lldb::SBLaunchInfo sbLaunchInfo = sbTarget.GetLaunchInfo();
- sbLaunchInfo.SetArguments(NULL, false);
+ sbLaunchInfo.SetArguments(nullptr, false);
CMIUtilString strArg;
size_t nArgIndex = 0;
while (pArgArguments->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
strArg, nArgIndex)) {
- const char *argv[2] = {strArg.c_str(), NULL};
+ const char *argv[2] = {strArg.c_str(), nullptr};
sbLaunchInfo.SetArguments(argv, true);
++nArgIndex;
}
@@ -1075,7 +1000,6 @@ bool CMICmdCmdExecArguments::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -1092,7 +1016,6 @@ bool CMICmdCmdExecArguments::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.
@@ -1105,12 +1028,8 @@ CMICmdBase *CMICmdCmdExecArguments::CreateSelf() {
return new CMICmdCmdExecArguments();
}
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecAbort constructor.
// Type: Method.
// Args: None.
@@ -1126,7 +1045,6 @@ CMICmdCmdExecAbort::CMICmdCmdExecAbort() {
}
//++
-//------------------------------------------------------------------------------------
// Details: CMICmdCmdExecAbort destructor.
// Type: Overrideable.
// Args: None.
@@ -1136,7 +1054,6 @@ CMICmdCmdExecAbort::CMICmdCmdExecAbort() {
CMICmdCmdExecAbort::~CMICmdCmdExecAbort() {}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this
// function.
// The command is likely to communicate with the LLDB SBDebugger in
@@ -1169,7 +1086,6 @@ bool CMICmdCmdExecAbort::Execute() {
}
//++
-//------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record
// Result
// for the work carried out in the Execute().
@@ -1186,7 +1102,6 @@ bool CMICmdCmdExecAbort::Acknowledge() {
}
//++
-//------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The
// factory
// calls this function to create an instance of *this command.