summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MIUtilString.h
diff options
context:
space:
mode:
authorIlia K <ki.stfu@gmail.com>2015-02-26 18:14:30 +0000
committerIlia K <ki.stfu@gmail.com>2015-02-26 18:14:30 +0000
commitda86749a92f60e63aadd25a3cfed173a1cb189e4 (patch)
treea93a25d62a8fd6ecb4df95f8f39c69e6a73ee4f6 /lldb/tools/lldb-mi/MIUtilString.h
parent28a3b86b069c05418234bd16890843ca400b8639 (diff)
downloadbcm5719-llvm-da86749a92f60e63aadd25a3cfed173a1cb189e4.tar.gz
bcm5719-llvm-da86749a92f60e63aadd25a3cfed173a1cb189e4.zip
Fix process's output to stdout/stderr (MI)
Summary: * Add CMIUtilString::Escape/Unescape methods (MI) * Fix process's output to stdout/stderr (MI): lldb-mi escapes process's output to show it in the following format: ``` ~"..." ``` But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of ``` printf("'\n` - it's \\n\x12\"\\\"") ``` looked like: ``` ~"'\r\n` - it's \n"\"" ``` This patch fixes it by using CMIUtilString::Escape method and now it looks like: ``` ~"'\r\n` - it's \\n\x12\"\\\"" ``` Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: zturner, lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7858 llvm-svn: 230652
Diffstat (limited to 'lldb/tools/lldb-mi/MIUtilString.h')
-rw-r--r--lldb/tools/lldb-mi/MIUtilString.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/tools/lldb-mi/MIUtilString.h b/lldb/tools/lldb-mi/MIUtilString.h
index 37f3092441b..54a0f7704c0 100644
--- a/lldb/tools/lldb-mi/MIUtilString.h
+++ b/lldb/tools/lldb-mi/MIUtilString.h
@@ -72,6 +72,7 @@ class CMIUtilString : public std::string
MIuint FindFirst(const CMIUtilString &vrPattern, const bool vbSkipQuotedText, bool &vrwbNotFoundClosedQuote,
const MIuint vnPos = 0) const;
MIuint FindFirstNot(const CMIUtilString &vrPattern, const MIuint vnPos = 0) const;
+ CMIUtilString Escape(const bool vbEscapeQuotes = false) const;
//
CMIUtilString &operator=(const MIchar *vpRhs);
CMIUtilString &operator=(const std::string &vrRhs);
OpenPOWER on IntegriCloud