summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-06 14:32:30 +0000
committerdim <dim@FreeBSD.org>2015-09-06 14:32:30 +0000
commit80b639cd40df427b9e325318efeec2d885a65f62 (patch)
tree94980f450aa3daec3e1fec217374704ad62cfe45 /tools
parent8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 (diff)
downloadFreeBSD-src-80b639cd40df427b9e325318efeec2d885a65f62.zip
FreeBSD-src-80b639cd40df427b9e325318efeec2d885a65f62.tar.gz
Vendor import of (stripped) lldb trunk r242221:
https://llvm.org/svn/llvm-project/lldb/trunk@242221
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/Driver.cpp20
-rw-r--r--tools/driver/Driver.h2
-rw-r--r--tools/lldb-mi/MICmdArgSet.h2
-rw-r--r--tools/lldb-mi/MICmdArgValBase.h16
-rw-r--r--tools/lldb-mi/MICmdArgValConsume.h4
-rw-r--r--tools/lldb-mi/MICmdArgValFile.h4
-rw-r--r--tools/lldb-mi/MICmdArgValListBase.h2
-rw-r--r--tools/lldb-mi/MICmdArgValListOfN.h4
-rw-r--r--tools/lldb-mi/MICmdArgValNumber.h4
-rw-r--r--tools/lldb-mi/MICmdArgValOptionLong.h4
-rw-r--r--tools/lldb-mi/MICmdArgValOptionShort.cpp2
-rw-r--r--tools/lldb-mi/MICmdArgValOptionShort.h6
-rw-r--r--tools/lldb-mi/MICmdArgValPrintValues.h4
-rw-r--r--tools/lldb-mi/MICmdArgValString.cpp4
-rw-r--r--tools/lldb-mi/MICmdArgValString.h4
-rw-r--r--tools/lldb-mi/MICmdArgValThreadGrp.h4
-rw-r--r--tools/lldb-mi/MICmdBase.cpp6
-rw-r--r--tools/lldb-mi/MICmdBase.h2
-rw-r--r--tools/lldb-mi/MICmdCmd.h12
-rw-r--r--tools/lldb-mi/MICmdCmdBreak.cpp2
-rw-r--r--tools/lldb-mi/MICmdCmdBreak.h48
-rw-r--r--tools/lldb-mi/MICmdCmdData.cpp6
-rw-r--r--tools/lldb-mi/MICmdCmdData.h76
-rw-r--r--tools/lldb-mi/MICmdCmdEnviro.h8
-rw-r--r--tools/lldb-mi/MICmdCmdExec.h72
-rw-r--r--tools/lldb-mi/MICmdCmdFile.h12
-rw-r--r--tools/lldb-mi/MICmdCmdGdbInfo.h8
-rw-r--r--tools/lldb-mi/MICmdCmdGdbSet.h8
-rw-r--r--tools/lldb-mi/MICmdCmdGdbShow.h8
-rw-r--r--tools/lldb-mi/MICmdCmdGdbThread.h6
-rw-r--r--tools/lldb-mi/MICmdCmdMiscellanous.cpp2
-rw-r--r--tools/lldb-mi/MICmdCmdMiscellanous.h28
-rw-r--r--tools/lldb-mi/MICmdCmdStack.h56
-rw-r--r--tools/lldb-mi/MICmdCmdSupportInfo.h8
-rw-r--r--tools/lldb-mi/MICmdCmdSupportList.h6
-rw-r--r--tools/lldb-mi/MICmdCmdSymbol.h8
-rw-r--r--tools/lldb-mi/MICmdCmdTarget.h24
-rw-r--r--tools/lldb-mi/MICmdCmdThread.h8
-rw-r--r--tools/lldb-mi/MICmdCmdTrace.h6
-rw-r--r--tools/lldb-mi/MICmdCmdVar.h72
-rw-r--r--tools/lldb-mi/MICmdFactory.cpp4
-rw-r--r--tools/lldb-mi/MICmdFactory.h6
-rw-r--r--tools/lldb-mi/MICmdInterpreter.cpp8
-rw-r--r--tools/lldb-mi/MICmdInterpreter.h6
-rw-r--r--tools/lldb-mi/MICmdInvoker.cpp4
-rw-r--r--tools/lldb-mi/MICmdInvoker.h10
-rw-r--r--tools/lldb-mi/MICmdMgr.cpp2
-rw-r--r--tools/lldb-mi/MICmdMgr.h8
-rw-r--r--tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h2
-rw-r--r--tools/lldb-mi/MICmnBase.cpp2
-rw-r--r--tools/lldb-mi/MICmnLLDBBroadcaster.cpp4
-rw-r--r--tools/lldb-mi/MICmnLLDBBroadcaster.h8
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp12
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugSessionInfo.h10
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp4
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h4
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugger.cpp4
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugger.h12
-rw-r--r--tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp6
-rw-r--r--tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h6
-rw-r--r--tools/lldb-mi/MICmnLLDBProxySBValue.cpp4
-rw-r--r--tools/lldb-mi/MICmnLLDBProxySBValue.h4
-rw-r--r--tools/lldb-mi/MICmnLLDBUtilSBValue.cpp4
-rw-r--r--tools/lldb-mi/MICmnLLDBUtilSBValue.h2
-rw-r--r--tools/lldb-mi/MICmnLog.h12
-rw-r--r--tools/lldb-mi/MICmnLogMediumFile.cpp4
-rw-r--r--tools/lldb-mi/MICmnLogMediumFile.h12
-rw-r--r--tools/lldb-mi/MICmnMIOutOfBandRecord.h2
-rw-r--r--tools/lldb-mi/MICmnMIResultRecord.h2
-rw-r--r--tools/lldb-mi/MICmnMIValue.h2
-rw-r--r--tools/lldb-mi/MICmnMIValueConst.h2
-rw-r--r--tools/lldb-mi/MICmnMIValueList.cpp4
-rw-r--r--tools/lldb-mi/MICmnMIValueList.h2
-rw-r--r--tools/lldb-mi/MICmnMIValueResult.h2
-rw-r--r--tools/lldb-mi/MICmnMIValueTuple.h2
-rw-r--r--tools/lldb-mi/MICmnResources.cpp2
-rw-r--r--tools/lldb-mi/MICmnResources.h8
-rw-r--r--tools/lldb-mi/MICmnStreamStderr.cpp6
-rw-r--r--tools/lldb-mi/MICmnStreamStderr.h6
-rw-r--r--tools/lldb-mi/MICmnStreamStdin.h6
-rw-r--r--tools/lldb-mi/MICmnStreamStdout.cpp6
-rw-r--r--tools/lldb-mi/MICmnStreamStdout.h6
-rw-r--r--tools/lldb-mi/MICmnThreadMgrStd.h6
-rw-r--r--tools/lldb-mi/MIDataTypes.h6
-rw-r--r--tools/lldb-mi/MIDriver.cpp4
-rw-r--r--tools/lldb-mi/MIDriver.h46
-rw-r--r--tools/lldb-mi/MIDriverBase.cpp2
-rw-r--r--tools/lldb-mi/MIDriverMain.cpp4
-rw-r--r--tools/lldb-mi/MIDriverMgr.h8
-rw-r--r--tools/lldb-mi/MIUtilFileStd.h2
-rw-r--r--tools/lldb-mi/MIUtilMapIdToVariant.h14
-rw-r--r--tools/lldb-mi/MIUtilSingletonBase.h4
-rw-r--r--tools/lldb-mi/MIUtilSingletonHelper.h4
-rw-r--r--tools/lldb-mi/MIUtilString.h2
-rw-r--r--tools/lldb-mi/MIUtilSystemLinux.cpp2
-rw-r--r--tools/lldb-mi/MIUtilSystemOsx.cpp2
-rw-r--r--tools/lldb-mi/MIUtilSystemWindows.cpp2
-rw-r--r--tools/lldb-mi/MIUtilThreadBaseStd.cpp4
-rw-r--r--tools/lldb-mi/MIUtilVariant.h8
-rw-r--r--tools/lldb-server/lldb-gdbserver.cpp98
-rw-r--r--tools/lldb-server/lldb-platform.cpp61
101 files changed, 551 insertions, 528 deletions
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp
index 91b92d2..3b2eadd 100644
--- a/tools/driver/Driver.cpp
+++ b/tools/driver/Driver.cpp
@@ -452,7 +452,7 @@ Driver::OptionData::Clear ()
}
void
-Driver::OptionData::AddInitialCommand (const char *command, CommandPlacement placement, bool is_file, bool silent, SBError &error)
+Driver::OptionData::AddInitialCommand (const char *command, CommandPlacement placement, bool is_file, SBError &error)
{
std::vector<InitialCmdEntry> *command_set;
switch (placement)
@@ -472,18 +472,18 @@ Driver::OptionData::AddInitialCommand (const char *command, CommandPlacement pla
{
SBFileSpec file(command);
if (file.Exists())
- command_set->push_back (InitialCmdEntry(command, is_file, silent));
+ command_set->push_back (InitialCmdEntry(command, is_file));
else if (file.ResolveExecutableLocation())
{
char final_path[PATH_MAX];
file.GetPath (final_path, sizeof(final_path));
- command_set->push_back (InitialCmdEntry(final_path, is_file, silent));
+ command_set->push_back (InitialCmdEntry(final_path, is_file));
}
else
error.SetErrorStringWithFormat("file specified in --source (-s) option doesn't exist: '%s'", optarg);
}
else
- command_set->push_back (InitialCmdEntry(command, is_file, silent));
+ command_set->push_back (InitialCmdEntry(command, is_file));
}
void
@@ -746,10 +746,10 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exiting)
break;
case 'K':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterCrash, true, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterCrash, true, error);
break;
case 'k':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterCrash, false, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterCrash, false, error);
break;
case 'n':
@@ -770,16 +770,16 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exiting)
}
break;
case 's':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterFile, true, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterFile, true, error);
break;
case 'o':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterFile, false, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementAfterFile, false, error);
break;
case 'S':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementBeforeFile, true, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementBeforeFile, true, error);
break;
case 'O':
- m_option_data.AddInitialCommand(optarg, eCommandPlacementBeforeFile, false, true, error);
+ m_option_data.AddInitialCommand(optarg, eCommandPlacementBeforeFile, false, error);
break;
default:
m_option_data.m_print_help = true;
diff --git a/tools/driver/Driver.h b/tools/driver/Driver.h
index 38b1254..b1e536d 100644
--- a/tools/driver/Driver.h
+++ b/tools/driver/Driver.h
@@ -75,7 +75,7 @@ public:
Clear();
void
- AddInitialCommand (const char *command, CommandPlacement placement, bool is_file, bool quietly, lldb::SBError &error);
+ AddInitialCommand (const char *command, CommandPlacement placement, bool is_file, lldb::SBError &error);
//static OptionDefinition m_cmd_option_table[];
diff --git a/tools/lldb-mi/MICmdArgSet.h b/tools/lldb-mi/MICmdArgSet.h
index 00da679..0dd2933 100644
--- a/tools/lldb-mi/MICmdArgSet.h
+++ b/tools/lldb-mi/MICmdArgSet.h
@@ -28,7 +28,7 @@ class CMICmdArgValBase;
// Argument objects added to *this container are owned by this container
// and are deleted when this container goes out of scope. Allocate argument
// objects on the heap.
-// It is assummed the arguments to be parsed are read from left to right in
+// It is assumed the arguments to be parsed are read from left to right in
// order. The order added to *this container is the order they will parsed.
// Gotchas: None.
// Authors: Illya Rudkin 14/04/2014.
diff --git a/tools/lldb-mi/MICmdArgValBase.h b/tools/lldb-mi/MICmdArgValBase.h
index 0d0eedd..3aaae49 100644
--- a/tools/lldb-mi/MICmdArgValBase.h
+++ b/tools/lldb-mi/MICmdArgValBase.h
@@ -43,18 +43,18 @@ class CMICmdArgValBase : public CMICmdArgSet::IArg
// Overrideable:
public:
- /* dtor */ virtual ~CMICmdArgValBase(void);
+ /* dtor */ ~CMICmdArgValBase(void) override;
// Overridden:
public:
// From CMICmdArgSet::IArg
- virtual bool GetFound(void) const;
- virtual bool GetIsHandledByCmd(void) const;
- virtual bool GetIsMandatory(void) const;
- virtual bool GetIsMissingOptions(void) const;
- virtual const CMIUtilString &GetName(void) const;
- virtual bool GetValid(void) const;
- virtual bool Validate(CMICmdArgContext &vwArgContext);
+ bool GetFound(void) const override;
+ bool GetIsHandledByCmd(void) const override;
+ bool GetIsMandatory(void) const override;
+ bool GetIsMissingOptions(void) const override;
+ const CMIUtilString &GetName(void) const override;
+ bool GetValid(void) const override;
+ bool Validate(CMICmdArgContext &vwArgContext) override;
// Attributes:
protected:
diff --git a/tools/lldb-mi/MICmdArgValConsume.h b/tools/lldb-mi/MICmdArgValConsume.h
index 1d37b79..75768ff 100644
--- a/tools/lldb-mi/MICmdArgValConsume.h
+++ b/tools/lldb-mi/MICmdArgValConsume.h
@@ -45,7 +45,7 @@ class CMICmdArgValConsume : public CMICmdArgValBaseTemplate<CMIUtilString>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValConsume(void);
+ /* dtor */ ~CMICmdArgValConsume(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vwArgContext);
+ bool Validate(CMICmdArgContext &vwArgContext) override;
};
diff --git a/tools/lldb-mi/MICmdArgValFile.h b/tools/lldb-mi/MICmdArgValFile.h
index 196f21f..07abc4b 100644
--- a/tools/lldb-mi/MICmdArgValFile.h
+++ b/tools/lldb-mi/MICmdArgValFile.h
@@ -39,9 +39,9 @@ class CMICmdArgValFile : public CMICmdArgValBaseTemplate<CMIUtilString>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValFile(void);
+ /* dtor */ ~CMICmdArgValFile(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vwArgContext);
+ bool Validate(CMICmdArgContext &vwArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdArgValListBase.h b/tools/lldb-mi/MICmdArgValListBase.h
index 153af81..f013562 100644
--- a/tools/lldb-mi/MICmdArgValListBase.h
+++ b/tools/lldb-mi/MICmdArgValListBase.h
@@ -75,7 +75,7 @@ class CMICmdArgValListBase : public CMICmdArgValBaseTemplate<std::vector<CMICmdA
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValListBase(void);
+ /* dtor */ ~CMICmdArgValListBase(void) override;
// Methods:
protected:
diff --git a/tools/lldb-mi/MICmdArgValListOfN.h b/tools/lldb-mi/MICmdArgValListOfN.h
index 356b494..496bc65 100644
--- a/tools/lldb-mi/MICmdArgValListOfN.h
+++ b/tools/lldb-mi/MICmdArgValListOfN.h
@@ -49,9 +49,9 @@ class CMICmdArgValListOfN : public CMICmdArgValListBase
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValListOfN(void);
+ /* dtor */ ~CMICmdArgValListOfN(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vArgContext);
+ bool Validate(CMICmdArgContext &vArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdArgValNumber.h b/tools/lldb-mi/MICmdArgValNumber.h
index fea94b6..58a28b3 100644
--- a/tools/lldb-mi/MICmdArgValNumber.h
+++ b/tools/lldb-mi/MICmdArgValNumber.h
@@ -52,9 +52,9 @@ class CMICmdArgValNumber : public CMICmdArgValBaseTemplate<MIint64>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValNumber(void);
+ /* dtor */ ~CMICmdArgValNumber(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vwArgContext);
+ bool Validate(CMICmdArgContext &vwArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdArgValOptionLong.h b/tools/lldb-mi/MICmdArgValOptionLong.h
index ace939b..ac55c47 100644
--- a/tools/lldb-mi/MICmdArgValOptionLong.h
+++ b/tools/lldb-mi/MICmdArgValOptionLong.h
@@ -46,9 +46,9 @@ class CMICmdArgValOptionLong : public CMICmdArgValListBase
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValOptionLong(void);
+ /* dtor */ ~CMICmdArgValOptionLong(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vArgContext);
+ bool Validate(CMICmdArgContext &vArgContext) override;
// Methods:
protected:
diff --git a/tools/lldb-mi/MICmdArgValOptionShort.cpp b/tools/lldb-mi/MICmdArgValOptionShort.cpp
index 25eac67..d18f72e 100644
--- a/tools/lldb-mi/MICmdArgValOptionShort.cpp
+++ b/tools/lldb-mi/MICmdArgValOptionShort.cpp
@@ -80,7 +80,7 @@ CMICmdArgValOptionShort::IsArgShortOption(const CMIUtilString &vrTxt) const
return false;
// Look for -f short option
- nPos = vrTxt.find("-");
+ nPos = vrTxt.find('-');
if (nPos != 0)
return false;
diff --git a/tools/lldb-mi/MICmdArgValOptionShort.h b/tools/lldb-mi/MICmdArgValOptionShort.h
index 971a0d3..9157b37 100644
--- a/tools/lldb-mi/MICmdArgValOptionShort.h
+++ b/tools/lldb-mi/MICmdArgValOptionShort.h
@@ -44,11 +44,11 @@ class CMICmdArgValOptionShort : public CMICmdArgValOptionLong
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValOptionShort(void);
+ /* dtor */ ~CMICmdArgValOptionShort(void) override;
// Overridden:
private:
// From CMICmdArgValOptionLong
- virtual bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const;
- virtual bool ArgNameMatch(const CMIUtilString &vrTxt) const;
+ bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const override;
+ bool ArgNameMatch(const CMIUtilString &vrTxt) const override;
};
diff --git a/tools/lldb-mi/MICmdArgValPrintValues.h b/tools/lldb-mi/MICmdArgValPrintValues.h
index 37de923..9ac3238 100644
--- a/tools/lldb-mi/MICmdArgValPrintValues.h
+++ b/tools/lldb-mi/MICmdArgValPrintValues.h
@@ -38,9 +38,9 @@ class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValPrintValues(void);
+ /* dtor */ ~CMICmdArgValPrintValues(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vArgContext);
+ bool Validate(CMICmdArgContext &vArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdArgValString.cpp b/tools/lldb-mi/MICmdArgValString.cpp
index c8d3290..1c3e5f8 100644
--- a/tools/lldb-mi/MICmdArgValString.cpp
+++ b/tools/lldb-mi/MICmdArgValString.cpp
@@ -231,11 +231,11 @@ CMICmdArgValString::IsStringArgSingleText(const CMIUtilString &vrTxt) const
return false;
// Look for -f type short options, if found reject
- if ((0 == vrTxt.find("-")) && (vrTxt.length() == 2))
+ if ((0 == vrTxt.find('-')) && (vrTxt.length() == 2))
return false;
// Look for thread group i1 i2 i3...., if found reject
- if ((vrTxt.find("i") == 0) && ::isdigit(vrTxt[1]))
+ if ((vrTxt.find('i') == 0) && ::isdigit(vrTxt[1]))
return false;
// Look for numbers, if found reject
diff --git a/tools/lldb-mi/MICmdArgValString.h b/tools/lldb-mi/MICmdArgValString.h
index 54051d6..8b58a0a 100644
--- a/tools/lldb-mi/MICmdArgValString.h
+++ b/tools/lldb-mi/MICmdArgValString.h
@@ -41,9 +41,9 @@ class CMICmdArgValString : public CMICmdArgValBaseTemplate<CMIUtilString>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValString(void);
+ /* dtor */ ~CMICmdArgValString(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vrwArgContext);
+ bool Validate(CMICmdArgContext &vrwArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdArgValThreadGrp.h b/tools/lldb-mi/MICmdArgValThreadGrp.h
index d361f3a..64c1140 100644
--- a/tools/lldb-mi/MICmdArgValThreadGrp.h
+++ b/tools/lldb-mi/MICmdArgValThreadGrp.h
@@ -39,9 +39,9 @@ class CMICmdArgValThreadGrp : public CMICmdArgValBaseTemplate<MIuint>
// Overridden:
public:
// From CMICmdArgValBase
- /* dtor */ virtual ~CMICmdArgValThreadGrp(void);
+ /* dtor */ ~CMICmdArgValThreadGrp(void) override;
// From CMICmdArgSet::IArg
- virtual bool Validate(CMICmdArgContext &vArgContext);
+ bool Validate(CMICmdArgContext &vArgContext) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdBase.cpp b/tools/lldb-mi/MICmdBase.cpp
index de4fec2..97bf5a0 100644
--- a/tools/lldb-mi/MICmdBase.cpp
+++ b/tools/lldb-mi/MICmdBase.cpp
@@ -69,7 +69,7 @@ CMICmdBase::GetErrorDescription(void) const
// options description string.
// Type: Overridden.
// Args: None.
-// Return: CMIUtilString & - Command decription.
+// Return: CMIUtilString & - Command description.
// Throws: None.
//--
const CMIUtilString &
@@ -141,7 +141,7 @@ CMICmdBase::GetMIResultRecord(void) const
//++ ------------------------------------------------------------------------------------
// Details: Retrieve from the command additional MI result to its 1 line response.
-// Because of using LLDB addtional 'fake'/hack output is sometimes required to
+// Because of using LLDB additional 'fake'/hack output is sometimes required to
// help the driver client operate i.e. Eclipse.
// Type: Overridden.
// Args: None.
@@ -156,7 +156,7 @@ CMICmdBase::GetMIResultRecordExtra(void) const
//++ ------------------------------------------------------------------------------------
// Details: Hss *this command got additional MI result to its 1 line response.
-// Because of using LLDB addtional 'fake'/hack output is sometimes required to
+// Because of using LLDB additional 'fake'/hack output is sometimes required to
// help the driver client operate i.e. Eclipse.
// Type: Overridden.
// Args: None.
diff --git a/tools/lldb-mi/MICmdBase.h b/tools/lldb-mi/MICmdBase.h
index 7209f4f..df1e429 100644
--- a/tools/lldb-mi/MICmdBase.h
+++ b/tools/lldb-mi/MICmdBase.h
@@ -25,7 +25,7 @@ class CMICmnLLDBDebugSessionInfo;
//++ ============================================================================
// Details: MI command base class. MI commands derive from this base class.
// The Command Factory creates command objects and passes them to the
-// Command Invoker. The Invoker takes ownersip of any commands created
+// Command Invoker. The Invoker takes ownership of any commands created
// which means it is the only object to delete them when a command is
// finished working. Commands do not delete themselves.
// There are two types of command implicitly defined by the state of
diff --git a/tools/lldb-mi/MICmdCmd.h b/tools/lldb-mi/MICmdCmd.h
index a360ad6..2669764 100644
--- a/tools/lldb-mi/MICmdCmd.h
+++ b/tools/lldb-mi/MICmdCmd.h
@@ -59,10 +59,10 @@ class CMICmdCmdEnablePrettyPrinting : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdEnablePrettyPrinting(void);
+ /* dtor */ ~CMICmdCmdEnablePrettyPrinting(void) override;
};
//++ ============================================================================
@@ -86,8 +86,8 @@ class CMICmdCmdSource : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdSource(void);
+ /* dtor */ ~CMICmdCmdSource(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdBreak.cpp b/tools/lldb-mi/MICmdCmdBreak.cpp
index 1b34809..8a310c7 100644
--- a/tools/lldb-mi/MICmdCmdBreak.cpp
+++ b/tools/lldb-mi/MICmdCmdBreak.cpp
@@ -1009,7 +1009,7 @@ CMICmdCmdBreakCondition::CreateSelf(void)
// a single string i.e. '2' -> ok.
// a quoted string i.e. "a > 100" -> ok
// a non quoted string i.e. 'a > 100' -> not ok
-// CMICmdArgValString only extracts the first space seperated string, the "a".
+// CMICmdArgValString only extracts the first space separated string, the "a".
// This function using the optional argument type CMICmdArgValListOfN collects
// the rest of the expression so that is may be added to the 'a' part to form a
// complete expression string i.e. "a > 100".
diff --git a/tools/lldb-mi/MICmdCmdBreak.h b/tools/lldb-mi/MICmdCmdBreak.h
index 06a3434..476ab45 100644
--- a/tools/lldb-mi/MICmdCmdBreak.h
+++ b/tools/lldb-mi/MICmdCmdBreak.h
@@ -53,11 +53,11 @@ class CMICmdCmdBreakInsert : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakInsert(void);
+ /* dtor */ ~CMICmdCmdBreakInsert(void) override;
// Enumerations:
private:
@@ -122,11 +122,11 @@ class CMICmdCmdBreakDelete : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakDelete(void);
+ /* dtor */ ~CMICmdCmdBreakDelete(void) override;
// Attributes:
private:
@@ -155,11 +155,11 @@ class CMICmdCmdBreakDisable : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakDisable(void);
+ /* dtor */ ~CMICmdCmdBreakDisable(void) override;
// Attributes:
private:
@@ -190,11 +190,11 @@ class CMICmdCmdBreakEnable : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakEnable(void);
+ /* dtor */ ~CMICmdCmdBreakEnable(void) override;
// Attributes:
private:
@@ -225,11 +225,11 @@ class CMICmdCmdBreakAfter : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakAfter(void);
+ /* dtor */ ~CMICmdCmdBreakAfter(void) override;
// Attributes:
private:
@@ -261,11 +261,11 @@ class CMICmdCmdBreakCondition : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdBreakCondition(void);
+ /* dtor */ ~CMICmdCmdBreakCondition(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmdCmdData.cpp b/tools/lldb-mi/MICmdCmdData.cpp
index bd02093..0b950d5 100644
--- a/tools/lldb-mi/MICmdCmdData.cpp
+++ b/tools/lldb-mi/MICmdCmdData.cpp
@@ -1750,8 +1750,8 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
// LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:3[:1]
// ^^^^^^^^^^^^^^^^^^ -- start address
- const size_t nStartAddressStartPos = rLine.find("[");
- const size_t nStartAddressEndPos = rLine.find("-");
+ const size_t nStartAddressStartPos = rLine.find('[');
+ const size_t nStartAddressEndPos = rLine.find('-');
const size_t nStartAddressLen = nStartAddressEndPos - nStartAddressStartPos - 1;
const CMIUtilString strStartAddress(rLine.substr(nStartAddressStartPos + 1, nStartAddressLen).c_str());
const CMICmnMIValueConst miValueConst(strStartAddress);
@@ -1760,7 +1760,7 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
// LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:3[:1]
// ^^^^^^^^^^^^^^^^^^ -- end address
- const size_t nEndAddressEndPos = rLine.find(")");
+ const size_t nEndAddressEndPos = rLine.find(')');
const size_t nEndAddressLen = nEndAddressEndPos - nStartAddressEndPos - 1;
const CMIUtilString strEndAddress(rLine.substr(nStartAddressEndPos + 1, nEndAddressLen).c_str());
const CMICmnMIValueConst miValueConst2(strEndAddress);
diff --git a/tools/lldb-mi/MICmdCmdData.h b/tools/lldb-mi/MICmdCmdData.h
index 11873e9..5764410 100644
--- a/tools/lldb-mi/MICmdCmdData.h
+++ b/tools/lldb-mi/MICmdCmdData.h
@@ -60,11 +60,11 @@ class CMICmdCmdDataEvaluateExpression : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataEvaluateExpression(void);
+ /* dtor */ ~CMICmdCmdDataEvaluateExpression(void) override;
// Methods:
private:
@@ -105,11 +105,11 @@ class CMICmdCmdDataDisassemble : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataDisassemble(void);
+ /* dtor */ ~CMICmdCmdDataDisassemble(void) override;
// Attributes:
private:
@@ -142,11 +142,11 @@ class CMICmdCmdDataReadMemoryBytes : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataReadMemoryBytes(void);
+ /* dtor */ ~CMICmdCmdDataReadMemoryBytes(void) override;
// Attributes:
private:
@@ -181,10 +181,10 @@ class CMICmdCmdDataReadMemory : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataReadMemory(void);
+ /* dtor */ ~CMICmdCmdDataReadMemory(void) override;
};
//++ ============================================================================
@@ -208,11 +208,11 @@ class CMICmdCmdDataListRegisterNames : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataListRegisterNames(void);
+ /* dtor */ ~CMICmdCmdDataListRegisterNames(void) override;
// Methods:
private:
@@ -246,11 +246,11 @@ class CMICmdCmdDataListRegisterValues : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataListRegisterValues(void);
+ /* dtor */ ~CMICmdCmdDataListRegisterValues(void) override;
// Methods:
private:
@@ -287,10 +287,10 @@ class CMICmdCmdDataListRegisterChanged : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataListRegisterChanged(void);
+ /* dtor */ ~CMICmdCmdDataListRegisterChanged(void) override;
};
//++ ============================================================================
@@ -314,11 +314,11 @@ class CMICmdCmdDataWriteMemoryBytes : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataWriteMemoryBytes(void);
+ /* dtor */ ~CMICmdCmdDataWriteMemoryBytes(void) override;
// Attributes:
private:
@@ -351,11 +351,11 @@ class CMICmdCmdDataWriteMemory : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataWriteMemory(void);
+ /* dtor */ ~CMICmdCmdDataWriteMemory(void) override;
// Attributes:
private:
@@ -390,11 +390,11 @@ class CMICmdCmdDataInfoLine : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdDataInfoLine(void);
+ /* dtor */ ~CMICmdCmdDataInfoLine(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdEnviro.h b/tools/lldb-mi/MICmdCmdEnviro.h
index 1fb699e..7d5cf98 100644
--- a/tools/lldb-mi/MICmdCmdEnviro.h
+++ b/tools/lldb-mi/MICmdCmdEnviro.h
@@ -46,11 +46,11 @@ class CMICmdCmdEnvironmentCd : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdEnvironmentCd(void);
+ /* dtor */ ~CMICmdCmdEnvironmentCd(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdExec.h b/tools/lldb-mi/MICmdCmdExec.h
index 8889fb9..94d646f 100644
--- a/tools/lldb-mi/MICmdCmdExec.h
+++ b/tools/lldb-mi/MICmdCmdExec.h
@@ -56,10 +56,10 @@ class CMICmdCmdExecRun : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecRun(void);
+ /* dtor */ ~CMICmdCmdExecRun(void) override;
// Attributes:
private:
@@ -87,10 +87,10 @@ class CMICmdCmdExecContinue : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecContinue(void);
+ /* dtor */ ~CMICmdCmdExecContinue(void) override;
// Attributes:
private:
@@ -118,11 +118,11 @@ class CMICmdCmdExecNext : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecNext(void);
+ /* dtor */ ~CMICmdCmdExecNext(void) override;
// Attributes:
private:
@@ -152,11 +152,11 @@ class CMICmdCmdExecStep : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecStep(void);
+ /* dtor */ ~CMICmdCmdExecStep(void) override;
// Attributes:
private:
@@ -186,11 +186,11 @@ class CMICmdCmdExecNextInstruction : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecNextInstruction(void);
+ /* dtor */ ~CMICmdCmdExecNextInstruction(void) override;
// Attributes:
private:
@@ -220,11 +220,11 @@ class CMICmdCmdExecStepInstruction : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecStepInstruction(void);
+ /* dtor */ ~CMICmdCmdExecStepInstruction(void) override;
// Attributes:
private:
@@ -254,11 +254,11 @@ class CMICmdCmdExecFinish : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecFinish(void);
+ /* dtor */ ~CMICmdCmdExecFinish(void) override;
// Attributes:
private:
@@ -290,10 +290,10 @@ class CMICmdCmdExecInterrupt : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecInterrupt(void);
+ /* dtor */ ~CMICmdCmdExecInterrupt(void) override;
// Attributes:
private:
@@ -321,11 +321,11 @@ class CMICmdCmdExecArguments : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecArguments(void);
+ /* dtor */ ~CMICmdCmdExecArguments(void) override;
// Attributes:
private:
@@ -350,8 +350,8 @@ class CMICmdCmdExecAbort : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdExecAbort(void);
+ /* dtor */ ~CMICmdCmdExecAbort(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdFile.h b/tools/lldb-mi/MICmdCmdFile.h
index 307f4f8..2c1b59c 100644
--- a/tools/lldb-mi/MICmdCmdFile.h
+++ b/tools/lldb-mi/MICmdCmdFile.h
@@ -29,7 +29,7 @@
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "file-exec-and-symbols".
// This command does not follow the MI documentation exactly.
-// Gotchas: This command has additonal flags that were not available in GDB MI.
+// Gotchas: This command has additional flags that were not available in GDB MI.
// See MIextensions.txt for details.
// Authors: Illya Rudkin 25/02/2014.
// Changes: None.
@@ -48,12 +48,12 @@ class CMICmdCmdFileExecAndSymbols : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdFileExecAndSymbols(void);
- virtual bool GetExitAppOnCommandFailure(void) const;
+ /* dtor */ ~CMICmdCmdFileExecAndSymbols(void) override;
+ bool GetExitAppOnCommandFailure(void) const override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdGdbInfo.h b/tools/lldb-mi/MICmdCmdGdbInfo.h
index eb60f82..a1b5770 100644
--- a/tools/lldb-mi/MICmdCmdGdbInfo.h
+++ b/tools/lldb-mi/MICmdCmdGdbInfo.h
@@ -55,11 +55,11 @@ class CMICmdCmdGdbInfo : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdGdbInfo(void);
+ /* dtor */ ~CMICmdCmdGdbInfo(void) override;
// Typedefs:
private:
diff --git a/tools/lldb-mi/MICmdCmdGdbSet.h b/tools/lldb-mi/MICmdCmdGdbSet.h
index 0095f81..84d21f0 100644
--- a/tools/lldb-mi/MICmdCmdGdbSet.h
+++ b/tools/lldb-mi/MICmdCmdGdbSet.h
@@ -55,11 +55,11 @@ class CMICmdCmdGdbSet : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdGdbSet(void);
+ /* dtor */ ~CMICmdCmdGdbSet(void) override;
// Typedefs:
private:
diff --git a/tools/lldb-mi/MICmdCmdGdbShow.h b/tools/lldb-mi/MICmdCmdGdbShow.h
index 5cb4cb5..6ca5ef8 100644
--- a/tools/lldb-mi/MICmdCmdGdbShow.h
+++ b/tools/lldb-mi/MICmdCmdGdbShow.h
@@ -52,11 +52,11 @@ class CMICmdCmdGdbShow : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdGdbShow(void);
+ /* dtor */ ~CMICmdCmdGdbShow(void) override;
// Typedefs:
private:
diff --git a/tools/lldb-mi/MICmdCmdGdbThread.h b/tools/lldb-mi/MICmdCmdGdbThread.h
index a4b8596..6a3804a 100644
--- a/tools/lldb-mi/MICmdCmdGdbThread.h
+++ b/tools/lldb-mi/MICmdCmdGdbThread.h
@@ -44,8 +44,8 @@ class CMICmdCmdGdbThread : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdGdbThread(void);
+ /* dtor */ ~CMICmdCmdGdbThread(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdMiscellanous.cpp b/tools/lldb-mi/MICmdCmdMiscellanous.cpp
index 37cae40..3abc7c4 100644
--- a/tools/lldb-mi/MICmdCmdMiscellanous.cpp
+++ b/tools/lldb-mi/MICmdCmdMiscellanous.cpp
@@ -184,7 +184,7 @@ CMICmdCmdListThreadGroups::ParseArgs(void)
//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this function.
// The command is likely to communicate with the LLDB SBDebugger in here.
-// Synopis: -list-thread-groups [ --available ] [ --recurse 1 ] [ group ... ]
+// Synopsis: -list-thread-groups [ --available ] [ --recurse 1 ] [ group ... ]
// This command does not follow the MI documentation exactly. Has an extra
// argument "i1" to handle.
// Ref:
diff --git a/tools/lldb-mi/MICmdCmdMiscellanous.h b/tools/lldb-mi/MICmdCmdMiscellanous.h
index ffc691c..8765549 100644
--- a/tools/lldb-mi/MICmdCmdMiscellanous.h
+++ b/tools/lldb-mi/MICmdCmdMiscellanous.h
@@ -52,10 +52,10 @@ class CMICmdCmdGdbExit : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdGdbExit(void);
+ /* dtor */ ~CMICmdCmdGdbExit(void) override;
};
//++ ============================================================================
@@ -81,11 +81,11 @@ class CMICmdCmdListThreadGroups : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdListThreadGroups(void);
+ /* dtor */ ~CMICmdCmdListThreadGroups(void) override;
// Typedefs:
private:
@@ -124,11 +124,11 @@ class CMICmdCmdInterpreterExec : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdInterpreterExec(void);
+ /* dtor */ ~CMICmdCmdInterpreterExec(void) override;
// Attributes:
private:
@@ -158,8 +158,8 @@ class CMICmdCmdInferiorTtySet : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdInferiorTtySet(void);
+ /* dtor */ ~CMICmdCmdInferiorTtySet(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdStack.h b/tools/lldb-mi/MICmdCmdStack.h
index ed141fc..274415a 100644
--- a/tools/lldb-mi/MICmdCmdStack.h
+++ b/tools/lldb-mi/MICmdCmdStack.h
@@ -51,11 +51,11 @@ class CMICmdCmdStackInfoDepth : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackInfoDepth(void);
+ /* dtor */ ~CMICmdCmdStackInfoDepth(void) override;
// Attributes:
private:
@@ -82,11 +82,11 @@ class CMICmdCmdStackInfoFrame : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackInfoFrame(void);
+ /* dtor */ ~CMICmdCmdStackInfoFrame(void) override;
// Attributes:
private:
@@ -114,11 +114,11 @@ class CMICmdCmdStackListFrames : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackListFrames(void);
+ /* dtor */ ~CMICmdCmdStackListFrames(void) override;
// Typedefs:
private:
@@ -154,11 +154,11 @@ class CMICmdCmdStackListArguments : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackListArguments(void);
+ /* dtor */ ~CMICmdCmdStackListArguments(void) override;
// Attributes:
private:
@@ -191,11 +191,11 @@ class CMICmdCmdStackListLocals : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackListLocals(void);
+ /* dtor */ ~CMICmdCmdStackListLocals(void) override;
// Attributes:
private:
@@ -224,11 +224,11 @@ public:
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackListVariables(void);
+ /* dtor */ ~CMICmdCmdStackListVariables(void) override;
// Attributes
private:
@@ -257,11 +257,11 @@ class CMICmdCmdStackSelectFrame : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdStackSelectFrame(void);
+ /* dtor */ ~CMICmdCmdStackSelectFrame(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdSupportInfo.h b/tools/lldb-mi/MICmdCmdSupportInfo.h
index a8c2252..8dfcfba 100644
--- a/tools/lldb-mi/MICmdCmdSupportInfo.h
+++ b/tools/lldb-mi/MICmdCmdSupportInfo.h
@@ -45,11 +45,11 @@ class CMICmdCmdSupportInfoMiCmdQuery : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdSupportInfoMiCmdQuery(void);
+ /* dtor */ ~CMICmdCmdSupportInfoMiCmdQuery(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdSupportList.h b/tools/lldb-mi/MICmdCmdSupportList.h
index 16c140b..a317b07 100644
--- a/tools/lldb-mi/MICmdCmdSupportList.h
+++ b/tools/lldb-mi/MICmdCmdSupportList.h
@@ -45,8 +45,8 @@ class CMICmdCmdSupportListFeatures : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdSupportListFeatures(void);
+ /* dtor */ ~CMICmdCmdSupportListFeatures(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdSymbol.h b/tools/lldb-mi/MICmdCmdSymbol.h
index 449d8ae..ef268bb 100644
--- a/tools/lldb-mi/MICmdCmdSymbol.h
+++ b/tools/lldb-mi/MICmdCmdSymbol.h
@@ -44,11 +44,11 @@ class CMICmdCmdSymbolListLines : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdSymbolListLines(void);
+ /* dtor */ ~CMICmdCmdSymbolListLines(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdCmdTarget.h b/tools/lldb-mi/MICmdCmdTarget.h
index b381030..62f77ee 100644
--- a/tools/lldb-mi/MICmdCmdTarget.h
+++ b/tools/lldb-mi/MICmdCmdTarget.h
@@ -47,11 +47,11 @@ class CMICmdCmdTargetSelect : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdTargetSelect(void);
+ /* dtor */ ~CMICmdCmdTargetSelect(void) override;
// Attributes:
private:
@@ -78,11 +78,11 @@ public:
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdTargetAttach(void);
+ /* dtor */ ~CMICmdCmdTargetAttach(void) override;
// Attributes:
private:
@@ -110,10 +110,10 @@ public:
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdTargetDetach(void);
+ /* dtor */ ~CMICmdCmdTargetDetach(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdThread.h b/tools/lldb-mi/MICmdCmdThread.h
index 6b268f4..7bce823 100644
--- a/tools/lldb-mi/MICmdCmdThread.h
+++ b/tools/lldb-mi/MICmdCmdThread.h
@@ -46,11 +46,11 @@ class CMICmdCmdThreadInfo : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdThreadInfo(void);
+ /* dtor */ ~CMICmdCmdThreadInfo(void) override;
// Typedefs:
private:
diff --git a/tools/lldb-mi/MICmdCmdTrace.h b/tools/lldb-mi/MICmdCmdTrace.h
index c9a6f72..cafe2d8 100644
--- a/tools/lldb-mi/MICmdCmdTrace.h
+++ b/tools/lldb-mi/MICmdCmdTrace.h
@@ -44,8 +44,8 @@ class CMICmdCmdTraceStatus : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdTraceStatus(void);
+ /* dtor */ ~CMICmdCmdTraceStatus(void) override;
};
diff --git a/tools/lldb-mi/MICmdCmdVar.h b/tools/lldb-mi/MICmdCmdVar.h
index b6b6572..9f5ad1c 100644
--- a/tools/lldb-mi/MICmdCmdVar.h
+++ b/tools/lldb-mi/MICmdCmdVar.h
@@ -59,14 +59,14 @@ class CMICmdCmdVarCreate : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarCreate(void);
+ /* dtor */ ~CMICmdCmdVarCreate(void) override;
// Methods:
private:
@@ -110,14 +110,14 @@ class CMICmdCmdVarUpdate : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarUpdate(void);
+ /* dtor */ ~CMICmdCmdVarUpdate(void) override;
// Methods:
private:
@@ -153,11 +153,11 @@ class CMICmdCmdVarDelete : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarDelete(void);
+ /* dtor */ ~CMICmdCmdVarDelete(void) override;
// Attribute:
private:
@@ -185,11 +185,11 @@ class CMICmdCmdVarAssign : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarAssign(void);
+ /* dtor */ ~CMICmdCmdVarAssign(void) override;
// Attributes:
private:
@@ -220,11 +220,11 @@ class CMICmdCmdVarSetFormat : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarSetFormat(void);
+ /* dtor */ ~CMICmdCmdVarSetFormat(void) override;
// Attributes:
private:
@@ -254,11 +254,11 @@ class CMICmdCmdVarListChildren : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarListChildren(void);
+ /* dtor */ ~CMICmdCmdVarListChildren(void) override;
// Attributes:
private:
@@ -293,11 +293,11 @@ class CMICmdCmdVarEvaluateExpression : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarEvaluateExpression(void);
+ /* dtor */ ~CMICmdCmdVarEvaluateExpression(void) override;
// Attributes:
private:
@@ -328,11 +328,11 @@ class CMICmdCmdVarInfoPathExpression : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarInfoPathExpression(void);
+ /* dtor */ ~CMICmdCmdVarInfoPathExpression(void) override;
// Attributes:
private:
@@ -362,11 +362,11 @@ class CMICmdCmdVarShowAttributes : public CMICmdBase
// Overridden:
public:
// From CMICmdInvoker::ICmd
- virtual bool Execute(void);
- virtual bool Acknowledge(void);
- virtual bool ParseArgs(void);
+ bool Execute(void) override;
+ bool Acknowledge(void) override;
+ bool ParseArgs(void) override;
// From CMICmnBase
- /* dtor */ virtual ~CMICmdCmdVarShowAttributes(void);
+ /* dtor */ ~CMICmdCmdVarShowAttributes(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdFactory.cpp b/tools/lldb-mi/MICmdFactory.cpp
index 3fe4062..717a497 100644
--- a/tools/lldb-mi/MICmdFactory.cpp
+++ b/tools/lldb-mi/MICmdFactory.cpp
@@ -85,7 +85,7 @@ CMICmdFactory::Shutdown(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Register a command's creator function with the command identitier the MI
+// Details: Register a command's creator function with the command identifier the MI
// command name i.e. 'file-exec-and-symbols'.
// Type: Method.
// Args: vMiCmd - (R) Command's name, the MI command.
@@ -159,7 +159,7 @@ CMICmdFactory::IsValid(const CMIUtilString &vMiCmd) const
return false;
}
- const size_t nPos = vMiCmd.find(" ");
+ const size_t nPos = vMiCmd.find(' ');
if (nPos != std::string::npos)
bValid = false;
diff --git a/tools/lldb-mi/MICmdFactory.h b/tools/lldb-mi/MICmdFactory.h
index 8ad64fb..9a5e076 100644
--- a/tools/lldb-mi/MICmdFactory.h
+++ b/tools/lldb-mi/MICmdFactory.h
@@ -55,8 +55,8 @@ class CMICmdFactory : public CMICmnBase, public MI::ISingleton<CMICmdFactory>
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool CmdRegister(const CMIUtilString &vMiCmd, CmdCreatorFnPtr vCmdCreateFn);
bool CmdCreate(const CMIUtilString &vMiCmd, const SMICmdData &vCmdData, CMICmdBase *&vpNewCmd);
bool CmdExist(const CMIUtilString &vMiCmd) const;
@@ -73,7 +73,7 @@ class CMICmdFactory : public CMICmnBase, public MI::ISingleton<CMICmdFactory>
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdFactory(void);
+ /* dtor */ ~CMICmdFactory(void) override;
// Typedefs:
private:
diff --git a/tools/lldb-mi/MICmdInterpreter.cpp b/tools/lldb-mi/MICmdInterpreter.cpp
index ce5d30e..3c5285f 100644
--- a/tools/lldb-mi/MICmdInterpreter.cpp
+++ b/tools/lldb-mi/MICmdInterpreter.cpp
@@ -153,7 +153,7 @@ bool
CMICmdInterpreter::MiHasCmdTokenEndingHyphen(const CMIUtilString &vTextLine)
{
// The hyphen is mandatory
- const size_t nPos = vTextLine.find("-", 0);
+ const size_t nPos = vTextLine.find('-', 0);
if ((nPos == std::string::npos))
return false;
@@ -215,7 +215,7 @@ CMICmdInterpreter::MiHasCmdTokenEndingAlpha(const CMIUtilString &vTextLine)
bool
CMICmdInterpreter::MiHasCmdTokenPresent(const CMIUtilString &vTextLine)
{
- const size_t nPos = vTextLine.find("-", 0);
+ const size_t nPos = vTextLine.find('-', 0);
return (nPos > 0);
}
@@ -246,12 +246,12 @@ CMICmdInterpreter::MiHasCmd(const CMIUtilString &vTextLine)
}
else
{
- nPos = vTextLine.find("-", 0);
+ nPos = vTextLine.find('-', 0);
}
bool bFoundCmd = false;
const size_t nLen = vTextLine.length();
- const size_t nPos2 = vTextLine.find(" ", nPos);
+ const size_t nPos2 = vTextLine.find(' ', nPos);
if (nPos2 != std::string::npos)
{
if (nPos2 == nLen)
diff --git a/tools/lldb-mi/MICmdInterpreter.h b/tools/lldb-mi/MICmdInterpreter.h
index acb0522..e243084 100644
--- a/tools/lldb-mi/MICmdInterpreter.h
+++ b/tools/lldb-mi/MICmdInterpreter.h
@@ -35,8 +35,8 @@ class CMICmdInterpreter : public CMICmnBase, public MI::ISingleton<CMICmdInterpr
public:
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool ValidateIsMi(const CMIUtilString &vTextLine, bool &vwbYesValid, bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
// Methods:
@@ -55,7 +55,7 @@ class CMICmdInterpreter : public CMICmnBase, public MI::ISingleton<CMICmdInterpr
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdInterpreter(void);
+ /* dtor */ ~CMICmdInterpreter(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdInvoker.cpp b/tools/lldb-mi/MICmdInvoker.cpp
index ef957c5..9f82e92 100644
--- a/tools/lldb-mi/MICmdInvoker.cpp
+++ b/tools/lldb-mi/MICmdInvoker.cpp
@@ -176,7 +176,7 @@ CMICmdInvoker::CmdAdd(const CMICmdBase &vCmd)
//++ ------------------------------------------------------------------------------------
// Details: Having previously had the potential command validated and found valid now
// get the command executed.
-// If the Functionalityity returns MIstatus::failure call GetErrorDescription().
+// If the Functionality returns MIstatus::failure call GetErrorDescription().
// This function is used by the application's main thread.
// Type: Method.
// Args: vCmd - (RW) Command object.
@@ -220,7 +220,7 @@ CMICmdInvoker::CmdExecute(CMICmdBase &vCmd)
//++ ------------------------------------------------------------------------------------
// Details: Called when a command has finished its Execution() work either synchronously
-// because the command executed was the type a non event type or asynchronoulsy
+// because the command executed was the type a non event type or asynchronously
// via the command's callback (because of an SB Listener event). Needs to be called
// so that *this invoker call do some house keeping and then proceed to call
// the command's Acknowledge() function.
diff --git a/tools/lldb-mi/MICmdInvoker.h b/tools/lldb-mi/MICmdInvoker.h
index a03c2d3..b178d43 100644
--- a/tools/lldb-mi/MICmdInvoker.h
+++ b/tools/lldb-mi/MICmdInvoker.h
@@ -33,7 +33,7 @@ class CMICmnStreamStdout;
// exceed a time limit which if it exceeds informs the command(s) to
// stop work.
// The work by the Invoker is carried out in the main thread.
-// The Invoker takes ownersip of any commands created which means it
+// The Invoker takes ownership of any commands created which means it
// is the only object to delete them when a command is finished working.
// A singleton class.
// Gotchas: None.
@@ -68,8 +68,8 @@ class CMICmdInvoker : public CMICmnBase, public CMICmdMgrSetCmdDeleteCallback::I
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool CmdExecute(CMICmdBase &vCmd);
bool CmdExecuteFinished(CMICmdBase &vCmd);
@@ -92,9 +92,9 @@ class CMICmdInvoker : public CMICmnBase, public CMICmdMgrSetCmdDeleteCallback::I
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdInvoker(void);
+ /* dtor */ ~CMICmdInvoker(void) override;
// From CMICmdMgrSetCmdDeleteCallback::ICallback
- virtual void Delete(SMICmdData &vCmd);
+ void Delete(SMICmdData &vCmd) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdMgr.cpp b/tools/lldb-mi/MICmdMgr.cpp
index 998a72f..76dbff6 100644
--- a/tools/lldb-mi/MICmdMgr.cpp
+++ b/tools/lldb-mi/MICmdMgr.cpp
@@ -170,7 +170,7 @@ CMICmdMgr::CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid, bool
//++ ------------------------------------------------------------------------------------
// Details: Having previously had the potential command validated and found valid now
// get the command executed.
-// If the Functionalityity returns MIstatus::failure call GetErrorDescription().
+// If the Functionality returns MIstatus::failure call GetErrorDescription().
// This function is used by the application's main thread.
// Type: Method.
// Args: vCmdData - (RW) Command meta data.
diff --git a/tools/lldb-mi/MICmdMgr.h b/tools/lldb-mi/MICmdMgr.h
index a45ecb6..4956d5c 100644
--- a/tools/lldb-mi/MICmdMgr.h
+++ b/tools/lldb-mi/MICmdMgr.h
@@ -27,7 +27,7 @@ class CMICmdBase;
//++ ============================================================================
// Details: MI command manager. Oversees command operations, controls command
// production and the running of commands.
-// Command Invoker, Command Factory and Command Monitor while independant
+// Command Invoker, Command Factory and Command Monitor while independent
// units are overseen/managed by *this manager.
// A singleton class.
// Gotchas: None.
@@ -40,8 +40,8 @@ class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr>
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid, bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
bool CmdExecute(const SMICmdData &vCmdData);
@@ -58,7 +58,7 @@ class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr>
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmdMgr(void);
+ /* dtor */ ~CMICmdMgr(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h b/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h
index 16b11e5..1c9be82 100644
--- a/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h
+++ b/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h
@@ -64,7 +64,7 @@ class CSetClients : public std::set<class ICallback *>, public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CSetClients(void);
+ /* dtor */ ~CSetClients(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnBase.cpp b/tools/lldb-mi/MICmnBase.cpp
index 9093935..0d9eda7 100644
--- a/tools/lldb-mi/MICmnBase.cpp
+++ b/tools/lldb-mi/MICmnBase.cpp
@@ -46,7 +46,7 @@ CMICmnBase::~CMICmnBase(void)
// Details: Retrieve whether *this object has an error description set.
// Type: Method.
// Args: None.
-// Return: bool - True = Yes already defined, false = empty discription.
+// Return: bool - True = Yes already defined, false = empty description.
// Throws: None.
//--
bool
diff --git a/tools/lldb-mi/MICmnLLDBBroadcaster.cpp b/tools/lldb-mi/MICmnLLDBBroadcaster.cpp
index 55927b6..8bad243 100644
--- a/tools/lldb-mi/MICmnLLDBBroadcaster.cpp
+++ b/tools/lldb-mi/MICmnLLDBBroadcaster.cpp
@@ -35,7 +35,7 @@ CMICmnLLDBBroadcaster::~CMICmnLLDBBroadcaster(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Initialize resources for *this broardcaster object.
+// Details: Initialize resources for *this broadcaster object.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functionality succeeded.
@@ -56,7 +56,7 @@ CMICmnLLDBBroadcaster::Initialize(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Release resources for *this broardcaster object.
+// Details: Release resources for *this broadcaster object.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functionality succeeded.
diff --git a/tools/lldb-mi/MICmnLLDBBroadcaster.h b/tools/lldb-mi/MICmnLLDBBroadcaster.h
index 469aae9..dc0de47 100644
--- a/tools/lldb-mi/MICmnLLDBBroadcaster.h
+++ b/tools/lldb-mi/MICmnLLDBBroadcaster.h
@@ -15,7 +15,7 @@
#include "MIUtilSingletonBase.h"
//++ ============================================================================
-// Details: MI derived class from LLDB SBBroardcaster API.
+// Details: MI derived class from LLDB SBBroadcaster API.
//
// *** This class (files) is a place holder until we know we need it or
// *** not
@@ -31,8 +31,8 @@ class CMICmnLLDBBroadcaster : public CMICmnBase, public lldb::SBBroadcaster, pub
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
// Methods:
private:
/* ctor */ CMICmnLLDBBroadcaster(void);
@@ -42,5 +42,5 @@ class CMICmnLLDBBroadcaster : public CMICmnBase, public lldb::SBBroadcaster, pub
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLLDBBroadcaster(void);
+ /* dtor */ ~CMICmnLLDBBroadcaster(void) override;
};
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
index cff651d..cf74fe5 100644
--- a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
@@ -231,7 +231,7 @@ CMICmnLLDBDebugSessionInfo::GetThreadFrames(const SMICmdData &vCmdData, const MI
// MI print
// "frame={level=\"%d\",addr=\"0x%016" PRIx64 "\",func=\"%s\",args=[%s],file=\"%s\",fullname=\"%s\",line=\"%d\"},frame={level=\"%d\",addr=\"0x%016" PRIx64 "\",func=\"%s\",args=[%s],file=\"%s\",fullname=\"%s\",line=\"%d\"},
// ..."
- CMIUtilString strListCommaSeperated;
+ CMIUtilString strListCommaSeparated;
for (MIuint nLevel = 0; nLevel < nFrames; nLevel++)
{
CMICmnMIValueTuple miValueTuple;
@@ -240,11 +240,11 @@ CMICmnLLDBDebugSessionInfo::GetThreadFrames(const SMICmdData &vCmdData, const MI
const CMICmnMIValueResult miValueResult2("frame", miValueTuple);
if (nLevel != 0)
- strListCommaSeperated += ",";
- strListCommaSeperated += miValueResult2.GetString();
+ strListCommaSeparated += ",";
+ strListCommaSeparated += miValueResult2.GetString();
}
- vwrThreadFrames = strListCommaSeperated;
+ vwrThreadFrames = strListCommaSeparated;
return MIstatus::success;
}
@@ -383,7 +383,7 @@ CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo(const SMICmdData &vCmdData,
const char *pThreadName = rThread.GetName();
const MIuint len = (pThreadName != nullptr) ? CMIUtilString(pThreadName).length() : 0;
const bool bHaveName = ((pThreadName != nullptr) && (len > 0) && (len < 32) &&
- CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName)); // 32 is arbitary number
+ CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName)); // 32 is arbitrary number
const char *pThrdFmt = bHaveName ? "%s" : "Thread %d";
CMIUtilString strThread;
if (bHaveName)
@@ -523,7 +523,7 @@ CMICmnLLDBDebugSessionInfo::MIResponseForVariableInfoInternal(const VariableInfo
// Args: vrValue - (R) LLDB value object.
// vbInSimpleForm - (R) True = Get variable info in simple form (i.e. don't expand aggregates).
// - False = Get variable info (and expand aggregates if any).
-// vwrStrValue t - (W) The string representatin of this value.
+// vwrStrValue t - (W) The string representation of this value.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
index e3e16cd..7e0ce6a 100644
--- a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
+++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
@@ -35,8 +35,8 @@ class CMICmnMIValueList;
// Details: MI debug session object that holds debugging information between
// instances of MI commands executing their work and producing MI
// result records. Information/data is set by one or many commands then
-// retrieved by the same or other sebsequent commands.
-// It primarily to hold LLDB type objects.
+// retrieved by the same or other subsequent commands.
+// It primarily holds LLDB type objects.
// A singleton class.
// Gotchas: None.
// Authors: Illya Rudkin 04/03/2014.
@@ -140,8 +140,8 @@ class CMICmnLLDBDebugSessionInfo : public CMICmnBase, public MI::ISingleton<CMIC
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
// Variant type data which can be assigned and retrieved across all command instances
template <typename T> bool SharedDataAdd(const CMIUtilString &vKey, const T &vData);
@@ -209,7 +209,7 @@ class CMICmnLLDBDebugSessionInfo : public CMICmnBase, public MI::ISingleton<CMIC
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLLDBDebugSessionInfo(void);
+ /* dtor */ ~CMICmnLLDBDebugSessionInfo(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp b/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
index a42964c..6213084 100644
--- a/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
+++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
@@ -289,7 +289,7 @@ CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(const lldb::SBValue &v
}
//++ ------------------------------------------------------------------------------------
-// Details: Return nuber formatted string according to the given value type.
+// Details: Return number formatted string according to the given value type.
// Type: Static method.
// Args: vnValue - (R) The number value to get formatted.
// vpStrValueNatural - (R) The natural representation of the number value.
@@ -535,7 +535,7 @@ CMICmnLLDBDebugSessionInfoVarObj::GetValue(void) const
}
//++ ------------------------------------------------------------------------------------
-// Details: Set the var format type for *this object and upate the formatting.
+// Details: Set the var format type for *this object and update the formatting.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h b/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
index ad5a6ab..e768c5f 100644
--- a/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
+++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
@@ -120,7 +120,7 @@ class CMICmnLLDBDebugSessionInfoVarObj
static MIuint ms_nVarUniqueId;
static varFormat_e ms_eDefaultFormat; // overrides "natural" format
//
- // *** Upate the copy move constructors and assignment operator ***
+ // *** Update the copy move constructors and assignment operator ***
varFormat_e m_eVarFormat;
varType_e m_eVarType;
CMIUtilString m_strName;
@@ -128,5 +128,5 @@ class CMICmnLLDBDebugSessionInfoVarObj
CMIUtilString m_strNameReal;
CMIUtilString m_strFormattedValue;
CMIUtilString m_strVarObjParentName;
- // *** Upate the copy move constructors and assignment operator ***
+ // *** Update the copy move constructors and assignment operator ***
};
diff --git a/tools/lldb-mi/MICmnLLDBDebugger.cpp b/tools/lldb-mi/MICmnLLDBDebugger.cpp
index 5d4a09a..b626ccc 100644
--- a/tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ b/tools/lldb-mi/MICmnLLDBDebugger.cpp
@@ -423,13 +423,13 @@ CMICmnLLDBDebugger::RegisterForEvent(const CMIUtilString &vClientName, const lld
const char *pBroadcasterName = vBroadcaster.GetName();
if (pBroadcasterName == nullptr)
{
- SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROARDCASTER_NAME), MIRSRC(IDS_WORD_INVALIDNULLPTR)));
+ SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME), MIRSRC(IDS_WORD_INVALIDNULLPTR)));
return MIstatus::failure;
}
CMIUtilString broadcasterName(pBroadcasterName);
if (broadcasterName.length() == 0)
{
- SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROARDCASTER_NAME), MIRSRC(IDS_WORD_INVALIDEMPTY)));
+ SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME), MIRSRC(IDS_WORD_INVALIDEMPTY)));
return MIstatus::failure;
}
diff --git a/tools/lldb-mi/MICmnLLDBDebugger.h b/tools/lldb-mi/MICmnLLDBDebugger.h
index 6c7e900..de76112 100644
--- a/tools/lldb-mi/MICmnLLDBDebugger.h
+++ b/tools/lldb-mi/MICmnLLDBDebugger.h
@@ -42,8 +42,8 @@ class CMICmnLLDBDebugger : public CMICmnBase, public CMIUtilThreadActiveObjBase,
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool SetDriver(const CMIDriverBase &vClientDriver);
CMIDriverBase &GetDriver(void) const;
@@ -62,13 +62,13 @@ class CMICmnLLDBDebugger : public CMICmnBase, public CMIUtilThreadActiveObjBase,
// Overridden:
public:
// From CMIUtilThreadActiveObjBase
- virtual const CMIUtilString &ThreadGetName(void) const;
+ const CMIUtilString &ThreadGetName(void) const override;
// Overridden:
protected:
// From CMIUtilThreadActiveObjBase
- virtual bool ThreadRun(bool &vrIsAlive);
- virtual bool ThreadFinish(void);
+ bool ThreadRun(bool &vrIsAlive) override;
+ bool ThreadFinish(void) override;
// Typedefs:
private:
@@ -100,7 +100,7 @@ class CMICmnLLDBDebugger : public CMICmnBase, public CMIUtilThreadActiveObjBase,
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLLDBDebugger(void);
+ /* dtor */ ~CMICmnLLDBDebugger(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp b/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
index 49fce12..29ff15c 100644
--- a/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
+++ b/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
@@ -64,7 +64,7 @@ CMICmnLLDBDebuggerHandleEvents::~CMICmnLLDBDebuggerHandleEvents(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Initialize resources for *this broardcaster object.
+// Details: Initialize resources for *this broadcaster object.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functionality succeeded.
@@ -90,7 +90,7 @@ CMICmnLLDBDebuggerHandleEvents::Initialize(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Release resources for *this broardcaster object.
+// Details: Release resources for *this broadcaster object.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functionality succeeded.
@@ -112,7 +112,7 @@ CMICmnLLDBDebuggerHandleEvents::Shutdown(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Interpret the event object to asscertain the action to take or information to
+// Details: Interpret the event object to ascertain the action to take or information to
// to form and put in a MI Out-of-band record object which is given to stdout.
// Type: Method.
// Args: vEvent - (R) An LLDB broadcast event.
diff --git a/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h b/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
index 9b7b5d6..1abb520 100644
--- a/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
+++ b/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
@@ -36,8 +36,8 @@ class CMICmnLLDBDebuggerHandleEvents : public CMICmnBase, public MI::ISingleton<
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
//
bool HandleEvent(const lldb::SBEvent &vEvent, bool &vrbHandledEvent);
@@ -84,7 +84,7 @@ class CMICmnLLDBDebuggerHandleEvents : public CMICmnBase, public MI::ISingleton<
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLLDBDebuggerHandleEvents(void);
+ /* dtor */ ~CMICmnLLDBDebuggerHandleEvents(void) override;
void InitializeSignals();
bool m_bSignalsInitialized;
MIuint64 m_SIGINT;
diff --git a/tools/lldb-mi/MICmnLLDBProxySBValue.cpp b/tools/lldb-mi/MICmnLLDBProxySBValue.cpp
index b60ce1a..eeafa9d 100644
--- a/tools/lldb-mi/MICmnLLDBProxySBValue.cpp
+++ b/tools/lldb-mi/MICmnLLDBProxySBValue.cpp
@@ -36,7 +36,7 @@ CMICmnLLDBProxySBValue::GetValueAsUnsigned(const lldb::SBValue &vrValue, MIuint6
MIuint64 nValue = rValue.GetValueAsUnsigned(nFailValue);
if (nValue == nFailValue)
{
- nFailValue = 5; // Some arbitary number
+ nFailValue = 5; // Some arbitrary number
nValue = rValue.GetValueAsUnsigned(nFailValue);
if (nValue != nFailValue)
{
@@ -72,7 +72,7 @@ CMICmnLLDBProxySBValue::GetValueAsSigned(const lldb::SBValue &vrValue, MIint64 &
MIuint64 nValue = rValue.GetValueAsSigned(nFailValue);
if (nValue == nFailValue)
{
- nFailValue = 5; // Some arbitary number
+ nFailValue = 5; // Some arbitrary number
nValue = rValue.GetValueAsSigned(nFailValue);
if (nValue != nFailValue)
{
diff --git a/tools/lldb-mi/MICmnLLDBProxySBValue.h b/tools/lldb-mi/MICmnLLDBProxySBValue.h
index a4ff0b7..c9cd3a9 100644
--- a/tools/lldb-mi/MICmnLLDBProxySBValue.h
+++ b/tools/lldb-mi/MICmnLLDBProxySBValue.h
@@ -15,12 +15,12 @@
// In-house headers:
#include "MIDataTypes.h"
-// Declerations:
+// Declarations:
class CMIUtilString;
//++ ============================================================================
// Details: MI proxy wrapper class to lldb::SBValue. The class provides functionality
-// to assist in the use of SBValue's parculiar function usage.
+// to assist in the use of SBValue's particular function usage.
// Gotchas: None.
// Authors: Illya Rudkin 03/04/2014.
// Changes: None.
diff --git a/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp b/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
index 7ccb35e..45f030b 100644
--- a/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
+++ b/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
@@ -20,7 +20,7 @@
//++ ------------------------------------------------------------------------------------
// Details: CMICmnLLDBUtilSBValue constructor.
// Type: Method.
-// Args: vrValue - (R) The LLDb value object.
+// Args: vrValue - (R) The LLDB value object.
// vbHandleCharType - (R) True = Yes return text molding to char type,
// False = just return data.
// Return: None.
@@ -579,7 +579,7 @@ CMICmnLLDBUtilSBValue::HasName(void) const
}
//++ ------------------------------------------------------------------------------------
-// Details: Determine if the value object' respresents a LLDB variable i.e. "$0".
+// Details: Determine if the value object' represents a LLDB variable i.e. "$0".
// Type: Method.
// Args: None.
// Return: bool - True = Yes LLDB variable, false = no.
diff --git a/tools/lldb-mi/MICmnLLDBUtilSBValue.h b/tools/lldb-mi/MICmnLLDBUtilSBValue.h
index 468170b..8bb6783 100644
--- a/tools/lldb-mi/MICmnLLDBUtilSBValue.h
+++ b/tools/lldb-mi/MICmnLLDBUtilSBValue.h
@@ -16,7 +16,7 @@
#include "MIDataTypes.h"
#include "MICmnMIValueTuple.h"
-// Declerations:
+// Declarations:
class CMIUtilString;
//++ ============================================================================
diff --git a/tools/lldb-mi/MICmnLog.h b/tools/lldb-mi/MICmnLog.h
index 3050535..f0ae534 100644
--- a/tools/lldb-mi/MICmnLog.h
+++ b/tools/lldb-mi/MICmnLog.h
@@ -20,7 +20,7 @@
//++ ============================================================================
// Details: MI common code implementation class. Handle application trace
// activity logging. Medium objects derived from the Medium abstract
-/// class are registered with this loggor. The function Write is called
+/// class are registered with this logger. The function Write is called
// by a client callee to log information. That information is given to
// registered relevant mediums. The medium file is registered during
// *this logs initialization so it will always have a file log for the
@@ -37,14 +37,14 @@ class CMICmnLog : public MI::ISingleton<CMICmnLog>
// Enumeration:
public:
//++
- // Description: Data given to the Logger can be of serveral types. The Logger can be
+ // Description: Data given to the Logger can be of several types. The Logger can be
// set at levels of verbosity. Can determine how data is sent to one or
// mediums.
//--
enum ELogVerbosity
{ // Descriptions of what 'may' occur, depends ultimately on the medium itself. See the medium.
eLogVerbosity_FnTrace = 0x00000004, // Debug function stack call tracing
- eLogVerbosity_DbgOp = 0x00000008, // Send a string to the debugguer for display (not implemented)
+ eLogVerbosity_DbgOp = 0x00000008, // Send a string to the debugger for display (not implemented)
eLogVerbosity_ClientMsg = 0x00000010, // A client using MI can insert messages into the log (not implemented)
eLogVerbosity_Log = 0x00000020 // Send to only the Log file.
};
@@ -93,8 +93,8 @@ class CMICmnLog : public MI::ISingleton<CMICmnLog>
// Overridden:
public:
// From MI::ISingleton
- virtual bool Initialize(void);
- virtual bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
// Methods:
private:
@@ -105,7 +105,7 @@ class CMICmnLog : public MI::ISingleton<CMICmnLog>
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLog(void);
+ /* dtor */ ~CMICmnLog(void) override;
// Typedef:
private:
diff --git a/tools/lldb-mi/MICmnLogMediumFile.cpp b/tools/lldb-mi/MICmnLogMediumFile.cpp
index 4080bc5..67b8086 100644
--- a/tools/lldb-mi/MICmnLogMediumFile.cpp
+++ b/tools/lldb-mi/MICmnLogMediumFile.cpp
@@ -396,7 +396,7 @@ CMICmnLogMediumFile::ConvertCr(const CMIUtilString &vData) const
}
//++ ------------------------------------------------------------------------------------
-// Details: Set the header text that is written to the logger file at the begining.
+// Details: Set the header text that is written to the logger file at the beginning.
// Type: Method.
// Args: vText - (R) Text.
// Return: MIstatus::success - Functional succeeded.
@@ -425,7 +425,7 @@ CMICmnLogMediumFile::GetLineReturn(void) const
}
//++ ------------------------------------------------------------------------------------
-// Details: Set the diretory to place the log file.
+// Details: Set the directory to place the log file.
// Type: Method.
// Args: vPath - (R) Path to log.
// Return: MIstatus::success - Functional succeeded.
diff --git a/tools/lldb-mi/MICmnLogMediumFile.h b/tools/lldb-mi/MICmnLogMediumFile.h
index 53961d8..b79baf1 100644
--- a/tools/lldb-mi/MICmnLogMediumFile.h
+++ b/tools/lldb-mi/MICmnLogMediumFile.h
@@ -48,13 +48,13 @@ class CMICmnLogMediumFile : public CMICmnBase, public CMICmnLog::IMedium
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnLogMediumFile(void);
+ /* dtor */ ~CMICmnLogMediumFile(void) override;
// From CMICmnLog::IMedium
- virtual bool Initialize(void);
- virtual const CMIUtilString &GetName(void) const;
- virtual bool Write(const CMIUtilString &vData, const CMICmnLog::ELogVerbosity veType);
- virtual const CMIUtilString &GetError(void) const;
- virtual bool Shutdown(void);
+ bool Initialize(void) override;
+ const CMIUtilString &GetName(void) const override;
+ bool Write(const CMIUtilString &vData, const CMICmnLog::ELogVerbosity veType) override;
+ const CMIUtilString &GetError(void) const override;
+ bool Shutdown(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIOutOfBandRecord.h b/tools/lldb-mi/MICmnMIOutOfBandRecord.h
index 60a6716..6277e86 100644
--- a/tools/lldb-mi/MICmnMIOutOfBandRecord.h
+++ b/tools/lldb-mi/MICmnMIOutOfBandRecord.h
@@ -86,7 +86,7 @@ class CMICmnMIOutOfBandRecord : public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIOutOfBandRecord(void);
+ /* dtor */ ~CMICmnMIOutOfBandRecord(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIResultRecord.h b/tools/lldb-mi/MICmnMIResultRecord.h
index 92666ab..981cf36 100644
--- a/tools/lldb-mi/MICmnMIResultRecord.h
+++ b/tools/lldb-mi/MICmnMIResultRecord.h
@@ -76,7 +76,7 @@ class CMICmnMIResultRecord : public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIResultRecord(void);
+ /* dtor */ ~CMICmnMIResultRecord(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIValue.h b/tools/lldb-mi/MICmnMIValue.h
index d5de427..6a372e6 100644
--- a/tools/lldb-mi/MICmnMIValue.h
+++ b/tools/lldb-mi/MICmnMIValue.h
@@ -43,7 +43,7 @@ class CMICmnMIValue : public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIValue(void);
+ /* dtor */ ~CMICmnMIValue(void) override;
// Attributes:
protected:
diff --git a/tools/lldb-mi/MICmnMIValueConst.h b/tools/lldb-mi/MICmnMIValueConst.h
index 72b5f24..4036194 100644
--- a/tools/lldb-mi/MICmnMIValueConst.h
+++ b/tools/lldb-mi/MICmnMIValueConst.h
@@ -45,7 +45,7 @@ class CMICmnMIValueConst : public CMICmnMIValue
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIValueConst(void);
+ /* dtor */ ~CMICmnMIValueConst(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIValueList.cpp b/tools/lldb-mi/MICmnMIValueList.cpp
index 68eceab..30888cf 100644
--- a/tools/lldb-mi/MICmnMIValueList.cpp
+++ b/tools/lldb-mi/MICmnMIValueList.cpp
@@ -84,7 +84,7 @@ CMICmnMIValueList::BuildList(void)
//++ ------------------------------------------------------------------------------------
// Details: Add another MI result object to the value list's of list is results.
-// Only result obejcts can be added to a list of result otherwise this function
+// Only result objects can be added to a list of result otherwise this function
// will return MIstatus::failure.
// Type: Method.
// Args: vResult - (R) The MI result object.
@@ -116,7 +116,7 @@ CMICmnMIValueList::Add(const CMICmnMIValue &vValue)
//++ ------------------------------------------------------------------------------------
// Details: Add another MI result object to the value list's of list is results.
-// Only result obejcts can be added to a list of result otherwise this function
+// Only result objects can be added to a list of result otherwise this function
// will return MIstatus::failure.
// Type: Method.
// Args: vResult - (R) The MI result object.
diff --git a/tools/lldb-mi/MICmnMIValueList.h b/tools/lldb-mi/MICmnMIValueList.h
index 85bc5d4..26a217df 100644
--- a/tools/lldb-mi/MICmnMIValueList.h
+++ b/tools/lldb-mi/MICmnMIValueList.h
@@ -48,7 +48,7 @@ class CMICmnMIValueList : public CMICmnMIValue
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIValueList(void);
+ /* dtor */ ~CMICmnMIValueList(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIValueResult.h b/tools/lldb-mi/MICmnMIValueResult.h
index 99051bf..7c8e980 100644
--- a/tools/lldb-mi/MICmnMIValueResult.h
+++ b/tools/lldb-mi/MICmnMIValueResult.h
@@ -45,7 +45,7 @@ class CMICmnMIValueResult : public CMICmnMIValue
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIValueResult(void);
+ /* dtor */ ~CMICmnMIValueResult(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnMIValueTuple.h b/tools/lldb-mi/MICmnMIValueTuple.h
index 3b6a883..ecf5402 100644
--- a/tools/lldb-mi/MICmnMIValueTuple.h
+++ b/tools/lldb-mi/MICmnMIValueTuple.h
@@ -50,7 +50,7 @@ class CMICmnMIValueTuple : public CMICmnMIValue
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnMIValueTuple(void);
+ /* dtor */ ~CMICmnMIValueTuple(void) override;
// Methods:
private:
diff --git a/tools/lldb-mi/MICmnResources.cpp b/tools/lldb-mi/MICmnResources.cpp
index 3d8583f..ee9c93d 100644
--- a/tools/lldb-mi/MICmnResources.cpp
+++ b/tools/lldb-mi/MICmnResources.cpp
@@ -129,7 +129,7 @@ const CMICmnResources::SRsrcTextData CMICmnResources::ms_pResourceId2TextData[]
{IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME, "LLDB Debugger. Invalid client name '%s' "},
{IDS_LLDBDEBUGGER_ERR_CLIENTNOTREGISTERED, "LLDB Debugger. Client name '%s' not registered for listening events"},
{IDS_LLDBDEBUGGER_ERR_STOPLISTENER, "LLDB Debugger. Failure occurred stopping event for client '%s' SBBroadcaster '%s'"},
- {IDS_LLDBDEBUGGER_ERR_BROARDCASTER_NAME, "LLDB Debugger. Broardcaster's name '%s' is not valid"},
+ {IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME, "LLDB Debugger. Broadcaster's name '%s' is not valid"},
{IDS_LLDBDEBUGGER_WRN_UNKNOWN_EVENT, "LLDB Debugger. Unhandled event '%s'"},
{IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT, "LLDB Out-of-band. Handling event for '%s', an event enumeration '%d' not recognised"},
{IDS_LLDBOUTOFBAND_ERR_PROCESS_INVALID, "LLDB Out-of-band. Invalid '%s' in '%s'"},
diff --git a/tools/lldb-mi/MICmnResources.h b/tools/lldb-mi/MICmnResources.h
index 7e5b70f..633eba8 100644
--- a/tools/lldb-mi/MICmnResources.h
+++ b/tools/lldb-mi/MICmnResources.h
@@ -140,7 +140,7 @@ enum
IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME,
IDS_LLDBDEBUGGER_ERR_CLIENTNOTREGISTERED,
IDS_LLDBDEBUGGER_ERR_STOPLISTENER,
- IDS_LLDBDEBUGGER_ERR_BROARDCASTER_NAME,
+ IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME,
IDS_LLDBDEBUGGER_WRN_UNKNOWN_EVENT,
IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT,
@@ -289,8 +289,8 @@ class CMICmnResources : public CMICmnBase, public MI::ISingleton<CMICmnResources
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
CMIUtilString GetString(const MIuint vResourceId) const;
bool HasString(const MIuint vResourceId) const;
@@ -327,7 +327,7 @@ class CMICmnResources : public CMICmnBase, public MI::ISingleton<CMICmnResources
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnResources(void);
+ /* dtor */ ~CMICmnResources(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnStreamStderr.cpp b/tools/lldb-mi/MICmnStreamStderr.cpp
index 74f3612..5a18951 100644
--- a/tools/lldb-mi/MICmnStreamStderr.cpp
+++ b/tools/lldb-mi/MICmnStreamStderr.cpp
@@ -93,7 +93,7 @@ CMICmnStreamStderr::Shutdown(void)
//++ ------------------------------------------------------------------------------------
// Details: Write text data to stderr. Prefix the message with "MI:". The text data does
-// not need to include a carrage line return as this is added to the text. The
+// not need to include a carriage line return as this is added to the text. The
// function also then passes the text data into the CMICmnLog logger.
// Type: Method.
// Args: vText - (R) Text data.
@@ -115,7 +115,7 @@ CMICmnStreamStderr::Write(const CMIUtilString &vText, const bool vbSendToLog /*
//++ ------------------------------------------------------------------------------------
// Details: Write an LLDB text message to stderr.
-// The text data does not need to include a carrage line return as this is added
+// The text data does not need to include a carriage line return as this is added
// to the text. The function also then passes the text data into the CMICmnLog
// logger.
// Type: Method.
@@ -138,7 +138,7 @@ CMICmnStreamStderr::WriteLLDBMsg(const CMIUtilString &vText, const bool vbSendTo
//++ ------------------------------------------------------------------------------------
// Details: Write text data to stderr. The text data does not need to
-// include a carrage line return as this is added to the text. The function also
+// include a carriage line return as this is added to the text. The function also
// then passes the text data into the CMICmnLog logger.
// Type: Method.
// Args: vText - (R) Text data. May be prefixed with MI app's short name.
diff --git a/tools/lldb-mi/MICmnStreamStderr.h b/tools/lldb-mi/MICmnStreamStderr.h
index 4f4874e..afceada 100644
--- a/tools/lldb-mi/MICmnStreamStderr.h
+++ b/tools/lldb-mi/MICmnStreamStderr.h
@@ -35,8 +35,8 @@ class CMICmnStreamStderr : public CMICmnBase, public MI::ISingleton<CMICmnStream
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
//
bool Lock(void);
bool Unlock(void);
@@ -54,7 +54,7 @@ class CMICmnStreamStderr : public CMICmnBase, public MI::ISingleton<CMICmnStream
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnStreamStderr(void);
+ /* dtor */ ~CMICmnStreamStderr(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnStreamStdin.h b/tools/lldb-mi/MICmnStreamStdin.h
index 309c7d8..71076d6 100644
--- a/tools/lldb-mi/MICmnStreamStdin.h
+++ b/tools/lldb-mi/MICmnStreamStdin.h
@@ -32,8 +32,8 @@ class CMICmnStreamStdin : public CMICmnBase, public MI::ISingleton<CMICmnStreamS
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
//
const CMIUtilString &GetPrompt(void) const;
bool SetPrompt(const CMIUtilString &vNewPrompt);
@@ -50,7 +50,7 @@ class CMICmnStreamStdin : public CMICmnBase, public MI::ISingleton<CMICmnStreamS
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnStreamStdin(void);
+ /* dtor */ ~CMICmnStreamStdin(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnStreamStdout.cpp b/tools/lldb-mi/MICmnStreamStdout.cpp
index 63dec65..2c93c99 100644
--- a/tools/lldb-mi/MICmnStreamStdout.cpp
+++ b/tools/lldb-mi/MICmnStreamStdout.cpp
@@ -93,7 +93,7 @@ CMICmnStreamStdout::Shutdown(void)
//++ ------------------------------------------------------------------------------------
// Details: Write an MI format type response to stdout. The text data does not need to
-// include a carrage line return as this is added to the text. The function also
+// include a carriage line return as this is added to the text. The function also
// then passes the text data into the CMICmnLog logger.
// Type: Method.
// Args: vText - (R) MI formatted text.
@@ -110,7 +110,7 @@ CMICmnStreamStdout::WriteMIResponse(const CMIUtilString &vText, const bool vbSen
//++ ------------------------------------------------------------------------------------
// Details: Write text data to stdout. The text data does not need to
-// include a carrage line return as this is added to the text. The function also
+// include a carriage line return as this is added to the text. The function also
// then passes the text data into the CMICmnLog logger.
// Type: Method.
// Args: vText - (R) Text data.
@@ -132,7 +132,7 @@ CMICmnStreamStdout::Write(const CMIUtilString &vText, const bool vbSendToLog /*
//++ ------------------------------------------------------------------------------------
// Details: Write text data to stdout. The text data does not need to
-// include a carrage line return as this is added to the text. The function also
+// include a carriage line return as this is added to the text. The function also
// then passes the text data into the CMICmnLog logger.
// Type: Method.
// Args: vText - (R) Text data prefixed with MI app's short name.
diff --git a/tools/lldb-mi/MICmnStreamStdout.h b/tools/lldb-mi/MICmnStreamStdout.h
index 526a322..664faae 100644
--- a/tools/lldb-mi/MICmnStreamStdout.h
+++ b/tools/lldb-mi/MICmnStreamStdout.h
@@ -35,8 +35,8 @@ class CMICmnStreamStdout : public CMICmnBase, public MI::ISingleton<CMICmnStream
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
//
bool Lock(void);
bool Unlock(void);
@@ -54,7 +54,7 @@ class CMICmnStreamStdout : public CMICmnBase, public MI::ISingleton<CMICmnStream
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnStreamStdout(void);
+ /* dtor */ ~CMICmnStreamStdout(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MICmnThreadMgrStd.h b/tools/lldb-mi/MICmnThreadMgrStd.h
index 8f2d207..fef999b 100644
--- a/tools/lldb-mi/MICmnThreadMgrStd.h
+++ b/tools/lldb-mi/MICmnThreadMgrStd.h
@@ -35,8 +35,8 @@ class CMICmnThreadMgrStd : public CMICmnBase, public MI::ISingleton<CMICmnThread
// Methods:
public:
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
bool
ThreadAllTerminate(void); // Ask all threads to stop (caution)
template <typename T> // Ask the thread manager to start and stop threads on our behalf
@@ -58,7 +58,7 @@ class CMICmnThreadMgrStd : public CMICmnBase, public MI::ISingleton<CMICmnThread
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMICmnThreadMgrStd(void);
+ /* dtor */ ~CMICmnThreadMgrStd(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MIDataTypes.h b/tools/lldb-mi/MIDataTypes.h
index b058334..33c5b20 100644
--- a/tools/lldb-mi/MIDataTypes.h
+++ b/tools/lldb-mi/MIDataTypes.h
@@ -51,18 +51,14 @@ const bool failure = false;
// Portability issues
#ifdef _WIN64
typedef unsigned __int64 size_t;
-typedef unsigned __int64 PointerToInteger_t;
typedef __int64 MIint;
typedef unsigned __int64 MIuint;
#else
#ifdef _WIN32
typedef unsigned int size_t;
-typedef unsigned int PointerToInteger_t;
typedef int MIint;
typedef unsigned int MIuint;
#else
-// typedef long unsigned int size_t; // size_t already defined
-typedef unsigned int PointerToInteger_t;
typedef int MIint;
typedef unsigned int MIuint;
@@ -74,8 +70,6 @@ typedef unsigned int MIuint;
// Common types:
// Fundamentals:
-typedef float MIflt;
-typedef double MIdbl;
typedef long long MIint64; // 64bit signed integer.
typedef unsigned long long MIuint64; // 64bit unsigned integer.
diff --git a/tools/lldb-mi/MIDriver.cpp b/tools/lldb-mi/MIDriver.cpp
index 549f9e2..d4a3195 100644
--- a/tools/lldb-mi/MIDriver.cpp
+++ b/tools/lldb-mi/MIDriver.cpp
@@ -343,7 +343,7 @@ CMIDriver::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver)
//++ ------------------------------------------------------------------------------------
// Details: Proxy function CMIDriverMgr IDriver interface implementation. *this driver's
// implementation called from here to match the existing function name of the
-// original LLDb driver class (the extra indirection is not necessarily required).
+// original LLDB driver class (the extra indirection is not necessarily required).
// Check the arguments that were passed to this program to make sure they are
// valid and to get their argument values (if any).
// Type: Overridden.
@@ -925,7 +925,7 @@ bool
CMIDriver::InterpretCommandThisDriver(const CMIUtilString &vTextLine, bool &vwbCmdYesValid)
{
// Convert any CLI commands into MI commands
- CMIUtilString vMITextLine(WrapCLICommandIntoMICommand(vTextLine));
+ const CMIUtilString vMITextLine(WrapCLICommandIntoMICommand(vTextLine));
vwbCmdYesValid = false;
bool bCmdNotInCmdFactor = false;
diff --git a/tools/lldb-mi/MIDriver.h b/tools/lldb-mi/MIDriver.h
index 795549e..55c6624 100644
--- a/tools/lldb-mi/MIDriver.h
+++ b/tools/lldb-mi/MIDriver.h
@@ -46,7 +46,7 @@ class CMIDriver : public CMICmnBase,
// Enumerations:
public:
//++ ----------------------------------------------------------------------
- // Details: The MI Driver has a running state which is used to help determin
+ // Details: The MI Driver has a running state which is used to help determine
// which specific action(s) it should take or not allow.
// The driver when operational and not shutting down alternates
// between eDriverState_RunningNotDebugging and
@@ -68,8 +68,8 @@ class CMIDriver : public CMICmnBase,
// Methods:
public:
// MI system
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
// MI state
bool GetExitApplicationFlag(void) const;
@@ -94,26 +94,26 @@ class CMIDriver : public CMICmnBase,
// Overridden:
public:
// From CMIDriverMgr::IDriver
- virtual bool DoInitialize(void);
- virtual bool DoShutdown(void);
- virtual bool DoMainLoop(void);
- virtual lldb::SBError DoParseArgs(const int argc, const char *argv[], FILE *vpStdOut, bool &vwbExiting);
- virtual CMIUtilString GetError(void) const;
- virtual const CMIUtilString &GetName(void) const;
- virtual lldb::SBDebugger &GetTheDebugger(void);
- virtual bool GetDriverIsGDBMICompatibleDriver(void) const;
- virtual bool SetId(const CMIUtilString &vId);
- virtual const CMIUtilString &GetId(void) const;
+ bool DoInitialize(void) override;
+ bool DoShutdown(void) override;
+ bool DoMainLoop(void) override;
+ lldb::SBError DoParseArgs(const int argc, const char *argv[], FILE *vpStdOut, bool &vwbExiting) override;
+ CMIUtilString GetError(void) const override;
+ const CMIUtilString &GetName(void) const override;
+ lldb::SBDebugger &GetTheDebugger(void) override;
+ bool GetDriverIsGDBMICompatibleDriver(void) const override;
+ bool SetId(const CMIUtilString &vId) override;
+ const CMIUtilString &GetId(void) const override;
// From CMIDriverBase
- virtual void SetExitApplicationFlag(const bool vbForceExit);
- virtual bool DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilString &vwErrMsg);
- virtual bool SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver);
- virtual FILE *GetStdin(void) const;
- virtual FILE *GetStdout(void) const;
- virtual FILE *GetStderr(void) const;
- virtual const CMIUtilString &GetDriverName(void) const;
- virtual const CMIUtilString &GetDriverId(void) const;
- virtual void DeliverSignal(int signal);
+ void SetExitApplicationFlag(const bool vbForceExit) override;
+ bool DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilString &vwErrMsg) override;
+ bool SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) override;
+ FILE *GetStdin(void) const override;
+ FILE *GetStdout(void) const override;
+ FILE *GetStderr(void) const override;
+ const CMIUtilString &GetDriverName(void) const override;
+ const CMIUtilString &GetDriverId(void) const override;
+ void DeliverSignal(int signal) override;
// Typedefs:
private:
@@ -142,7 +142,7 @@ class CMIDriver : public CMICmnBase,
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMIDriver(void);
+ /* dtor */ ~CMIDriver(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MIDriverBase.cpp b/tools/lldb-mi/MIDriverBase.cpp
index e03e7b0..6bf5ab6 100644
--- a/tools/lldb-mi/MIDriverBase.cpp
+++ b/tools/lldb-mi/MIDriverBase.cpp
@@ -175,7 +175,7 @@ CMIDriverBase::GetStderr(void) const
//++ ------------------------------------------------------------------------------------
// Details: Set the MI Driver's exit application flag. The application checks this flag
-// after every stdin line is read so the exit may not be instantious.
+// after every stdin line is read so the exit may not be instantaneous.
// If vbForceExit is false the MI Driver queries its state and determines if is
// should exit or continue operating depending on that running state.
// Type: Overrideable.
diff --git a/tools/lldb-mi/MIDriverMain.cpp b/tools/lldb-mi/MIDriverMain.cpp
index 3b7588b..2f469bf 100644
--- a/tools/lldb-mi/MIDriverMain.cpp
+++ b/tools/lldb-mi/MIDriverMain.cpp
@@ -124,7 +124,7 @@ DriverSystemShutdown(const bool vbAppExitOk)
}
//++ ------------------------------------------------------------------------------------
-// Details: MI's application start point of execution. The applicaton runs in two modes.
+// Details: MI's application start point of execution. The application runs in two modes.
// An LLDB native driver mode where it acts no different from the LLDB driver.
// The other mode is the MI when it finds on the command line
// the --interpreter option. Command line argument --help on its own will give
@@ -140,7 +140,7 @@ DriverSystemShutdown(const bool vbAppExitOk)
// >0 = Program success with status i.e. Control-C signal status
// <0 = Program failed.
// -1 = Program failed reason not specified here, see MI log file.
-// -1000 = Program failed did not initailize successfully.
+// -1000 = Program failed did not initialize successfully.
// Throws: None.
//--
int
diff --git a/tools/lldb-mi/MIDriverMgr.h b/tools/lldb-mi/MIDriverMgr.h
index 53fc984..c84ef04 100644
--- a/tools/lldb-mi/MIDriverMgr.h
+++ b/tools/lldb-mi/MIDriverMgr.h
@@ -32,7 +32,7 @@
// those objects (modules/components) to support it's own functionality).
// The Driver manager is the first object instantiated as part of the
// MI code base. It is also the first thing to interpret the command
-// line arguments passed to the executeable. Bases on options it
+// line arguments passed to the executable. Bases on options it
// understands the manage will set up the appropriate driver or give
// help information. Other options are passed on to the driver chosen
// to do work.
@@ -75,8 +75,8 @@ class CMIDriverMgr : public CMICmnBase, public MI::ISingleton<CMIDriverMgr>
// Methods:
public:
// MI system
- bool Initialize(void);
- bool Shutdown(void);
+ bool Initialize(void) override;
+ bool Shutdown(void) override;
//
CMIUtilString GetAppVersion(void) const;
bool RegisterDriver(const IDriver &vrADriver, const CMIUtilString &vrDriverID);
@@ -115,7 +115,7 @@ class CMIDriverMgr : public CMICmnBase, public MI::ISingleton<CMIDriverMgr>
// Overridden:
private:
// From CMICmnBase
- /* dtor */ virtual ~CMIDriverMgr(void);
+ /* dtor */ ~CMIDriverMgr(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MIUtilFileStd.h b/tools/lldb-mi/MIUtilFileStd.h
index 4b27d2f..5a22348 100644
--- a/tools/lldb-mi/MIUtilFileStd.h
+++ b/tools/lldb-mi/MIUtilFileStd.h
@@ -41,7 +41,7 @@ class CMIUtilFileStd : public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMIUtilFileStd(void);
+ /* dtor */ ~CMIUtilFileStd(void) override;
// Attributes:
private:
diff --git a/tools/lldb-mi/MIUtilMapIdToVariant.h b/tools/lldb-mi/MIUtilMapIdToVariant.h
index 1b9c6a1..c77f0b9 100644
--- a/tools/lldb-mi/MIUtilMapIdToVariant.h
+++ b/tools/lldb-mi/MIUtilMapIdToVariant.h
@@ -20,7 +20,7 @@
//++ ============================================================================
// Details: MI common code utility class. Map type container that hold general
-// object types (by being wrappin an variant wrapper)
+// object types (by being a variant wrapper)
// objects by ID.
// Gotchas: None.
// Authors: Illya Rudkin 19/06/2014.
@@ -42,9 +42,9 @@ class CMIUtilMapIdToVariant : public CMICmnBase
// Overridden:
public:
// From CMICmnBase
- /* dtor */ virtual ~CMIUtilMapIdToVariant(void);
+ /* dtor */ ~CMIUtilMapIdToVariant(void) override;
- // Typdefs:
+ // Typedefs:
private:
typedef std::map<CMIUtilString, CMIUtilVariant> MapKeyToVariantValue_t;
typedef std::pair<CMIUtilString, CMIUtilVariant> MapPairKeyToVariantValue_t;
@@ -65,8 +65,8 @@ class CMIUtilMapIdToVariant : public CMICmnBase
// Args: T - The data object's variable type.
// vId - (R) Unique ID i.e. GUID.
// vData - (R) The general data object to be stored of some type.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: MIstatus::success - Function succeeded.
+// MIstatus::failure - Function failed.
// Throws: None.
//--
template <typename T>
@@ -98,8 +98,8 @@ CMIUtilMapIdToVariant::Add(const CMIUtilString &vId, const T &vData)
// vId - (R) Unique ID i.e. GUID.
// vrwData - (W) Copy of the data object held.
// vrwbFound - (W) True = data found, false = data not found.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: MIstatus::success - Function succeeded.
+// MIstatus::failure - Function failed.
// Throws: None.
//--
template <typename T>
diff --git a/tools/lldb-mi/MIUtilSingletonBase.h b/tools/lldb-mi/MIUtilSingletonBase.h
index c6d7f55..3649a73 100644
--- a/tools/lldb-mi/MIUtilSingletonBase.h
+++ b/tools/lldb-mi/MIUtilSingletonBase.h
@@ -22,8 +22,8 @@ namespace MI
// // Overridden:
// public:
// // From MI::ISingleton
-// virtual bool Initialize( void );
-// virtual bool Shutdown( void );
+// bool Initialize(void) override;
+// bool Shutdown(void) override;
// };
//++ ============================================================================
diff --git a/tools/lldb-mi/MIUtilSingletonHelper.h b/tools/lldb-mi/MIUtilSingletonHelper.h
index 5bd879e..19cc3a9 100644
--- a/tools/lldb-mi/MIUtilSingletonHelper.h
+++ b/tools/lldb-mi/MIUtilSingletonHelper.h
@@ -24,7 +24,7 @@ namespace MI
// MI components (singletons) required by a client module.
// Type: Template method.
// Args: vErrorResrcId - (R) The string resource ID error message identifier to place in errMsg.
-// vwrbOk - (RW) On input True = Try to initalise MI driver module.
+// vwrbOk - (RW) On input True = Try to initialize MI driver module.
// On output True = MI driver module initialise successfully.
// vwrErrMsg - (W) MI driver module initialise error description on failure.
// Return: MIstatus::success - Functional succeeded.
@@ -46,7 +46,7 @@ ModuleInit(const MIint vErrorResrcId, bool &vwrbOk, CMIUtilString &vwrErrMsg)
}
//++ ============================================================================
-// Details: Short cut helper function to simplify repeated shutodown of
+// Details: Short cut helper function to simplify repeated shutdown of
// MI components (singletons) required by a client module.
// Type: Template method.
// Args: vErrorResrcId - (R) The string resource ID error message identifier
diff --git a/tools/lldb-mi/MIUtilString.h b/tools/lldb-mi/MIUtilString.h
index eac0746e..7b188ed 100644
--- a/tools/lldb-mi/MIUtilString.h
+++ b/tools/lldb-mi/MIUtilString.h
@@ -26,7 +26,7 @@
//--
class CMIUtilString : public std::string
{
- // Typdefs:
+ // Typedefs:
public:
typedef std::vector<CMIUtilString> VecString_t;
diff --git a/tools/lldb-mi/MIUtilSystemLinux.cpp b/tools/lldb-mi/MIUtilSystemLinux.cpp
index a4ae327..8fd2470 100644
--- a/tools/lldb-mi/MIUtilSystemLinux.cpp
+++ b/tools/lldb-mi/MIUtilSystemLinux.cpp
@@ -78,7 +78,7 @@ CMIUtilSystemLinux::GetOSLastError(void) const
// Details: Retrieves the fully qualified path for the this application. If the function
// fails the string is filled with the error message.
// Type: Method.
-// Args: vrwFileNamePath - (W) The excutable's name and path or last error description.
+// Args: vrwFileNamePath - (W) The executable's name and path or last error description.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
diff --git a/tools/lldb-mi/MIUtilSystemOsx.cpp b/tools/lldb-mi/MIUtilSystemOsx.cpp
index 1834651..b926342 100644
--- a/tools/lldb-mi/MIUtilSystemOsx.cpp
+++ b/tools/lldb-mi/MIUtilSystemOsx.cpp
@@ -78,7 +78,7 @@ CMIUtilSystemOsx::GetOSLastError(void) const
// Details: Retrieves the fully qualified path for the this application. If the function
// fails the string is filled with the error message.
// Type: Method.
-// Args: vrwFileNamePath - (W) The excutable's name and path or last error description.
+// Args: vrwFileNamePath - (W) The executable's name and path or last error description.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
diff --git a/tools/lldb-mi/MIUtilSystemWindows.cpp b/tools/lldb-mi/MIUtilSystemWindows.cpp
index 19c6e9e..80f4aac 100644
--- a/tools/lldb-mi/MIUtilSystemWindows.cpp
+++ b/tools/lldb-mi/MIUtilSystemWindows.cpp
@@ -100,7 +100,7 @@ CMIUtilSystemWindows::GetOSLastError(void) const
// Details: Retrieves the fully qualified path for the this application. If the function
// fails the string is filled with the error message.
// Type: Method.
-// Args: vrwFileNamePath - (W) The excutable's name and path or last error description.
+// Args: vrwFileNamePath - (W) The executable's name and path or last error description.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
diff --git a/tools/lldb-mi/MIUtilThreadBaseStd.cpp b/tools/lldb-mi/MIUtilThreadBaseStd.cpp
index 2dc6d3d..96f53ff 100644
--- a/tools/lldb-mi/MIUtilThreadBaseStd.cpp
+++ b/tools/lldb-mi/MIUtilThreadBaseStd.cpp
@@ -59,7 +59,7 @@ CMIUtilThreadActiveObjBase::ThreadIsActive(void)
//++ ------------------------------------------------------------------------------------
// Details: Set up *this thread.
-// Type: Mrthod.
+// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
@@ -73,7 +73,7 @@ CMIUtilThreadActiveObjBase::ThreadExecute(void)
}
//++ ------------------------------------------------------------------------------------
-// Details: Aquire a reference to CMIUtilThreadActiveObjBase.
+// Details: Acquire a reference to CMIUtilThreadActiveObjBase.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
diff --git a/tools/lldb-mi/MIUtilVariant.h b/tools/lldb-mi/MIUtilVariant.h
index 8e7ac7b..a6c3ba4 100644
--- a/tools/lldb-mi/MIUtilVariant.h
+++ b/tools/lldb-mi/MIUtilVariant.h
@@ -95,9 +95,9 @@ class CMIUtilVariant
// Overridden:
public:
// From CDataObjectBase
- virtual ~CDataObject(void);
- virtual CDataObjectBase *CreateCopyOfSelf(void);
- virtual bool GetIsDerivedClass(void) const;
+ ~CDataObject(void) override;
+ CDataObjectBase *CreateCopyOfSelf(void) override;
+ bool GetIsDerivedClass(void) const override;
// Overrideable:
private:
@@ -106,7 +106,7 @@ class CMIUtilVariant
// Overridden:
private:
// From CDataObjectBase
- virtual void Destroy(void);
+ void Destroy(void) override;
// Attributes:
private:
diff --git a/tools/lldb-server/lldb-gdbserver.cpp b/tools/lldb-server/lldb-gdbserver.cpp
index a286e3d..30bb2d6 100644
--- a/tools/lldb-server/lldb-gdbserver.cpp
+++ b/tools/lldb-server/lldb-gdbserver.cpp
@@ -109,16 +109,21 @@ signal_handler(int signo)
case SIGPIPE:
g_sigpipe_received = 1;
break;
- case SIGHUP:
- ++g_sighup_received_count;
-
- // For now, swallow SIGHUP.
- if (log)
- log->Printf ("lldb-server:%s swallowing SIGHUP (receive count=%d)", __FUNCTION__, g_sighup_received_count);
- signal (SIGHUP, signal_handler);
- break;
}
}
+
+static void
+sighup_handler(MainLoopBase &mainloop)
+{
+ ++g_sighup_received_count;
+
+ Log *log (GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
+ if (log)
+ log->Printf ("lldb-server:%s swallowing SIGHUP (receive count=%d)", __FUNCTION__, g_sighup_received_count);
+
+ if (g_sighup_received_count >= 2)
+ mainloop.RequestTermination();
+}
#endif // #ifndef _WIN32
static void
@@ -338,7 +343,7 @@ writePortToPipe(int unnamed_pipe_fd, const uint16_t port)
}
void
-ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
+ConnectToRemote(MainLoop &mainloop, GDBRemoteCommunicationServerLLGS &gdb_server,
bool reverse_connect, const char *const host_and_port,
const char *const progname, const char *const subcommand,
const char *const named_pipe_path, int unnamed_pipe_fd)
@@ -372,6 +377,8 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
exit (1);
}
+ std::unique_ptr<ConnectionFileDescriptor> connection_up;
+
if (reverse_connect)
{
// llgs will connect to the gdb-remote client.
@@ -388,8 +395,7 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
snprintf(connection_url, sizeof(connection_url), "connect://%s", final_host_and_port.c_str ());
// Create the connection.
- std::unique_ptr<ConnectionFileDescriptor> connection_up (new ConnectionFileDescriptor ());
- connection_up.reset (new ConnectionFileDescriptor ());
+ connection_up.reset(new ConnectionFileDescriptor);
auto connection_result = connection_up->Connect (connection_url, &error);
if (connection_result != eConnectionStatusSuccess)
{
@@ -401,10 +407,6 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
fprintf (stderr, "error: failed to connect to client at '%s': %s", connection_url, error.AsCString ());
exit (-1);
}
-
- // We're connected.
- printf ("Connection established.\n");
- gdb_server.SetConnection (connection_up.release());
}
else
{
@@ -461,10 +463,7 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
// Ensure we connected.
if (s_listen_connection_up)
- {
- printf ("Connection established '%s'\n", s_listen_connection_up->GetURI().c_str());
- gdb_server.SetConnection (s_listen_connection_up.release());
- }
+ connection_up = std::move(s_listen_connection_up);
else
{
fprintf (stderr, "failed to connect to '%s': %s\n", final_host_and_port.c_str (), error.AsCString ());
@@ -472,46 +471,13 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
exit (1);
}
}
- }
-
- if (gdb_server.IsConnected())
- {
- // After we connected, we need to get an initial ack from...
- if (gdb_server.HandshakeWithClient(&error))
+ error = gdb_server.InitializeConnection (std::move(connection_up));
+ if (error.Fail())
{
- // We'll use a half a second timeout interval so that an exit conditions can
- // be checked that often.
- const uint32_t TIMEOUT_USEC = 500000;
-
- bool interrupt = false;
- bool done = false;
- while (!interrupt && !done && (g_sighup_received_count < 2))
- {
- const GDBRemoteCommunication::PacketResult result = gdb_server.GetPacketAndSendResponse (TIMEOUT_USEC, error, interrupt, done);
- if ((result != GDBRemoteCommunication::PacketResult::Success) &&
- (result != GDBRemoteCommunication::PacketResult::ErrorReplyTimeout))
- {
- // We're bailing out - we only support successful handling and timeouts.
- fprintf(stderr, "leaving packet loop due to PacketResult %d\n", result);
- break;
- }
- }
-
- if (error.Fail())
- {
- fprintf(stderr, "error: %s\n", error.AsCString());
- }
- }
- else
- {
- fprintf(stderr, "error: handshake with client failed\n");
+ fprintf(stderr, "Failed to initialize connection: %s\n", error.AsCString());
+ exit(-1);
}
- }
- else
- {
- fprintf (stderr, "no connection information provided, unable to run\n");
- display_usage (progname, subcommand);
- exit (1);
+ printf ("Connection established.\n");
}
}
@@ -521,10 +487,12 @@ ConnectToRemote(GDBRemoteCommunicationServerLLGS &gdb_server,
int
main_gdbserver (int argc, char *argv[])
{
+ Error error;
+ MainLoop mainloop;
#ifndef _WIN32
// Setup signal handlers first thing.
signal (SIGPIPE, signal_handler);
- signal (SIGHUP, signal_handler);
+ MainLoop::SignalHandleUP sighup_handle = mainloop.RegisterSignal(SIGHUP, sighup_handler, error);
#endif
#ifdef __linux__
// Block delivery of SIGCHLD on linux. NativeProcessLinux will read it using signalfd.
@@ -539,7 +507,6 @@ main_gdbserver (int argc, char *argv[])
argc--;
argv++;
int long_option_index = 0;
- Error error;
int ch;
std::string platform_name;
std::string attach_target;
@@ -670,7 +637,7 @@ main_gdbserver (int argc, char *argv[])
// Setup the platform that GDBRemoteCommunicationServerLLGS will use.
lldb::PlatformSP platform_sp = setup_platform (platform_name);
- GDBRemoteCommunicationServerLLGS gdb_server (platform_sp);
+ GDBRemoteCommunicationServerLLGS gdb_server (platform_sp, mainloop);
const char *const host_and_port = argv[0];
argc -= 1;
@@ -688,10 +655,19 @@ main_gdbserver (int argc, char *argv[])
// Print version info.
printf("%s-%s", LLGS_PROGRAM_NAME, LLGS_VERSION_STR);
- ConnectToRemote(gdb_server, reverse_connect,
+ ConnectToRemote(mainloop, gdb_server, reverse_connect,
host_and_port, progname, subcommand,
named_pipe_path.c_str(), unnamed_pipe_fd);
+
+ if (! gdb_server.IsConnected())
+ {
+ fprintf (stderr, "no connection information provided, unable to run\n");
+ display_usage (progname, subcommand);
+ return 1;
+ }
+
+ mainloop.Run();
fprintf(stderr, "lldb-server exiting...\n");
return 0;
diff --git a/tools/lldb-server/lldb-platform.cpp b/tools/lldb-server/lldb-platform.cpp
index 33ba1ad..4dfa7d2 100644
--- a/tools/lldb-server/lldb-platform.cpp
+++ b/tools/lldb-server/lldb-platform.cpp
@@ -20,13 +20,18 @@
#include <sys/wait.h>
// C++ Includes
+#include <fstream>
// Other libraries and framework includes
#include "lldb/Core/Error.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileSpec.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostGetOpt.h"
#include "lldb/Host/OptionParser.h"
#include "lldb/Host/Socket.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/FileUtilities.h"
#include "LLDBServerUtilities.h"
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h"
#include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
@@ -56,6 +61,7 @@ static struct option g_long_options[] =
{ "gdbserver-port", required_argument, NULL, 'P' },
{ "min-gdbserver-port", required_argument, NULL, 'm' },
{ "max-gdbserver-port", required_argument, NULL, 'M' },
+ { "port-file", required_argument, NULL, 'f' },
{ "server", no_argument, &g_server, 1 },
{ NULL, 0, NULL, 0 }
};
@@ -89,10 +95,42 @@ signal_handler(int signo)
static void
display_usage (const char *progname, const char *subcommand)
{
- fprintf(stderr, "Usage:\n %s %s [--log-file log-file-name] [--log-channels log-channel-list] --server --listen port\n", progname, subcommand);
+ fprintf(stderr, "Usage:\n %s %s [--log-file log-file-name] [--log-channels log-channel-list] [--port-file port-file-path] --server --listen port\n", progname, subcommand);
exit(0);
}
+static Error
+save_port_to_file(const uint16_t port, const FileSpec &port_file_spec)
+{
+ FileSpec temp_file_spec(port_file_spec.GetDirectory().AsCString(), false);
+ auto error = FileSystem::MakeDirectory(temp_file_spec, eFilePermissionsDirectoryDefault);
+ if (error.Fail())
+ return Error("Failed to create directory %s: %s", temp_file_spec.GetCString(), error.AsCString());
+
+ llvm::SmallString<PATH_MAX> temp_file_path;
+ temp_file_spec.AppendPathComponent("port-file.%%%%%%");
+ auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetCString(), temp_file_path);
+ if (err_code)
+ return Error("Failed to create temp file: %s", err_code.message().c_str());
+
+ llvm::FileRemover tmp_file_remover(temp_file_path.c_str());
+
+ {
+ std::ofstream temp_file(temp_file_path.c_str(), std::ios::out);
+ if (!temp_file.is_open())
+ return Error("Failed to open temp file %s", temp_file_path.c_str());
+ temp_file << port;
+ }
+
+ err_code = llvm::sys::fs::rename(temp_file_path.c_str(), port_file_spec.GetPath().c_str());
+ if (err_code)
+ return Error("Failed to rename file %s to %s: %s",
+ temp_file_path.c_str(), port_file_spec.GetPath().c_str(), err_code.message().c_str());
+
+ tmp_file_remover.releaseFile();
+ return Error();
+}
+
//----------------------------------------------------------------------
// main
//----------------------------------------------------------------------
@@ -112,12 +150,13 @@ main_platform (int argc, char *argv[])
std::string log_file;
StringRef log_channels; // e.g. "lldb process threads:gdb-remote default:linux all"
-
+
GDBRemoteCommunicationServerPlatform::PortMap gdbserver_portmap;
int min_gdbserver_port = 0;
int max_gdbserver_port = 0;
uint16_t port_offset = 0;
-
+
+ FileSpec port_file;
bool show_usage = false;
int option_error = 0;
int socket_error = -1;
@@ -152,6 +191,11 @@ main_platform (int argc, char *argv[])
log_channels = StringRef(optarg);
break;
+ case 'f': // Port file
+ if (optarg && optarg[0])
+ port_file.SetFile(optarg, false);
+ break;
+
case 'p':
{
char *end = NULL;
@@ -255,6 +299,15 @@ main_platform (int argc, char *argv[])
}
listening_socket_up.reset(socket);
printf ("Listening for a connection from %u...\n", listening_socket_up->GetLocalPortNumber());
+ if (port_file)
+ {
+ error = save_port_to_file(listening_socket_up->GetLocalPortNumber(), port_file);
+ if (error.Fail())
+ {
+ fprintf(stderr, "failed to write port to %s: %s", port_file.GetPath().c_str(), error.AsCString());
+ return 1;
+ }
+ }
do {
GDBRemoteCommunicationServerPlatform platform;
@@ -308,7 +361,7 @@ main_platform (int argc, char *argv[])
if (platform.IsConnected())
{
// After we connected, we need to get an initial ack from...
- if (platform.HandshakeWithClient(&error))
+ if (platform.HandshakeWithClient())
{
bool interrupt = false;
bool done = false;
OpenPOWER on IntegriCloud