Fix CMIUtilString::SplitConsiderQuotes (MI)
authorIlia K <ki.stfu@gmail.com>
Wed, 11 Feb 2015 04:52:54 +0000 (04:52 +0000)
committerIlia K <ki.stfu@gmail.com>
Wed, 11 Feb 2015 04:52:54 +0000 (04:52 +0000)
commit98bdc6418fccdada985cb267935db0f6eae4cf9e
treede1ee7036613d403cce40f56f3ade0ff9133168e
parent81b5c668ac649bbdbf9dc7e4aab2528f4590d421
Fix CMIUtilString::SplitConsiderQuotes (MI)

Summary:
This method doesn't work properly. Here is an example:
```
CMIUtilString test("\"hello\" \"\\\" world \\\" !\"");
CMIUtilString::VecString_t res;
test.SplitConsiderQuotes(" ", res);
```

Before this patch the result was as following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=4 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\"")
  [2] = (std::__1::string = "world")
  [3] = (std::__1::string = "\\\" !\"")
}
```

This patch fixes that error and now it looks like following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=2 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\" world \\\" !\"")
}
```

Reviewers: abidh, emaste, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, emaste, clayborg, abidh

Differential Revision: http://reviews.llvm.org/D7532

llvm-svn: 228802
lldb/tools/lldb-mi/MIUtilString.cpp
lldb/tools/lldb-mi/MIUtilString.h