diff options
author | Jim Ingham <jingham@apple.com> | 2022-08-31 10:13:05 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2022-09-13 11:02:47 -0700 |
commit | 6c089b2af5d8d98f66b27b67f70958f520820a76 (patch) | |
tree | 575e84076bd5fa53e04744d3c54b1be35a9e8e13 /lldb/source/Interpreter/CommandObject.cpp | |
parent | bfc550a361f0c93fb81bfd8e37b07515696e9ee0 (diff) | |
download | llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.zip llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.tar.gz llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.tar.bz2 |
Be more careful to maintain quoting information when parsing commands.
This is particularly a problem for alias construction, where you might
want to have a backtick surrounded option in the alias. Before this
patch:
command alias expression -Z \`argc\` -- argv
for instance would be rendered as:
expression -Z argc -- argv
and would fail to work.
Differential Revision: https://reviews.llvm.org/D133045
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 5ab3392..4500378 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -727,7 +727,7 @@ bool CommandObjectParsed::Execute(const char *args_string, } if (!handled) { for (auto entry : llvm::enumerate(cmd_args.entries())) { - if (!entry.value().ref().empty() && entry.value().ref().front() == '`') { + if (!entry.value().ref().empty() && entry.value().GetQuoteChar() == '`') { cmd_args.ReplaceArgumentAtIndex( entry.index(), m_interpreter.ProcessEmbeddedScriptCommands(entry.value().c_str())); |