diff options
Diffstat (limited to 'tools/lldb-mi/MICmdCmdMiscellanous.cpp')
-rw-r--r-- | tools/lldb-mi/MICmdCmdMiscellanous.cpp | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/tools/lldb-mi/MICmdCmdMiscellanous.cpp b/tools/lldb-mi/MICmdCmdMiscellanous.cpp index 87c0ee62f658..5aa795999535 100644 --- a/tools/lldb-mi/MICmdCmdMiscellanous.cpp +++ b/tools/lldb-mi/MICmdCmdMiscellanous.cpp @@ -1,9 +1,8 @@ //===-- MICmdCmdMiscellanous.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 // //===----------------------------------------------------------------------===// @@ -35,7 +34,6 @@ #include "MIDriverBase.h" //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdGdbExit constructor. // Type: Method. // Args: None. @@ -51,7 +49,6 @@ CMICmdCmdGdbExit::CMICmdCmdGdbExit() { } //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdGdbExit destructor. // Type: Overrideable. // Args: None. @@ -61,7 +58,6 @@ CMICmdCmdGdbExit::CMICmdCmdGdbExit() { CMICmdCmdGdbExit::~CMICmdCmdGdbExit() {} //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command does work in this // function. // The command is likely to communicate with the LLDB SBDebugger in @@ -81,7 +77,6 @@ bool CMICmdCmdGdbExit::Execute() { } //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command prepares a MI Record // Result // for the work carried out in the Execute(). @@ -110,7 +105,6 @@ bool CMICmdCmdGdbExit::Acknowledge() { } //++ -//------------------------------------------------------------------------------------ // Details: Required by the CMICmdFactory when registering *this command. The // factory // calls this function to create an instance of *this command. @@ -121,12 +115,8 @@ bool CMICmdCmdGdbExit::Acknowledge() { //-- CMICmdBase *CMICmdCmdGdbExit::CreateSelf() { return new CMICmdCmdGdbExit(); } -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdListThreadGroups constructor. // Type: Method. // Args: None. @@ -146,7 +136,6 @@ CMICmdCmdListThreadGroups::CMICmdCmdListThreadGroups() } //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdListThreadGroups destructor. // Type: Overrideable. // Args: None. @@ -158,7 +147,6 @@ CMICmdCmdListThreadGroups::~CMICmdCmdListThreadGroups() { } //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The parses the command line // options // arguments to extract values for each of those arguments. @@ -183,7 +171,6 @@ bool CMICmdCmdListThreadGroups::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 @@ -254,7 +241,6 @@ bool CMICmdCmdListThreadGroups::Execute() { } //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command prepares a MI Record // Result // for the work carried out in the Execute(). @@ -340,7 +326,9 @@ bool CMICmdCmdListThreadGroups::Acknowledge() { const char *pDir = sbTrgt.GetExecutable().GetDirectory(); const char *pFileName = sbTrgt.GetExecutable().GetFilename(); const CMIUtilString strFile( - CMIUtilString::Format("%s/%s", pDir, pFileName)); + CMIUtilString::Format("%s/%s", + CMIUtilString::WithNullAsEmpty(pDir), + CMIUtilString::WithNullAsEmpty(pFileName))); const CMICmnMIValueConst miValueConst4(strFile); const CMICmnMIValueResult miValueResult4("executable", miValueConst4); miTuple.Add(miValueResult4); @@ -386,7 +374,6 @@ bool CMICmdCmdListThreadGroups::Acknowledge() { } //++ -//------------------------------------------------------------------------------------ // Details: Required by the CMICmdFactory when registering *this command. The // factory // calls this function to create an instance of *this command. @@ -399,12 +386,8 @@ CMICmdBase *CMICmdCmdListThreadGroups::CreateSelf() { return new CMICmdCmdListThreadGroups(); } -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdInterpreterExec constructor. // Type: Method. // Args: None. @@ -422,7 +405,6 @@ CMICmdCmdInterpreterExec::CMICmdCmdInterpreterExec() } //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdInterpreterExec destructor. // Type: Overrideable. // Args: None. @@ -432,7 +414,6 @@ CMICmdCmdInterpreterExec::CMICmdCmdInterpreterExec() CMICmdCmdInterpreterExec::~CMICmdCmdInterpreterExec() {} //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The parses the command line // options // arguments to extract values for each of those arguments. @@ -451,7 +432,6 @@ bool CMICmdCmdInterpreterExec::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 @@ -467,8 +447,7 @@ bool CMICmdCmdInterpreterExec::Execute() { CMICMDBASE_GETOPTION(pArgCommand, String, m_constStrArgNamedCommand); // Handle the interpreter parameter by do nothing on purpose (set to 'handled' - // in - // the arg definition above) + // in the arg definition above) const CMIUtilString &rStrInterpreter(pArgInterpreter->GetValue()); MIunused(rStrInterpreter); @@ -484,7 +463,6 @@ bool CMICmdCmdInterpreterExec::Execute() { } //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command prepares a MI Record // Result // for the work carried out in the Execute(). @@ -522,7 +500,6 @@ bool CMICmdCmdInterpreterExec::Acknowledge() { } //++ -//------------------------------------------------------------------------------------ // Details: Required by the CMICmdFactory when registering *this command. The // factory // calls this function to create an instance of *this command. @@ -535,12 +512,8 @@ CMICmdBase *CMICmdCmdInterpreterExec::CreateSelf() { return new CMICmdCmdInterpreterExec(); } -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdInferiorTtySet constructor. // Type: Method. // Args: None. @@ -556,7 +529,6 @@ CMICmdCmdInferiorTtySet::CMICmdCmdInferiorTtySet() { } //++ -//------------------------------------------------------------------------------------ // Details: CMICmdCmdInferiorTtySet destructor. // Type: Overrideable. // Args: None. @@ -566,7 +538,6 @@ CMICmdCmdInferiorTtySet::CMICmdCmdInferiorTtySet() { CMICmdCmdInferiorTtySet::~CMICmdCmdInferiorTtySet() {} //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command does work in this // function. // The command is likely to communicate with the LLDB SBDebugger in @@ -584,7 +555,6 @@ bool CMICmdCmdInferiorTtySet::Execute() { } //++ -//------------------------------------------------------------------------------------ // Details: The invoker requires this function. The command prepares a MI Record // Result // for the work carried out in the Execute(). @@ -603,7 +573,6 @@ bool CMICmdCmdInferiorTtySet::Acknowledge() { } //++ -//------------------------------------------------------------------------------------ // Details: Required by the CMICmdFactory when registering *this command. The // factory // calls this function to create an instance of *this command. |