diff options
author | Ilia K <ki.stfu@gmail.com> | 2015-04-24 11:27:36 +0000 |
---|---|---|
committer | Ilia K <ki.stfu@gmail.com> | 2015-04-24 11:27:36 +0000 |
commit | b9355045e1e11fe65095f66e38d170e989d4a93a (patch) | |
tree | e588870f3865cabb4c72219e9c38e0e57d17a6e3 /lldb | |
parent | e10a2585272103b519d09240dbbde84bf89199a4 (diff) | |
download | bcm5719-llvm-b9355045e1e11fe65095f66e38d170e989d4a93a.tar.gz bcm5719-llvm-b9355045e1e11fe65095f66e38d170e989d4a93a.zip |
Fix CMICmnMIOutOfBandRecord to accept stream-records (MI)
Previously the CMICmnMIOutOfBandRecord class worked only with async-records.
llvm-svn: 235709
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp | 34 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h | 7 |
2 files changed, 31 insertions, 10 deletions
diff --git a/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp b/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp index 3c4b57642ee..bb8c09e1481 100644 --- a/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp +++ b/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp @@ -26,7 +26,8 @@ CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_MapOutOfBandToOutOfBan {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, "thread-exited"}, {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "thread-selected"}, {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesLoaded, "shlibs-added"}, - {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesUnloaded, "shlibs-removed"}}; + {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesUnloaded, "shlibs-removed"}, + {CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, ""}}; CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_constMapAsyncRecordTextToToken = { {CMICmnMIOutOfBandRecord::eOutOfBand_Running, "*"}, {CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, "*"}, @@ -41,7 +42,8 @@ CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_constMapAsyncRecordTex {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, "="}, {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "="}, {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesLoaded, "="}, - {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesUnloaded, "="}}; + {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesUnloaded, "="}, + {CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, "@"}}; //++ ------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord constructor. @@ -73,14 +75,30 @@ CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(const OutOfBand_e veType) // Details: CMICmnMIOutOfBandRecord constructor. // Type: Method. // Args: veType - (R) A MI Out-of-Bound enumeration. -// vMIResult - (R) A MI result object. +// vConst - (R) A MI const object. // Return: None. // Throws: None. //-- -CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueResult &vValue) +CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueConst &vConst) : m_eResultAsyncRecordClass(veType) , m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION)) - , m_partResult(vValue) +{ + BuildAsyncRecord(); + m_strAsyncRecord += vConst.GetString(); +} + +//++ ------------------------------------------------------------------------------------ +// Details: CMICmnMIOutOfBandRecord constructor. +// Type: Method. +// Args: veType - (R) A MI Out-of-Bound enumeration. +// vResult - (R) A MI result object. +// Return: None. +// Throws: None. +//-- +CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueResult &vResult) + : m_eResultAsyncRecordClass(veType) + , m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION)) + , m_partResult(vResult) { BuildAsyncRecord(); Add(m_partResult); @@ -136,16 +154,16 @@ CMICmnMIOutOfBandRecord::BuildAsyncRecord(void) //++ ------------------------------------------------------------------------------------ // Details: Add to *this Out-of-band record additional information. // Type: Method. -// Args: vMIValue - (R) A MI value derived object. +// Args: vResult - (R) A MI result object. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. //-- bool -CMICmnMIOutOfBandRecord::Add(const CMICmnMIValue &vMIValue) +CMICmnMIOutOfBandRecord::Add(const CMICmnMIValueResult &vResult) { m_strAsyncRecord += ","; - m_strAsyncRecord += vMIValue.GetString(); + m_strAsyncRecord += vResult.GetString(); return MIstatus::success; } diff --git a/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h b/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h index 4130f845f6a..b32465fc395 100644 --- a/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h +++ b/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h @@ -15,6 +15,7 @@ // In-house headers: #include "MICmnBase.h" #include "MIUtilString.h" +#include "MICmnMIValueConst.h" #include "MICmnMIValueResult.h" //++ ============================================================================ @@ -63,6 +64,7 @@ class CMICmnMIOutOfBandRecord : public CMICmnBase eOutOfBand_ThreadSelected, eOutOfBand_TargetModulesLoaded, eOutOfBand_TargetModulesUnloaded, + eOutOfBand_TargetStreamOutput, eOutOfBand_count // Always the last one }; @@ -75,10 +77,11 @@ class CMICmnMIOutOfBandRecord : public CMICmnBase public: /* ctor */ CMICmnMIOutOfBandRecord(void); /* ctor */ CMICmnMIOutOfBandRecord(const OutOfBand_e veType); - /* ctor */ CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueResult &vValue); + /* ctor */ CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueConst &vConst); + /* ctor */ CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueResult &vResult); // const CMIUtilString &GetString(void) const; - bool Add(const CMICmnMIValue &vMIValue); + bool Add(const CMICmnMIValueResult &vResult); // Overridden: public: |