summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py10
-rw-r--r--lldb/tools/lldb-mi/MIDriver.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py b/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
index 692082d874d..d1e5cf52bfa 100644
--- a/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
+++ b/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
@@ -40,15 +40,15 @@ class MiSyntaxTestCase(lldbmi_testcase.MiTestCaseBase):
def test_lldbmi_specialchars(self):
"""Test that 'lldb-mi --interpreter' handles complicated strings."""
- self.spawnLldbMi(args = None)
-
- # Create alias for myexe
+ # Create an alias for myexe
complicated_myexe = "C--mpl-x file's`s @#$%^&*()_+-={}[]| name"
os.symlink(self.myexe, complicated_myexe)
self.addTearDownHook(lambda: os.unlink(complicated_myexe))
- # Try to load executable with complicated filename
- self.runCmd("-file-exec-and-symbols \"%s\"" % complicated_myexe)
+ self.spawnLldbMi(args = "\"%s\"" % complicated_myexe)
+
+ # Test that the executable was loaded
+ self.expect("-file-exec-and-symbols \"%s\"" % complicated_myexe, exactly = True)
self.expect("\^done")
# Check that it was loaded correctly
diff --git a/lldb/tools/lldb-mi/MIDriver.cpp b/lldb/tools/lldb-mi/MIDriver.cpp
index 21182af3c95..0aba6501c2f 100644
--- a/lldb/tools/lldb-mi/MIDriver.cpp
+++ b/lldb/tools/lldb-mi/MIDriver.cpp
@@ -417,7 +417,7 @@ CMIDriver::ParseArgs(const int argc, const char *argv[], FILE *vpStdOut, bool &v
if (argFile.IsFilePath(strArg) || CMICmdArgValString(true, false, true).IsStringArg(strArg))
{
bHaveExecutableFileNamePath = true;
- m_strCmdLineArgExecuteableFileNamePath = argFile.GetFileNamePath(strArg);
+ m_strCmdLineArgExecuteableFileNamePath = strArg;
m_bHaveExecutableFileNamePathOnCmdLine = true;
}
// This argument is also check for in CMIDriverMgr::ParseArgs()
OpenPOWER on IntegriCloud