diff options
author | Jim Ingham <jingham@apple.com> | 2012-07-21 00:12:58 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-07-21 00:12:58 +0000 |
commit | a39fb7a4e13fb5938a1b733ff50ad06bcf7c5eeb (patch) | |
tree | 0bed40391adaf16402f84222ba7c66288ecf8ea2 /lldb/source/Interpreter/Args.cpp | |
parent | d3957e57f6591cf80ce5488d9d20fc8e911d4f5b (diff) | |
download | bcm5719-llvm-a39fb7a4e13fb5938a1b733ff50ad06bcf7c5eeb.tar.gz bcm5719-llvm-a39fb7a4e13fb5938a1b733ff50ad06bcf7c5eeb.zip |
Handle backslash protection inside unquoted commands like:
(lldb) file hello\ world
correctly.
<rdar://problem/11093911>
llvm-svn: 160591
Diffstat (limited to 'lldb/source/Interpreter/Args.cpp')
-rw-r--r-- | lldb/source/Interpreter/Args.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp index a6eb1f01bef..5b3b6797891 100644 --- a/lldb/source/Interpreter/Args.cpp +++ b/lldb/source/Interpreter/Args.cpp @@ -230,7 +230,18 @@ Args::SetCommandString (const char *command) break; default: - arg_pos = arg_end + 2; + if (quote_char == '\0') + { + arg.append (arg_piece_start, arg_end - arg_piece_start); + if (arg_end + 1 != '\0') + { + arg.append (arg_end + 1, 1); + arg_pos = arg_end + 2; + arg_piece_start = arg_pos; + } + } + else + arg_pos = arg_end + 2; break; } break; |