brucem created this revision. brucem added reviewers: abidh, ki.stfu, domipheus. brucem added a subscriber: lldb-commits.
This is a start on bringing lldb-mi more in line with the typical LLDB coding style. This just removes the usage of the typedefs and doesn't yet clean up any logic or other issues. (This is to keep the review simple.) http://reviews.llvm.org/D10917 Files: tools/lldb-mi/MICmdArgContext.h tools/lldb-mi/MICmdArgValFile.cpp tools/lldb-mi/MICmdArgValString.cpp tools/lldb-mi/MICmdCmdData.cpp tools/lldb-mi/MICmdCmdData.h tools/lldb-mi/MICmdCmdExec.cpp tools/lldb-mi/MICmdCmdFile.cpp tools/lldb-mi/MICmdCmdMiscellanous.cpp tools/lldb-mi/MICmdCmdSymbol.cpp tools/lldb-mi/MICmdCmdTarget.cpp tools/lldb-mi/MICmdCmdVar.cpp tools/lldb-mi/MICmdCmdVar.h tools/lldb-mi/MICmdInterpreter.cpp tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h tools/lldb-mi/MICmnLLDBDebugger.cpp tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp tools/lldb-mi/MICmnLLDBProxySBValue.cpp tools/lldb-mi/MICmnLLDBUtilSBValue.cpp tools/lldb-mi/MICmnLLDBUtilSBValue.h tools/lldb-mi/MICmnLogMediumFile.cpp tools/lldb-mi/MICmnLogMediumFile.h tools/lldb-mi/MICmnMIOutOfBandRecord.cpp tools/lldb-mi/MICmnMIResultRecord.cpp tools/lldb-mi/MICmnMIValueConst.cpp tools/lldb-mi/MICmnMIValueList.cpp tools/lldb-mi/MICmnMIValueResult.cpp tools/lldb-mi/MICmnMIValueTuple.cpp tools/lldb-mi/MICmnResources.cpp tools/lldb-mi/MICmnResources.h tools/lldb-mi/MICmnStreamStdin.cpp tools/lldb-mi/MICmnStreamStdin.h tools/lldb-mi/MIDataTypes.h tools/lldb-mi/MIDriver.cpp tools/lldb-mi/MIDriverMgr.cpp tools/lldb-mi/MIUtilDateTimeStd.h tools/lldb-mi/MIUtilFileStd.cpp tools/lldb-mi/MIUtilFileStd.h tools/lldb-mi/MIUtilString.cpp tools/lldb-mi/MIUtilString.h
Index: tools/lldb-mi/MIUtilString.h =================================================================== --- tools/lldb-mi/MIUtilString.h +++ tools/lldb-mi/MIUtilString.h @@ -35,40 +35,40 @@ static CMIUtilString Format(const CMIUtilString vFormating, ...); static CMIUtilString FormatBinary(const MIuint64 vnDecimal); static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); - static bool IsAllValidAlphaAndNumeric(const MIchar *vpText); + static bool IsAllValidAlphaAndNumeric(const char *vpText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); static CMIUtilString ConvertToPrintableASCII(const char vChar); static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16); static CMIUtilString ConvertToPrintableASCII(const char32_t vChar32); // Methods: public: /* ctor */ CMIUtilString(void); - /* ctor */ CMIUtilString(const MIchar *vpData); - /* ctor */ CMIUtilString(const MIchar *const *vpData); + /* ctor */ CMIUtilString(const char *vpData); + /* ctor */ CMIUtilString(const char *const *vpData); // bool ExtractNumber(MIint64 &vwrNumber) const; CMIUtilString FindAndReplace(const CMIUtilString &vFind, const CMIUtilString &vReplaceWith) const; bool IsNumber(void) const; bool IsHexadecimalNumber(void) const; bool IsQuoted(void) const; - CMIUtilString RemoveRepeatedCharacters(const MIchar vChar); + CMIUtilString RemoveRepeatedCharacters(const char vChar); MIuint Split(const CMIUtilString &vDelimiter, VecString_t &vwVecSplits) const; MIuint SplitConsiderQuotes(const CMIUtilString &vDelimiter, VecString_t &vwVecSplits) const; MIuint SplitLines(VecString_t &vwVecSplits) const; CMIUtilString StripCREndOfLine(void) const; CMIUtilString StripCRAll(void) const; CMIUtilString Trim(void) const; - CMIUtilString Trim(const MIchar vChar) const; + CMIUtilString Trim(const char vChar) const; MIuint FindFirst(const CMIUtilString &vrPattern, const MIuint vnPos = 0) const; MIuint FindFirst(const CMIUtilString &vrPattern, const bool vbSkipQuotedText, bool &vrwbNotFoundClosedQuote, const MIuint vnPos = 0) const; MIuint FindFirstNot(const CMIUtilString &vrPattern, const MIuint vnPos = 0) const; CMIUtilString Escape(const bool vbEscapeQuotes = false) const; CMIUtilString AddSlashes(void) const; CMIUtilString StripSlashes(void) const; // - CMIUtilString &operator=(const MIchar *vpRhs); + CMIUtilString &operator=(const char *vpRhs); CMIUtilString &operator=(const std::string &vrRhs); // Overrideable: @@ -82,6 +82,6 @@ // Methods: private: bool ExtractNumberFromHexadecimal(MIint64 &vwrNumber) const; - CMIUtilString RemoveRepeatedCharacters(const MIint vnPos, const MIchar vChar); + CMIUtilString RemoveRepeatedCharacters(const MIint vnPos, const char vChar); MIuint FindFirstQuote(const MIuint vnPos) const; }; Index: tools/lldb-mi/MIUtilString.cpp =================================================================== --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -37,7 +37,7 @@ // Return: None. // Throws: None. //-- -CMIUtilString::CMIUtilString(const MIchar *vpData) +CMIUtilString::CMIUtilString(const char *vpData) : std::string(vpData) { } @@ -49,7 +49,7 @@ // Return: None. // Throws: None. //-- -CMIUtilString::CMIUtilString(const MIchar *const *vpData) +CMIUtilString::CMIUtilString(const char *const *vpData) : std::string((const char *)vpData) { } @@ -61,7 +61,7 @@ // Return: CMIUtilString & - *this string. // Throws: None. //-- -CMIUtilString &CMIUtilString::operator=(const MIchar *vpRhs) +CMIUtilString &CMIUtilString::operator=(const char *vpRhs) { if (*this == vpRhs) return *this; @@ -480,15 +480,15 @@ // Throws: None. //-- bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vpText) +CMIUtilString::IsAllValidAlphaAndNumeric(const char *vpText) { const MIuint len = ::strlen(vpText); if (len == 0) return false; for (MIuint i = 0; i < len; i++, vpText++) { - const MIchar c = *vpText; + const char c = *vpText; if (::isalnum((int)c) == 0) return false; } @@ -525,7 +525,7 @@ CMIUtilString::Trim(void) const { CMIUtilString strNew(*this); - const MIchar *pWhiteSpace = " \t\n\v\f\r"; + const char *pWhiteSpace = " \t\n\v\f\r"; const MIint nPos = find_last_not_of(pWhiteSpace); if (nPos != (MIint)std::string::npos) { @@ -548,7 +548,7 @@ // Throws: None. //-- CMIUtilString -CMIUtilString::Trim(const MIchar vChar) const +CMIUtilString::Trim(const char vChar) const { CMIUtilString strNew(*this); const MIint nLen = strNew.length(); @@ -584,7 +584,7 @@ nNum = nNum >> 1; nLen++; } - MIchar pN[nConstBits + 1]; + char pN[nConstBits + 1]; MIuint j = 0; for (i = nLen; i > 0; --i, j++) { @@ -606,7 +606,7 @@ // Throws: None. //-- CMIUtilString -CMIUtilString::RemoveRepeatedCharacters(const MIchar vChar) +CMIUtilString::RemoveRepeatedCharacters(const char vChar) { return RemoveRepeatedCharacters(0, vChar); } @@ -622,9 +622,9 @@ // Throws: None. //-- CMIUtilString -CMIUtilString::RemoveRepeatedCharacters(const MIint vnPos, const MIchar vChar) +CMIUtilString::RemoveRepeatedCharacters(const MIint vnPos, const char vChar) { - const MIchar cQuote = '"'; + const char cQuote = '"'; // Look for first quote of two MIint nPos = find(cQuote, vnPos); @@ -654,7 +654,7 @@ bool CMIUtilString::IsQuoted(void) const { - const MIchar cQuote = '"'; + const char cQuote = '"'; if (at(0) != cQuote) return false; @@ -763,8 +763,8 @@ MIuint CMIUtilString::FindFirstQuote(const MIuint vnPos) const { - const MIchar cBckSlash('\\'); - const MIchar cQuote('"'); + const char cBckSlash('\\'); + const char cQuote('"'); const MIuint nLen(length()); MIuint nPos = vnPos; @@ -801,7 +801,7 @@ strNew.reserve(nLen); for (MIuint nIndex(0); nIndex < nLen; ++nIndex) { - const MIchar cUnescapedChar((*this)[nIndex]); + const char cUnescapedChar((*this)[nIndex]); if (cUnescapedChar == '"' && vbEscapeQuotes) strNew.append("\\\""); else @@ -821,7 +821,7 @@ CMIUtilString CMIUtilString::AddSlashes(void) const { - const MIchar cBckSlash('\\'); + const char cBckSlash('\\'); const MIuint nLen(length()); CMIUtilString strNew; strNew.reserve(nLen); @@ -840,7 +840,7 @@ const MIuint nAppendLen(nUnescapedCharPos - nOffset); strNew.append(*this, nOffset, nAppendLen); strNew.push_back(cBckSlash); - const MIchar cUnescapedChar((*this)[nUnescapedCharPos]); + const char cUnescapedChar((*this)[nUnescapedCharPos]); strNew.push_back(cUnescapedChar); nOffset = nUnescapedCharPos + 1; } @@ -858,7 +858,7 @@ CMIUtilString CMIUtilString::StripSlashes(void) const { - const MIchar cBckSlash('\\'); + const char cBckSlash('\\'); const MIuint nLen(length()); CMIUtilString strNew; strNew.reserve(nLen); @@ -882,7 +882,7 @@ strNew.push_back(cBckSlash); break; } - const MIchar cEscapedChar((*this)[nBckSlashPos + 1]); + const char cEscapedChar((*this)[nBckSlashPos + 1]); const MIuint nEscapedCharPos(std::string("\"\\").find(cEscapedChar)); const bool bEscapedCharNotFound(nEscapedCharPos == (MIuint)std::string::npos); if (bEscapedCharNotFound) Index: tools/lldb-mi/MIUtilFileStd.h =================================================================== --- tools/lldb-mi/MIUtilFileStd.h +++ tools/lldb-mi/MIUtilFileStd.h @@ -23,15 +23,15 @@ { // Static: public: - static MIchar GetSlash(void); + static char GetSlash(void); // Methods: public: /* ctor */ CMIUtilFileStd(void); // bool CreateWrite(const CMIUtilString &vFileNamePath, bool &vwrbNewCreated); bool Write(const CMIUtilString &vData); - bool Write(const MIchar *vpData, const MIuint vCharCnt); + bool Write(const char *vpData, const MIuint vCharCnt); void Close(void); bool IsOk(void) const; bool IsFileExist(const CMIUtilString &vFileNamePath) const; Index: tools/lldb-mi/MIUtilFileStd.cpp =================================================================== --- tools/lldb-mi/MIUtilFileStd.cpp +++ tools/lldb-mi/MIUtilFileStd.cpp @@ -147,7 +147,7 @@ // Throws: None. //-- bool -CMIUtilFileStd::Write(const MIchar *vpData, const MIuint vCharCnt) +CMIUtilFileStd::Write(const char *vpData, const MIuint vCharCnt) { if (vCharCnt == 0) return MIstatus::success; @@ -273,10 +273,10 @@ // is running on. // Type: Static method. // Args: None. -// Return: MIchar - '/' or '\' character. +// Return: char - '/' or '\' character. // Throws: None. //-- -MIchar +char CMIUtilFileStd::GetSlash(void) { #if !defined(_MSC_VER) Index: tools/lldb-mi/MIUtilDateTimeStd.h =================================================================== --- tools/lldb-mi/MIUtilDateTimeStd.h +++ tools/lldb-mi/MIUtilDateTimeStd.h @@ -40,5 +40,5 @@ // Attributes: private: std::time_t m_rawTime; - MIchar m_pScratch[16]; + char m_pScratch[16]; }; Index: tools/lldb-mi/MIDriverMgr.cpp =================================================================== --- tools/lldb-mi/MIDriverMgr.cpp +++ tools/lldb-mi/MIDriverMgr.cpp @@ -337,7 +337,7 @@ if (!bOk) { CMIUtilString errMsg; - const MIchar *pErrorCstr = error.GetCString(); + const char *pErrorCstr = error.GetCString(); if (pErrorCstr != nullptr) errMsg = CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_PARSE_ARGS), m_pDriverCurrent->GetName().c_str(), pErrorCstr); else Index: tools/lldb-mi/MIDriver.cpp =================================================================== --- tools/lldb-mi/MIDriver.cpp +++ tools/lldb-mi/MIDriver.cpp @@ -559,7 +559,7 @@ while (bOk && !m_bExitApp) { CMIUtilString errorText; - const MIchar *pCmd = m_rStdin.ReadLine (errorText); + const char *pCmd = m_rStdin.ReadLine (errorText); if (pCmd != nullptr) { CMIUtilString lineText(pCmd); @@ -649,8 +649,8 @@ // errMsg = errMsg.StripCREndOfLine(); // errMsg = errMsg.StripCRAll(); // const CMIDriverBase * pOtherDriver = GetDriverToFallThruTo(); - // const MIchar * pName = pOtherDriver->GetDriverName().c_str(); - // const MIchar * pId = pOtherDriver->GetDriverId().c_str(); + // const char * pName = pOtherDriver->GetDriverName().c_str(); + // const char * pId = pOtherDriver->GetDriverId().c_str(); // const CMIUtilString msg( CMIUtilString::Format( MIRSRC( IDS_DRIVER_ERR_FALLTHRU_DRIVER_ERR ), pName, pId, errMsg.c_str() ) //); // m_pLog->WriteMsg( msg ); Index: tools/lldb-mi/MIDataTypes.h =================================================================== --- tools/lldb-mi/MIDataTypes.h +++ tools/lldb-mi/MIDataTypes.h @@ -76,9 +76,6 @@ // Fundamentals: typedef float MIflt; typedef double MIdbl; -typedef char MIchar; // Defaults to signed char, i.e. MIschar. -typedef signed char MIschar; // Range: -128 to 127. More explicit than using MIchar. -typedef unsigned char MIuchar; // Range: 0 to 255. typedef long long MIint64; // 64bit signed integer. typedef unsigned long long MIuint64; // 64bit unsigned integer. Index: tools/lldb-mi/MICmnStreamStdin.h =================================================================== --- tools/lldb-mi/MICmnStreamStdin.h +++ tools/lldb-mi/MICmnStreamStdin.h @@ -39,7 +39,7 @@ bool SetPrompt(const CMIUtilString &vNewPrompt); void SetEnablePrompt(const bool vbYes); bool GetEnablePrompt(void) const; - const MIchar *ReadLine(CMIUtilString &vwErrMsg); + const char *ReadLine(CMIUtilString &vwErrMsg); // Methods: private: @@ -57,5 +57,5 @@ CMIUtilString m_strPromptCurrent; // Command line prompt as shown to the user bool m_bShowPrompt; // True = Yes prompt is shown/output to the user (stdout), false = no prompt static const int m_constBufferSize = 2048; - MIchar *m_pCmdBuffer; + char *m_pCmdBuffer; }; Index: tools/lldb-mi/MICmnStreamStdin.cpp =================================================================== --- tools/lldb-mi/MICmnStreamStdin.cpp +++ tools/lldb-mi/MICmnStreamStdin.cpp @@ -72,7 +72,7 @@ if (bOk) { - m_pCmdBuffer = new MIchar[m_constBufferSize]; + m_pCmdBuffer = new char[m_constBufferSize]; } else { @@ -198,16 +198,16 @@ // Details: Wait on new line of data from stdin stream (completed by '\n' or '\r'). // Type: Method. // Args: vwErrMsg - (W) Empty string ok or error description. -// Return: MIchar * - text buffer pointer or NULL on failure. +// Return: char * - text buffer pointer or NULL on failure. // Throws: None. //-- -const MIchar * +const char * CMICmnStreamStdin::ReadLine(CMIUtilString &vwErrMsg) { vwErrMsg.clear(); // Read user input - const MIchar *pText = ::fgets(&m_pCmdBuffer[0], m_constBufferSize, stdin); + const char *pText = ::fgets(&m_pCmdBuffer[0], m_constBufferSize, stdin); if (pText == nullptr) { #ifdef _MSC_VER @@ -228,7 +228,7 @@ } // Strip off new line characters - for (MIchar *pI = m_pCmdBuffer; *pI != '\0'; pI++) + for (char *pI = m_pCmdBuffer; *pI != '\0'; pI++) { if ((*pI == '\n') || (*pI == '\r')) { Index: tools/lldb-mi/MICmnResources.h =================================================================== --- tools/lldb-mi/MICmnResources.h +++ tools/lldb-mi/MICmnResources.h @@ -297,8 +297,8 @@ // Typedef: private: - typedef std::map<MIuint, const MIchar *> MapRscrIdToTextData_t; - typedef std::pair<MIuint, const MIchar *> MapPairRscrIdToTextData_t; + typedef std::map<MIuint, const char *> MapRscrIdToTextData_t; + typedef std::pair<MIuint, const char *> MapPairRscrIdToTextData_t; // Enumerations: private: @@ -312,7 +312,7 @@ struct SRsrcTextData { MIuint id; - const MIchar *pTextData; + const char *pTextData; }; // Methods: Index: tools/lldb-mi/MICmnResources.cpp =================================================================== --- tools/lldb-mi/MICmnResources.cpp +++ tools/lldb-mi/MICmnResources.cpp @@ -422,7 +422,7 @@ const MIuint nRsrcId((*it).first); MIunused(nRsrcId); - const MIchar *pRsrcData((*it).second); + const char *pRsrcData((*it).second); // Return result vrwResourceString = pRsrcData; Index: tools/lldb-mi/MICmnMIValueTuple.cpp =================================================================== --- tools/lldb-mi/MICmnMIValueTuple.cpp +++ tools/lldb-mi/MICmnMIValueTuple.cpp @@ -76,7 +76,7 @@ bool CMICmnMIValueTuple::BuildTuple(void) { - const MIchar *pFormat = "{%s}"; + const char *pFormat = "{%s}"; m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str()); return MIstatus::success; @@ -110,7 +110,7 @@ m_strValue = m_strValue.substr(0, m_strValue.size() - 1); } - const MIchar *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}"; + const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}"; m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(), vResult.GetString().c_str()); return MIstatus::success; @@ -136,7 +136,7 @@ } const CMIUtilString data(ExtractContentNoBrackets()); - const MIchar *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}"; + const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}"; m_strValue = CMIUtilString::Format(pFormat, data.c_str(), vValue.c_str()); return MIstatus::success; Index: tools/lldb-mi/MICmnMIValueResult.cpp =================================================================== --- tools/lldb-mi/MICmnMIValueResult.cpp +++ tools/lldb-mi/MICmnMIValueResult.cpp @@ -83,7 +83,7 @@ bool CMICmnMIValueResult::BuildResult(void) { - const MIchar *pFormat = m_bUseSpacing ? "%s %s %s" : "%s%s%s"; + const char *pFormat = m_bUseSpacing ? "%s %s %s" : "%s%s%s"; m_strValue = CMIUtilString::Format(pFormat, m_strPartVariable.c_str(), ms_constStrEqual.c_str(), m_partMIValue.GetString().c_str()); return MIstatus::success; @@ -101,7 +101,7 @@ bool CMICmnMIValueResult::BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue) { - const MIchar *pFormat = m_bUseSpacing ? "%s, %s %s %s" : "%s,%s%s%s"; + const char *pFormat = m_bUseSpacing ? "%s, %s %s %s" : "%s,%s%s%s"; m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(), vVariable.c_str(), ms_constStrEqual.c_str(), vValue.GetString().c_str()); Index: tools/lldb-mi/MICmnMIValueList.cpp =================================================================== --- tools/lldb-mi/MICmnMIValueList.cpp +++ tools/lldb-mi/MICmnMIValueList.cpp @@ -76,7 +76,7 @@ bool CMICmnMIValueList::BuildList(void) { - const MIchar *pFormat = "[%s]"; + const char *pFormat = "[%s]"; m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str()); return MIstatus::success; @@ -136,7 +136,7 @@ } const CMIUtilString data(ExtractContentNoBrackets()); - const MIchar *pFormat = "[%s,%s]"; + const char *pFormat = "[%s,%s]"; m_strValue = CMIUtilString::Format(pFormat, data.c_str(), vResult.GetString().c_str()); return MIstatus::success; @@ -168,7 +168,7 @@ size_t len = m_strValue.size(); if ( (len > 1) && (m_strValue[0] == '[') && (m_strValue[len - 1] == ']') ) m_strValue = m_strValue.substr(1, len - 2); - const MIchar *pFormat = "[%s,%s]"; + const char *pFormat = "[%s,%s]"; m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(), vValue.GetString().c_str()); return MIstatus::success; Index: tools/lldb-mi/MICmnMIValueConst.cpp =================================================================== --- tools/lldb-mi/MICmnMIValueConst.cpp +++ tools/lldb-mi/MICmnMIValueConst.cpp @@ -73,13 +73,13 @@ } else { - const MIchar *pFormat = "%s%s%s"; + const char *pFormat = "%s%s%s"; m_strValue = CMIUtilString::Format(pFormat, ms_constStrDblQuote.c_str(), strValue.c_str(), ms_constStrDblQuote.c_str()); } } else { - const MIchar *pFormat = "%s%s"; + const char *pFormat = "%s%s"; m_strValue = CMIUtilString::Format(pFormat, ms_constStrDblQuote.c_str(), ms_constStrDblQuote.c_str()); } Index: tools/lldb-mi/MICmnMIResultRecord.cpp =================================================================== --- tools/lldb-mi/MICmnMIResultRecord.cpp +++ tools/lldb-mi/MICmnMIResultRecord.cpp @@ -106,7 +106,7 @@ bool CMICmnMIResultRecord::BuildResultRecord(void) { - const MIchar *pFormat = "%s%s%s"; + const char *pFormat = "%s%s%s"; const CMIUtilString &rStrResultRecord(ms_MapResultClassToResultClassText[m_eResultRecordResultClass]); m_strResultRecord = CMIUtilString::Format(pFormat, m_strResultRecordToken.c_str(), ms_constStrResultRecordHat.c_str(), rStrResultRecord.c_str()); Index: tools/lldb-mi/MICmnMIOutOfBandRecord.cpp =================================================================== --- tools/lldb-mi/MICmnMIOutOfBandRecord.cpp +++ tools/lldb-mi/MICmnMIOutOfBandRecord.cpp @@ -143,7 +143,7 @@ bool CMICmnMIOutOfBandRecord::BuildAsyncRecord(void) { - const MIchar *pFormat = "%s%s"; + const char *pFormat = "%s%s"; const CMIUtilString &rStrAsyncRecord(ms_MapOutOfBandToOutOfBandText[m_eResultAsyncRecordClass]); const CMIUtilString &rStrToken(ms_constMapAsyncRecordTextToToken[m_eResultAsyncRecordClass]); m_strAsyncRecord = CMIUtilString::Format(pFormat, rStrToken.c_str(), rStrAsyncRecord.c_str()); Index: tools/lldb-mi/MICmnLogMediumFile.h =================================================================== --- tools/lldb-mi/MICmnLogMediumFile.h +++ tools/lldb-mi/MICmnLogMediumFile.h @@ -66,7 +66,7 @@ bool FileFormFileNamePath(void); CMIUtilString MassagedData(const CMIUtilString &vData, const CMICmnLog::ELogVerbosity veType); bool FileWriteHeader(void); - MIchar ConvertLogVerbosityTypeToId(const CMICmnLog::ELogVerbosity veType) const; + char ConvertLogVerbosityTypeToId(const CMICmnLog::ELogVerbosity veType) const; CMIUtilString ConvertCr(const CMIUtilString &vData) const; // Attributes: Index: tools/lldb-mi/MICmnLogMediumFile.cpp =================================================================== --- tools/lldb-mi/MICmnLogMediumFile.cpp +++ tools/lldb-mi/MICmnLogMediumFile.cpp @@ -276,7 +276,7 @@ { const CMIUtilString strCr("\n"); CMIUtilString data; - const MIchar verbosityCode(ConvertLogVerbosityTypeToId(veType)); + const char verbosityCode(ConvertLogVerbosityTypeToId(veType)); const CMIUtilString dt(CMIUtilString::Format("%s %s", m_strDate.c_str(), m_dateTime.GetTime().c_str())); data = CMIUtilString::Format("%c,%s,%s", verbosityCode, dt.c_str(), vData.c_str()); @@ -300,10 +300,10 @@ // Return: wchar_t - A letter. // Throws: None. //-- -MIchar +char CMICmnLogMediumFile::ConvertLogVerbosityTypeToId(const CMICmnLog::ELogVerbosity veType) const { - MIchar c = 0; + char c = 0; if (veType != 0) { MIuint cnt = 0; Index: tools/lldb-mi/MICmnLLDBUtilSBValue.h =================================================================== --- tools/lldb-mi/MICmnLLDBUtilSBValue.h +++ tools/lldb-mi/MICmnLLDBUtilSBValue.h @@ -61,8 +61,8 @@ // Attributes: private: lldb::SBValue &m_rValue; - const MIchar *m_pUnkwn; - const MIchar *m_pComposite; + const char *m_pUnkwn; + const char *m_pComposite; bool m_bValidSBValue; // True = SBValue is a valid object, false = not valid. bool m_bHandleCharType; // True = Yes return text molding to char type, false = just return data. bool m_bHandleArrayType; // True = Yes return special stub for array type, false = just return data. Index: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBUtilSBValue.cpp +++ tools/lldb-mi/MICmnLLDBUtilSBValue.cpp @@ -59,7 +59,7 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetName(void) const { - const MIchar *pName = m_bValidSBValue ? m_rValue.GetName() : nullptr; + const char *pName = m_bValidSBValue ? m_rValue.GetName() : nullptr; const CMIUtilString text((pName != nullptr) ? pName : m_pUnkwn); return text; @@ -129,7 +129,7 @@ } else { - const MIchar *pValue = m_rValue.GetValue(); + const char *pValue = m_rValue.GetValue(); vwrValue = pValue != nullptr ? pValue : m_pUnkwn; return MIstatus::success; } @@ -143,7 +143,7 @@ } else { - const MIchar *pValue = m_rValue.GetValue(); + const char *pValue = m_rValue.GetValue(); vwrValue = pValue != nullptr ? pValue : m_pUnkwn; return MIstatus::success; } @@ -223,7 +223,7 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetSimpleValueCStringPointer(void) const { - const MIchar *value = m_rValue.GetValue(); + const char *value = m_rValue.GetValue(); if (value == nullptr) return m_pUnkwn; @@ -521,7 +521,7 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetTypeName(void) const { - const MIchar *pName = m_bValidSBValue ? m_rValue.GetTypeName() : nullptr; + const char *pName = m_bValidSBValue ? m_rValue.GetTypeName() : nullptr; const CMIUtilString text((pName != nullptr) ? pName : m_pUnkwn); return text; @@ -537,7 +537,7 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetTypeNameDisplay(void) const { - const MIchar *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr; + const char *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr; const CMIUtilString text((pName != nullptr) ? pName : m_pUnkwn); return text; @@ -569,7 +569,7 @@ { bool bHasAName = false; - const MIchar *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr; + const char *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr; if (pName != nullptr) { bHasAName = (CMIUtilString(pName).length() > 0); Index: tools/lldb-mi/MICmnLLDBProxySBValue.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBProxySBValue.cpp +++ tools/lldb-mi/MICmnLLDBProxySBValue.cpp @@ -103,11 +103,11 @@ CMICmnLLDBProxySBValue::GetCString(const lldb::SBValue &vrValue, CMIUtilString &vwCString) { lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue); - const MIchar *pCType = rValue.GetTypeName(); + const char *pCType = rValue.GetTypeName(); if (pCType == nullptr) return MIstatus::failure; - const MIchar *pType = "unsigned char *"; + const char *pType = "unsigned char *"; if (!CMIUtilString::Compare(pCType, pType)) return MIstatus::failure; @@ -120,16 +120,16 @@ lldb::SBProcess sbProcess = rSessionInfo.GetProcess(); MIuint nBufferSize = 64; bool bNeedResize = false; - MIchar *pBuffer = static_cast<MIchar *>(::malloc(nBufferSize)); + char *pBuffer = static_cast<char *>(::malloc(nBufferSize)); do { lldb::SBError error; const size_t nReadSize = sbProcess.ReadCStringFromMemory((lldb::addr_t)nNum, pBuffer, nBufferSize, error); if (nReadSize == (nBufferSize - 1)) { bNeedResize = true; nBufferSize = nBufferSize << 1; - pBuffer = static_cast<MIchar *>(::realloc(pBuffer, nBufferSize)); + pBuffer = static_cast<char *>(::realloc(pBuffer, nBufferSize)); } else bNeedResize = false; Index: tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp +++ tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp @@ -169,7 +169,7 @@ { bool bOk = MIstatus::success; - const MIchar *pEventType = ""; + const char *pEventType = ""; const MIuint nEventType = vEvent.GetType(); switch (nEventType) { @@ -216,7 +216,7 @@ { bool bOk = MIstatus::success; - const MIchar *pEventType = ""; + const char *pEventType = ""; const lldb::BreakpointEventType eEvent = lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent(vEvent); switch (eEvent) { @@ -418,7 +418,7 @@ sBrkPtInfo.m_strOrigLoc = CMIUtilString::Format("%s:%d", sBrkPtInfo.m_fileName.c_str(), sBrkPtInfo.m_nLine); sBrkPtInfo.m_nIgnore = brkPt.GetIgnoreCount(); sBrkPtInfo.m_bPending = false; - const MIchar *pStrCondition = brkPt.GetCondition(); + const char *pStrCondition = brkPt.GetCondition(); sBrkPtInfo.m_bCondition = (pStrCondition != nullptr) ? true : false; sBrkPtInfo.m_strCondition = (pStrCondition != nullptr) ? pStrCondition : "??"; sBrkPtInfo.m_bBrkPtThreadId = (brkPt.GetThreadID() != 0) ? true : false; @@ -482,7 +482,7 @@ return MIstatus::failure; bool bOk = MIstatus::success; - const MIchar *pEventType = ""; + const char *pEventType = ""; const MIuint nEventType = vEvent.GetType(); switch (nEventType) { @@ -584,7 +584,7 @@ return MIstatus::failure; bool bOk = MIstatus::success; - const MIchar *pEventType = ""; + const char *pEventType = ""; const MIuint nEventType = vEvent.GetType(); switch (nEventType) { @@ -749,7 +749,7 @@ // This function is not used // *** This function is under development - const MIchar *pEventType = ""; + const char *pEventType = ""; const MIuint nEventType = vEvent.GetType(); switch (nEventType) { @@ -829,7 +829,7 @@ } bool bShouldBrk = true; - const MIchar *pEventType = ""; + const char *pEventType = ""; switch (eEventState) { case lldb::eStateUnloaded: @@ -940,7 +940,7 @@ if (!UpdateSelectedThread()) return MIstatus::failure; - const MIchar *pEventType = ""; + const char *pEventType = ""; bool bOk = MIstatus::success; lldb::SBProcess sbProcess = CMICmnLLDBDebugSessionInfo::Instance().GetProcess(); const lldb::StopReason eStoppedReason = sbProcess.GetSelectedThread().GetStopReason(); @@ -1114,7 +1114,7 @@ const CMICmnMIValueResult miValueResult("reason", miValueConst); CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult); lldb::SBUnixSignals sbUnixSignals = sbProcess.GetUnixSignals(); - const MIchar *pSignal = sbUnixSignals.GetSignalAsCString(nStopReason); + const char *pSignal = sbUnixSignals.GetSignalAsCString(nStopReason); if (pSignal) { const CMICmnMIValueConst miValueConst2(pSignal); Index: tools/lldb-mi/MICmnLLDBDebugger.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBDebugger.cpp +++ tools/lldb-mi/MICmnLLDBDebugger.cpp @@ -393,7 +393,7 @@ if (!ClientSaveMask(vClientName, vBroadcasterClass, vEventMask)) return MIstatus::failure; - const MIchar *pBroadCasterName = vBroadcasterClass.c_str(); + const char *pBroadCasterName = vBroadcasterClass.c_str(); MIuint eventMask = vEventMask; eventMask += existingMask; const MIuint result = m_lldbListener.StartListeningForEventClass(m_lldbDebugger, pBroadCasterName, eventMask); @@ -420,7 +420,7 @@ bool CMICmnLLDBDebugger::RegisterForEvent(const CMIUtilString &vClientName, const lldb::SBBroadcaster &vBroadcaster, const MIuint vEventMask) { - const MIchar *pBroadcasterName = vBroadcaster.GetName(); + const char *pBroadcasterName = vBroadcaster.GetName(); if (pBroadcasterName == nullptr) { SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROARDCASTER_NAME), MIRSRC(IDS_WORD_INVALIDNULLPTR))); @@ -485,7 +485,7 @@ } } - const MIchar *pBroadCasterName = vBroadcasterClass.c_str(); + const char *pBroadCasterName = vBroadcasterClass.c_str(); if (!m_lldbListener.StopListeningForEventClass(m_lldbDebugger, pBroadCasterName, newEventMask)) { SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_STOPLISTENER), vClientName.c_str(), pBroadCasterName)); Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h =================================================================== --- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h +++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h @@ -57,7 +57,7 @@ // Statics: public: static varFormat_e GetVarFormatForString(const CMIUtilString &vrStrFormat); - static varFormat_e GetVarFormatForChar(const MIchar &vrcFormat); + static varFormat_e GetVarFormatForChar(const char &vrcFormat); static CMIUtilString GetValueStringFormatted(const lldb::SBValue &vrValue, const varFormat_e veVarFormat); static void VarObjAdd(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj); static void VarObjDelete(const CMIUtilString &vrVarName); @@ -105,17 +105,17 @@ // Statics: private: - static CMIUtilString GetStringFormatted(const MIuint64 vnValue, const MIchar *vpStrValueNatural, varFormat_e veVarFormat); + static CMIUtilString GetStringFormatted(const MIuint64 vnValue, const char *vpStrValueNatural, varFormat_e veVarFormat); // Methods: private: bool CopyOther(const CMICmnLLDBDebugSessionInfoVarObj &vrOther); bool MoveOther(CMICmnLLDBDebugSessionInfoVarObj &vrwOther); // Attributes: private: - static const MIchar *ms_aVarFormatStrings[]; - static const MIchar *ms_aVarFormatChars[]; + static const char *ms_aVarFormatStrings[]; + static const char *ms_aVarFormatChars[]; static MapKeyToVarObj_t ms_mapVarIdToVarObj; static MIuint ms_nVarUniqueId; static varFormat_e ms_eDefaultFormat; // overrides "natural" format Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp +++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp @@ -13,11 +13,11 @@ #include "MICmnLLDBUtilSBValue.h" // Instantiations: -const MIchar *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatStrings[] = { +const char *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatStrings[] = { // CODETAG_SESSIONINFO_VARFORMAT_ENUM // *** Order is import here. "<Invalid var format>", "binary", "octal", "decimal", "hexadecimal", "natural"}; -const MIchar *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatChars[] = { +const char *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatChars[] = { // CODETAG_SESSIONINFO_VARFORMAT_ENUM // *** Order is import here. "<Invalid var format>", "t", "o", "d", "x", "N"}; @@ -223,7 +223,7 @@ // CODETAG_SESSIONINFO_VARFORMAT_ENUM for (MIuint i = 0; i < eVarFormat_count; i++) { - const MIchar *pVarFormatString = ms_aVarFormatStrings[i]; + const char *pVarFormatString = ms_aVarFormatStrings[i]; if (vrStrFormat == pVarFormatString) return static_cast<varFormat_e>(i); } @@ -240,15 +240,15 @@ // Throws: None. //-- CMICmnLLDBDebugSessionInfoVarObj::varFormat_e -CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(const MIchar &vrcFormat) +CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(const char &vrcFormat) { if ('r' == vrcFormat) return eVarFormat_Hex; // CODETAG_SESSIONINFO_VARFORMAT_ENUM for (MIuint i = 0; i < eVarFormat_count; i++) { - const MIchar *pVarFormatChar = ms_aVarFormatChars[i]; + const char *pVarFormatChar = ms_aVarFormatChars[i]; if (*pVarFormatChar == vrcFormat) return static_cast<varFormat_e>(i); } @@ -298,7 +298,7 @@ // Throws: None. //-- CMIUtilString -CMICmnLLDBDebugSessionInfoVarObj::GetStringFormatted(const MIuint64 vnValue, const MIchar *vpStrValueNatural, +CMICmnLLDBDebugSessionInfoVarObj::GetStringFormatted(const MIuint64 vnValue, const char *vpStrValueNatural, const CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat) { CMIUtilString strFormattedValue; Index: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -380,11 +380,11 @@ return MIstatus::failure; // Add "target-id" - const MIchar *pThreadName = rThread.GetName(); + 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 - const MIchar *pThrdFmt = bHaveName ? "%s" : "Thread %d"; + const char *pThrdFmt = bHaveName ? "%s" : "Thread %d"; CMIUtilString strThread; if (bHaveName) strThread = CMIUtilString::Format(pThrdFmt, pThreadName); @@ -635,17 +635,17 @@ const MIuint nBytes = rFrame.GetLineEntry().GetFileSpec().GetPath(&pBuffer[0], sizeof(pBuffer)); MIunused(nBytes); CMIUtilString strResolvedPath(&pBuffer[0]); - const MIchar *pUnkwn = "??"; + const char *pUnkwn = "??"; if (!ResolvePath(pUnkwn, strResolvedPath)) return MIstatus::failure; vwPath = strResolvedPath; vwPc = rFrame.GetPC(); - const MIchar *pFnName = rFrame.GetFunctionName(); + const char *pFnName = rFrame.GetFunctionName(); vwFnName = (pFnName != nullptr) ? pFnName : pUnkwn; - const MIchar *pFileName = rFrame.GetLineEntry().GetFileSpec().GetFilename(); + const char *pFileName = rFrame.GetLineEntry().GetFileSpec().GetFilename(); vwFileName = (pFileName != nullptr) ? pFileName : pUnkwn; vwnLine = rFrame.GetLineEntry().GetLine(); @@ -801,13 +801,13 @@ lldb::SBBreakpointLocation brkPtLoc = rBrkPt.GetLocationAtIndex(0); lldb::SBAddress brkPtAddr = brkPtLoc.GetAddress(); lldb::SBSymbolContext symbolCntxt = brkPtAddr.GetSymbolContext(lldb::eSymbolContextEverything); - const MIchar *pUnkwn = "??"; + const char *pUnkwn = "??"; lldb::SBModule rModule = symbolCntxt.GetModule(); - const MIchar *pModule = rModule.IsValid() ? rModule.GetFileSpec().GetFilename() : pUnkwn; + const char *pModule = rModule.IsValid() ? rModule.GetFileSpec().GetFilename() : pUnkwn; MIunused(pModule); - const MIchar *pFile = pUnkwn; - const MIchar *pFn = pUnkwn; - const MIchar *pFilePath = pUnkwn; + const char *pFile = pUnkwn; + const char *pFn = pUnkwn; + const char *pFilePath = pUnkwn; size_t nLine = 0; lldb::addr_t nAddr = brkPtAddr.GetLoadAddress(GetTarget()); if (nAddr == LLDB_INVALID_ADDRESS) Index: tools/lldb-mi/MICmdInterpreter.cpp =================================================================== --- tools/lldb-mi/MICmdInterpreter.cpp +++ tools/lldb-mi/MICmdInterpreter.cpp @@ -186,7 +186,7 @@ bool CMICmdInterpreter::MiHasCmdTokenEndingAlpha(const CMIUtilString &vTextLine) { - MIchar cChar = vTextLine[0]; + char cChar = vTextLine[0]; MIuint i = 0; while (::isdigit(cChar) != 0) { Index: tools/lldb-mi/MICmdCmdVar.h =================================================================== --- tools/lldb-mi/MICmdCmdVar.h +++ tools/lldb-mi/MICmdCmdVar.h @@ -122,7 +122,7 @@ // Methods: private: bool ExamineSBValueForChange(lldb::SBValue &vrwValue, bool &vrwbChanged); - bool MIFormResponse(const CMIUtilString &vrStrVarName, const MIchar *const vpValue, const CMIUtilString &vrStrScope); + bool MIFormResponse(const CMIUtilString &vrStrVarName, const char *const vpValue, const CMIUtilString &vrStrScope); // Attribute: private: Index: tools/lldb-mi/MICmdCmdVar.cpp =================================================================== --- tools/lldb-mi/MICmdCmdVar.cpp +++ tools/lldb-mi/MICmdCmdVar.cpp @@ -461,7 +461,7 @@ // Throws: None. //-- bool -CMICmdCmdVarUpdate::MIFormResponse(const CMIUtilString &vrStrVarName, const MIchar *const vpValue, const CMIUtilString &vrStrScope) +CMICmdCmdVarUpdate::MIFormResponse(const CMIUtilString &vrStrVarName, const char *const vpValue, const CMIUtilString &vrStrScope) { // MI print "[{name=\"%s\",value=\"%s\",in_scope=\"%s\",type_changed=\"false\",has_more=\"0\"}]" const CMICmnMIValueConst miValueConst(vrStrVarName); @@ -1335,7 +1335,7 @@ return MIstatus::failure; } - const MIchar *pPathExpression = stream.GetData(); + const char *pPathExpression = stream.GetData(); if (pPathExpression == nullptr) { // Build expression from what we do know Index: tools/lldb-mi/MICmdCmdTarget.cpp =================================================================== --- tools/lldb-mi/MICmdCmdTarget.cpp +++ tools/lldb-mi/MICmdCmdTarget.cpp @@ -111,7 +111,7 @@ const CMIUtilString strUrl = CMIUtilString::Format("connect://%s", pArgParameters->GetValue().c_str()); // Ask LLDB to collect to the target port - const MIchar *pPlugin("gdb-remote"); + const char *pPlugin("gdb-remote"); lldb::SBError error; lldb::SBProcess process = rSessionInfo.GetTarget().ConnectRemote(rSessionInfo.GetListener(), strUrl.c_str(), pPlugin, error); Index: tools/lldb-mi/MICmdCmdSymbol.cpp =================================================================== --- tools/lldb-mi/MICmdCmdSymbol.cpp +++ tools/lldb-mi/MICmdCmdSymbol.cpp @@ -104,7 +104,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); const CMIUtilString strMsg(CMIUtilString(pLldbErr).StripCRAll()); const CMICmnMIValueConst miValueConst(strMsg); const CMICmnMIValueResult miValueResult("message", miValueConst); Index: tools/lldb-mi/MICmdCmdMiscellanous.cpp =================================================================== --- tools/lldb-mi/MICmdCmdMiscellanous.cpp +++ tools/lldb-mi/MICmdCmdMiscellanous.cpp @@ -330,8 +330,8 @@ if (rSessionInfo.GetTarget().IsValid()) { lldb::SBTarget sbTrgt = rSessionInfo.GetTarget(); - const MIchar *pDir = sbTrgt.GetExecutable().GetDirectory(); - const MIchar *pFileName = sbTrgt.GetExecutable().GetFilename(); + const char *pDir = sbTrgt.GetExecutable().GetDirectory(); + const char *pFileName = sbTrgt.GetExecutable().GetFilename(); const CMIUtilString strFile(CMIUtilString::Format("%s/%s", pDir, pFileName)); const CMICmnMIValueConst miValueConst4(strFile); const CMICmnMIValueResult miValueResult4("executable", miValueConst4); Index: tools/lldb-mi/MICmdCmdFile.cpp =================================================================== --- tools/lldb-mi/MICmdCmdFile.cpp +++ tools/lldb-mi/MICmdCmdFile.cpp @@ -106,8 +106,8 @@ CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); lldb::SBDebugger &rDbgr = rSessionInfo.GetDebugger(); lldb::SBError error; - const MIchar *pTargetTriple = nullptr; // Let LLDB discover the triple required - const MIchar *pTargetPlatformName = platformName.c_str(); + const char *pTargetTriple = nullptr; // Let LLDB discover the triple required + const char *pTargetPlatformName = platformName.c_str(); const bool bAddDepModules = false; lldb::SBTarget target = rDbgr.CreateTarget(strExeFilePath.c_str(), pTargetTriple, pTargetPlatformName, bAddDepModules, error); CMIUtilString strWkDir; Index: tools/lldb-mi/MICmdCmdExec.cpp =================================================================== --- tools/lldb-mi/MICmdCmdExec.cpp +++ tools/lldb-mi/MICmdCmdExec.cpp @@ -198,7 +198,7 @@ bool CMICmdCmdExecContinue::Execute(void) { - const MIchar *pCmd = "continue"; + const char *pCmd = "continue"; CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(pCmd, m_lldbResult); MIunused(rtn); @@ -217,7 +217,7 @@ { // ToDo: Re-evaluate if this is required when application near finished as this is parsing LLDB error message // which seems a hack and is code brittle - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); const CMIUtilString strLldbMsg(CMIUtilString(pLldbErr).StripCREndOfLine()); if (strLldbMsg == "error: Process must be launched.") { @@ -367,7 +367,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); MIunused(pLldbErr); const CMICmnMIValueConst miValueConst(m_lldbResult.GetError()); const CMICmnMIValueResult miValueResult("message", miValueConst); @@ -494,7 +494,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); MIunused(pLldbErr); const CMICmnMIValueConst miValueConst(m_lldbResult.GetError()); const CMICmnMIValueResult miValueResult("message", miValueConst); @@ -621,7 +621,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); MIunused(pLldbErr); const CMICmnMIValueConst miValueConst(m_lldbResult.GetError()); const CMICmnMIValueResult miValueResult("message", miValueConst); @@ -748,7 +748,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); MIunused(pLldbErr); const CMICmnMIValueConst miValueConst(m_lldbResult.GetError()); const CMICmnMIValueResult miValueResult("message", miValueConst); @@ -876,7 +876,7 @@ { if (m_lldbResult.GetErrorSize() > 0) { - const MIchar *pLldbErr = m_lldbResult.GetError(); + const char *pLldbErr = m_lldbResult.GetError(); MIunused(pLldbErr); const CMICmnMIValueConst miValueConst(m_lldbResult.GetError()); const CMICmnMIValueResult miValueResult("message", miValueConst); Index: tools/lldb-mi/MICmdCmdData.h =================================================================== --- tools/lldb-mi/MICmdCmdData.h +++ tools/lldb-mi/MICmdCmdData.h @@ -68,7 +68,7 @@ // Methods: private: - bool HaveInvalidCharacterInExpression(const CMIUtilString &vrExpr, MIchar &vrwInvalidChar); + bool HaveInvalidCharacterInExpression(const CMIUtilString &vrExpr, char &vrwInvalidChar); // Attributes: private: @@ -78,7 +78,7 @@ CMICmnMIValueTuple m_miValueTuple; bool m_bCompositeVarType; // True = yes composite type, false = internal type bool m_bFoundInvalidChar; // True = yes found unexpected character in the expression, false = all ok - MIchar m_cExpressionInvalidChar; + char m_cExpressionInvalidChar; const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option. Not handled by command. const CMIUtilString m_constStrArgFrame; // Not specified in MI spec but Eclipse gives this option. Not handled by command. const CMIUtilString m_constStrArgExpr; @@ -155,7 +155,7 @@ const CMIUtilString m_constStrArgByteOffset; const CMIUtilString m_constStrArgAddrExpr; const CMIUtilString m_constStrArgNumBytes; - MIuchar *m_pBufferMemory; + unsigned char *m_pBufferMemory; MIuint64 m_nAddrStart; MIuint64 m_nAddrNumBytesToRead; }; @@ -368,7 +368,7 @@ MIuint64 m_nAddr; CMIUtilString m_strContents; MIuint64 m_nCount; - MIuchar *m_pBufferMemory; + unsigned char *m_pBufferMemory; }; //++ ============================================================================ Index: tools/lldb-mi/MICmdCmdData.cpp =================================================================== --- tools/lldb-mi/MICmdCmdData.cpp +++ tools/lldb-mi/MICmdCmdData.cpp @@ -265,7 +265,7 @@ // Throws: None. //-- bool -CMICmdCmdDataEvaluateExpression::HaveInvalidCharacterInExpression(const CMIUtilString &vrExpr, MIchar &vrwInvalidChar) +CMICmdCmdDataEvaluateExpression::HaveInvalidCharacterInExpression(const CMIUtilString &vrExpr, char &vrwInvalidChar) { static const std::string strInvalidCharacters(";#\\"); const size_t nInvalidCharacterOffset = vrExpr.find_first_of(strInvalidCharacters); @@ -403,20 +403,20 @@ for (size_t i = 0; i < nInstructions; i++) { - const MIchar *pUnknown = "??"; + const char *pUnknown = "??"; lldb::SBInstruction instrt = instructions.GetInstructionAtIndex(i); - const MIchar *pStrMnemonic = instrt.GetMnemonic(sbTarget); + const char *pStrMnemonic = instrt.GetMnemonic(sbTarget); pStrMnemonic = (pStrMnemonic != nullptr) ? pStrMnemonic : pUnknown; - const MIchar *pStrComment = instrt.GetComment(sbTarget); + const char *pStrComment = instrt.GetComment(sbTarget); CMIUtilString strComment; if (pStrComment != nullptr && *pStrComment != '\0') strComment = CMIUtilString::Format("; %s", pStrComment); lldb::SBAddress address = instrt.GetAddress(); lldb::addr_t addr = address.GetLoadAddress(sbTarget); - const MIchar *pFnName = address.GetFunction().GetName(); + const char *pFnName = address.GetFunction().GetName(); pFnName = (pFnName != nullptr) ? pFnName : pUnknown; lldb::addr_t addrOffSet = address.GetOffset() - start_offset; - const MIchar *pStrOperands = instrt.GetOperands(sbTarget); + const char *pStrOperands = instrt.GetOperands(sbTarget); pStrOperands = (pStrOperands != nullptr) ? pStrOperands : pUnknown; const size_t instrtSize = instrt.GetByteSize(); @@ -441,7 +441,7 @@ { lldb::SBLineEntry lineEntry = address.GetLineEntry(); const MIuint nLine = lineEntry.GetLine(); - const MIchar *pFileName = lineEntry.GetFileSpec().GetFilename(); + const char *pFileName = lineEntry.GetFileSpec().GetFilename(); pFileName = (pFileName != nullptr) ? pFileName : pUnknown; // MI "src_and_asm_line={line=\"%u\",file=\"%s\",line_asm_insn=[ ]}" @@ -660,7 +660,7 @@ nAddrStart += nAddrOffset; const MIuint64 nAddrNumBytes = pArgNumBytes->GetValue(); - m_pBufferMemory = new MIuchar[nAddrNumBytes]; + m_pBufferMemory = new unsigned char[nAddrNumBytes]; if (m_pBufferMemory == nullptr) { SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_MEMORY_ALLOC_FAILURE), m_cmdData.strMiCmd.c_str(), nAddrNumBytes)); @@ -1544,13 +1544,13 @@ m_nCount = pArgNumber->GetValue(); const MIuint64 nValue = pArgContents->GetValue(); - m_pBufferMemory = new MIuchar[m_nCount]; + m_pBufferMemory = new unsigned char[m_nCount]; if (m_pBufferMemory == nullptr) { SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_MEMORY_ALLOC_FAILURE), m_cmdData.strMiCmd.c_str(), m_nCount)); return MIstatus::failure; } - *m_pBufferMemory = static_cast<MIchar>(nValue); + *m_pBufferMemory = static_cast<char>(nValue); CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); lldb::SBProcess sbProcess = rSessionInfo.GetProcess(); Index: tools/lldb-mi/MICmdArgValString.cpp =================================================================== --- tools/lldb-mi/MICmdArgValString.cpp +++ tools/lldb-mi/MICmdArgValString.cpp @@ -179,7 +179,7 @@ if (vrwArgContext.RemoveArg(rArg)) { m_bValid = true; - const MIchar cQuote = '"'; + const char cQuote = '"'; m_argValue = rArg.Trim(cQuote).StripSlashes(); return MIstatus::success; } @@ -262,7 +262,7 @@ return true; // CODETAG_QUOTEDTEXT_SIMILAR_CODE - const MIchar cQuote = '"'; + const char cQuote = '"'; const MIint nPos = vrTxt.find(cQuote); if (nPos == (MIint)std::string::npos) return false; @@ -273,8 +273,8 @@ // Quote must be the first character in the string or be preceded by a space // Also check for embedded string formating quote - const MIchar cBckSlash = '\\'; - const MIchar cSpace = ' '; + const char cBckSlash = '\\'; + const char cSpace = ' '; if ((nPos > 1) && (vrTxt[nPos - 1] == cBckSlash) && (vrTxt[nPos - 2] != cSpace)) { return false; @@ -308,13 +308,13 @@ CMICmdArgValString::IsStringArgQuotedTextEmbedded(const CMIUtilString &vrTxt) const { // CODETAG_QUOTEDTEXT_SIMILAR_CODE - const MIchar cBckSlash = '\\'; + const char cBckSlash = '\\'; const MIint nPos = vrTxt.find(cBckSlash); if (nPos == (MIint)std::string::npos) return false; // Slash must be the first character in the string or be preceded by a space - const MIchar cSpace = ' '; + const char cSpace = ' '; if ((nPos > 0) && (vrTxt[nPos - 1] != cSpace)) return false; Index: tools/lldb-mi/MICmdArgValFile.cpp =================================================================== --- tools/lldb-mi/MICmdArgValFile.cpp +++ tools/lldb-mi/MICmdArgValFile.cpp @@ -121,7 +121,7 @@ CMIUtilString fileNamePath(vrTxt); // Look for a space in the path - const MIchar cSpace = ' '; + const char cSpace = ' '; const MIint nPos = fileNamePath.find(cSpace); if (nPos != (MIint)std::string::npos) fileNamePath = CMIUtilString::Format("\"%s\"", fileNamePath.c_str()); @@ -182,10 +182,10 @@ CMICmdArgValFile::IsValidChars(const CMIUtilString &vrText) const { static CMIUtilString s_strSpecialCharacters(".'\"`@#$%^&*()_+-={}[]| "); - const MIchar *pPtr = const_cast<MIchar *>(vrText.c_str()); + const char *pPtr = const_cast<char *>(vrText.c_str()); for (MIuint i = 0; i < vrText.length(); i++, pPtr++) { - const MIchar c = *pPtr; + const char c = *pPtr; if (::isalnum((int)c) == 0) { if (s_strSpecialCharacters.find(c) == CMIUtilString::npos) Index: tools/lldb-mi/MICmdArgContext.h =================================================================== --- tools/lldb-mi/MICmdArgContext.h +++ tools/lldb-mi/MICmdArgContext.h @@ -44,6 +44,6 @@ // Attributes: private: CMIUtilString m_strCmdArgsAndOptions; - const MIchar m_constCharSpace; + const char m_constCharSpace; const CMIUtilString m_constStrSpace; };
_______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits