aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
downloadsrc-5e95aa85bb660d45e9905ef1d7180b2678280660.tar.gz
src-5e95aa85bb660d45e9905ef1d7180b2678280660.zip
Import LLDB as of upstream SVN 241361 (git 612c075f)vendor/lldb/lldb-r241361
Notes
Notes: svn path=/vendor/lldb/dist/; revision=285101 svn path=/vendor/lldb/lldb-r241361/; revision=285102; tag=vendor/lldb/lldb-r241361
Diffstat (limited to 'tools/lldb-mi/MICmnMIOutOfBandRecord.cpp')
-rw-r--r--tools/lldb-mi/MICmnMIOutOfBandRecord.cpp52
1 files changed, 31 insertions, 21 deletions
diff --git a/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp b/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
index 2977753038a6..84c6695de354 100644
--- a/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
+++ b/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
@@ -7,18 +7,6 @@
//
//===----------------------------------------------------------------------===//
-//++
-// File: MICmnMIOutOfBandRecord.h
-//
-// Overview: CMICmnMIOutOfBandRecord implementation.
-//
-// Environment: Compilers: Visual C++ 12.
-// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
-// Libraries: See MIReadmetxt.
-//
-// Copyright: None.
-//--
-
// In-house headers:
#include "MICmnMIOutOfBandRecord.h"
#include "MICmnResources.h"
@@ -36,7 +24,10 @@ CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_MapOutOfBandToOutOfBan
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, "thread-group-started"},
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated, "thread-created"},
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, "thread-exited"},
- {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "thread-selected"}};
+ {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "thread-selected"},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded, "library-loaded"},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded, "library-unloaded"},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, ""}};
CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_constMapAsyncRecordTextToToken = {
{CMICmnMIOutOfBandRecord::eOutOfBand_Running, "*"},
{CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, "*"},
@@ -49,7 +40,10 @@ CMICmnMIOutOfBandRecord::MapOutOfBandToOutOfBandText_t ms_constMapAsyncRecordTex
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, "="},
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated, "="},
{CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, "="},
- {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "="}};
+ {CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, "="},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded, "="},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded, "="},
+ {CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, "@"}};
//++ ------------------------------------------------------------------------------------
// Details: CMICmnMIOutOfBandRecord constructor.
@@ -81,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 CMICmnMIValueConst &vConst)
+ : m_eResultAsyncRecordClass(veType)
+ , m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION))
+{
+ 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 &vValue)
+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(vValue)
+ , m_partResult(vResult)
{
BuildAsyncRecord();
Add(m_partResult);
@@ -133,7 +143,7 @@ CMICmnMIOutOfBandRecord::GetString(void) const
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());
@@ -144,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;
}