[all-commits] [llvm/llvm-project] 5205c1: [lldb] Fix escaping when launching in terminal wit...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Wed Apr 27 16:45:48 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5205c1774950b62dd410c69474295cd0f9351c7d
https://github.com/llvm/llvm-project/commit/5205c1774950b62dd410c69474295cd0f9351c7d
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2022-04-27 (Wed, 27 Apr 2022)
Changed paths:
M lldb/source/Host/macosx/objcxx/Host.mm
Log Message:
-----------
[lldb] Fix escaping when launching in terminal with AppleScript
Fix escaping when launching in terminal with AppleScript. The invocation
we're building up is wrapped in single quotes when passed to bash and
wrapped in double quotes for AppleScript.
Here's an example invocation with the new escaping:
tell application "Terminal"
activate
do script "/bin/bash -c 'arch -arch arm64 'darwin-debug'
--unix-socket=/tmp/dL2jSh --arch=arm64 --working-dir
\"/private/tmp/with spaces\" --disable-aslr -- \"foo\"
\"bar\" \"baz\" ; echo Process exited with status $?';exit"
end tell
Previously we were using unescaped single quotes which resulted in the
whole bash invocation being passed in pieces. That works most of the
time but breaks when you have a space in your current working directory
for example.
rdar://91870763
Differential revision: https://reviews.llvm.org/D124568
More information about the All-commits
mailing list