summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-04-04 22:46:38 +0000
committerEnrico Granata <egranata@apple.com>2016-04-04 22:46:38 +0000
commit7a37df3fc3b39774004b9e8fcfdc86b579a40c1e (patch)
treef0ba6a675c494e4a7c553397a242b1d0c8fcca42 /lldb/packages/Python/lldbsuite/test
parent769b5fd546c55a1c37cb037e3fe6c249b953b1c3 (diff)
downloadbcm5719-llvm-7a37df3fc3b39774004b9e8fcfdc86b579a40c1e.tar.gz
bcm5719-llvm-7a37df3fc3b39774004b9e8fcfdc86b579a40c1e.zip
Improve the way LLDB escapes arguments before passing them to the shell
Teach LLDB that different shells have different characters they are sensitive to, and use that knowledge to do shell-aware escaping This helps solve a class of problems on OS X where LLDB would try to launch via sh, and run into problems if the command line being passed to the inferior contained such special markers (hint: the shell would error out and we'd fail to launch) This makes those launch scenarios work transparently via shell expansion Slightly improve the error message when this kind of failure occurs to at least suggest that the user try going through 'process launch' directly Fixes rdar://problem/22749408 llvm-svn: 265357
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
index fa90d79b82d..28d8cccacfc 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
@@ -30,7 +30,7 @@ class LaunchWithShellExpandTestCase(TestBase):
breakpoint = target.BreakpointCreateBySourceRegex ('break here', lldb.SBFileSpec ("main.cpp", False))
self.assertTrue(breakpoint, VALID_BREAKPOINT)
- self.runCmd("process launch -X true -w %s -- fi*.tx?" % (os.getcwd()))
+ self.runCmd("process launch -X true -w %s -- fi*.tx? () > <" % (os.getcwd()))
process = self.process()
@@ -51,7 +51,11 @@ class LaunchWithShellExpandTestCase(TestBase):
self.expect("frame variable argv[2]", substrs=['file2.txt'])
self.expect("frame variable argv[3]", substrs=['file3.txt'])
self.expect("frame variable argv[4]", substrs=['file4.txy'])
+ self.expect("frame variable argv[5]", substrs=['()'])
+ self.expect("frame variable argv[6]", substrs=['>'])
+ self.expect("frame variable argv[7]", substrs=['<'])
self.expect("frame variable argv[5]", substrs=['file5.tyx'], matching=False)
+ self.expect("frame variable argv[8]", substrs=['file5.tyx'], matching=False)
self.runCmd("process kill")
OpenPOWER on IntegriCloud