[Lldb-commits] [lldb] r333140 - Add a --synchronous option to lldb-mi to facilitate reliable testing.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed May 23 16:33:51 PDT 2018
Author: adrian
Date: Wed May 23 16:33:50 2018
New Revision: 333140
URL: http://llvm.org/viewvc/llvm-project?rev=333140&view=rev
Log:
Add a --synchronous option to lldb-mi to facilitate reliable testing.
Patch by Alexander Polyakov!
Differential Revision: https://reviews.llvm.org/D47110
Modified:
lldb/trunk/tools/lldb-mi/MICmnResources.cpp
lldb/trunk/tools/lldb-mi/MICmnResources.h
lldb/trunk/tools/lldb-mi/MIDriver.cpp
lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp
Modified: lldb/trunk/tools/lldb-mi/MICmnResources.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnResources.cpp?rev=333140&r1=333139&r2=333140&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnResources.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnResources.cpp Wed May 23 16:33:50 2018
@@ -110,6 +110,8 @@ const CMICmnResources::SRsrcTextData
{IDE_MI_APP_ARG_EXECUTABLE, "executable (NOT IMPLEMENTED)\n\tThe file "
"path to the executable i.e. '\"C:\\My "
"Dev\\foo.exe\"'."},
+ {IDE_MI_APP_ARG_SYNCHRONOUS, "--synchronous\n\tBlock until each command "
+ "has finished executing.\n\tUsed for testing only."},
{IDS_STDIN_ERR_INVALID_PROMPT,
"Stdin. Invalid prompt description '%s'"},
{IDS_STDIN_ERR_THREAD_CREATION_FAILED,
Modified: lldb/trunk/tools/lldb-mi/MICmnResources.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnResources.h?rev=333140&r1=333139&r2=333140&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnResources.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnResources.h Wed May 23 16:33:50 2018
@@ -77,6 +77,7 @@ enum {
IDE_MI_APP_ARG_APP_LOG_DIR,
IDE_MI_APP_ARG_EXAMPLE,
IDE_MI_APP_ARG_EXECUTABLE,
+ IDE_MI_APP_ARG_SYNCHRONOUS,
IDS_STDIN_ERR_INVALID_PROMPT,
IDS_STDIN_ERR_THREAD_CREATION_FAILED,
Modified: lldb/trunk/tools/lldb-mi/MIDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIDriver.cpp?rev=333140&r1=333139&r2=333140&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIDriver.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIDriver.cpp Wed May 23 16:33:50 2018
@@ -382,6 +382,7 @@ lldb::SBError CMIDriver::DoParseArgs(con
// that are only handled by *this driver:
// --executable <file>
// --source <file> or -s <file>
+// --synchronous
// The application's options --interpreter and --executable in code act
// very similar.
// The --executable is necessary to differentiate whether the MI Driver
@@ -397,6 +398,7 @@ lldb::SBError CMIDriver::DoParseArgs(con
// argument for a debug session. Using --interpreter on the command
// line does not
// issue additional commands to initialise a debug session.
+// Option --synchronous disables an asynchronous mode in the lldb-mi driver.
// Type: Overridden.
// Args: argc - (R) An integer that contains the count of arguments
// that follow in
@@ -469,6 +471,8 @@ lldb::SBError CMIDriver::ParseArgs(const
// command line
{ // See fn description.
bHaveExecutableLongOption = true;
+ } else if (strArg.compare("--synchronous") == 0) {
+ CMICmnLLDBDebugSessionInfo::Instance().GetDebugger().SetAsync(false);
}
}
}
Modified: lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp?rev=333140&r1=333139&r2=333140&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp Wed May 23 16:33:50 2018
@@ -640,6 +640,7 @@ CMIUtilString CMIDriverMgr::GetHelpOnCmd
MIRSRC(IDE_MI_APP_ARG_VERSION), MIRSRC(IDE_MI_APP_ARG_VERSION_LONG),
MIRSRC(IDE_MI_APP_ARG_INTERPRETER), MIRSRC(IDE_MI_APP_ARG_SOURCE),
MIRSRC(IDE_MI_APP_ARG_EXECUTEABLE),
+ MIRSRC(IDE_MI_APP_ARG_SYNCHRONOUS),
CMIUtilString::Format(
MIRSRC(IDE_MI_APP_ARG_APP_LOG),
CMICmnLogMediumFile::Instance().GetFileName().c_str()),
More information about the lldb-commits
mailing list