summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MIDriver.cpp
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-03-18 10:07:46 +0000
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-03-18 10:07:46 +0000
commit4a7baeab14a9f991752879bdc85ad4bf684cdf46 (patch)
tree39edcaaeec0f8c052b762bbfb928aa4a1c80178c /lldb/tools/lldb-mi/MIDriver.cpp
parent61984d39d57245db68a5b08d76e268617cf9e43c (diff)
downloadbcm5719-llvm-4a7baeab14a9f991752879bdc85ad4bf684cdf46.tar.gz
bcm5719-llvm-4a7baeab14a9f991752879bdc85ad4bf684cdf46.zip
Make lldb-mi handle only MI commands
Summary: Previously lldb-mi can also act as a driver like normal lldb. It needed a lot of redundant code in the lldb-mi for that. I think that if a user wants command line lldb driver then he/she should use the lldb for it. This change will cleanup the code a lot. When this change goes in, it will allow us to remove some more redundant code too. All tests pass on Linux. Did some sanity testing on command line and with eclipse. Reviewers: ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8381 llvm-svn: 232621
Diffstat (limited to 'lldb/tools/lldb-mi/MIDriver.cpp')
-rw-r--r--lldb/tools/lldb-mi/MIDriver.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/lldb/tools/lldb-mi/MIDriver.cpp b/lldb/tools/lldb-mi/MIDriver.cpp
index fe80a6cefb8..43ba99a258f 100644
--- a/lldb/tools/lldb-mi/MIDriver.cpp
+++ b/lldb/tools/lldb-mi/MIDriver.cpp
@@ -175,22 +175,6 @@ CMIDriver::Initialize(void)
bOk &= m_rLldbDebugger.SetDriver(*this);
MI::ModuleInit<CMICmnLLDBDebugger>(IDS_MI_INIT_ERR_LLDBDEBUGGER, bOk, errMsg);
-#if MICONFIG_COMPILE_MIDRIVER_WITH_LLDBDRIVER
- CMIDriverMgr &rDrvMgr = CMIDriverMgr::Instance();
- bOk = bOk && rDrvMgr.RegisterDriver(*g_driver, "LLDB driver"); // Will be pass thru driver
- if (bOk)
- {
- bOk = SetEnableFallThru(false); // This is intentional at this time - yet to be fully implemented
- bOk = bOk && SetDriverToFallThruTo(*g_driver);
- CMIUtilString strOtherDrvErrMsg;
- if (bOk && GetEnableFallThru() && !g_driver->MISetup(strOtherDrvErrMsg))
- {
- bOk = false;
- errMsg = CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_FALLTHRUDRIVER), strOtherDrvErrMsg.c_str());
- }
- }
-#endif // MICONFIG_COMPILE_MIDRIVER_WITH_LLDBDRIVER
-
m_bExitApp = false;
m_bInitialized = bOk;
@@ -403,8 +387,8 @@ CMIDriver::DoParseArgs(const int argc, const char *argv[], FILE *vpStdOut, bool
// that are only handled by *this driver:
// --executable
// The application's options --interpreter and --executable in code act very similar.
-// The --executable is necessary to differentiate whither the MI Driver is being
-// using by a client i.e. Eclipse or from the command line. Eclipse issues the option
+// The --executable is necessary to differentiate whether the MI Driver is being
+// used by a client i.e. Eclipse or from the command line. Eclipse issues the option
// --interpreter and also passes additional arguments which can be interpreted as an
// executable if called from the command line. Using --executable tells the MI
// Driver is being called the command line and that the executable argument is indeed
@@ -461,13 +445,7 @@ CMIDriver::ParseArgs(const int argc, const char *argv[], FILE *vpStdOut, bool &v
if (bHaveExecutableFileNamePath && bHaveExecutableLongOption)
{
-// CODETAG_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
-#if MICONFIG_ENABLE_MI_DRIVER_MI_MODE_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
SetDriverDebuggingArgExecutable();
-#else
- vwbExiting = true;
- errStatus.SetErrorString(MIRSRC(IDS_DRIVER_ERR_LOCAL_DEBUG_NOT_IMPL));
-#endif // MICONFIG_ENABLE_MI_DRIVER_MI_MODE_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
}
return errStatus;
@@ -554,8 +532,6 @@ CMIDriver::DoMainLoop(void)
// App is not quitting currently
m_bExitApp = false;
-// CODETAG_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
-#if MICONFIG_ENABLE_MI_DRIVER_MI_MODE_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
if (HaveExecutableFileNamePathOnCmdLine())
{
if (!LocalDebugSessionStartupExecuteCommands())
@@ -564,7 +540,6 @@ CMIDriver::DoMainLoop(void)
return MIstatus::failure;
}
}
-#endif // MICONFIG_ENABLE_MI_DRIVER_MI_MODE_CMDLINE_ARG_EXECUTABLE_DEBUG_SESSION
// While the app is active
while (!m_bExitApp)
OpenPOWER on IntegriCloud