[Lldb-commits] [PATCH] D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 7 13:25:36 PDT 2018


clayborg added inline comments.


================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:248
     }
-  } else {
-    // 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 char *pLldbErr = m_lldbResult.GetError();
-    const CMIUtilString strLldbMsg(CMIUtilString(pLldbErr).StripCREndOfLine());
-    if (strLldbMsg == "error: Process must be launched.") {
-      CMIDriver::Instance().SetExitApplicationFlag(true);
-    }
-  }
+  } else m_lldbResult.SetError(error.GetCString());
 
----------------
An error can claim to fail but not have an error string set. It might be nice to have a helper function that checks to make sure there is an error string on error cases and if there is no error string when error.Success() is false or error.Fail() is true, then set the error string to "unknown error". 


https://reviews.llvm.org/D47415





More information about the lldb-commits mailing list