diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
commit | 14f1b3e8826ce43b978db93a62d1166055db5394 (patch) | |
tree | 0a00ad8d3498783fe0193f3b656bca17c4c8697d /tools/lldb-mi/MICmnMIOutOfBandRecord.cpp | |
parent | 4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff) | |
download | src-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz src-14f1b3e8826ce43b978db93a62d1166055db5394.zip |
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=311128
svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'tools/lldb-mi/MICmnMIOutOfBandRecord.cpp')
-rw-r--r-- | tools/lldb-mi/MICmnMIOutOfBandRecord.cpp | 231 |
1 files changed, 115 insertions, 116 deletions
diff --git a/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp b/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp index e633e5a61fa9..66a44e6084b1 100644 --- a/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp +++ b/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp @@ -16,99 +16,98 @@ // Instantiations: static const char * -MapOutOfBandToText(CMICmnMIOutOfBandRecord::OutOfBand_e veType) -{ - switch (veType) - { - case CMICmnMIOutOfBandRecord::eOutOfBand_Running: - return "running"; - case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped: - return "stopped"; - case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated: - return "breakpoint-created"; - case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified: - return "breakpoint-modified"; - case CMICmnMIOutOfBandRecord::eOutOfBand_Thread: - return ""; // "" Meant to be empty - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded: - return "thread-group-added"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited: - return "thread-group-exited"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved: - return "thread-group-removed"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted: - return "thread-group-started"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated: - return "thread-created"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited: - return "thread-exited"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected: - return "thread-selected"; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded: - return "library-loaded"; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded: - return "library-unloaded"; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput: - return ""; - } - assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e"); - return NULL; +MapOutOfBandToText(CMICmnMIOutOfBandRecord::OutOfBand_e veType) { + switch (veType) { + case CMICmnMIOutOfBandRecord::eOutOfBand_Running: + return "running"; + case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped: + return "stopped"; + case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated: + return "breakpoint-created"; + case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified: + return "breakpoint-modified"; + case CMICmnMIOutOfBandRecord::eOutOfBand_Thread: + return ""; // "" Meant to be empty + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded: + return "thread-group-added"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited: + return "thread-group-exited"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved: + return "thread-group-removed"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted: + return "thread-group-started"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated: + return "thread-created"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited: + return "thread-exited"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected: + return "thread-selected"; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded: + return "library-loaded"; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded: + return "library-unloaded"; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput: + return ""; + } + assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e"); + return NULL; } static const char * -MapOutOfBandToToken(CMICmnMIOutOfBandRecord::OutOfBand_e veType) -{ - switch (veType) - { - case CMICmnMIOutOfBandRecord::eOutOfBand_Running: - return "*"; - case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped: - return "*"; - case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_Thread: - return "@"; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded: - return "="; - case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput: - return "@"; - } - assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e"); - return NULL; +MapOutOfBandToToken(CMICmnMIOutOfBandRecord::OutOfBand_e veType) { + switch (veType) { + case CMICmnMIOutOfBandRecord::eOutOfBand_Running: + return "*"; + case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped: + return "*"; + case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_Thread: + return "@"; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded: + return "="; + case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput: + return "@"; + } + assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e"); + return NULL; } -//++ ------------------------------------------------------------------------------------ -// Details: Build the Out-of-band record's mandatory data part. The part up to the first +//++ +//------------------------------------------------------------------------------------ +// Details: Build the Out-of-band record's mandatory data part. The part up to +// the first // (additional) result i.e. async-record ==> "*" type. // Args: veType - (R) A MI Out-of-Band enumeration. // Return: CMIUtilString - The async record text. // Throws: None. //-- static CMIUtilString -BuildAsyncRecord(CMICmnMIOutOfBandRecord::OutOfBand_e veType) -{ - return CMIUtilString::Format("%s%s", MapOutOfBandToToken(veType), MapOutOfBandToText(veType)); +BuildAsyncRecord(CMICmnMIOutOfBandRecord::OutOfBand_e veType) { + return CMIUtilString::Format("%s%s", MapOutOfBandToToken(veType), + MapOutOfBandToText(veType)); } -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord constructor. // Type: Method. // Args: None. @@ -116,11 +115,10 @@ BuildAsyncRecord(CMICmnMIOutOfBandRecord::OutOfBand_e veType) // Throws: None. //-- CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord() - : m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION)) -{ -} + : m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION)) {} -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord constructor. // Type: Method. // Args: veType - (R) A MI Out-of-Bound enumeration. @@ -128,11 +126,10 @@ CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord() // Throws: None. //-- CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType) - : m_strAsyncRecord(BuildAsyncRecord(veType)) -{ -} + : m_strAsyncRecord(BuildAsyncRecord(veType)) {} -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord constructor. // Type: Method. // Args: veType - (R) A MI Out-of-Bound enumeration. @@ -140,13 +137,14 @@ CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType) // Return: None. // Throws: None. //-- -CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType, const CMICmnMIValueConst &vConst) - : m_strAsyncRecord(BuildAsyncRecord(veType)) -{ - m_strAsyncRecord += vConst.GetString(); +CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord( + OutOfBand_e veType, const CMICmnMIValueConst &vConst) + : m_strAsyncRecord(BuildAsyncRecord(veType)) { + m_strAsyncRecord += vConst.GetString(); } -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord constructor. // Type: Method. // Args: veType - (R) A MI Out-of-Bound enumeration. @@ -154,49 +152,50 @@ CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType, const CMICm // Return: None. // Throws: None. //-- -CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType, const CMICmnMIValueResult &vResult) - : m_strAsyncRecord(BuildAsyncRecord(veType)) -{ - Add(vResult); +CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord( + OutOfBand_e veType, const CMICmnMIValueResult &vResult) + : m_strAsyncRecord(BuildAsyncRecord(veType)) { + Add(vResult); } -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMICmnMIOutOfBandRecord destructor. // Type: Overrideable. // Args: None. // Return: None. // Throws: None. //-- -CMICmnMIOutOfBandRecord::~CMICmnMIOutOfBandRecord() -{ -} +CMICmnMIOutOfBandRecord::~CMICmnMIOutOfBandRecord() {} -//++ ------------------------------------------------------------------------------------ -// Details: Return the MI Out-of-band record as a string. The string is a direct result of -// work done on *this Out-of-band record so if not enough data is added then it is -// possible to return a malformed Out-of-band record. If nothing has been set or -// added to *this MI Out-of-band record object then text "<Invalid>" will be returned. +//++ +//------------------------------------------------------------------------------------ +// Details: Return the MI Out-of-band record as a string. The string is a direct +// result of +// work done on *this Out-of-band record so if not enough data is added +// then it is +// possible to return a malformed Out-of-band record. If nothing has +// been set or +// added to *this MI Out-of-band record object then text "<Invalid>" +// will be returned. // Type: Method. // Args: None. // Return: CMIUtilString & - MI output text. // Throws: None. //-- -const CMIUtilString & -CMICmnMIOutOfBandRecord::GetString() const -{ - return m_strAsyncRecord; +const CMIUtilString &CMICmnMIOutOfBandRecord::GetString() const { + return m_strAsyncRecord; } -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: Add to *this Out-of-band record additional information. // Type: Method. // Args: vResult - (R) A MI result object. // Return: None. // Throws: None. //-- -void -CMICmnMIOutOfBandRecord::Add(const CMICmnMIValueResult &vResult) -{ - m_strAsyncRecord += ","; - m_strAsyncRecord += vResult.GetString(); +void CMICmnMIOutOfBandRecord::Add(const CMICmnMIValueResult &vResult) { + m_strAsyncRecord += ","; + m_strAsyncRecord += vResult.GetString(); } |