[Lldb-commits] [lldb] r247673 - [lldb-mi] Simplify CMICmnLLDBDebugSessionInfo::Shutdown.

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 03:36:08 PDT 2015


Author: brucem
Date: Tue Sep 15 05:36:08 2015
New Revision: 247673

URL: http://llvm.org/viewvc/llvm-project?rev=247673&view=rev
Log:
[lldb-mi] Simplify CMICmnLLDBDebugSessionInfo::Shutdown.

Summary:
* SharedDataDestroy couldn't fail, so no need to return a status.
* No need for status, so can remove error message. The error message
  wasn't displayed or used anywhere anyway.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12879

Modified:
    lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
    lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
    lldb/trunk/tools/lldb-mi/MICmnResources.cpp
    lldb/trunk/tools/lldb-mi/MICmnResources.h

Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp?rev=247673&r1=247672&r2=247673&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp Tue Sep 15 05:36:08 2015
@@ -99,16 +99,9 @@ CMICmnLLDBDebugSessionInfo::Shutdown()
     if (!m_bInitialized)
         return MIstatus::success;
 
-    bool bOk = MIstatus::success;
-    CMIUtilString errMsg;
-
     // Tidy up
-    bOk = SharedDataDestroy();
-    if (!bOk)
-    {
-        errMsg = MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE);
-        errMsg += "\n";
-    }
+    SharedDataDestroy();
+
     m_vecActiveThreadId.clear();
     CMICmnLLDBDebugSessionInfoVarObj::VarObjClear();
 
@@ -125,18 +118,15 @@ CMICmnLLDBDebugSessionInfo::Shutdown()
 //          stopped i.e. application shutdown.
 // Type:    Method.
 // Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
+// Return:  None.
 // Throws:  None.
 //--
-bool
+void
 CMICmnLLDBDebugSessionInfo::SharedDataDestroy()
 {
     m_mapIdToSessionData.Clear();
     m_vecVarObj.clear();
     m_mapBrkPtIdToBrkPtInfo.clear();
-
-    return MIstatus::success;
 }
 
 //++ ------------------------------------------------------------------------------------

Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h?rev=247673&r1=247672&r2=247673&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h Tue Sep 15 05:36:08 2015
@@ -143,7 +143,7 @@ class CMICmnLLDBDebugSessionInfo : publi
     // Variant type data which can be assigned and retrieved across all command instances
     template <typename T> bool SharedDataAdd(const CMIUtilString &vKey, const T &vData);
     template <typename T> bool SharedDataRetrieve(const CMIUtilString &vKey, T &vwData);
-    bool SharedDataDestroy();
+    void SharedDataDestroy();
 
     //  Common command required functionality
     bool AccessPath(const CMIUtilString &vPath, bool &vwbYesAccessible);

Modified: lldb/trunk/tools/lldb-mi/MICmnResources.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnResources.cpp?rev=247673&r1=247672&r2=247673&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnResources.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnResources.cpp Tue Sep 15 05:36:08 2015
@@ -141,8 +141,6 @@ const CMICmnResources::SRsrcTextData CMI
      "LLDB Out-of-band. %s. Event handler tried to set new MI Driver running state and failed. %s"},
     {IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
      "LLDB Out-of-band. '%s'. Number of valid breakpoint exceeded %d. Cannot create new breakpoint with ID %d"},
-    {IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE,
-     "LLDB debug session info. Release some or all of the data shared across command instances failed"},
     {IDS_DBGSESSION_ERR_SHARED_DATA_ADD, "LLDB debug session info. Failed to add '%s' data to the shared data command container"},
     {IDS_MI_SHTDWN_ERR_LOG, "Log. Error occurred during shutdown. %s"},
     {IDS_MI_SHUTDOWN_ERR, "Server shutdown failure. %s"},

Modified: lldb/trunk/tools/lldb-mi/MICmnResources.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnResources.h?rev=247673&r1=247672&r2=247673&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnResources.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnResources.h Tue Sep 15 05:36:08 2015
@@ -152,7 +152,6 @@ enum
     IDS_LLDBOUTOFBAND_ERR_SETNEWDRIVERSTATE,
     IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
 
-    IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE,
     IDS_DBGSESSION_ERR_SHARED_DATA_ADD,
 
     IDS_MI_SHTDWN_ERR_LOG,




More information about the lldb-commits mailing list